/* =====================================================
   UTILITIES
   ===================================================== */

.hidden {
    display: none !important;
}


/* =====================================================
   AUTH PAGE
   ===================================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: #f4f7fb;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}


/* =====================================================
   BRAND
   ===================================================== */

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.brand-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #2563eb;
    color: white;
    font-size: 30px;
    font-weight: bold;
}

.brand h1 {
    margin: 0;
    font-size: 28px;
    color: #1d4ed8;
}

.brand p {
    margin: 5px 0 0;
    color: #6b7280;
    font-size: 14px;
}


/* =====================================================
   HEADINGS & TEXT
   ===================================================== */

.auth-card h2 {
    margin: 0 0 8px;
    font-size: 23px;
    color: #111827;
}

.auth-card .muted {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 5px;
    line-height: 1.6;
}


/* =====================================================
   FORMS
   ===================================================== */

.auth-card form {
    margin-top: 20px;
}

.auth-card label {
    display: block;
    margin-top: 16px;
    margin-bottom: 7px;
    font-weight: bold;
    font-size: 14px;
    color: #374151;
}

.auth-card input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    font-size: 15px;
    background: #ffffff;
    transition: 0.2s;
    font-family: inherit;
    color: #111827;
}

.auth-card input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}


/* =====================================================
   BUTTONS
   ===================================================== */

.primary-btn {
    width: 100%;
    height: 50px;
    margin-top: 25px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    font-size: 16px;
    font-weight: bold;
    transition: 0.2s;
    cursor: pointer;
    font-family: inherit;
}

.primary-btn:hover {
    background: #1d4ed8;
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.link-btn {
    display: block;
    width: 100%;
    margin: 20px auto 0;
    border: none;
    background: transparent;
    color: #2563eb;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    padding: 5px;
}

.link-btn:hover {
    text-decoration: underline;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
    padding: 0;
    margin-bottom: 18px;
    cursor: pointer;
    font-family: inherit;
}

.back-btn:hover {
    text-decoration: underline;
}


/* =====================================================
   MESSAGES
   ===================================================== */

.message {
    min-height: 24px;
    margin: 15px 0 0;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
}

.message.success {
    color: #15803d;
}

.message.error {
    color: #dc2626;
}


/* =====================================================
   SELECTION SCREEN (شاشة اختيار الدور)
   ===================================================== */

#selectionView {
    text-align: center;
}

.selection-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 25px;
}

.selection-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 18px;
    padding: 28px 15px 22px;
    cursor: pointer;
    transition:
        border-color 0.2s,
        transform 0.15s,
        box-shadow 0.2s;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.selection-card:hover {
    border-color: #2563eb;
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
}

.selection-card:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
}

.selection-icon {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 5px;
}

.selection-card h3 {
    margin: 0;
    font-size: 20px;
    color: #111827;
    font-weight: 700;
}

.selection-card p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}


/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 500px) {

    .auth-page {
        padding: 15px;
    }

    .auth-card {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .brand-icon {
        width: 52px;
        height: 52px;
        font-size: 25px;
    }

    .brand h1 {
        font-size: 24px;
    }

    /* البطاقتان تترتبان عموديًا */
    .selection-cards {
        grid-template-columns: 1fr;
    }

    .selection-icon {
        font-size: 44px;
    }

    .selection-card {
        padding: 22px 15px 18px;
    }

    .selection-card h3 {
        font-size: 18px;
    }
}