/* =========================================
   VIBRANT LUXURY DESIGN DEFINITIONS
   ========================================= */
:root {
    --fya-gold-vibrant: #cca673;
    --fya-gold-deep: #b08d56;
    --fya-gold-glow: rgba(204, 166, 115, 0.35);
    --fya-charcoal-vibrant: #1a1a1e;
    --fya-border-vibrant: #ebdcb9;
    --fya-layer-shadow: 
        0 4px 12px rgba(140, 114, 77, 0.1),
        0 0 0 1px rgba(255, 255, 254, 0.5) inset;
}

/* =========================================
   1. GLOBAL FRAMEWORK & BACKGROUND
   ========================================= */
body {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    background-color: #f7f2e2; 
    background-image: 
        radial-gradient(at 0% 0%, #ffffff 0px, transparent 55%),
        radial-gradient(at 100% 0%, rgba(224, 196, 144, 0.65) 0px, transparent 65%),
        radial-gradient(at 100% 100%, rgba(204, 166, 115, 0.55) 0px, transparent 60%),
        radial-gradient(at 0% 100%, rgba(34, 34, 34, 0.05) 0px, transparent 45%),
        radial-gradient(at 50% 50%, rgba(255, 255, 254, 0.98) 0px, transparent 100%);
    background-attachment: fixed;
    color: #222222;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 40px 20px;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.main-viewport-wrapper {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 10;
    animation: fyaAppEntrance 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fyaAppEntrance {
    0% { opacity: 0; transform: translateY(24px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================
   2. HAMBURGER MENU
   ========================================= */
.menu-btn { 
    position: fixed; top: 24px; left: 24px; z-index: 1000; 
    display: flex; flex-direction: column; gap: 6px; cursor: pointer; 
    width: 48px; height: 48px; padding: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--fya-border-vibrant); border-radius: 50%;
    box-shadow: 0 4px 15px var(--fya-gold-glow); 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    justify-content: center;
    align-items: center;
}
.menu-btn:hover { 
    transform: scale(1.05); 
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(204, 166, 115, 0.4); 
}

.menu-btn span { 
    display: block; 
    width: 22px; 
    height: 2.5px; 
    background-color: #1a1a1e; 
    border-radius: 2px; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    transform-origin: center;
}

.menu-btn.is-open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.menu-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn.is-open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

.nav-drawer { 
    position: fixed; top: 0; left: -300px; width: 280px; height: 100vh; 
    background: #ffffff; 
    box-shadow: 8px 0 40px rgba(26, 22, 16, 0.1); z-index: 999; 
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    display: flex; flex-direction: column; 
    padding: 90px 20px 20px 20px; box-sizing: border-box; direction: ltr;
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
}
.nav-drawer.open { left: 0; }

.drawer-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(36, 31, 26, 0.4); z-index: 998; opacity: 0; visibility: hidden; 
    transition: opacity 0.4s ease; 
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.drawer-overlay.show { opacity: 1; visibility: visible; }

.nav-links { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.nav-item { 
    display: flex; align-items: center; gap: 10px;
    padding: 16px 20px; 
    border-radius: 14px; 
    color: #333333; text-decoration: none; font-weight: 700; font-size: 1.05rem; 
    transition: all 0.2s ease; text-align: left; 
    background: #fdfcf9;
    border: 1px solid transparent;
}
.nav-item:hover { 
    background: #faf6eb; 
    border-color: var(--fya-border-vibrant); 
    transform: translateX(4px);
    color: var(--fya-gold-deep); 
}

/* =========================================
   3. CARD CONTAINERS
   ========================================= */
.upper-brand-card, .container, #loadingState {
    background: #ffffff;
    border-radius: 28px;
    box-shadow: var(--fya-layer-shadow);
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    border: none;
}

.container { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    position: relative; 
    z-index: 2; 
}

#page-index .container { padding: 28px 24px; }
#page-card .container, #page-attendees .container { padding: 24px 20px; }
#page-admin-login .container, #page-admin .container, #page-scanner .container, #page-calendar .container, #page-add-workshop .container, #page-add-edit-workshop .container, #page-workshop .container { padding: 32px 24px; }

.upper-brand-card {
    height: 220px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center;
    background-image: 
        radial-gradient(circle at top right, transparent 34px, #a58c64 35px, transparent 36px, transparent 44px, #a58c64 45px, transparent 46px, transparent 54px, #a58c64 55px, transparent 56px, transparent 64px, #a58c64 65px, transparent 66px, transparent 74px, #a58c64 75px, transparent 76px, transparent 84px, #a58c64 85px, transparent 86px),
        radial-gradient(circle at bottom left, transparent 34px, #a58c64 35px, transparent 36px, transparent 44px, #a58c64 45px, transparent 46px, transparent 54px, #a58c64 55px, transparent 56px, transparent 64px, #a58c64 65px, transparent 66px, transparent 74px, #a58c64 75px, transparent 76px, transparent 84px, #a58c64 85px, transparent 86px) !important;
    background-size: 130px 130px !important; background-repeat: no-repeat !important; background-position: top right, bottom left !important; opacity: 0.95;
}

#page-card .upper-brand-card, #page-attendees .upper-brand-card { justify-content: center; gap: 12px; }

.upper-brand-card .fya-small-logo { width: 50px; height: auto; position: absolute; top: 23%; left: 50%; transform: translate(-50%, -50%); display: block; z-index: 2; }
.upper-brand-card .fya-logo { width: 72%; max-width: 240px; height: auto; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: block; z-index: 2; }
.upper-brand-card .fya-brand-logo-emblem { width: 85%; max-width: 240px; max-height: 80px; height: auto; object-fit: contain; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; }

.upper-brand-card .fya-tagline {
    position: absolute; top: 76%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 0px; text-align: center; width: 100%; z-index: 2; line-height: 1.25;
}
.upper-brand-card .fya-tagline .ar-tagline { font-size: 0.82rem; font-weight: 700; color: #a58c64; margin: 0; }
.upper-brand-card .fya-tagline .en-tagline { font-size: 0.62rem; letter-spacing: 0.6px; color: #222222; font-weight: 700; margin: 0; }

/* =========================================
   4. FORM ELEMENTS & UI
   ========================================= */
h2 { font-size: 1.2rem; color: #1a1a1e; font-weight: 700; margin: 0 0 20px 0; text-align: center; width: 100%; letter-spacing: -0.2px; }
label, .form-label, .edit-label { font-size: 0.8rem; color: #555555; font-weight: 700; margin-bottom: 6px; display: block; width: 100%; text-align: right; }

input, select, .search-input, .form-input, .form-select, .input-box, .workshop-select-input, .workshop-input-field { 
    width: 100%; padding: 13px 16px; border: 1px solid var(--fya-border-vibrant); border-radius: 12px; 
    font-size: 0.95rem; box-sizing: border-box; background: #fdfcf9; color: #333333; margin-bottom: 14px; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); font-family: inherit; text-align: right;
}
input:focus, select:focus, .search-input:focus, .form-input:focus, .form-select:focus, .input-box:focus, .workshop-select-input:focus, .workshop-input-field:focus { 
    outline: none; border-color: var(--fya-gold-vibrant); box-shadow: 0 0 0 4px var(--fya-gold-glow); background: #ffffff; 
}

input[type="date"], 
input[type="time"] {
    -webkit-appearance: none !important; 
    -moz-appearance: none !important;
    appearance: none !important;
    display: block !important; 
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important; 
    height: 48px !important; 
    line-height: 24px !important; 
    box-sizing: border-box !important;
    padding: 12px 16px !important;
    margin: 0 0 14px 0 !important;
    text-align: center !important;
    direction: ltr !important; 
    overflow: hidden; 
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value {
    height: 24px;
    line-height: 24px;
    text-align: center;
    min-width: 100%;
    width: 100%;
}

.input-placeholder-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 14px;
    display: block;
}
.input-placeholder-wrap input {
    margin-bottom: 0 !important;
    background: transparent !important; 
    position: relative;
    z-index: 2;
}
.input-placeholder-wrap input:not(:valid) {
    color: transparent !important;
}
.input-placeholder-wrap::before {
    content: attr(data-placeholder);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999999;
    font-size: 0.95rem;
    font-family: inherit;
    pointer-events: none; 
    z-index: 1;
    width: 100%;
    text-align: center;
}
.input-placeholder-wrap.has-value::before {
    display: none;
}

.form-row-grid { 
    display: flex; 
    gap: 12px; 
    width: 100%; 
    box-sizing: border-box; 
    margin: 0 0 14px 0; 
    padding: 0;
} 
.form-row-grid > div { 
    display: flex; 
    flex-direction: column; 
    box-sizing: border-box; 
    flex: 1 1 0; 
    min-width: 0; 
    max-width: 50%;
}

.form-row-grid input[type="date"], 
.form-row-grid input[type="time"],
.form-row-grid input,
.form-row-grid select {
    width: 100%;
    max-width: 100%; 
    box-sizing: border-box;
    margin-bottom: 0;
    padding: 13px 8px; 
}

.hidden { display: none !important; }

/* =========================================
   5. TABS & TITLES
   ========================================= */
.tabs { display: flex; background: #faf7f0; border-radius: 14px; padding: 4px; width: 100%; margin-bottom: 24px; border: 1px solid var(--fya-border-vibrant); box-sizing: border-box; direction: ltr; }
.tab { flex: 1; padding: 11px 4px; text-align: center; font-size: 0.8rem; font-weight: 700; cursor: pointer; border-radius: 10px; color: #666666; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 5px; direction: ltr; }
.tab.active { background: #ffffff; color: var(--fya-gold-deep); box-shadow: 0 4px 12px rgba(184, 150, 103, 0.15); border: 1px solid var(--fya-border-vibrant); }

.page-title-badge, .admin-title-badge, .loyalty-title-badge { text-align: center; margin-bottom: 24px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.page-title-badge .ar-title, .admin-title-badge .ar-title, .loyalty-title-badge .ar-title { font-size: 1.45rem; color: #a58c64; font-weight: 700; display: block; margin-bottom: 3px; line-height: 1.2; }
.admin-title-badge .ar-title { font-size: 1.25rem; color: #a1895a; }

.en-title-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 200px; }
.en-title-wrap .gold-line { height: 2px; background-color: #a58c64; flex-grow: 1; max-width: 45px; }
.en-title-wrap .en-title { font-size: 0.75rem; letter-spacing: 1.5px; color: #222222; margin: 0; font-weight: 700; line-height: 1; white-space: nowrap; }

.profile-badge-zone { text-align: center; margin-bottom: 12px; }
.profile-badge-zone h2 { margin: 0; font-size: 1.65rem; font-weight: 700; color: #111111; line-height: 1.2; }

/* =========================================
   6. BUTTONS
   ========================================= */
button, .btn-outline { 
    padding: 15px; border-radius: 12px; font-size: 0.95rem; font-weight: 700; width: 100%; border: none; cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); text-align: center; box-sizing: border-box; font-family: inherit;
}
#btnRegister, #btnSignIn { background-color: var(--fya-charcoal-vibrant); color: #ffffff; margin-top: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); }
#btnRegister:hover, #btnSignIn:hover { background-color: #2b2b30; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22); }

.btn-gold { background-color: #a1895a; color: #ffffff; box-shadow: 0 4px 12px rgba(161, 137, 90, 0.25); }
.btn-gold:hover { background-color: #8f794e; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(161, 137, 90, 0.35); }

.btn-black { 
    background-color: var(--fya-charcoal-vibrant) !important; 
    color: #ffffff !important; 
    border: none; 
    padding: 16px; 
    border-radius: 12px; 
    font-size: 0.95rem; 
    font-weight: 700; 
    cursor: pointer; 
    width: 100%; 
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    margin-top: 15px; 
    text-align: center; 
    box-sizing: border-box; 
    display: block; 
    text-decoration: none !important; 
    font-family: inherit;
    line-height: 1.4;
}
.btn-black:hover { background-color: #2b2b30 !important; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22); transform: translateY(-2px); }

.btn-outline { background-color: transparent; border: 1px solid var(--fya-border-vibrant); color: #666; margin-top: 12px; text-decoration: none; }
.btn-outline:hover { background: #faf7f0; color: #333; border-color: #d1b88e; }

.btn-danger-outline, .btn-red-outline { background-color: #fff0f0; border: 1px dashed #ffcccc; color: #d93838; margin-top: 10px; }
.btn-danger-outline:hover, .btn-red-outline:hover { background-color: #ffe5e5; border-color: #ffb3b3; transform: translateY(-1px); }

.menu-action-btn { 
    display: flex; align-items: center; justify-content: center; width: 100%; padding: 16px; margin-bottom: 14px; 
    background-color: #a1895a; border: none; border-radius: 12px; color: #ffffff; font-size: 0.95rem; font-weight: 700; 
    cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 4px 12px rgba(161, 137, 90, 0.25); 
    text-decoration: none; box-sizing: border-box; letter-spacing: 0.3px; text-align: center; line-height: 1.4; 
    font-family: inherit;
    white-space: nowrap !important;
    font-size: 0.9rem !important;
}
.menu-action-btn:hover { background-color: #8f794e; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(161, 137, 90, 0.35); }

.btn-edit-user { background: #e3d9be; color: #5c4e33; border: none; padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: 0.75rem; cursor: pointer; transition: all 0.2s; margin: auto; display: block; max-width: 90%; white-space: nowrap; font-family: inherit; }
.btn-edit-user:hover { background: #cdbe9b; transform: scale(1.03); }

.btn-edit-action { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 100%; 
    padding: 10px; 
    font-size: 0.85rem; 
    background: #faf6eb; 
    color: var(--fya-gold-deep); 
    border: 1px dashed var(--fya-border-vibrant); 
    border-radius: 10px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.2s; 
    font-family: inherit; 
    margin-top: 6px; 
    text-align: center; 
    box-sizing: border-box; 
    text-decoration: none;
}
.btn-edit-action:hover { background: #f3edd7; color: #8f794e; }

/* =========================================
   7. STAMPS & CARD FOOTER
   ========================================= */
.stamps-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 12px; 
    width: 85%; 
    margin: 0 auto 16px auto; 
    padding: 0; 
    direction: ltr; 
}

.stamp-slot { 
    aspect-ratio: 1; 
    border: 1.5px dashed #e0d5b9; 
    border-radius: 18px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    background-color: #f9f6f0; 
    overflow: hidden; 
    padding: 4px; 
    box-sizing: border-box; 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    box-shadow: inset 0 2px 4px rgba(140, 114, 77, 0.05); 
}

.stamp-slot img { 
    width: 65%; 
    height: 65%; 
    object-fit: contain; 
    display: block; 
    transition: all 0.3s ease; 
    opacity: 0.35;
    filter: grayscale(100%);
}

.stamp-slot.stamped {
    background-image: linear-gradient(145deg, #e6cfa5 0%, #cca673 50%, #b08d56 100%); 
    border: 1.5px solid #8f794e; 
    background-color: transparent; 
    box-shadow: 
        0 6px 14px rgba(176, 141, 86, 0.35), 
        inset 0 2px 3px rgba(255, 255, 255, 0.7), 
        inset 0 -2px 3px rgba(0,0,0,0.15), 
        inset 0 0 0 3px #ffffff; 
    animation: stampPop 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
}

.stamp-slot.stamped img {
    width: 65%; 
    height: 65%;
    opacity: 1;
    filter: grayscale(100%) brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0,0,0,0.25)) !important;
}

@keyframes stampPop {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.card-footer-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 8px; width: 100%; direction: ltr; }
.footer-left-content { display: flex; align-items: center; gap: 6px; max-width: 58%; }
.gift-icon-wrap { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gift-icon-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; }
.footer-rewards-text { display: flex; flex-direction: column; text-align: left; gap: 0px; line-height: 1.15; }
.footer-rewards-text .ar-reward { font-size: 0.74rem; color: #a58c64; font-weight: 700; white-space: nowrap; margin: 0; }
.footer-rewards-text .en-reward { font-size: 0.56rem; color: #555555; font-weight: 600; white-space: nowrap; margin: 0; }
.footer-divider-line { width: 1px; height: 28px; background-color: #a58c64; opacity: 0.4; margin: 0 8px; }
.footer-right-logo { max-width: 35%; display: flex; justify-content: flex-end; align-items: center; }
.footer-right-logo img { width: 100%; max-width: 95px; height: auto; display: block; }

/* =========================================
   8. MISC & PAGE SPECIFIC ELEMENTS
   ========================================= */
.auth-input-group { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.auth-input-group label { margin-bottom: 0; }
.auth-input-group input { 
    width: 100%; padding: 13px 16px; border: 1px solid var(--fya-border-vibrant); border-radius: 12px; 
    font-size: 0.95rem; box-sizing: border-box; background: #fdfcf9; color: #333333; margin-bottom: 0; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); font-family: inherit; text-align: right;
}
.auth-input-group input:focus { outline: none; border-color: var(--fya-gold-vibrant); box-shadow: 0 0 0 4px var(--fya-gold-glow); background: #ffffff; }

#loadingState { text-align: center; padding: 60px 24px; font-size: 1.1rem; font-weight: 700; max-width: 400px; }
#loadingPlaceholder { text-align: center; color: var(--fya-gold-deep); font-weight: 600; padding: 20px 0; width: 100%; }
#errorMsg { color: #d93838; font-size: 0.85rem; font-weight: bold; text-align: center; min-height: 20px; margin-top: -4px; }

.workshop-setup { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; text-align: center; }
.workshop-select-input { text-align: right; direction: rtl; }
.workshop-input-field { text-align: center; direction: ltr; }

#reader { width: 100%; border: 1px solid var(--fya-border-vibrant) !important; border-radius: 14px; overflow: hidden; box-shadow: inset 0 2px 10px rgba(0,0,0,0.02); }
#reader__dashboard_section_csr span { color: #a1895a !important; font-weight: bold; }
#reader button { background-color: #a1895a; color: #ffffff; border: none; padding: 10px 12px; border-radius: 8px; font-weight: bold; cursor: pointer; margin: 10px 0; width: 90%; }

.divider-text { display: flex; align-items: center; text-align: center; color: #a58c64; font-size: 0.75rem; font-weight: bold; margin: 18px 0; width: 100%; letter-spacing: 1px; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; border-bottom: 1px solid var(--fya-border-vibrant); }
.divider-text span { padding: 0 12px; }

.result-card { width: 100%; background: #fdfcf9; border: 1px solid var(--fya-border-vibrant); border-radius: 14px; padding: 20px 16px; text-align: center; box-sizing: border-box; animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); margin-top: 15px; box-shadow: var(--fya-layer-shadow); }
.result-card.error { background: #fff0f0; border-color: #ffcccc; }
.result-title { font-size: 1.1rem; font-weight: 700; color: #a1895a; margin-bottom: 12px; }
.result-card.error .result-title { color: #d93838; }
.result-row { margin-bottom: 6px; font-size: 0.9rem; color: #222; }
.result-label { font-weight: 700; color: #666; margin-right: 5px; }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }

.search-input-wrapper { width: 100%; margin-bottom: 12px; }
.table-scroll-container { width: 100%; max-height: 280px; overflow-y: auto; border: 1px solid var(--fya-border-vibrant); border-radius: 12px; background: #fdfcf9; margin-bottom: 16px; box-shadow: inset 0 2px 8px rgba(0,0,0,0.02); }
.user-data-table { width: 100%; border-collapse: collapse; text-align: right; font-size: 0.8rem; }
.user-data-table th { position: sticky; top: 0; background: #f4edd9; color: #7a653d; font-weight: 700; padding: 12px 10px; border-bottom: 1px solid var(--fya-border-vibrant); z-index: 5; }
.user-data-table td { padding: 14px 10px; border-bottom: 1px solid #eee; color: #333; vertical-align: middle; }

.edit-form-group { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: right; }
.stamp-control-box { background: #fdfcf9; border: 1px solid var(--fya-border-vibrant); border-radius: 10px; padding: 12px 16px; margin-top: 8px; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; height: 60px; }
.stamp-control-box-label { font-weight: bold; color: #666; font-size: 0.85rem; }
.btn-circle-modify { width: 36px; height: 36px; border: none; border-radius: 8px; font-weight: 700; font-size: 1.6rem; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 4px 0; margin: 0; box-sizing: border-box; }
.btn-plus { background: #e3d9be; color: #5c4e33; }
.btn-minus { background: #eee7d5; color: #5c4e33; }

.workshop-item-card { background: #ffffff; border-radius: 20px; padding: 20px; border: 1px solid var(--fya-border-vibrant); box-shadow: var(--fya-layer-shadow); display: flex; flex-direction: column; gap: 8px; width: 100%; box-sizing: border-box; }
.item-row { display: flex; justify-content: space-between; font-size: 0.88rem; color: #333; font-family: 'Cairo', sans-serif; }
.item-label { font-weight: 700; color: #666; }
.item-title { font-size: 1.1rem; font-weight: 700; color: var(--fya-charcoal-vibrant); border-bottom: 1px dashed #ebdcb9; padding-bottom: 6px; margin-bottom: 4px; text-align: right; }

.fya-modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(26, 22, 16, 0.5); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; opacity: 1; transition: opacity 0.3s ease; 
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); 
}
.fya-modal-card { background: #ffffff; border-radius: 24px; padding: 24px; width: 100%; max-width: 360px; box-shadow: 0 20px 50px rgba(0,0,0,0.15); border: 1px solid var(--fya-border-vibrant); animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1); max-height: 90vh; overflow-y: auto; box-sizing: border-box; }
@keyframes modalPop { 0% { transform: scale(0.95); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* =========================================
   CALENDAR.HTML SPECIFIC STYLES
   ========================================= */
.workshop-card {
    background: #ffffff; border-radius: 20px; padding: 20px; border: 1px solid var(--fya-border-vibrant);
    box-shadow: var(--fya-layer-shadow); display: flex; flex-direction: column; gap: 8px; width: 100%; box-sizing: border-box;
}
.work-meta-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed #ebdcb9; padding-bottom: 8px; margin-bottom: 4px; }
.work-emirate-tag { background: #faf6eb; color: var(--fya-gold-deep); padding: 2px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; border: 1px solid var(--fya-border-vibrant); }
.work-time-tag { font-family: 'Cairo', system-ui, sans-serif; font-size: 0.82rem; color: #555555; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.work-title { font-size: 1.1rem; font-weight: 700; color: var(--fya-charcoal-vibrant); margin: 0; }

/* =========================================
   CALENDAR WORKSHOP BUTTONS & FEEDBACK
   ========================================= */
.btn-register, .btn-rate, .btn-registered {
    width: 100%; 
    padding: 14px 16px; 
    font-size: 0.9rem; 
    border-radius: 12px; 
    font-weight: 700; 
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    font-family: inherit; 
    margin-top: 12px; 
    text-align: center; 
    border: none;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    text-decoration: none !important;
    box-sizing: border-box;
    line-height: 1.4;
}

.btn-register { 
    background-color: #a1895a; 
    color: #ffffff; 
    box-shadow: 0 4px 12px rgba(161, 137, 90, 0.25); 
}
.btn-register:hover { 
    background-color: #8f794e; 
    transform: translateY(-2px); 
    box-shadow: 0 8px 18px rgba(161, 137, 90, 0.35); 
}

.btn-rate { 
    background-color: #1a1a1e; 
    color: #ffffff; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); 
}
.btn-rate:hover { 
    background-color: #2b2b30; 
    transform: translateY(-2px); 
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22); 
}

.btn-registered { 
    background: #e3e3e3; 
    color: #666666; 
    cursor: not-allowed; 
    box-shadow: none;
}

.emoji-rating-container { cursor: pointer; }
.emoji-btn { transition: transform 0.2s ease; filter: grayscale(100%) opacity(0.5); cursor: pointer; }
.emoji-btn.selected, .emoji-btn:hover { transform: scale(1.2); filter: grayscale(0%) opacity(1); }

.btn-load-more {
    background-color: transparent;
    border: 1px solid var(--fya-border-vibrant);
    color: #8f794e;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.btn-load-more:hover {
    background-color: #faf6eb;
}

.workshop-date {
    font-size: 0.72rem; 
    color: #a1895a; 
    font-weight: 700; 
    margin-bottom: 4px;
}

/* =========================================
   ACCESSIBILITY FLOATING ACTION BUTTON (FAB)
   ========================================= */
.fab-btn {
    position: fixed !important; 
    bottom: 24px !important; 
    right: 24px !important; 
    z-index: 10000 !important;
    width: 60px; height: 60px; 
    background-image: linear-gradient(145deg, #e6cfa5 0%, #cca673 50%, #b08d56 100%);
    border: 1px solid #d4b481;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; cursor: pointer; 
    box-shadow: 0 6px 20px rgba(176, 141, 86, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease; padding: 0; overflow: hidden;
}
.fab-btn:hover { 
    transform: scale(1.05); 
    box-shadow: 0 8px 24px rgba(176, 141, 86, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}
.fab-btn.active { 
    background-image: linear-gradient(145deg, #b08d56 0%, #8f794e 100%); 
    transform: scale(0.95); 
}
.fab-btn img { width: 53px; height: 53px; }

.fab-menu {
    position: fixed !important; 
    bottom: 112px !important; 
    right: 24px !important; 
    z-index: 9999 !important;
    background: linear-gradient(180deg, #ffffff 0%, #fdfcf9 100%); 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(140, 114, 77, 0.25), 0 0 0 1px var(--fya-border-vibrant) inset;
    border: none; padding: 10px;
    display: none; flex-direction: column; gap: 8px; width: 260px; box-sizing: border-box;
    animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.fab-menu.show { display: flex; }

.fab-menu-item {
    padding: 14px 16px; border-radius: 12px; text-align: right; cursor: pointer;
    background: #ffffff; border: 1px solid transparent; font-size: 0.95rem;
    font-weight: 700; color: #333; display: flex; align-items: center; gap: 12px;
    transition: all 0.2s; font-family: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.fab-menu-item:hover { 
    background: #faf6eb; 
    border-color: var(--fya-border-vibrant); 
    transform: translateX(-4px); 
}
.fab-menu-item.active { 
    background-image: linear-gradient(145deg, #e6cfa5 0%, #cca673 100%); 
    color: #ffffff; 
    box-shadow: 0 4px 12px rgba(176, 141, 86, 0.3);
    border-color: #d4b481;
}
.fab-menu-item span.icon { font-size: 1.2rem; }

/* =========================================
   LARGE TEXT MODE OVERRIDES
   ========================================= */
body.large-text { font-size: 20px !important; }
body.large-text h2 { font-size: 1.8rem !important; }
body.large-text .page-title-badge .ar-title, body.large-text .admin-title-badge .ar-title { font-size: 2rem !important; }
body.large-text .en-title-wrap .en-title { font-size: 1rem !important; }
body.large-text label, body.large-text .form-label, body.large-text .edit-label { font-size: 1.2rem !important; }
body.large-text input, body.large-text select, body.large-text .form-input, body.large-text .input-box { font-size: 1.3rem !important; }
body.large-text button, body.large-text .btn-outline, body.large-text .btn-gold, body.large-text .btn-black, body.large-text .menu-action-btn { font-size: 1.3rem !important; }
body.large-text .nav-item { font-size: 1.4rem !important; }
body.large-text .work-title, body.large-text .item-title { font-size: 1.6rem !important; }
body.large-text .profile-badge-zone h2 { font-size: 2.4rem !important; }
body.large-text .item-row, body.large-text .work-meta-header, body.large-text .result-row, body.large-text .stamp-slot { font-size: 1.2rem !important; }
body.large-text .loyalty-title-badge .ar-title { font-size: 1.8rem !important; }
body.large-text .tab { font-size: 0.9rem !important; padding: 14px 4px !important; line-height: 1.2 !important; }
body.large-text .qr-sub-text { font-size: 1.1rem !important; }
body.large-text .work-time-tag { font-size: 1.1rem !important; }
body.large-text .work-emirate-tag { font-size: 1rem !important; }
body.large-text .workshop-card > div[style*="0.72rem"] { font-size: 1rem !important; }

/* =========================================
   ADMIN ANALYTICS DASHBOARD
   ========================================= */
.admin-stats-grid {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-bottom: 24px;
}
.admin-stat-card {
    flex: 1;
    background: linear-gradient(145deg, #ffffff 0%, #fdfcf9 100%);
    border: 1px solid var(--fya-border-vibrant);
    border-radius: 18px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(140, 114, 77, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.admin-stat-card .stat-num {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(145deg, #b08d56 0%, #8f794e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}
.admin-stat-card .stat-label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================
   SOFT CHARCOAL & GOLD DARK MODE
   ========================================= */
body.dark-mode {
    background-color: #21242c; 
    color-scheme: dark; 
    background-image: 
        radial-gradient(at 0% 0%, rgba(204, 165, 114, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(204, 165, 114, 0.05) 0px, transparent 50%);
    color: #e0e0e0;
}

body.dark-mode .upper-brand-card,
body.dark-mode .container,
body.dark-mode #loadingState,
body.dark-mode .menu-btn,
body.dark-mode .nav-drawer,
body.dark-mode .fya-modal-card,
body.dark-mode .workshop-card,
body.dark-mode .workshop-item-card,
body.dark-mode .result-card,
body.dark-mode .fab-menu,
body.dark-mode .admin-stat-card {
    background-color: #2a2e38 !important; 
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
    color: #e0e0e0;
}

body.dark-mode .upper-brand-card .fya-logo {
    content: url('fya_gold_logo.png');
    width: 72% !important; 
    max-width: 240px !important; 
    height: auto !important; 
}
body.dark-mode .upper-brand-card .fya-brand-logo-emblem {
    content: url('fya_gold_logo.png');
    width: 85% !important; 
    max-width: 240px !important; 
    max-height: 90px !important;
    height: auto !important; 
    object-fit: contain !important;
}

body.dark-mode .footer-right-logo img { content: url('youth-gold.png'); }

body.dark-mode .upper-brand-card {
    background-image: 
        radial-gradient(circle at top right, transparent 34px, #b08d56 35px, transparent 36px, transparent 44px, #b08d56 45px, transparent 46px, transparent 54px, #b08d56 55px, transparent 56px, transparent 64px, #b08d56 65px, transparent 66px, transparent 74px, #b08d56 75px, transparent 76px, transparent 84px, #b08d56 85px, transparent 86px),
        radial-gradient(circle at bottom left, transparent 34px, #b08d56 35px, transparent 36px, transparent 44px, #b08d56 45px, transparent 46px, transparent 54px, #b08d56 55px, transparent 56px, transparent 64px, #b08d56 65px, transparent 66px, transparent 74px, #b08d56 75px, transparent 76px, transparent 84px, #b08d56 85px, transparent 86px) !important;
}

body.dark-mode .menu-btn { background-color: rgba(42, 46, 56, 0.85); border-color: rgba(255, 255, 255, 0.08); }
body.dark-mode .menu-btn span { background-color: #e0e0e0; }
body.dark-mode .nav-item { color: #e0e0e0; border-bottom-color: rgba(255, 255, 255, 0.08); background: #2a2e38; }
body.dark-mode .nav-item:hover { background: #333842; border-color: rgba(255, 255, 255, 0.12); color: #cca572 !important; }
body.dark-mode .drawer-overlay { background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

body.dark-mode h2, body.dark-mode h3, body.dark-mode .work-title, body.dark-mode .profile-badge-zone h2, body.dark-mode .item-title { color: #ffffff !important; }
body.dark-mode label, body.dark-mode .form-label, body.dark-mode .edit-label, body.dark-mode .item-label, body.dark-mode .work-time-tag, body.dark-mode .result-label, body.dark-mode .stat-label, body.dark-mode .stamp-control-box-label, body.dark-mode .en-reward { color: #999999 !important; }
body.dark-mode .en-title-wrap .en-title, body.dark-mode .upper-brand-card .fya-tagline .en-tagline { color: #cccccc !important; }
body.dark-mode .upper-brand-card .fya-tagline .ar-tagline { color: #cca572 !important; }
body.dark-mode .page-title-badge .ar-title, body.dark-mode .admin-title-badge .ar-title, body.dark-mode .loyalty-title-badge .ar-title { color: #cca572 !important; }
body.dark-mode .qr-sub-text { color: #cca572 !important; }
body.dark-mode .ar-reward { color: #cca572 !important; }

body.dark-mode input, 
body.dark-mode select, 
body.dark-mode .search-input, 
body.dark-mode .form-input, 
body.dark-mode .form-select, 
body.dark-mode .input-box, 
body.dark-mode .workshop-select-input, 
body.dark-mode .workshop-input-field,
body.dark-mode .auth-input-group input {
    background-color: #21242c !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode input[type="date"], 
body.dark-mode input[type="time"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important; 
}
body.dark-mode input::placeholder { color: #666666; opacity: 1; }
body.dark-mode input:focus, body.dark-mode select:focus { 
    border-color: #cca572 !important; 
    box-shadow: 0 0 0 4px rgba(204, 165, 114, 0.25) !important; 
    background-color: #2a2e38 !important; 
}
body.dark-mode .input-placeholder-wrap::before { color: #666; }

body.dark-mode .tabs { background-color: #21242c; border-color: rgba(255, 255, 255, 0.1); }
body.dark-mode .tab { color: #999999; }
body.dark-mode .tab.active { background-color: #2a2e38; color: #cca572 !important; border-color: rgba(255, 255, 255, 0.1); }

body.dark-mode .table-scroll-container { background-color: #2a2e38; border-color: rgba(255, 255, 255, 0.1); }
body.dark-mode .user-data-table th { background-color: #21242c; color: #cca572 !important; border-color: rgba(255, 255, 255, 0.1); }
body.dark-mode .user-data-table td { border-bottom-color: rgba(255, 255, 255, 0.08); color: #e0e0e0; }

body.dark-mode #editUserPanelView h2 { color: #ffffff !important; }
body.dark-mode .edit-form-group label { color: #aaaaaa !important; }
body.dark-mode .stamp-control-box { background: #21242c !important; border: 1px solid rgba(255,255,255,0.1) !important; box-shadow: none !important; }
body.dark-mode #editStampsCount { color: #ffffff !important; }
body.dark-mode .btn-circle-modify { background: #333842 !important; color: #ffffff !important; }

body.dark-mode .btn-black { background-color: #333842 !important; color: #ffffff !important; border: 1px solid rgba(255, 255, 255, 0.12) !important; box-shadow: none !important; }
body.dark-mode .btn-black:hover { background-color: #3d434f !important; }
body.dark-mode .btn-gold { background-color: #cca572 !important; color: #ffffff !important; box-shadow: none !important; }
body.dark-mode .btn-gold:hover { background-color: #b08d56 !important; }
body.dark-mode .btn-outline { background: transparent; color: #cca572 !important; border-color: rgba(255, 255, 255, 0.15); }
body.dark-mode .btn-outline:hover { background: #2a2e38; border-color: #cca572; color: #fff; }
body.dark-mode .btn-load-more { border-color: rgba(255, 255, 255, 0.15); color: #cca572 !important; }
body.dark-mode .btn-load-more:hover { background: #2a2e38; }
body.dark-mode .menu-action-btn { background-color: #cca572 !important; color: #ffffff !important; box-shadow: none !important; }
body.dark-mode .menu-action-btn:hover { background-color: #b08d56 !important; }
body.dark-mode .btn-register { background-color: #cca572 !important; color: #ffffff !important; }
body.dark-mode .btn-register:hover { background-color: #b08d56 !important; }
body.dark-mode .btn-rate { background-color: #333842 !important; color: #ffffff !important; border: 1px solid rgba(255, 255, 255, 0.12) !important; }
body.dark-mode .btn-rate:hover { background-color: #3d434f !important; }
body.dark-mode .btn-registered { background: #21242c; color: #666; border: 1px solid rgba(255, 255, 255, 0.1); }

body.dark-mode .work-emirate-tag { background-color: #21242c; color: #cca572 !important; border-color: rgba(255, 255, 255, 0.1); }
body.dark-mode .workshop-date { color: #cca572 !important; }
body.dark-mode .btn-edit-user { background-color: #333842; color: #e0e0e0; }
body.dark-mode .btn-edit-action { background-color: #21242c; color: #cca572 !important; border-color: rgba(255, 255, 255, 0.1); }
body.dark-mode .result-card.error { background-color: #3a2222 !important; border-color: #663333 !important; }
body.dark-mode .result-card.error .result-title { color: #ff6b6b !important; }
body.dark-mode .fya-modal-overlay { background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

body.dark-mode .clock-icon { color: #cca572 !important; }

body.dark-mode .stamp-slot { background-color: #16181d !important; border: 1.5px dashed rgba(255, 255, 255, 0.15) !important; box-shadow: inset 0 2px 6px rgba(0,0,0,0.6) !important; }
body.dark-mode .stamp-slot img { opacity: 0.15; filter: grayscale(100%) brightness(0.8); }
body.dark-mode .stamp-slot.stamped { background-image: linear-gradient(145deg, #e6cfa5 0%, #cca673 50%, #b08d56 100%) !important; border: 1.5px solid #8f794e !important; background-color: transparent !important; box-shadow: 0 4px 12px rgba(204, 166, 115, 0.3), inset 0 2px 3px rgba(255, 255, 255, 0.5), inset 0 -2px 3px rgba(0,0,0,0.2), inset 0 0 0 3px #1c1f26 !important; }
body.dark-mode .stamp-slot.stamped img { opacity: 1; filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0,0,0,0.3)) !important; }

body.dark-mode .user-data-table th, 
body.dark-mode .user-data-table td {
    color: #e0e0e0 !important; 
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .user-data-table td[colspan] {
    color: #888888 !important; 
}

body.dark-mode #registeredWorkshopTitle {
    color: #ffffff !important; 
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode #registeredUsersList > div {
    background: #21242c !important; 
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
body.dark-mode #registeredUsersList span {
    color: #e0e0e0 !important;
}

body.dark-mode .fya-modal-card > div[style*="color: var(--fya-gold-deep)"] {
    color: #cca572 !important;
}

body.dark-mode .fya-modal-card .btn-gold[style*="background: #999"] {
    background-color: #333842 !important;
    color: #ffffff !important;
}

body.dark-mode .item-row { 
    color: #e0e0e0 !important; 
    border-bottom: none !important; 
}
body.dark-mode .item-row .item-label { 
    color: #999999 !important; 
}
body.dark-mode .item-row span { 
    color: #e0e0e0 !important; 
}

body.dark-mode .work-time-tag { 
    color: #ffffff !important;
}

body.dark-mode .workshop-setup > div[style*="color: #555"] {
    color: #aaaaaa !important;
    gap: 2px !important; 
}

body.dark-mode #scannerInterface > div[style*="background: #fdfdf9"] {
    background-color: #21242c !important;
    border-color: #3a3f4b !important;
}
body.dark-mode #scannerInterface > div[style*="background: #fdfdf9"] span {
    color: #e0e0e0 !important;
}
body.dark-mode #activeWorkshopNameDisplay {
    color: #cca572 !important;
}

body.dark-mode #reader {
    background-color: #2a2e38 !important; 
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode #reader img {
    filter: brightness(0) invert(1);
}

body.dark-mode #reader button {
    background-color: #cca572 !important;
    color: #ffffff !important;
    border: none !important;
}
body.dark-mode #reader__dashboard_section_csr span {
    color: #cca572 !important;
}

body.dark-mode .divider-text {
    color: #cca572 !important;
}
body.dark-mode .divider-text::before, 
body.dark-mode .divider-text::after {
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

body.dark-mode #installContent div {
    color: #e0e0e0 !important;
}
body.dark-mode #installContent div div[dir="ltr"] {
    border-top-color: rgba(255, 255, 255, 0.15) !important;
}


body.dark-mode .admin-stat-card {
    background: #2a2e38 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
body.dark-mode .admin-stat-card .stat-num {
    -webkit-text-fill-color: #cca572 !important;
}

body.dark-mode #rewardPrizeText {
    color: #ffffff !important;
}

body.dark-mode .fab-menu {
    background: #2a2e38 !important; 
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4) !important;
}
body.dark-mode .fab-menu-item {
    background: #21242c !important;
    color: #e0e0e0 !important;
}
body.dark-mode .fab-menu-item:hover { 
    background: #333842 !important; 
    border-color: rgba(255, 255, 255, 0.12) !important; 
}