/* =========================================================
   استایل ماژول «حضور و غیاب» — کاملاً دست‌نویس (نه کلاس‌های Tailwind)
   چون این پروژه هیچ build pipeline تیلویندی ندارد و فقط از CSS
   از‌پیش‌ساخته‌ی خودِ Filament استفاده می‌کند؛ هر کلاس Tailwind که خودِ
   Filament جایی استفاده نکرده باشد، اصلاً در آن فایل وجود ندارد و بی‌اثر
   است. برای همین همه‌چیز اینجا با رنگ/اندازه‌ی ثابت نوشته شده تا در هر دو
   تم روشن/تاریک (کلاس .dark روی <html>) درست و قطعی نمایش داده شود.
   این فایل هم مثل custom-theme.css مستقیم از public سرو می‌شود.
   ========================================================= */

/* ---------- دکمه‌ی «شروع ساعت کار» ---------- */
.attn-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.attn-chip-start {
    background-color: #16a34a;
    color: #ffffff;
}

.attn-chip-start:hover {
    background-color: #15803d;
}

.attn-chip-start:disabled {
    opacity: .6;
    cursor: default;
}

.attn-chip-active {
    background-color: #fef2f2;
    color: #b91c1c;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .25);
}

.attn-chip-active:hover {
    background-color: #fee2e2;
}

html.dark .attn-chip-active {
    background-color: rgba(248, 113, 113, .12);
    color: #f87171;
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .3);
}

.attn-chip svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.attn-dot-wrap {
    position: relative;
    display: inline-flex;
    width: 8px;
    height: 8px;
    flex-shrink: 0;
}

.attn-dot-ping {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background-color: #ef4444;
    opacity: .6;
    animation: attn-ping 1.4s cubic-bezier(0, 0, .2, 1) infinite;
}

.attn-dot-core {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background-color: #dc2626;
}

html.dark .attn-dot-core {
    background-color: #f87171;
}

@keyframes attn-ping {
    75%, 100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.attn-timer {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

/* ---------- ساعت/تاریخ بالای صفحه ---------- */
.attn-clock-chip {
    display: none;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    background-color: #f3f4f6;
    color: #374151;
    white-space: nowrap;
}

html.dark .attn-clock-chip {
    background-color: rgba(255, 255, 255, .06);
    color: #e5e7eb;
}

@media (min-width: 640px) {
    .attn-clock-chip {
        display: flex;
    }
}

.attn-clock-chip svg {
    width: 16px;
    height: 16px;
    color: #9ca3af;
    flex-shrink: 0;
}

html.dark .attn-clock-chip svg {
    color: #9ca3af;
}

.attn-clock-sep {
    color: #d1d5db;
}

html.dark .attn-clock-sep {
    color: #4b5563;
}

.attn-topbar-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

/* ---------- مودال تأیید خروج ---------- */
.attn-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(10, 10, 15, .5);
    padding: 16px;
}

.attn-modal-box {
    width: 100%;
    max-width: 380px;
    border-radius: 16px;
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .15);
}

html.dark .attn-modal-box {
    background-color: #1f2937;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .5);
}

.attn-modal-text {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin: 0;
}

html.dark .attn-modal-text {
    color: #f3f4f6;
}

.attn-modal-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.attn-btn {
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color .15s ease;
}

.attn-btn-ghost {
    background-color: transparent;
    border-color: #d1d5db;
    color: #374151;
}

.attn-btn-ghost:hover {
    background-color: #f9fafb;
}

html.dark .attn-btn-ghost {
    border-color: #4b5563;
    color: #e5e7eb;
}

html.dark .attn-btn-ghost:hover {
    background-color: #374151;
}

.attn-btn-danger {
    background-color: #dc2626;
    color: #ffffff;
}

.attn-btn-danger:hover {
    background-color: #b91c1c;
}

.attn-btn-danger:disabled {
    opacity: .6;
    cursor: default;
}

