/* ─── JAW Distributors – Frontend Styles ─────────────────────────────────── */

:root {
    --dist-accent:     #A0415E;
    --dist-accent-dk:  #7d3049;
    --dist-bg:         #FFF3F7;
    --dist-text:       #2C000D;
    --dist-muted:      #666;
    --dist-border:     #e8c8d4;
    --dist-radius:     10px;
    --dist-shadow:     0 4px 24px rgba(160,65,94,.10);
    --dist-font-body:  'Manrope', 'Inter', sans-serif;
    --dist-font-head:  'ZT Neue Ralewe', 'Georgia', serif;
}

/* ─── Login page ─────────────────────────────────────────────────────────── */

.jaw-dist-login-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    background: #fff;
}

.jaw-dist-login-wrap {
    width: 100%;
    max-width: 460px;
}

.jaw-dist-card {
    background: #fff;
    border-radius: var(--dist-radius);
    box-shadow: var(--dist-shadow);
    padding: 40px 40px 36px;
    border: 1px solid var(--dist-border);
}

.jaw-dist-card h2 {
    font-family: var(--dist-font-head);
    font-size: 26px;
    font-weight: 500;
    color: var(--dist-text);
    margin: 0 0 6px;
}

.jaw-dist-card .jaw-dist-subtitle {
    font-size: 14px;
    color: var(--dist-muted);
    margin: 0 0 28px;
}

/* ─── Form elements ──────────────────────────────────────────────────────── */

.jaw-dist-form .form-row {
    margin-bottom: 18px;
}

.jaw-dist-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dist-text);
    margin-bottom: 6px;
    letter-spacing: .02em;
}

.jaw-dist-form input[type="text"],
.jaw-dist-form input[type="email"],
.jaw-dist-form input[type="tel"],
.jaw-dist-form input[type="url"],
.jaw-dist-form input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--dist-border);
    border-radius: 8px;
    font-family: var(--dist-font-body);
    font-size: 15px;
    color: var(--dist-text);
    background: #fff;
    transition: border-color .2s;
    box-sizing: border-box;
    outline: none;
}

.jaw-dist-form input:focus {
    border-color: var(--dist-accent);
    box-shadow: 0 0 0 3px rgba(160,65,94,.12);
}

.jaw-dist-form input.error {
    border-color: #dc2626;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.jaw-dist-btn {
    display: inline-block;
    width: 100%;
    padding: 13px 24px;
    background: var(--dist-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--dist-font-body);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    transition: background .2s, transform .1s;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.jaw-dist-btn:hover {
    background: var(--dist-accent-dk);
}

.jaw-dist-btn:active {
    transform: scale(.98);
}

.jaw-dist-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.jaw-dist-btn-outline {
    background: transparent;
    border: 1.5px solid var(--dist-accent);
    color: var(--dist-accent);
}

.jaw-dist-btn-outline:hover {
    background: var(--dist-bg);
}

/* ─── Alerts ─────────────────────────────────────────────────────────────── */

.jaw-dist-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 18px;
    display: none;
}

.jaw-dist-alert.show { display: block; }

.jaw-dist-alert-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

.jaw-dist-alert-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

/* ─── Divider ────────────────────────────────────────────────────────────── */

.jaw-dist-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--dist-muted);
    font-size: 13px;
}

.jaw-dist-divider::before,
.jaw-dist-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dist-border);
}

/* ─── Apply modal ────────────────────────────────────────────────────────── */

.jaw-dist-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44,0,13,.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

.jaw-dist-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.jaw-dist-modal {
    background: #fff;
    border-radius: var(--dist-radius);
    box-shadow: 0 20px 60px rgba(44,0,13,.2);
    padding: 40px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform .25s;
    position: relative;
}

.jaw-dist-modal-overlay.open .jaw-dist-modal {
    transform: translateY(0);
}

.jaw-dist-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--dist-muted);
    line-height: 1;
    padding: 4px;
}

.jaw-dist-modal-close:hover { color: var(--dist-text); }

.jaw-dist-modal h3 {
    font-family: var(--dist-font-head);
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 6px;
    color: var(--dist-text);
}

.jaw-dist-modal .jaw-dist-subtitle {
    font-size: 14px;
    color: var(--dist-muted);
    margin: 0 0 24px;
}

.jaw-dist-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ─── Portal – Hero ──────────────────────────────────────────────────────── */

.jaw-dist-hero {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    padding: 60px 0;
    border-bottom: 1px solid #e5e5e5;
}

.jaw-dist-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
}

.jaw-dist-hero-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.jaw-dist-hero-badge {
    display: inline-block;
    background: var(--dist-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 6px 14px;
    border-radius: 100px;
    width: fit-content;
}

.jaw-dist-hero h1 {
    font-family: var(--dist-font-head);
    font-size: 42px;
    font-weight: 700;
    color: var(--dist-text);
    margin: 0;
    line-height: 1.2;
}

.jaw-dist-hero-inner > p,
.jaw-dist-hero-content > p {
    font-size: 16px;
    color: var(--dist-muted);
    margin: 0;
    max-width: 580px;
    line-height: 1.6;
}

.jaw-dist-hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.jaw-dist-hero-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--dist-muted);
    text-decoration: none;
    transition: color .2s;
}

.jaw-dist-hero-logout:hover {
    color: var(--dist-text);
}

.jaw-dist-hero-stats {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 32px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    min-width: 240px;
}

.jaw-dist-hero-stats > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jaw-dist-hero-stat-label {
    font-size: 12px;
    color: var(--dist-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
}

.jaw-dist-hero-stat-value {
    font-family: var(--dist-font-head);
    font-size: 28px;
    font-weight: 700;
    color: var(--dist-text);
}

/* ─── Portal – Products section ──────────────────────────────────────────── */

.jaw-dist-products-section {
    padding: 64px 0;
    background: #fff;
}

.jaw-dist-products-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.jaw-dist-products-section .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.jaw-dist-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 36px;
    gap: 16px;
    flex-wrap: wrap;
}

.jaw-dist-section-header h2 {
    font-family: var(--dist-font-head);
    font-size: 32px;
    font-weight: 500;
    color: var(--dist-text);
    margin: 0;
}

.jaw-dist-section-header p {
    font-size: 14px;
    color: var(--dist-muted);
    margin: 0;
}

/* ─── Login/Set Password Pages ────────────────────────────────────────────── */

.jaw-dist-login-page,
.jaw-dist-set-password-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    padding-top: 0;
    background: #fff;
}

.jaw-dist-card {
    padding: 40px;
    width: 100%;
    max-width: 500px;
    margin: auto;
    box-shadow: 0 20px 60px rgba(44,0,13,.2);
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform .25s;
    position: relative;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .jaw-dist-products-section .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .jaw-dist-hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .jaw-dist-hero-stats {
        flex-direction: row;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .jaw-dist-card { padding: 28px 20px; }
    .jaw-dist-modal { padding: 28px 20px; }
    .jaw-dist-form-row-2 { grid-template-columns: 1fr; }
    .jaw-dist-hero h1 { font-size: 32px; }
    .jaw-dist-hero-inner { padding: 0 20px; }
    .jaw-dist-products-inner { padding: 0 20px; }
    .jaw-dist-products-section .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .jaw-dist-hero { padding: 48px 0 40px; }
    .jaw-dist-hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    .jaw-dist-products-section .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}
