/* ==========================================================================
   CLASSIC SOVEREIGN FULL-SCREEN AUTHENTICATION STYLESHEET
   ظ…ظ†ط¸ظˆظ…ط© ط¥ط¯ط§ط±ط© ظˆطھظˆط²ظٹط¹ ط§ظ„ظˆظ‚ظˆط¯ ط§ظ„ظˆط·ظ†ظٹط© â€” ظˆط§ط¬ظ‡ط© ط§ظ„ط¯ط®ظˆظ„ ط§ظ„ظƒظ„ط§ط³ظٹظƒظٹط© ط§ظ„ظپط§ط®ط±ط©
   image4 as full-page background with centered luxury login card
   ========================================================================== */

:root {
    /* Sovereign Deep Palette */
    --c-navy-950: #060b18;
    --c-navy-900: #0b152d;
    --c-navy-850: #0e1b38;
    --c-navy-800: #132448;
    --c-navy-700: #1a305f;
    --c-navy-600: #233e79;

    /* Heritage Burnished Gold Palette */
    --c-gold-900: #6a4f10;
    --c-gold-800: #876515;
    --c-gold-700: #aa811c;
    --c-gold-600: #c59b27;
    --c-gold-500: #d4af37;
    --c-gold-400: #e5c358;
    --c-gold-300: #f0d67d;
    --c-gold-200: #f8e9b2;
    --c-gold-100: #fcf6dc;
    --c-gold-50:  #fffdf6;

    /* Card Colors */
    --c-card-bg: rgba(6, 11, 24, 0.82);
    --c-text-main: #f0f4f8;
    --c-text-muted: #94a3b8;
    --c-text-subtle: #64748b;
    --c-border-subtle: rgba(197, 155, 39, 0.25);
    --c-border-gold: rgba(197, 155, 39, 0.5);

    /* Classical Typography */
    --font-primary: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-classic: 'Amiri', serif;
    --font-heading: 'Cairo', sans-serif;

    /* Shadows & Transitions */
    --shadow-classic-card: 0 30px 80px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(197, 155, 39, 0.3);
    --shadow-gold-focus: 0 0 0 3.5px rgba(197, 155, 39, 0.3);
    --trans-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    min-height: 100vh;
    font-family: var(--font-primary);
    direction: rtl;
    text-align: right;
    background-color: var(--c-navy-950);
    color: var(--c-text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   FULL-PAGE BACKGROUND
   ========================================================================== */

.classic-login-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* Full-screen image4 background */
.classic-login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--login-bg-img, url('../../../../image/image4.jpg'));
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    animation: bgDrift 22s ease-in-out infinite alternate;
}


@keyframes bgDrift {
    0%   { transform: scale(1.04) translate(0, 0); }
    100% { transform: scale(1.07) translate(-1%, -1%); }
}

@keyframes emblemPulse {
    0%, 100% { filter: drop-shadow(0 4px 16px rgba(212, 175, 55, 0.4)) drop-shadow(0 0 6px rgba(0,0,0,0.5)); }
    50%       { filter: drop-shadow(0 8px 28px rgba(212, 175, 55, 0.8)) drop-shadow(0 0 12px rgba(0,0,0,0.5)); }
}

@keyframes cardEntrance {
    to { opacity: 1; transform: translateY(0) scale(1); }
}


/* Elegant multi-layer dark overlay */
.classic-login-page::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(6, 11, 24, 0.60) 0%,
            rgba(6, 11, 24, 0.38) 40%,
            rgba(6, 11, 24, 0.65) 100%
        ),
        radial-gradient(ellipse at 50% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    z-index: 1;
}

/* ==========================================================================
   LAYOUT CONTAINER â€” FULL-SCREEN CENTERED
   ========================================================================== */