.attn-btn-primary {
    background-color: #4f46e5;
    color: #ffffff;
}

.attn-btn-primary:hover {
    background-color: #4338ca;
}

.attn-btn-dark {
    background-color: #1f2937;
    color: #ffffff;
}

.attn-btn-dark:hover {
    background-color: #111827;
}

html.dark .attn-btn-dark {
    background-color: rgba(255, 255, 255, .1);
}

html.dark .attn-btn-dark:hover {
    background-color: rgba(255, 255, 255, .18);
}

/* ---------- قفل تمام‌صفحه تا قبل از ثبت ورود ---------- */
.attn-lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
    padding: 24px;
    background-color: rgba(243, 244, 246, .85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

html.dark .attn-lock-overlay {
    background-color: rgba(17, 24, 39, .85);
}

.attn-lock-icon {
    width: 56px;
    height: 56px;
    color: #9ca3af;
}

html.dark .attn-lock-icon {
    color: #6b7280;
}

.attn-lock-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

html.dark .attn-lock-title {
    color: #f9fafb;
}

.attn-lock-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    max-width: 320px;
}

html.dark .attn-lock-subtitle {
    color: #9ca3af;
}

.attn-lock-overlay .attn-chip {
    height: 48px;
    padding: 0 24px;
    font-size: 15px;
}

/* ---------- صفحه‌ی تقویم حضور و غیاب ---------- */
.attn-cal-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .attn-cal-summary-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.attn-cal-summary-card {
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    padding: 12px;
    text-align: center;
}

html.dark .attn-cal-summary-card {
    border-color: rgba(255, 255, 255, .06);
    background-color: #111827;
}

.attn-cal-summary-label {
    font-size: 11px;
    color: #6b7280;
    margin: 0;
}

html.dark .attn-cal-summary-label {
    color: #9ca3af;
}

.attn-cal-summary-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 4px 0 0;
}

html.dark .attn-cal-summary-value {
    color: #f3f4f6;
}

.attn-cal-summary-avg {
    font-size: 11px;
    color: #9ca3af;
    margin: 0;
}

html.dark .attn-cal-summary-avg {
    color: #6b7280;
}

.attn-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 12px;
}

.attn-cal-nav-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.attn-cal-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #374151;
    cursor: pointer;
}

.attn-cal-nav-btn:hover {
    background-color: #f9fafb;
}

html.dark .attn-cal-nav-btn {
    border-color: #4b5563;
    background-color: transparent;
    color: #e5e7eb;
}

html.dark .attn-cal-nav-btn:hover {
    background-color: #374151;
}

.attn-cal-nav-btn svg {
    width: 16px;
    height: 16px;
}

.attn-cal-month-label {
    min-width: 140px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

html.dark .attn-cal-month-label {
    color: #e5e7eb;
}

.attn-cal-grid-wrap {
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    overflow: hidden;
}

html.dark .attn-cal-grid-wrap {
    border-color: rgba(255, 255, 255, .06);
    background-color: #111827;
}

.attn-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #f3f4f6;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
}

html.dark .attn-cal-weekdays {
    border-color: rgba(255, 255, 255, .06);
    color: #9ca3af;
}

.attn-cal-weekdays > div {
    padding: 8px 0;
}

.attn-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.attn-cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 84px;
    padding: 6px;
    border-bottom: 1px solid #f3f4f6;
    border-inline-start: 1px solid #f3f4f6;
    background: none;
    cursor: pointer;
    text-align: center;
    transition: background-color .15s ease;
}

html.dark .attn-cal-day {
    border-color: rgba(255, 255, 255, .06);
}

.attn-cal-day:hover {
    background-color: #f9fafb;
}

html.dark .attn-cal-day:hover {
    background-color: rgba(255, 255, 255, .04);
}

.attn-cal-day-outside {
    opacity: .35;
}

