* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f5f8;
    color: #142033;
}

a {
    text-decoration: none;
    color: inherit;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 260px;
    background: #0f2d63;
    color: #ffffff;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    margin: 0 0 6px 0;
    font-size: 28px;
}

.sidebar-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.sidebar-nav {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    color: #ffffff;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.14);
}

.content {
    flex: 1;
    padding: 32px;
}

.content-header {
    margin-bottom: 24px;
}

.content-header h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
}

.content-header p {
    margin: 0;
    color: #53627a;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(14, 31, 53, 0.08);
    margin-bottom: 20px;
}

.card h3 {
    margin-top: 0;
}

.analysis-form {
    display: flex;
    flex-direction: column;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d3dbe6;
    border-radius: 10px;
    background: #ffffff;
    font-size: 14px;
    color: #142033;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.full-width {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.primary-button,
.secondary-button {
    display: inline-block;
    border: none;
    border-radius: 10px;
    padding: 13px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.primary-button {
    background: #0f2d63;
    color: #ffffff;
}

.secondary-button {
    background: #e7ecf3;
    color: #142033;
}

.status-box {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
}

.status-box.success {
    background: #e7f8ec;
    color: #166534;
    border: 1px solid #b7ebc6;
}

.status-box.error {
    background: #ffe8e8;
    color: #991b1b;
    border: 1px solid #f3b6b6;
}

.hidden {
    display: none;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.product-list {
    display: grid;
    gap: 16px;
}

.product-card {
    border: 1px solid #e1e7ef;
    border-radius: 14px;
    padding: 18px;
    background: #fbfcfe;
}

.product-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.product-card-head h4 {
    margin: 0;
    font-size: 18px;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dbe8ff;
    color: #0f2d63;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 10px;
    color: #42526b;
    font-size: 14px;
}

.product-notes p {
    margin: 8px 0 0 0;
    color: #5b677b;
    white-space: pre-wrap;
}

.muted {
    color: #5b677b;
}

.login-container,
.page-container {
    max-width: 460px;
    margin: 80px auto;
    background: #ffffff;
    padding: 32px;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.error-message {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 8px;
    background: #ffe3e3;
    color: #a40000;
}

@media (max-width: 900px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .content {
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .section-head,
    .product-card-head {
        flex-direction: column;
        align-items: flex-start;
    }
}