.classic-auth-container {
    position: relative;
    z-index: 10;
    display: flex;
    min-height: 100vh;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

/* Hide the old brand side â€” we use full-screen centered card design */
.classic-brand-side {
    display: none;
}

/* ==========================================================================
   CENTER CARD LAYOUT
   ========================================================================== */

.classic-form-side {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    background: transparent;
    position: relative;
    z-index: 20;
    min-height: auto;
}

/* ==========================================================================
   LUXURY CENTERED CARD
   ========================================================================== */

.card-classic-frame {
    width: 100%;
    max-width: 460px;
    background: var(--c-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-top: 3px solid rgba(255, 255, 255, 0.85);
    border-bottom: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 30px 38px 24px;
    box-shadow: var(--shadow-classic-card);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    position: relative;
    transition: var(--trans-smooth);
    animation: cardEntrance 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(24px) scale(0.97);
}

@keyframes cardEntrance {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Golden corner accent lines */
.card-classic-frame::before,
.card-classic-frame::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border-color: rgba(255, 255, 255, 0.5);
    border-style: solid;
    pointer-events: none;
}

.card-classic-frame::before {
    top: -1px;
    right: -1px;
    border-width: 2px 2px 0 0;
    border-radius: 0 24px 0 0;
}

.card-classic-frame::after {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 2px 2px;
    border-radius: 0 0 24px 0;
}

/* ==========================================================================
   CARD HEADER â€” IDENTITY SECTION
   ========================================================================== */

.card-classic-header {
    text-align: center;
    margin-bottom: 18px;
    position: relative;
}

.crest-monogram {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(11, 21, 45, 0.95) 0%, rgba(19, 36, 72, 0.95) 100%);
    border: 1.5px solid var(--c-gold-600);
    color: var(--c-gold-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.form-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 3px;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.form-subtitle {
    font-size: 0.86rem;
    color: var(--c-text-muted);
    line-height: 1.5;
}

.header-thin-accent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 10px auto 0;
    width: 75%;
}

.header-thin-accent span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.header-thin-accent i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

/* ==========================================================================
   CLASSIC ALERT BOX
   ========================================================================== */

.classic-alert-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 15px;
    border-radius: 12px;
    margin-bottom: 22px;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-right: 4px solid #dc2626;
    color: #fca5a5;
    font-size: 0.88rem;
    text-align: right;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.alert-icon-wrap {
    font-size: 1.25rem;
    line-height: 1;
    color: #f87171;
    margin-top: 1px;
    flex-shrink: 0;
}

.alert-msg-content strong {
    display: block;
    margin-bottom: 2px;
    font-weight: 700;
    color: #fca5a5;
}

.alert-msg-content p {
    line-height: 1.45;
    color: #fca5a5;
}

/* ==========================================================================
   FORM INPUTS & LABELS
   ========================================================================== */

.classic-login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.field-label, .label-txt {
    font-size: 0.86rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.3px;
}

.required-star {
    color: #f87171;
    font-weight: bold;
}

.field-label-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-input-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-leading-icon {
    position: absolute;
    right: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.22rem;
    pointer-events: none;
    transition: var(--trans-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.classic-text-input {
    width: 100%;
    padding: 11px 46px 11px 14px;
    font-family: var(--font-primary);
    font-size: 0.92rem;
    font-weight: 500;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    direction: rtl;
    text-align: right;
    outline: none;
    transition: var(--trans-smooth);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.classic-text-input.has-action-btn {
    padding-left: 48px;
}

.classic-text-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.875rem;
    font-weight: 400;
}

.classic-text-input:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12),
                0 4px 16px rgba(0, 0, 0, 0.3);
}

.field-input-box:focus-within .input-leading-icon {
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* Trailing Button (Toggle Password) */
.input-trailing-btn {
    position: absolute;
    left: 10px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: var(--trans-smooth);
    z-index: 3;
}

.input-trailing-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.input-trailing-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 1px;
}

/* ==========================================================================
   OPTIONS ROW: REMEMBER ME & SUPPORT
   ========================================================================== */

.form-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 4px;
    font-size: 0.84rem;
}

.classic-checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.classic-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.custom-check-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.75rem;
    transition: var(--trans-smooth);
}

.custom-check-box i {
    display: none;
}

.classic-checkbox-wrapper input:checked + .custom-check-box {
    background: rgba(255, 255, 255, 0.85);
    border-color: #ffffff;
    color: #0b152d;
}

.classic-checkbox-wrapper input:checked + .custom-check-box i {
    display: block;
}

.classic-checkbox-wrapper input:focus-visible + .custom-check-box {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.check-title {
    color: #94a3b8;
    font-weight: 500;
}

.btn-support-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-family: var(--font-primary);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans-smooth);
    padding: 4px 6px;
    border-radius: 6px;
}

.btn-support-trigger:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: underline;
}