.attn-cal-day-num {
    align-self: flex-end;
    font-size: 11px;
    font-weight: 600;
    color: #4b5563;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

html.dark .attn-cal-day-num {
    color: #d1d5db;
}

.attn-cal-day-today .attn-cal-day-num {
    background-color: #4f46e5;
    color: #ffffff;
}

.attn-cal-day-worked { background-color: #f0fdf4; }
html.dark .attn-cal-day-worked { background-color: rgba(34, 197, 94, .08); }

.attn-cal-day-absence { background-color: #fef2f2; }
html.dark .attn-cal-day-absence { background-color: rgba(239, 68, 68, .08); }

.attn-cal-day-leave { background-color: #eff6ff; }
html.dark .attn-cal-day-leave { background-color: rgba(59, 130, 246, .08); }

.attn-cal-day-remote { background-color: #fffbeb; }
html.dark .attn-cal-day-remote { background-color: rgba(245, 158, 11, .08); }

.attn-cal-day-holiday { background-color: #f3f4f6; }
html.dark .attn-cal-day-holiday { background-color: rgba(255, 255, 255, .04); }

.attn-cal-day-label {
    font-size: 11px;
}

.attn-cal-day-duration {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    color: #4b5563;
}

html.dark .attn-cal-day-duration {
    color: #d1d5db;
}

.attn-cal-label-absence { color: #b91c1c; }
html.dark .attn-cal-label-absence { color: #f87171; }

.attn-cal-label-leave { color: #1d4ed8; }
html.dark .attn-cal-label-leave { color: #60a5fa; }

.attn-cal-label-remote { color: #b45309; }
html.dark .attn-cal-label-remote { color: #fbbf24; }

.attn-cal-label-holiday { color: #6b7280; }
html.dark .attn-cal-label-holiday { color: #9ca3af; }

/* ---------- مودال مدیریت یک روز ---------- */
.attn-day-modal-box {
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .15);
}

html.dark .attn-day-modal-box {
    background-color: #1f2937;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .5);
}

.attn-day-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.attn-day-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

html.dark .attn-day-modal-title {
    color: #f3f4f6;
}

.attn-day-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
}

.attn-day-modal-close:hover {
    color: #4b5563;
}

html.dark .attn-day-modal-close:hover {
    color: #e5e7eb;
}

.attn-day-modal-close svg {
    width: 18px;
    height: 18px;
}

.attn-shift-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 8px;
}

html.dark .attn-shift-row {
    border-color: #4b5563;
}

.attn-shift-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.attn-shift-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 11px;
    color: #9ca3af;
    border-top: 1px dashed #e5e7eb;
    padding-top: 6px;
}

html.dark .attn-shift-meta {
    color: #6b7280;
    border-color: #4b5563;
}

.attn-shift-meta b {
    font-weight: 600;
    color: #6b7280;
}

html.dark .attn-shift-meta b {
    color: #9ca3af;
}

.attn-shift-row-empty {
    font-size: 12px;
    color: #9ca3af;
}

html.dark .attn-shift-row-empty {
    color: #6b7280;
}

.attn-shift-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attn-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}

.attn-link-edit { color: #4f46e5; }
.attn-link-edit:hover { text-decoration: underline; }

.attn-link-delete { color: #dc2626; }
.attn-link-delete:hover { text-decoration: underline; }

.attn-day-modal-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

html.dark .attn-day-modal-section {
    border-color: rgba(255, 255, 255, .06);
}

.attn-day-modal-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #4b5563;
    margin: 0 0 8px;
}

html.dark .attn-day-modal-section-label {
    color: #d1d5db;
}

.attn-field-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.attn-field {
    flex: 1;
}

.attn-field label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

html.dark .attn-field label {
    color: #9ca3af;
}

.attn-input,
.attn-select {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 7px 10px;
    font-size: 13px;
    background-color: #ffffff;
    color: #111827;
}

html.dark .attn-input,
html.dark .attn-select {
    border-color: #4b5563;
    background-color: #374151;
    color: #f3f4f6;
}
