/* ==============================================================
   Next Level Single-Screen Islamic Architecture
   ============================================================== */
:root {
    --green-deep: #020d07;
    --green-emerald: #082b19;
    --green-card: #0F4D3F;
    --gold: #D4AF37;
    --gold-light: #f5da82;
    --cream: #fcfbf8;
    --text-muted: #4a5c53;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background-color: var(--green-deep);
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ==============================================================
   Background & Geometry
   ============================================================== */
.screen-wrapper {
    height: 100vh;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #062b1f 0%, #0a402d 40%, #062e21 75%, #031811 100%);
    padding: 30px 50px;
    position: relative;
    z-index: 1;
}

/* Intricate Gold Star Pattern & Warm Golden Aura Overlay */
.screen-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4AF37' fill-opacity='1'%3E%3Cpath d='M40 0l6 14L60 20l-14 6L40 40l-6-14L20 20l14-6L40 0zm0 80l-6-14L20 60l14-6L40 40l6 14L60 60l-14 6L40 80zM0 40l6-14L20 20L6 26 0 40zm80 0l-6 14L60 60l14-6 6-14z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

.screen-wrapper::after {
    content: '';
    position: absolute;
    top: -15%; left: 10%; right: 10%; height: 60%;
    background: radial-gradient(ellipse at center, rgba(232, 201, 106, 0.18) 0%, rgba(15, 77, 63, 0.28) 45%, transparent 75%);
    pointer-events: none;
    z-index: -1;
    filter: blur(45px);
}

/* ==============================================================
   Portal Top Navigation Bar (Home & Admin Login)
   ============================================================== */
.portal-nav-bar {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto 12px auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.home-nav-btn,
.admin-login-btn {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    background: rgba(15, 77, 63, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--gold);
    border: 1.5px solid var(--gold);
    padding: 8px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-nav-btn:hover,
.admin-login-btn:hover {
    background: var(--gold);
    color: var(--green-deep);
    border-color: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.38);
}

@media (max-width: 768px) {
    .portal-nav-bar {
        margin-bottom: 8px !important;
        padding: 0 !important;
    }
    .home-nav-btn,
    .admin-login-btn {
        padding: 7px 16px;
        font-size: 0.82rem;
        border-radius: 50px;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .portal-nav-bar {
        margin-bottom: 14px;
    }
    .home-nav-btn,
    .admin-login-btn {
        padding: 6px 14px;
        font-size: 0.78rem;
    }
}

/* ==============================================================
   Header Section
   ============================================================== */
.top-header {
    text-align: center;
    flex-shrink: 0;
    margin-bottom: 4vh;
    position: relative;
    z-index: 10;
    background: linear-gradient(135deg, rgba(16, 82, 67, 0.75) 0%, rgba(9, 46, 35, 0.85) 50%, rgba(4, 25, 18, 0.90) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px 36px 32px;
    border-radius: 28px;
    border: 1.5px solid rgba(232, 201, 106, 0.38);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.bismillah {
    font-family: 'Amiri', serif;
    font-size: clamp(1.2rem, 6vw, 3rem);
    color: var(--gold);
    margin-bottom: 5px;
    text-shadow: 0 0 20px rgba(212,175,55,0.4);
    opacity: 0.95;
    display: inline-block;
    padding: 0 20px;
    overflow: visible;
}

.english-title {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    font-size: 2.6rem;
    margin: 0;
    letter-spacing: 1.5px;
    font-weight: 600;
    line-height: 1.2;
}

.gold-amp {
    font-style: italic;
    color: var(--cream);
    font-weight: 400;
    font-size: 1.1em;
    padding: 0 5px;
}

.header-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0 10px;
}

.header-divider::before, .header-divider::after {
    content: '';
    width: 120px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(212,175,55,0.6));
}
.header-divider::after {
    background: linear-gradient(to left, transparent, rgba(212,175,55,0.6));
}

.diamond {
    width: 8px;
    height: 8px;
    background: var(--gold);
    transform: rotate(45deg);
    margin: 0 15px;
    box-shadow: 0 0 10px rgba(212,175,55,0.8);
}

.header-subtitle {
    color: rgba(252, 251, 248, 0.8);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.header-contact {
    color: var(--gold);
    font-size: 1.05rem;
    font-weight: 500;
    margin-top: 10px;
    letter-spacing: 1.5px;
}

.header-contact i {
    margin-right: 8px;
    opacity: 0.8;
}

/* ==============================================================
   Arches Container & Finials
   ============================================================== */
.arches-container {
    display: flex;
    gap: 30px;
    margin: auto 0;
    padding: 20px 20px 0;
}

.arch-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Gold Dome Tip on Top of Arch */
.arch-finial {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 35px;
    background: linear-gradient(to bottom, var(--gold-light), var(--gold));
    clip-path: polygon(50% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%);
    z-index: 10;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
    transition: transform 0.5s ease;
}

.arch-wrapper:hover .arch-finial {
    transform: translate(-50%, -15px);
}

/* ==============================================================
   The Arch Card (Marble Texture)
   ============================================================== */
.arch-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 48vh;
    background-color: var(--cream);
    /* Subtle Marble Noise Filter */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    border-radius: 500px 500px 15px 15px;
    padding: 12px;
    text-decoration: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
    position: relative;
    top: 0;
}

.arch-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 40px 70px rgba(0,0,0,0.8), 0 0 40px rgba(212,175,55,0.2);
}

/* Intricate Double Inner Border */
.arch-inner {
    flex: 1;
    border: 1px solid rgba(212, 175, 55, 0.6);
    outline: 2px solid rgba(212, 175, 55, 0.3);
    outline-offset: -8px;
    border-radius: 488px 488px 10px 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: rgba(255,255,255,0.7);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230F4D3F' fill-opacity='0.04'%3E%3Cpath d='M30 0l4.5 10.5L45 15l-10.5 4.5L30 30l-4.5-10.5L15 15l10.5-4.5L30 0zm0 60l-4.5-10.5L15 45l10.5-4.5L30 30l4.5 10.5L45 45l-10.5 4.5L30 60zM0 30l4.5-10.5L15 15l-10.5 4.5L0 30zm60 0l-4.5 10.5L45 45l10.5-4.5L60 30z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px 80px;
    background-position: center;
}

/* ==============================================================
   Moroccan Hanging Lantern Design
   ============================================================== */
.lantern-chain {
    width: 2px;
    height: 8vh;
    min-height: 30px;
    border-left: 3px dashed var(--gold);
    position: relative;
    z-index: 1;
    opacity: 0.8;
}

.lantern-body {
    width: 85px;
    height: 95px;
    background: linear-gradient(135deg, var(--green-emerald), #03140b);
    border: 2px solid var(--gold);
    border-radius: 40px 40px 15px 15px; /* Sculpted Lantern Shape */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: var(--gold-light);
    position: relative;
    z-index: 2;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3), inset 0 0 15px rgba(212,175,55,0.1);
    margin-bottom: 4vh;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Glowing Flame Animation inside Lantern */
.lantern-body::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(212,175,55,0.5) 0%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
    animation: flicker 3s infinite alternate;
}

@keyframes flicker {
    0% { opacity: 0.6; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.1); }
}

.arch-card:hover .lantern-body {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(212,175,55,0.3), inset 0 0 25px rgba(212,175,55,0.3);
}

/* ==============================================================
   Card Typography & Watermark
   ============================================================== */
.card-watermark {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 160px;
    color: var(--gold);
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
    transition: all 0.6s ease;
}

.arch-card:hover .card-watermark {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.1;
}

.card-title {
    font-family: 'Playfair Display', serif;
    color: var(--green-card);
    font-size: 2.1rem;
    margin: 0 0 1.5vh 0;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 20px;
    line-height: 1.1;
    font-weight: 700;
}

.card-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--gold);
    margin: 15px auto 0;
    border-radius: 2px;
    opacity: 0.6;
}

