/* style.css - فایلی دیزاینی سەرەکی */

:root {
   --primary: #0062ff;
    --primary-rgb: 0, 98, 255; /* زیادکرا بۆ بەکارهێنان لە rgba */
    --primary-hover: #004dc2;
    --accent-pink: #ff69b4;
    --bg-color: #f1f5f9; /* تۆزێك تاریکتر کردنی سپییەکە بۆ جیاکردنەوەی کاردەکە */
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-sub: #64748b;
    --border-color: #e2e8f0;
    --input-bg: #f1f5f9;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary: #60a5fa; /* شینێکی نەرمتر و گەشتر بۆ دۆخی تاریک */
    --primary-rgb: 96, 165, 250; /* زیادکرا بۆ بەکارهێنان لە rgba */
    --primary-hover: #93c5fd;
    --bg-color: #020617;
    --card-bg: #0f172a;
    --text-main: #f1f5f9;
    --text-sub: #94a3b8;
    --border-color: #1e293b;
    --input-bg: #1e293b;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    font-family: 'Noto Kufi Arabic', -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    /* ڕێگری لە دەستنیشانکردنی دەق بۆ هەموو ئەپەکە */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none; /* ڕێگری لە مینیووی کۆپی لە مۆبایل */
}

/* ڕێگەدان بە دەستنیشانکردن تەنها لە خانەکانی نووسیندا */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Custom Modern Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-sub); /* ڕەنگی هەمیشەیی بۆ سکڕۆڵبار */
    border-radius: 20px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-sub); /* ڕەنگەکە ناگۆڕێت لە کاتی هۆڤەر */
}

html {
    /* گواستنەوەی باکگراوەند بۆ ئێرە بۆ ئەوەی هەموو شاشەکە بگرێتەوە بەبێ پچڕان */
    background: linear-gradient(-45deg, var(--bg-color), var(--border-color), var(--bg-color), rgba(var(--primary-rgb), 0.08));
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: shimmerBG 15s ease infinite;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: transparent !important; /* لابردنی باکگراوەندی body بۆ ئەوەی html دیار بێت */
    color: var(--text-main); /* Use new variable name */
    /* Support for iPhone Notch/Safe Areas */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    display: flex;
    justify-content: center;
   align-items: center; /* ناوەندکردنی ستوونی بۆ لاپەڕەی لۆگین */
    min-height: 100vh;
    transition: background 0.5s ease, opacity 0.4s ease, transform 0.4s ease;
    overflow-x: hidden;
}

/* تەنها لەو لاپەڕانەی داشبۆردیان تێدایە، با ناوەڕۆک لە سەرەوە دەست پێ بکات بۆ هەموو شاشەکان */
body:has(.dashboard-container) {
    align-items: flex-start;
    padding-bottom: 40px; /* بۆشاییەک لە خوارەوە بۆ کاتی سکڕۆڵ */
}

/* ئەنیمەیشنی بریقەی باکگراوند */
@keyframes shimmerBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.page-slide-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.5s ease;
    pointer-events: none;
}

/* Helper Classes */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-5 { margin-bottom: 5px; }
.mb-15 { margin-bottom: 15px; }
.align-right { text-align: right; }
.text-center { text-align: center; }

/* Forgot Password Modal Styles */
.forgot-header {
    background: linear-gradient(135deg, #0cb7c6, #e766b2) !important;
}

.forgot-modal-width {
    max-width: 360px !important;
}

.forgot-desc {
    margin-bottom: 15px;
}

.timer-box {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
    margin-bottom: 15px;
}

.otp-expiry-text {
    font-size: 0.7rem;
    color: var(--text-sub);
}

.otp-timer {
    font-weight: bold;
    color: var(--primary);
    font-family: monospace;
}

.otp-input-field {
    text-align: center;
    letter-spacing: 5px;
    font-size: 1.4rem;
    font-weight: bold;
}

.error-msg-small {
    display: none;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 8px;
    text-align: center;
}

.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
    margin: 0 auto;
}

.success-icon-large {
    font-size: 3rem;
    color: #22c55e;
}

.forgot-close-btn {
    margin-top: 20px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-sub);
    display: block;
    width: 100%;
}

.top-controls {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    z-index: 100;
    background: transparent;
}

/* کڵاسی نوێ بۆ جێگیرکردنی دوگمەکان لە لای چەپ بەبێ ئینلاین ستایل */
.top-controls.justify-end {
    justify-content: flex-end;
}

.top-control-group {
    display: flex;
    gap: 10px; /* بۆشاییەکی کەم و جوان لە نێوان هەردوو دوگمەکە */
}

