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

:root {
   --primary: #0062ff;
    --primary-rgb: 0, 98, 255; /* زیادکرا بۆ بەکارهێنان لە rgba */
    --primary-hover: #004dc2;
    --accent-pink: #ff69b4;
    --bg-color: #f8fafc;
    --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;
}

/* 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); /* ڕەنگەکە ناگۆڕێت لە کاتی هۆڤەر */
}

body {
   background-color: var(--bg-color);
    color: var(--text-main); /* Use new variable name */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
     transition: background-color 0.5s ease;
    overflow-x: hidden;
}

.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;
}

.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: rgba(0, 98, 255, 0.05);
}

.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;
}

.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); }

#welcomeUser {
    margin-bottom: 5px;
    font-weight: 700;
    color: var(--text-main);
}

.login-card {
    background: var(--card-bg);
    padding: 25px 25px;
    border-radius: 24px;
    width: 100%;
    max-width: 440px; /* کەمێک زیادکرا بۆ ئەوەی کالێندەرەکە جێگیر بێت */
    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;
}

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

.logo-box {
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 20px; /* Slightly more rounded */
    margin: 0 auto 15px; /* Reduced margin to bring title closer */
    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.6rem; font-weight: 800; margin-bottom: 4px; color: var(--text-main); } /* Bold title, closer to subtitle */
.subtitle { color: var(--text-sub); font-size: 0.85rem; margin-bottom: 18px; font-weight: 500; } /* Closer to inputs */

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

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

input {
    width: 100%;
    padding: 10px 42px 10px 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--input-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(0, 98, 255, 0.1);
}

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

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

.eye-icon {
    position: absolute;
    left: 15px;
    cursor: pointer;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    z-index: 10;
}

.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: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;
}

/* 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; }

.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;
    }

    .login-card {
        width: 100%;
        padding: 20px 18px;
        border-radius: 20px;
        max-width: none;
    }

    .top-controls {
        top: 10px;
        right: 10px;
        gap: 8px;
    }

.calendar-nav-btn {
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
    width: auto !important;
    height: auto !important;
}

    .calendar-grid {
        gap: 3px;
    }

    .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 20px;
    padding: 0 15px;
    animation: fadeIn 0.8s ease-out;
}

.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);
}

.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 */
}

/* 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 {
    font-size: 0.9rem !important;
    padding: 10px !important;
    box-shadow: none !important;
}

.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;
}

.history-btn {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    margin-top: 15px !important;
}

/* 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:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 98, 255, 0.3);
}

.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.5.5rem; }
    .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); }