.card-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    text-align: center;
    line-height: 1.6;
    padding: 0 25px;
    margin: 10px 0 0;
    position: relative;
    z-index: 1;
}

/* ==============================================================
   Proceed Button
   ============================================================== */
.card-action {
    margin-top: auto;
    margin-bottom: 4vh;
    color: var(--gold);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    background: var(--green-card);
    padding: 14px 35px;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.arch-card:hover .card-action {
    background: var(--gold);
    color: var(--green-card);
    border-color: var(--gold);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.card-action i {
    transition: transform 0.3s ease;
}

.arch-card:hover .card-action i {
    transform: translateX(6px);
}

/* ==============================================================
   Responsive Handling
   ============================================================== */
@media (max-width: 1100px) {
    html, body { overflow-y: auto; }
    .screen-wrapper { 
        padding: 20px 30px; 
        height: auto; 
        min-height: 100vh;
    }
    .english-title { font-size: 2.2rem; }
    .arches-container { 
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px; 
        padding: 30px 10px 40px; 
        flex: none;
    }
    .arch-card { min-height: 350px; }
    .card-title { font-size: 1.7rem; }
    .lantern-body { width: 65px; height: 75px; font-size: 26px; margin-bottom: 3vh; }
}

/* ==============================================================
   Modals & Premium Forms
   ============================================================== */
.modals-container {
    position: relative;
    z-index: 1000;
}

.modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 13, 7, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-window {
    position: relative;
    width: 650px;
    max-width: 90%;
    background-color: var(--cream);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    border-radius: 300px 300px 20px 20px;
    padding: 12px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6);
    transform: translateY(50px);
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-window {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 40px; right: 40px;
    width: 45px; height: 45px;
    border-radius: 50%;
    background: var(--cream);
    border: 2px solid var(--gold);
    color: var(--green-card);
    font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.close-modal:hover {
    background: var(--gold);
    color: var(--green-card);
    transform: rotate(90deg);
}

.modal-inner {
    border: 1px solid rgba(212, 175, 55, 0.6);
    outline: 2px solid rgba(212, 175, 55, 0.3);
    outline-offset: -8px;
    border-radius: 288px 288px 10px 10px;
    padding: 70px 50px 40px;
    background: rgba(255,255,255,0.6);
    display: flex; flex-direction: column; align-items: center;
}

.modal-finial {
    position: absolute;
    top: -20px; left: 50%;
    transform: translateX(-50%);
    width: 24px; height: 35px;
    background: linear-gradient(to bottom, var(--gold-light), var(--gold));
    clip-path: polygon(50% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%);
    z-index: 10;
}

.modal-icon {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: var(--green-card);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    border: 2px solid var(--gold);
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(15, 77, 63, 0.3);
}

.modal-title {
    font-family: 'Playfair Display', serif;
    color: var(--green-card);
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 5px;
}

/* Forms */
.premium-form {
    width: 100%;
    margin-top: 30px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.input-group {
    margin-bottom: 20px;
    flex: 1;
}

.input-group label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.req {
    color: #e63946;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(15, 77, 63, 0.2);
    border-radius: 15px;
    background: rgba(255,255,255,0.8);
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    color: var(--green-card);
    transition: 0.3s;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212,175,55,0.2);
}

.submit-btn {
    width: 100%;
    margin-top: 15px;
    background: var(--green-card);
    color: var(--gold);
    border: none;
    padding: 18px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex; justify-content: center; align-items: center; gap: 10px;
    transition: 0.3s;
    border: 1px solid transparent;
}

.submit-btn:hover {
    background: var(--gold);
    color: var(--green-card);
    border-color: var(--gold);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

@media (max-width: 700px) {
    .form-row { flex-direction: column; gap: 0; }
    .modal-window { padding: 8px; }
    .modal-inner { padding: 50px 30px 30px; }
    .close-modal { top: 20px; right: 20px; }
}

/* ==============================================================
   Mobile App Conversion
   ============================================================== */
@media (max-width: 768px) {
    html, body {
        height: auto !important;
        min-height: 100%;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch; /* Smooth iOS momentum scroll */
    }

    .screen-wrapper {
        height: auto;
        min-height: 100vh;
        width: 100%;
        max-width: 100%;
        padding: 0;
        display: block; /* Remove flex constraint */
        padding-bottom: 30px;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Header (Relative so never cropped or hidden under address bar) */
    /* Header (Relative so never cropped or hidden under address bar) */
    .top-header {
        position: relative;
        background: linear-gradient(145deg, rgba(16, 82, 67, 0.90) 0%, rgba(9, 46, 35, 0.94) 55%, rgba(4, 25, 18, 0.96) 100%);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        margin-bottom: 18px;
        padding: 16px 16px 28px !important;
        border-bottom: 2px solid rgba(232, 201, 106, 0.55);
        border-radius: 0 0 36px 36px;
        box-shadow: 0 16px 35px -8px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(232, 201, 106, 0.4);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .bismillah {
        font-size: 1.8rem;
        margin-top: 5px;
    }

    .english-title {
        font-size: 1.6rem;
        line-height: 1.3;
        word-wrap: break-word;
    }

    .header-subtitle {
        font-size: 0.9rem;
        padding: 0 10px;
        line-height: 1.4;
    }

    .header-contact {
        font-size: 0.78rem;
        line-height: 1.6;
        word-break: break-word;
        max-width: 100%;
        padding: 0 10px;
    }

    /* Vertical Scrollable Cards */
    .arches-container {
        display: flex;
        flex-direction: column;
        gap: 50px; /* Space for finials */
        padding: 30px 20px 40px;
        overflow: visible;
    }

    .arch-wrapper {
        width: 100%;
    }

    .arch-card {
        min-height: 350px;
        border-radius: 200px 200px 15px 15px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    }
    
    .arch-inner {
        border-radius: 188px 188px 10px 10px;
    }

}

/* Hide scrollbar for smooth app feel */
::-webkit-scrollbar {
    display: none;
}
* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ==============================================================
   Footer
   ============================================================== */
.dashboard-footer {
    text-align: center;
    color: rgba(212, 175, 55, 0.7);
    font-size: 0.9rem;
    padding: 30px 0 10px;
    margin-top: auto;
    font-weight: 400;
    letter-spacing: 1.5px;
}

/* ==============================================================
   Desktop Height Auto-Scaling (No Scroll)
   ============================================================== */
@media (max-height: 850px) and (min-width: 1101px) {
    .screen-wrapper { padding: 15px 50px; }
    .top-header { margin-bottom: 2vh; }
    .english-title { font-size: 2.1rem; }
    .header-divider { margin: 10px 0; }
    .header-subtitle { font-size: 1rem; }
    .header-contact { font-size: 0.9rem; margin-top: 5px; }
    
    .arches-container { gap: 20px; padding-top: 10px; }
    .lantern-chain { height: 4vh; }
    .lantern-body { width: 65px; height: 75px; font-size: 28px; margin-bottom: 2vh; }
    .card-title { font-size: 1.6rem; margin-bottom: 1vh; }
    .card-desc { font-size: 0.95rem; padding: 0 15px; }
    .card-action { padding: 10px 25px; margin-bottom: 2vh; font-size: 0.85rem; }
    
    .dashboard-footer { padding: 15px 0 5px; font-size: 0.8rem; }
}

@media (max-height: 720px) and (min-width: 1101px) {
    .english-title { font-size: 1.8rem; }
    .header-subtitle { font-size: 0.9rem; }
    .lantern-chain { height: 2vh; }
    .lantern-body { width: 50px; height: 55px; font-size: 24px; margin-bottom: 1.5vh; }
    .card-title { font-size: 1.4rem; margin-bottom: 0.5vh; }
    .card-desc { font-size: 0.85rem; padding: 0 10px; }
    .card-action { padding: 8px 20px; margin-bottom: 1.5vh; font-size: 0.8rem; }
    .dashboard-footer { padding: 10px 0 5px; font-size: 0.75rem; }
}

/* ==============================================================
   AI Assistant Widget & Staff Modal
   ============================================================== */
.ai-assistant-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

@media (max-width: 768px) {
    .ai-assistant-wrapper {
        bottom: 100px; /* Above mobile nav */
        right: 20px;
    }
}

.ai-greeting-bubble {
    background: var(--cream);
    color: var(--green-card);
    padding: 15px 20px;
    border-radius: 15px 15px 0 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2), 0 0 15px rgba(212,175,55,0.3);
    margin-bottom: 15px;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.5);
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
    max-width: 250px;
}

.ai-greeting-bubble.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.ai-greeting-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 15px;
    border-width: 10px 10px 0 0;
    border-style: solid;
    border-color: var(--cream) transparent transparent transparent;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1));
}

.ai-greeting-close {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--green-card);
    color: var(--gold);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.ai-icon-container {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.ai-icon-container:hover {
    transform: scale(1.1);
}

.ai-icon-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--gold);
    border-radius: 50%;
    z-index: 1;
    animation: aiPulse 2s infinite;
    opacity: 0.6;
}