.theme-toggle-btn, .icon-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
   color: var(--text-main);
    width: 42px;
    height: 42px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
   transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.theme-icon-anim {
    font-size: 1.2rem;
    animation: themeIconBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes themeIconBounce {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}


.theme-toggle-btn:hover, .icon-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: var(--card-bg) !important; /* بەکارهێنانی گۆڕاو بۆ ئەوەی لە هەردوو دۆخەکە کار بکات */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.settings-toggle-btn {
    margin-left: 0; /* لابردنی مارجین چونکە ئێستا لەناو دیڤێکی Flex دایە */
}

.settings-toggle-btn i {
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1.25rem;
    color: var(--text-main);
}

.settings-toggle-btn:active {
    transform: scale(0.9) rotate(-5deg);
}

.fa-spin-once {
    animation: settingsSpin 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--primary);
}

@keyframes settingsSpin {
    0% { transform: rotate(0deg) scale(1); }
    40% { transform: rotate(120deg) scale(1.15); }
    100% { transform: rotate(180deg) scale(1); }
}

.flag-img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-dropdown { position: relative;
}

.lang-dropbtn {
    background: var(--card-bg);
    border: 1px solid rgba(0, 98, 255, 0.2);
    color: var(--text-main);
    padding: 0 12px;
    height: 34px; /* Compact height */
    border-radius: 50px; /* Pill shape */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    text-decoration: none; /* In case it's used as a link */
}

.logout-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: #ef4444;
    padding: 0 15px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.logout-btn:hover {
    transform: translateY(-2px);
    border-color: #ef4444;
    background: #fee2e2;
}

/* دوگمەی نوێی بەڕێوەبەر لە ژێر مێژوو */
.mgmt-launch-btn {
    background: linear-gradient(135deg, #334155, #0f172a) !important; /* ڕەنگێکی ڕەساسی تۆخی فەرمی و شیک */
    color: #ffffff !important;
    border: none !important;
    margin: 5px auto 15px !important;
    border-radius: 20px !important;
    font-weight: 800 !important;
    height: 56px;
    width: 100%;
    font-size: 0.92rem !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    -webkit-tap-highlight-color: transparent;
}

.mgmt-launch-btn:active {
    transform: scale(0.96);
    filter: brightness(1.2);
}

/* مەودای نێوان کالێندەر و دوگمەی بەڕێوەبردن تەنها کاتێک کالێندەرەکە دەکرێتەوە */
#calendarWrapper.expanded + .mgmt-launch-btn {
    margin-top: 20px !important;
}

/* دیزاینی مۆدێرنی مۆداڵ */
.sub-admin-modal {
    overflow: visible !important;
    width: 95% !important;
    max-width: 440px !important;
    border: none !important;
    background: transparent !important; /* لابردنی پاشبنەما بۆ ڕێگری لە دەرکەوتنی سپی لە ژێر شینەکە */
     transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), min-height 0.3s ease;
}

/* دوگمەی داخستنی مۆدێرن و گونجاو بۆ مۆبایل */
.modal-close-btn-modern {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 38px;
    height: 38px;
    background: #ef4444; /* باکگراوندی سوور */
    border: none;
    color: #ffffff; /* ئایکۆنی سپی */
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 999999;
}

.modal-close-btn-modern:active {
    transform: scale(0.85) rotate(8deg); /* بچووکبوونەوە و کەمێک سوڕان لە کاتی داگرتن */
    background: #dc2626; /* سوورێکی تۆختر لە کاتی داگرتن بۆ فیدباک */
    color: white;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* ڕیزکردنی دوگمەکانی ناو مۆداڵ بە تەنیشت یەک */
.mgmt-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 5px;
}