/* ==========================================================================
   CLASSIC ROYAL SUBMIT BUTTON â€” GOLDEN
   ========================================================================== */

.btn-classic-royal {
    position: relative;
    width: 100%;
    padding: 12px 24px;
    margin-top: 4px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #0b152d;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.92) 0%,
        #ffffff 50%,
        rgba(220,230,240,0.92) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 8px 26px -4px rgba(0, 0, 0, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: var(--trans-smooth);
}

.btn-content-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #0b152d;
}

.btn-content-wrap i {
    font-size: 1.25rem;
    color: #0b152d;
    transition: transform 0.25s ease;
}

.btn-classic-royal:hover {
    background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 50%, #e2e8f0 100%);
    box-shadow:
        0 14px 34px -4px rgba(0, 0, 0, 0.4),
        0 4px 10px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.btn-classic-royal:hover .btn-content-wrap i {
    transform: translateX(-4px);
}

.btn-classic-royal:active {
    transform: translateY(0);
}

/* Button Shimmer Effect */
.btn-shine-fx {
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        60deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    transition: all 0.75s ease;
    pointer-events: none;
}

.btn-classic-royal:hover .btn-shine-fx {
    left: 130%;
}

.btn-classic-royal.is-submitting {
    opacity: 0.85;
    pointer-events: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.card-classic-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.copyright-note {
    font-size: 0.74rem;
    color: rgba(148, 163, 184, 0.65);
    line-height: 1.5;
}

.system-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--c-gold-400);
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(197, 155, 39, 0.25);
    padding: 3px 10px;
    border-radius: 50px;
}

/* ==========================================================================
   CLASSIC SUPPORT MODAL
   ========================================================================== */

.classic-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 11, 24, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.classic-modal-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.classic-modal-card {
    width: 100%;
    max-width: 520px;
    background: rgba(11, 21, 45, 0.95);
    border-radius: 18px;
    border: 1px solid rgba(197, 155, 39, 0.4);
    border-top: 3px solid var(--c-gold-500);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.classic-modal-backdrop.is-visible .classic-modal-card {
    transform: translateY(0) scale(1);
}

.modal-gold-frame {
    padding: 26px 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(197, 155, 39, 0.2);
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

.modal-title-wrap i {
    font-size: 1.45rem;
    color: var(--c-gold-400);
}

.modal-title-wrap h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

.btn-close-modal {
    background: none;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--trans-smooth);
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.modal-intro {
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.65;
    margin-bottom: 6px;
}

.support-channels-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.channel-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(197, 155, 39, 0.2);
    border-radius: 12px;
    text-align: right;
    transition: var(--trans-smooth);
}

.channel-card:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(197, 155, 39, 0.45);
}

.channel-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(197, 155, 39, 0.12);
    color: var(--c-gold-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.channel-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.channel-content strong {
    font-size: 0.88rem;
    color: #e2e8f0;
    font-weight: 700;
}

.channel-content span {
    font-size: 0.84rem;
    color: #64748b;
}

.support-channel-link {
    color: var(--c-gold-400);
    text-decoration: none;
    font-weight: 600;
    transition: var(--trans-smooth);
}

.support-channel-link:hover {
    color: var(--c-gold-300);
    text-decoration: underline;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
}

.btn-modal-dismiss {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--c-gold-600) 0%, var(--c-gold-700) 100%);
    color: #0b152d;
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--trans-smooth);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
}

.btn-modal-dismiss:hover {
    background: linear-gradient(135deg, var(--c-gold-500) 0%, var(--c-gold-600) 100%);
    transform: translateY(-1px);
}

/* ==========================================================================
   RESPONSIVE DESIGN — FULL MOBILE PARITY
   ========================================================================== */

/* ── Tablet & small laptops (max 768px) ── */
@media (max-width: 768px) {
    .classic-auth-container {
        padding: 24px 16px;
        align-items: center;
    }

    .card-classic-frame {
        max-width: 440px;
        padding: 28px 30px 22px;
        border-radius: 18px;
    }

    .form-title {
        font-size: 1.45rem;
    }

    .form-subtitle {
        font-size: 0.84rem;
    }

    .classic-modal-card {
        max-width: 95vw;
    }

    .modal-gold-frame {
        padding: 22px 24px;
    }
}

/* ── Mobile phones (max 600px) ── */
@media (max-width: 600px) {