@keyframes aiPulse {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.ai-icon {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-radius: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--green-card);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 2px solid var(--cream);
}

/* AI Staff Modal */
.ai-staff-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 1099;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ai-staff-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.ai-staff-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    background: var(--cream);
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(212,175,55,0.2);
    border: 1px solid var(--gold);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.ai-staff-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

.ai-staff-modal-header {
    background: linear-gradient(135deg, var(--green-emerald), var(--green-deep));
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gold);
}

.ai-staff-modal-header h3 {
    color: var(--gold);
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-close-modal {
    color: var(--cream);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.ai-close-modal:hover {
    color: var(--gold);
}

.ai-staff-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.ai-modal-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.staff-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.staff-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(15, 77, 63, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(15, 77, 63, 0.1);
    transition: all 0.3s ease;
}

.staff-card:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.staff-profile {
    width: 45px;
    height: 45px;
    background: var(--green-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    margin-right: 15px;
    flex-shrink: 0;
}

.staff-profile svg {
    width: 24px;
    height: 24px;
}

.staff-info {
    flex-grow: 1;
}

.staff-info h4 {
    color: var(--green-card);
    margin: 0 0 5px 0;
    font-size: 1.05rem;
}

.staff-info p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.staff-dial-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-deep);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.3);
    flex-shrink: 0;
}

.staff-dial-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.5);
}

.staff-dial-btn svg {
    width: 20px;
    height: 20px;
}

/* ==============================================================
   Print Styles for Salary Receipt
   ============================================================== */
@media print {
    body * {
        visibility: hidden;
    }
    #salary-receipt-modal, 
    #salary-receipt-modal * {
        visibility: visible;
    }
    #salary-receipt-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white !important;
        opacity: 1 !important;
        display: block !important;
    }
    .modal-content.receipt-content {
        box-shadow: none !important;
        transform: none !important;
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }
    .receipt-controls {
        display: none !important;
    }
    #printable-receipt {
        border: none !important;
        padding: 0 !important;
    }
}