.mgmt-action-btn {
    height: 48px;
    border-radius: 14px;
    border: 1.5px solid var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mgmt-action-btn:active {
    transform: scale(0.94);
    background: var(--primary);
    color: white;
}

.mgmt-action-btn.active {
    background: var(--primary);
    color: white;
}

/* گونجاندنی تایبەت بۆ مۆبایل */
@media (max-width: 480px) {
    .modal-close-btn-modern {
        top: 12px !important;
        left: 12px !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 12px !important;
    }

     .branch-card-content {
        padding: 15px 8px !important; /* کەمکردنەوەی پادینگی لایەکان بۆ ئەوەی کالێندەر جێگەی بێتەوە */
    }

    .calendar-grid {
        gap: 3px !important; /* کەمکردنەوەی بۆشایی نێوان ڕۆژەکان لە مۆبایل */
    }

    .calendar-day {
        height: 36px !important; /* کەمێک کەمکردنەوەی بەرزی خانەکان */
        font-size: 0.7rem !important;
    }
     .calendar-day-name {
        font-size: 0.6rem !important;
    }

    .branch-card-banner {
        padding: 15px !important;
    }

    .branch-logo-circle {
        width: 45px !important;
        height: 45px !important;
    }

    .branch-card-content {
        padding: 15px !important;
    }
}

.modal-close-btn-modern:hover {
    transform: rotate(90deg) scale(1.1);
    background: #ef4444;
    color: white;
}
.lang-dropdown-content {
    position: absolute;
    top: 40px;
    left: 0;
    background-color: var(--card-bg);
    min-width: 120px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.lang-dropdown-content.show { display: flex; animation: slideDown 0.3s ease; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-dropdown-content div {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.lang-dropdown-content div:hover { background: var(--input-bg); color: var(--primary); }

.employee-profile-card {
    background: rgba(var(--primary-rgb), 0.05); /* ڕەنگی شینی کاڵ بۆ ناو کاردەکە */
    border: 1.5px solid var(--primary); /* بۆردەرێکی شین */
    border-radius: 20px; /* گۆشەی خڕی مۆدێرن */
    padding: 15px 20px; /* بۆشایی ناوەوەی کۆمپاکت */
    margin-bottom: 20px; /* بۆشایی لە خوار کاردەکەوە */
    display: flex;
    flex-direction: column;
    align-items: center; /* ناوەندکردنی هەموو توخمەکان */
    text-align: center; /* ناوەندکردنی دەقەکان */
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.1); /* سێبەرێکی نەرمی شین */
    transition: all 0.3s ease;
}

.employee-profile-card #welcomeUser {
    font-size: 1.3rem; /* فۆنتێکی گەورەتر بۆ ناو */
    font-weight: 900; /* زۆر تۆخ */
    color: var(--primary); /* ڕەنگی شینی سەرەکی */
    margin-bottom: 10px; /* بۆشایی نێوان ناو و پلە/بنکە */
    line-height: 1.2;
}

.employee-profile-card #userRole {
    font-size: 0.75rem; /* فۆنتێکی بچووکتر بۆ پلە/بنکە */
    font-weight: 600;
    color: var(--text-sub); /* ڕەنگێکی کاڵتر */
    line-height: 1.4;
}

.login-card {
    background: var(--card-bg);
    padding: 15px 20px; /* کۆمپاکتر کردنی پادینگی ناوەوە */
    border-radius: 24px;
    width: 100%;
    max-width: 420px; /* پانی زیاتر بۆ لاپتۆپ و شاشە گەورەکان */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08); /* More modern, soft shadow */
    text-align: center;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.6s ease;
}

/* ڕێگریکردن لە گۆڕانی ڕەنگی خانەکە بۆ خۆڵەمێشی یان زەرد لە کاتی Autofill */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--card-bg) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.forgot-container {
    text-align: left;
    margin-top: -12px;
    margin-bottom: 18px;
    padding: 0 5px;
}

.forgot-link {
    color: var(--text-sub);
    font-size: 0.72rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary);
}

.forgot-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

/* لابردنی چاوی بنەڕەتی وێبگەڕ بۆ ڕێگری لە دووبارە بوونەوە */
input::-ms-reveal,
input::-ms-clear,
input::-webkit-contacts-auto-fill-button {
    display: none !important;
}

.forgot-step.active {
    display: block;
}

.forgot-header {
    background: linear-gradient(135deg, #0cb7c6, #e766b2) !important;
}

.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.timer-box {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

.forgot-modal-width {
    max-width: 360px !important;
}

.logo-box {
    width: 55px;
    height: 55px;
    background: #fff;
    border-radius: 20px; /* Slightly more rounded */
    margin: 0 auto 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06); /* Enhanced logo shadow */
    border: 1px solid var(--border-color);
}

.company-logo { max-width: 70%; object-fit: contain; }

h1 { font-size: 1.25rem; font-weight: 800; margin-bottom: 4px; color: var(--text-main); }
.subtitle { color: var(--text-sub); font-size: 0.75rem; margin-bottom: 42px; font-weight: 500; }

.input-group { margin-bottom: 18px; text-align: right; }
label { display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 600; color: var(--text-sub); }

.input-wrapper { position: relative; display: flex; align-items: center; }

input {
    width: 100%;
    padding: 12px 42px 12px 40px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--card-bg); /* هەمیشە سپی دەبێت لە لایتی تێمدا */
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

input:focus {
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15), 0 4px 12px rgba(var(--primary-rgb), 0.08);
}

.input-icon {
    position: absolute;
    right: 15px;
    color: var(--text-sub);
    transition: var(--transition);
    pointer-events: none;
    z-index: 6;
}

input:focus ~ .input-icon { color: var(--accent-pink); }

.floating-label {
    position: absolute;
    right: 42px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 !important;
    padding: 0 4px !important;
    pointer-events: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: transparent !important;
    color: var(--text-sub) !important;
    font-size: 0.85rem !important;
    z-index: 10;
}

