/* ============================================================
   Halaman Kehadiran & Perizinan
   (app/Filament/Admin/Pages/Attendance.php +
    resources/views/filament/pages/attendance.blade.php)
   ============================================================ */

.akti-attendance-section > .fi-section-content-ctn > .fi-section-content {
    padding-top: 0.25rem;
}

.akti-attendance-section,
.dark .akti-attendance-section,
.akti-attendance-section > .fi-section-content-ctn,
.dark .akti-attendance-section > .fi-section-content-ctn {
    background-color: transparent !important;
    border-radius: 0 !important;
}
.fi-section-content-ctn {
    margin-top: 1rem !important;
}
.akti-attendance-table-section,
.dark .akti-attendance-table-section {
    background-color: transparent !important;
}

.akti-attendance-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.akti-attendance-toolbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1 1 18rem;
}

.akti-attendance-recap {
    flex: 0 1 22rem;
    min-width: 16rem;
}

.akti-attendance-recap h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: #374151;
}

.dark .akti-attendance-recap h4 {
    color: #e5e7eb;
}

.akti-attendance-recap-table th {
    background: #74292a;
    color: #fff;
}

.dark .akti-attendance-recap-table th {
    background: #334155;
    color: #f1f5f9;
}

.akti-attendance-recap-empty {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
}

.akti-attendance-filter,
.akti-attendance-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.akti-attendance-filter-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #4b5563;
}

.dark .akti-attendance-filter-label {
    color: #d1d5db;
}

.akti-attendance-select {
    /* Limit ukuran agar tidak kebesaran */
    width: auto;
    min-width: 160px;
    height: 36px;
    padding: 0 36px 0 12px;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;

    /* Hilangkan panah kasar bawaan browser */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Tambahkan panah SVG kustom yang halus */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%6B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;

    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.akti-attendance-select:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.dark .akti-attendance-select {
    border-color: #4b5563;
    background: #1f2937;
    color: #f3f4f6;
}

.akti-attendance-notice {
    margin-bottom: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.8125rem;
}

.dark .akti-attendance-notice {
    background: #431407;
    color: #fdba74;
}

.akti-attendance-scroll {
    overflow-x: auto;
}

.akti-attendance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.akti-attendance-table th,
.akti-attendance-table td {
    border: 1px solid #9ca3af;
    padding: 0.25rem 0.5rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.akti-attendance-table th {
    background: var(--akti-th-bg);
    font-weight: 600;
    color: #374151;
}

.dark .akti-attendance-table th,
.dark .akti-attendance-table td {
    border-color: #4b5563;
}

.dark .akti-attendance-table th {
    color: #d1d5db;
}

.akti-attendance-table td.akti-attendance-cell--left {
    text-align: left;
    white-space: normal;
    min-width: 250px !important;
    width: 280px !important;
    word-break: break-word;
}

.akti-attendance-table th[rowspan="3"]:nth-last-child(2) {
    min-width: 250px !important;
    width: 280px !important;
}

.akti-attendance-row--weekend {
    background: #f9fafb;
}

.dark .akti-attendance-row--weekend {
    background: #111827;
}

.akti-attendance-cell--problem {
    background: #fecaca;
    font-weight: 600;
    color: #7f1d1d;
}

.dark .akti-attendance-cell--problem {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.akti-attendance-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b45309;
    cursor: pointer;
}

.akti-attendance-edit:hover {
    color: #92400e;
}

.dark .akti-attendance-edit {
    color: #fbbf24;
}

.akti-attendance-correction-row td {
    background: #fffbeb;
    white-space: normal;
    text-align: left;
}

.dark .akti-attendance-correction-row td {
    background: #292118;
}

.akti-attendance-correction-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
}

.akti-attendance-correction-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.dark .akti-attendance-correction-form label {
    color: #9ca3af;
}

.akti-attendance-correction-form input,
.akti-attendance-correction-form select {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
}

.dark .akti-attendance-correction-form input,
.dark .akti-attendance-correction-form select {
    border-color: #4b5563;
    background: #1f2937;
    color: #f3f4f6;
}

.akti-attendance-correction-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    color: #dc2626;
}

.dark .akti-attendance-correction-error {
    color: #f87171;
}

.akti-attendance-correction-reason {
    flex: 1 1 12rem;
}

.akti-attendance-correction-reason input {
    width: 100%;
}

.akti-attendance-correction-hint {
    margin: 0.25rem 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-style: italic;
    color: #9ca3af;
}

.akti-attendance-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.akti-attendance-modal {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 24rem;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.dark .akti-attendance-modal {
    background: #1f2937;
    color: #f3f4f6;
}

.akti-attendance-modal h3 {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.akti-attendance-modal--wide {
    max-width: 56rem;
}

.akti-attendance-code-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .akti-attendance-code-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.akti-attendance-code-grid h4,
.akti-attendance-code-system h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: #374151;
}

.dark .akti-attendance-code-grid h4,
.dark .akti-attendance-code-system h4 {
    color: #e5e7eb;
}

.akti-attendance-code-grid h4 span,
.akti-attendance-code-system h4 span {
    font-weight: 400;
    font-size: 0.75rem;
    color: #6b7280;
}

.dark .akti-attendance-code-grid h4 span,
.dark .akti-attendance-code-system h4 span {
    color: #9ca3af;
}

.akti-attendance-code-system {
    margin-bottom: 1rem;
}
