:root {
    --brand-primary: #005eb8;
    --brand-dark: #003478;
    --brand-light: #4a9fd4;
    --brand-gradient-start: #0066cc;
    --brand-gradient-end: #003478;
    --text-dark: #1a1a1a;
    --text-muted: #555;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--white);
    color: var(--text-dark);
    min-height: 100vh;
}

.portal-header {
    background: var(--brand-dark);
    color: var(--white);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.portal-header .home-link {
    position: absolute;
    left: 24px;
    color: var(--white);
    text-decoration: none;
    font-size: 22px;
}

.portal-header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.portal-header-user {
    position: absolute;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.portal-header-user a {
    color: var(--white);
    text-decoration: none;
}

.portal-header-user a:hover { text-decoration: underline; }

.portal-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.distributor-switcher {
    background: #f4f8fc;
    border: 1px solid #dce8f5;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.distributor-form label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.distributor-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.distributor-controls select {
    min-width: 260px;
    padding: 10px 12px;
    border: 1px solid #c9c9c9;
    border-radius: 4px;
    font-size: 0.95rem;
    background: white;
}

.distributor-btn {
    width: auto;
    padding: 10px 18px;
}

.distributor-controls select:disabled option {
    color: #999;
}

.hero-banner {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.hero-text .tagline-small { font-size: 1rem; margin-bottom: 4px; }

.hero-text .tagline-main {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.15;
}

.hero-text .tagline-main .brand-word { color: var(--brand-primary); }

.hero-text .tagline-main .tagline-rest { color: var(--text-dark); }

.hero-text .tagline-sub {
    font-size: 1.35rem;
    color: var(--brand-primary);
    margin-top: 6px;
}

.hero-graphic {
    width: 220px;
    height: 120px;
    background:
        radial-gradient(circle at 20% 50%, var(--brand-light) 2px, transparent 2px),
        radial-gradient(circle at 40% 30%, var(--brand-primary) 2px, transparent 2px),
        radial-gradient(circle at 60% 70%, var(--brand-light) 2px, transparent 2px);
    background-size: 24px 24px;
    opacity: 0.85;
}

.greeting-section p { font-size: 1.05rem; margin-bottom: 12px; }

.section-divider {
    height: 3px;
    background: var(--brand-primary);
    border: none;
    margin-bottom: 28px;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 40px;
}

.nav-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    background: linear-gradient(135deg, var(--brand-gradient-start), var(--brand-gradient-end));
    border-radius: var(--radius);
    color: var(--white);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 52, 120, 0.28);
    transition: transform 0.15s ease;
}

.nav-card:hover { transform: translateY(-2px); }

.nav-card .icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-card .icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.quick-links-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.quick-links-header h2 {
    font-size: 1.05rem;
    font-weight: 600;
}

.portal-footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.82rem;
    border-top: 1px solid #eee;
}

/* Login */
.login-body {
    background: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
    min-height: 100vh;
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 8px;
}

.login-card h1 { font-size: 1.35rem; margin-bottom: 6px; }

.login-sub {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 20px;
}

.field { margin-bottom: 14px; }

.field label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #c9c9c9;
    border-radius: 4px;
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-brand {
    background: var(--brand-primary);
    color: white;
    width: 100%;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-error {
    background: #fef1f1;
    color: #ba0517;
    border: 1px solid #faced0;
}

@media (max-width: 900px) {
    .nav-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-banner { flex-direction: column; text-align: center; }
    .portal-header-user { position: static; margin-top: 8px; }
    .portal-header { flex-direction: column; }
}

.portal-header-user .hub-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.82rem;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 4px 10px;
    border-radius: 4px;
}

.portal-header-user .hub-link:hover { background: rgba(255,255,255,0.15); }

.hub-banner { margin-bottom: 24px; }

.partner-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.partner-picker-card { margin: 0; }

.partner-picker-btn {
    width: 100%;
    text-align: left;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px 24px;
    background: linear-gradient(135deg, var(--brand-gradient-start), var(--brand-gradient-end));
    border-radius: var(--radius);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease;
}

.partner-picker-btn:hover { transform: translateY(-2px); }

.partner-picker-disabled {
    padding: 28px 24px;
    background: #f3f3f3;
    border: 1px dashed #ccc;
    border-radius: var(--radius);
    color: #888;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.partner-picker-logo { font-size: 1.4rem; font-weight: 700; }
.partner-picker-title { font-size: 0.92rem; opacity: 0.95; }
.partner-picker-go { font-size: 0.85rem; margin-top: 8px; opacity: 0.9; }
.partner-picker-soon { font-size: 0.82rem; color: #999; font-style: italic; }

@media (max-width: 900px) {
    .partner-picker-grid { grid-template-columns: 1fr; }
}