input:not(:placeholder-shown) ~ .floating-label,
input:-webkit-autofill ~ .floating-label,
input:autofill ~ .floating-label,
input:focus ~ .floating-label {
    top: 0;
    right: 15px;
    transform: translateY(-50%) scale(0.9); /* بۆ ئەوەی جوانتر بنیشێت لەسەر بۆردەرەکە */
    font-size: 0.72rem !important;
    background: var(--card-bg) !important;
    padding: 0 6px !important;
    color: var(--text-sub) !important; /* ڕەنگی بنەڕەتی کاتێک خانەکە پڕە یان جێهێڵراوە */
}

/* تەنها لە کاتی فۆکەس و کلیک کردن ڕەنگەکەی بگۆڕێت بۆ شین */
input:focus ~ .floating-label {
    color: var(--primary) !important;
}

.eye-icon {
    position: absolute;
    left: 15px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
    border-radius: 50%;
}

.eye-icon:hover {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}

.eye-icon i {
    font-size: 1rem;
    transition: all 0.3s ease;
}

.eye-icon i.active {
    color: var(--primary);
}

.eye-icon-anim {
    animation: eyeBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes eyeBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}
.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.login-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 98, 255, 0.3);
}

.login-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.login-btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* --- Modal Styling (Centering Fix) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: none; /* Default hidden without inline style */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.confirm-modal-window {
    max-width: 320px !important;
}

.modal-window {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 24px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-icon {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
}

.calendar-workshop {
    background: rgba(99, 102, 241, 0.15) !important;
    border: 1px solid #6366f1 !important;
    color: #4f46e5 !important;
    font-weight: 700;
}

.calendar-mobile-team {
    background: rgba(20, 184, 166, 0.15) !important;
    border: 1px solid #14b8a6 !important;
    color: #0d9488 !important;
    font-weight: 700;
}

/* --- Compliance Card Styling --- */
.compliance-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: 20px;
    margin-top: -10px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.compliance-header {
    text-align: center;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.compliance-title {
    font-size: 0.6rem;
    font-weight: 800;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 6px;
    align-self: center;
    margin-bottom: 4px;
    white-space: nowrap;
}

.total-percentage {
    font-size: 2.6rem;
    font-weight: 900;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 0.8;
    letter-spacing: -2.5px;
    margin-top: 2px;
}

.compliance-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bar-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-sub);
}

.progress-bg {
    height: 6px;
    background: var(--input-bg);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 0%;
}

/* ڕەنگە زیرەکەکان */
.compliance-excellent { color: #22c55e !important; }
.compliance-good { color: #f59e0b !important; }
.compliance-poor { color: #ef4444 !important; }

.bg-excellent { background: linear-gradient(90deg, #22c55e, #4ade80) !important; }
.bg-good { background: linear-gradient(90deg, #f59e0b, #fbbf24) !important; }
.bg-poor { background: linear-gradient(90deg, #ef4444, #f87171) !important; }

/* --- Modal Compliance Styling --- */
.modal-compliance-box {
    background: var(--input-bg);
    padding: 12px 15px;
    border-radius: 16px;
    margin: 10px 0;
    border: 1px solid var(--border-color);
}

.m-comp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.m-comp-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-sub);
}

.m-comp-value {
    font-size: 1.2rem;
    font-weight: 900;
    font-family: 'Inter', sans-serif;
}

/* Password Strength UI */
.strength-meter {
    height: 4px;
    background: var(--input-bg);
    border-radius: 10px;
    margin-top: 6px;
    overflow: hidden;
    display: none; /* شاردنەوە لە سەرەتادا */
}

.strength-meter .bar {
    height: 100%;
    width: 0%;
    transition: all 0.4s ease;
}

.strength-label {
    font-size: 0.6rem;
    font-weight: 700;
    margin-top: 4px;
    display: none; /* شاردنەوە لە سەرەتادا */
    align-items: center;
    justify-content: center;
    padding: 3px 12px;
    border-radius: 6px;
    transition: all 0.4s ease;
    line-height: 1;
}

.strength-label:not(:empty) {
    margin-bottom: 2px;
}

.match-feedback {
    font-size: 0.7rem;
    margin-top: 6px;
    display: none;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

/* States */
.weak { background: #ef4444 !important; color: white !important; }
.medium { background: #f59e0b !important; color: white !important; }
.strong { background: #22c55e !important; color: white !important; }
.very-strong { background: #0ea5e9 !important; color: white !important; }

.match-success { color: #22c55e; display: flex; }
.match-error { color: #ef4444; display: flex; }

/* Ensure eye icon is always visible */
.eye-icon {
    position: absolute;
    left: 15px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
    border-radius: 50%;
}

.m-comp-bars {
    display: flex;
    gap: 4px;
}

.m-bar { flex: 1; height: 4px; background: var(--border-color); border-radius: 4px; overflow: hidden; }
.m-fill { height: 100%; border-radius: 4px; transition: width 1s ease; }

/* Modern Update Modal Specific Styling */
.update-card {
    padding: 0 !important;
    overflow: hidden;
    border: none !important;
    max-width: 400px !important;
}

.update-header {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    padding: 15px 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.update-icon-wrapper {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.update-icon-wrapper i {
    color: white;
    font-size: 1.4rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.update-body {
    padding: 15px 20px;
}

.update-body h3, .update-body h4 {
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: var(--text-main);
}

.update-body p {
    margin-bottom: 25px;
    font-size: 0.95rem;
    color: var(--text-sub);
    line-height: 1.6;
}

.update-body .login-btn {
    margin-top: 10px;
}

.update-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border: none;
    margin-top: 10px;
}

.update-btn:hover {
    box-shadow: 0 10px 20px rgba(0, 98, 255, 0.2) !important;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* History Modal Specific Header */
.history-header {
    background: linear-gradient(135deg, #64748b, #475569) !important;
}

.detail-text {
     background: var(--card-bg);
    padding: 10px;
    border-radius: 12px;
    margin: 5px 0;
    text-align: right;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.justification-area {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    text-align: right;
}

.justification-area label {
    font-size: 0.8rem;
    margin-bottom: 8px;
    display: block;
    color: var(--text-sub);
    font-weight: 700;
}

.justification-input {
    width: 100%;
    min-height: 55px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 0.85rem;
    resize: none;
    margin-bottom: 8px;
    outline: none;
    transition: var(--transition);
}

.btn-delete {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border: 1px solid #fecaca !important;
    width: 45px !important;
    padding: 0 !important;
    flex-shrink: 0;
}
.btn-delete:hover { background: #ef4444 !important; color: white !important; }

.justification-controls {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.justification-controls .login-btn { margin-top: 0 !important; }
.justification-controls #saveJustBtn { flex: 1; }
.justification-controls #deleteJustBtn { display: none; }

.btn-justification-edit {
    background: rgba(0, 98, 255, 0.1) !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    box-shadow: none !important;
}

.justification-input:focus {
    border-color: var(--primary);
    background: var(--card-bg);
}

.detail-text b {
    direction: ltr;
    display: inline-block;
}

/* --- Calendar Adjustments --- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-top: 15px;
    width: 100%;
}

.calendar-day {
    aspect-ratio: 1;
    width: 100%;
    height: 40px; /* قەبارەیەکی جێگیر بۆ ئەوەی لە کارتەکە دەرنەچێت */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--input-bg);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover { background: var(--primary); color: white; }
.has-record { border: 2px solid var(--primary); color: var(--primary); font-weight: 700; }
.today { background: var(--accent-pink) !important; color: white !important; }

.calendar-leave {
    background: rgba(255, 193, 7, 0.15) !important;
    border: 1px solid #ffc107 !important;
    color: #b48900 !important;
    font-weight: 700;
}

/* Custom Modern Dropdown Styles */
.custom-select {
    position: relative;
    width: 100%;
    text-align: right;
}

.select-trigger {
    width: 100%;
    height: 40px;
    padding: 0 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
}

.custom-select.active .select-trigger {
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.options-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-select.active .options-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.option {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.option:hover { background: var(--input-bg); color: var(--primary); }
.option.selected { background: rgba(var(--primary-rgb), 0.1); color: var(--primary); }

.weekend-day {
    color: #ef4444; /* ڕەنگی سور بۆ دەقی ڕۆژەکە */
    background: rgba(239, 68, 68, 0.08); /* پاشبنەمایەکی زۆر کاڵ بۆ ناسینەوەی پشوو */
}

.accuracy-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.acc-good { background: #dcfce7; color: #15803d; }
.acc-bad { background: #fee2e2; color: #b91c1c; }

/* Responsive Design Optimizations */
@media (max-width: 640px) {
    .dashboard-container {
        width: 100%;
        margin: 70px 0 0 0;
        padding: 15px;
    }

    body > .login-card {
        padding: 20px 18px;
        border-radius: 20px;
        max-width: none;
        width: calc(100% - 32px); /* دروستکردنی بۆشایی ١٦ پێکسڵ لە لای ڕاست و چەپ */
        margin: 0 auto; /* ناوەندکردنی کارتەکە */
    }
     
.calendar-nav-btn {
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
    width: auto !important;
    height: auto !important;
}

}

[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7) sepia(1) saturate(5) hue-rotate(200deg); /* شینێکی گەشاوە بۆ دۆخی تاریک */
}

input[type="date"]:focus::-webkit-calendar-picker-indicator {
 height: auto !important;
}

.calendar-nav-btn i {
    color: var(--primary);
}

    .calendar-grid {
        gap: 3px;
    }

    .subtitle {
        margin-bottom: 35px; /* مەودایەکی گونجاو بۆ مۆبایل تاوەکو تێکەڵ بوون ڕوونەدات */
    }


    .calendar-day {
        font-size: 0.75rem;
        border-radius: 8px;
    }

    .modal-window {
        width: 95%;
        padding: 20px;
        border-radius: 20px;
    }

/* Dashboard Layout Improvements */
.dashboard-container {
    width: 100%;
    max-width: 450px;
    margin: 80px auto 0;
    padding: 0 15px;
}

.status-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.clock-display {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: -1px;
    line-height: 1.2;
    direction: ltr; /* بۆ ئەوەی AM/PM بکەوێتە لای ڕاست */
}

.date-display {
    font-size: 1rem;
    color: var(--text-sub);
    margin-top: 5px;
    font-weight: 500;
}

#confirmTitle {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

#confirmMsg {
    font-size: 0.9rem;
    color: var(--text-sub);
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    text-align: right;
}

.accuracy-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.acc-good { background: #dcfce7; color: #166534; }
.acc-bad { background: #fee2e2; color: #991b1b; }

.checkin-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Error and Success Status Styling */
#error-msg {
    margin-top: 15px;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    display: none;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
    text-align: right;
    line-height: 1.4;
}
#error-msg.error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
#error-msg.success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }

.checkin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.checkin-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.checkout-active {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3) !important;
    display: none; /* Default hidden */
}

/* --- Staggered Fade-in Animation for Dashboard Cards --- */
.dashboard-container .employee-profile-card,
.dashboard-container .status-card,
.dashboard-container .location-card-mini,
.dashboard-container .checkin-btn {
    opacity: 0;
    animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dashboard-container .employee-profile-card { animation-delay: 0.1s; }
.dashboard-container .status-card { animation-delay: 0.2s; }
.dashboard-container .location-card-mini { animation-delay: 0.3s; }
.dashboard-container #checkinBtn, .dashboard-container #checkoutBtn { animation-delay: 0.4s; }
.dashboard-container .history-btn { animation-delay: 0.5s; }

/* Modern Error Message for Login */
#error-msg {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.82rem;
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
    animation: fadeIn 0.3s ease;
}

/* Compact Arrival Info */
.arrival-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    direction: ltr; /* بۆ ئەوەی کاتی هاتن لە ناو باجەکە ڕێك بێت */
    display: none; /* Default hidden */
}

/* Calendar Animation */
#calendarWrapper {
    max-height: 0;
    opacity: 0;
    overflow: hidden; /* Ensures content is hidden when collapsed */
    visibility: hidden; /* Hides from screen readers when collapsed */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}

#calendarWrapper.expanded {
    max-height: 500px; /* A value large enough to contain the calendar */
    opacity: 1;
    visibility: visible;
}

@keyframes btn-glow {
    0% { box-shadow: 0 0 5px rgba(0, 123, 255, 0.4); }
    50% { box-shadow: 0 0 20px rgba(0, 123, 255, 0.6); }
    100% { box-shadow: 0 0 5px rgba(0, 123, 255, 0.4); }
}

.searching-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.checkin-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

#calendarToggleBtn:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

.history-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #ffffff !important;
    border: none !important;
    margin: 25px auto 10px !important;
    border-radius: 20px !important;
    font-weight: 800 !important;
    height: 56px;
    font-size: 0.92rem !important;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* هەستی کلیک کردن لە مۆبایل */
.history-btn:active {
    transform: scale(0.96) translateY(2px) !important;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2) !important;
    filter: brightness(0.9);
}

.history-btn i {
    font-size: 1.2rem;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.history-btn:active i {
    transform: rotate(-10deg) scale(1.1);
}

.calendar-container {
    background: var(--input-bg);
    border-radius: 18px;
    padding: 12px;
    margin-top: 15px;
    width: 100%;
    border: 1px solid var(--border-color);
    animation: slideDownIn 0.4s ease-out;
}

@keyframes slideDownIn {
    from { opacity: 0; transform: translateY(-10px) scaleY(0.95); }
    to { opacity: 1; transform: translateY(0) scaleY(1); }
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

#monthDisplay {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-main);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
}
.calendar-day-name {
    font-weight: bold;
    font-size: 0.7rem;
    color: var(--primary);
    padding: 5px 0;
}
.calendar-day {
    padding: 6px 2px;
    border-radius: 6px;
    background: var(--input-bg);
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid transparent;
}
.calendar-day:hover {
    background: var(--primary);
    color: white;
}
.has-record {
    border: 1px solid #22c55e;
    background: #f0fdf4;
    color: #166534;
}
.weekend-default-day {
    color: var(--primary); /* ڕەنگی شین بۆ دەقی ڕۆژەکە */
    background: rgba(0, 98, 255, 0.08); /* پاشبنەمایەکی شینی کاڵ بۆ ناسینەوەی پشوو */
}
.missed-day {
    border: 1px solid #ef4444;
    background: #fef2f2;
    color: #991b1b;
}
.today {
    background: var(--primary) !important;
    color: white !important;
    font-weight: bold;
}

/* Modern Compact Location */
.location-card-mini {
   background: transparent; /* Remove background */
    border: none; /* Remove border */
    padding: 0; /* Remove padding */
    margin-bottom: 20px; /* Keep spacing below the whole section */
}

.verification-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.verify-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 10px 8px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
min-height: 80px; /* Ensure consistent height for both items */
}

.verify-item .item-header {
    display: flex;
    align-items: center;
    gap: 4px; /* Gap between main icon and title */
}

.verify-item i.main-icon {
    font-size: 1rem; /* Reduced size */
    color: var(--text-sub);
}

.verify-item span.item-title { /* New class for the title text */
    font-size: 0.75rem; /* Reduced size */
    font-weight: 700;
    color: var(--text-sub);
}

.verify-item .status-message {
    display: flex;
    align-items: center;
    gap: 4px; /* Gap between status text and icon */
    margin-top: 4px; /* Small margin to separate from title */
}

.verify-item .status-text {
    font-size: 0.7rem; /* Smaller font for status text */
    color: var(--text-sub);
    font-weight: 500;
}

.verify-item .status-icon { /* For the check/times/spinner icon */
    font-size: 0.7rem; /* Smaller icon */
}

.verify-item i.main-icon {
    font-size: 1.2rem;
    color: var(--text-sub);
}

.verify-item span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-sub);
}

.verify-item .status-indicator {
    font-size: 0.8rem;
    margin-top: 2px;
}

.verify-item.loading .item-header i, .verify-item.loading .item-header span {
    color: var(--text-sub); /* Keep default color for loading */
}
.verify-item.loading .status-message .status-icon {
    color: var(--primary); /* Loading spinner color */
}
.verify-item.loading .status-message .status-text {
    color: var(--text-sub);
}

.verify-success {
    border-color: #22c55e !important;
    background: rgba(34, 197, 94, 0.05) !important;
}
.verify-success .item-header i, .verify-success .item-header span, .verify-success .status-message .status-text, .verify-success .status-message .status-icon {
    color: #166534 !important;
}

.verify-error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
}
.verify-error .item-header i, .verify-error .item-header span, .verify-error .status-message .status-text, .verify-error .status-message .status-icon {
    color: #991b1b !important;
}

/* Accuracy Area and Refresh Button */
#accuracyArea {
    text-align: center;
    margin-top: 10px; /* Reduced margin */
    font-size: 0.75rem; /* Smaller font */
    color: var(--text-sub);
}

#refreshLocBtn {
    display: none; /* بە شێوەی بنەڕەتی شاراوەیە، تەنها لە کاتی هەڵە دەردەکەوێت */
    margin: 10px auto 0 auto !important; /* Center it below accuracy area */
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 18px; /* Adjusted padding */
    cursor: pointer;
    font-size: 0.8rem; /* Adjusted font size */
    transition: transform 0.3s;
    box-shadow: 0 2px 8px rgba(0, 98, 255, 0.2);
}
#refreshLocBtn:active {
    transform: scale(0.96) translateY(2px) !important;
}

.btn-secondary {
    box-shadow: none !important;
    background: var(--border-color) !important;
    color: var(--text-main) !important;
}

.btn-confirm {
    margin: 0 !important;
}

/* --- PWA Install Banner (Modern Bottom Sheet) --- */
.pwa-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    z-index: 99999;
    transition: bottom 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pwa-banner.show { bottom: 0; }

.pwa-handle {
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-bottom: 20px;
}

.pwa-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 400px;
    text-align: right;
}

.pwa-text {
    flex: 1;
}

.pwa-text h4 {
    margin-bottom: 4px;
}

.pwa-text p {
    font-size: 0.8rem;
    color: var(--text-sub);
}

.pwa-install-btn {
    width: 100%;
    max-width: 400px;
}

.pwa-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pwa-ios-hint {
    display: none;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    background: rgba(0, 98, 255, 0.05);
    padding: 10px;
    border-radius: 12px;
    margin-top: 10px;
}

/* PWA Close Button */
.pwa-close-btn {
    position: absolute;
    top: 15px;
    left: 15px; /* Positioned to the left for RTL layout */
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}
.pwa-close-btn:hover {
    background: var(--input-bg);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
}

.developer-credit {
    margin-top: 25px;
    font-size: 0.65rem;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0.7;
    transition: var(--transition);
    font-weight: 500;
}
.copyright-text {
    font-size: 0.65rem;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    opacity: 0.6;
    margin-top: 5px;
}
@media (max-width: 640px) {
    .developer-credit { margin-top: 18px; font-size: 0.55rem; }
    .copyright-text { font-size: 0.6rem; margin-bottom: 5px; }
}

.developer-credit:hover { opacity: 1; color: var(--primary); }
.developer-credit i { font-size: 0.85rem; }
.dev-name { font-weight: 700; color: var(--text-main); }

/* --- Sub-Admin Panel Improvements --- */
.sub-admin-panel {
    padding: 0 !important;
    overflow: visible !important; /* ڕێگەدان بە لیستەکان بچنە دەرەوەی کاردەکە */
    border: 1.5px solid var(--border-color);
}

.branch-card-banner {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    border-radius: 24px 24px 0 0; /* خڕکردنی لێوارەکانی سەرەوەی بانەرەکە چونکە overflow لابراوە */
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.branch-logo-circle {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.branch-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.branch-info-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start; /* بەپێی ئاراستەی زمانەکە لای چەپ یان ڕاست */
}

.branch-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.branch-id-display {
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    opacity: 0.95;
}

.branch-title-sep {
    font-size: 1.1rem;
    opacity: 0.5;
    font-weight: 300;
}

.branch-name-display {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.branch-mgmt-badge {
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.branch-card-content {
    padding: 22px;
    background: var(--card-bg); /* دانانی ڕەنگی سپی تەنها بۆ ئەم بەشە */
    border-radius: 0 0 24px 24px; /* خڕکردنی لێوارەکانی خوارەوە */
}

.sub-admin-panel .history-btn {
    margin: 0 !important;
    height: 48px !important;
    font-size: 0.85rem !important;
    background: rgba(var(--primary-rgb), 0.05) !important;
    color: var(--primary) !important;
    border: 1px dashed var(--primary) !important;
    box-shadow: none !important;
    border-radius: 14px !important;
}

.leave-management-card {
    border: 1px solid var(--border-color);
    padding: 18px;
    border-radius: 20px;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.leave-label {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    margin-bottom: 2px !important;
}

.date-range-container {
    display: flex;
    gap: 12px;
    width: 100%;
}

.input-wrapper-labeled {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
    min-width: 0;
}

.input-wrapper-labeled label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 4px;
}

.input-wrapper-labeled .glass-input {
    height: 48px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    background: var(--card-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    padding: 0 12px !important;
    line-height: 48px !important;
    display: block !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.save-leave-btn {
    height: 50px !important;
    font-size: 0.95rem !important;
    border-radius: 14px !important;
    margin-top: 5px !important;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.25) !important;
}

@media (max-width: 480px) {
    .date-range-container { gap: 8px; }
    .input-wrapper-labeled label { font-size: 0.65rem; }
    .input-wrapper-labeled .glass-input { 
        height: 46px !important; 
        line-height: 46px !important;
        font-size: 0.8rem !important;
        padding: 0 8px !important;
        text-align: center;
    }
    .sub-admin-panel .history-btn span,
    .save-leave-btn span {
        font-size: 0.85rem;
    }
}

/* --- Advanced Success Checkout Modal --- */
.checkout-success-modal {
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    border: none !important;
    background: var(--card-bg) !important;
}

.success-visual-header {
    height: 130px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.3);
    top: -10%;
    animation: confettiFall 3s infinite linear;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(200px) rotate(720deg); opacity: 0; }
}

.check-circle-wrapper {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 2;
    animation: checkJump 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes checkJump {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.check-circle-wrapper i {
    font-size: 2.2rem;
    color: var(--primary);
}

.success-content-body {
    padding: 20px 20px;
    text-align: center;
}

.success-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.success-msg {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.5;
    margin-bottom: 15px;
}

.modern-time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.time-card-modern {
    background: var(--input-bg);
    padding: 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.time-card-modern:hover { transform: translateY(-3px); }

.time-card-modern .t-icon {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 0.9rem;
}

.t-in { background: rgba(var(--primary-rgb), 0.15); color: var(--primary); }
.t-out { background: rgba(220, 38, 38, 0.15); color: #b91c1c; }

.time-card-modern .t-label { font-size: 0.65rem; font-weight: 700; color: var(--text-sub); display: block; margin-bottom: 2px; }
.time-card-modern .t-value { font-size: 1.1rem; font-weight: 900; color: var(--text-main); font-family: 'Inter', sans-serif; }

/* --- Modern Connectivity Toast --- */
.connectivity-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card-bg);
    color: var(--text-main);
    padding: 10px 22px;
    border-radius: 50px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    z-index: 1000000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    pointer-events: none;
    border: 1px solid var(--border-color);
}

.connectivity-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.connectivity-toast.success {
    border-right: 4px solid #22c55e;
}
.connectivity-toast.success i { color: #22c55e; animation: fadeIn 0.5s ease; }

[dir="ltr"] .connectivity-toast.success {
    border-right: none;
    border-left: 4px solid #22c55e;
}

/* --- Permanent Small Offline Bar --- */
.offline-bar {
    position: fixed;
    top: -30px;
    left: 0;
    right: 0;
    height: 26px;
    background: #ef4444;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    z-index: 2000;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}
.offline-bar.show { top: 0; }