/* ============================================================
   ADS styles - Time: attendance summary + timesheet approvals redesign
   Split out of the former monolithic style.css WITHOUT code changes.
   Files are linked in numeric order (see Core/templates/_styles.html) so
   the cascade is identical to the old single file.
   ============================================================ */

/* ============================================================
   ATTENDANCE SUMMARY (Project Manager / Super Admin)
   Filter bar, toggleable status chips, tag badges and pagination for
   the cumulative attendance screen. Mirrors the existing .ar-* visual
   language (glass chips, rounded pills) used on the Attendance Register.
   ============================================================ */
.as-filter-bar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 14px;
    margin: 14px 0 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.as-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--gray-600, #4b5563);
    min-width: 170px;
}
.as-filter-field select[multiple] {
    min-height: 38px;
    max-height: 90px;
}
.as-status-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}
.as-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid;
    border-radius: 999px;
    padding: 5px 12px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.as-status-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px -3px rgba(15, 23, 42, 0.18);
}
.as-chip-count {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.85;
}
.as-tag-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    border-radius: 999px;
    padding: 2px 8px;
    margin: 1px;
    white-space: nowrap;
}
.as-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
}
.as-page-indicator {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-600, #4b5563);
}

/* ========== TIMESHEET APPROVALS (redesign) ========== */
#page-approvals .apv-summary {
    margin: 14px 2px 10px;
    font-size: 13px;
    color: var(--gray-600);
}
#page-approvals .apv-summary strong { color: var(--gray-900); }
.apv-list { display: flex; flex-direction: column; gap: 14px; }
.apv-empty {
    background: var(--white);
    border: 1px dashed var(--gray-200);
    border-radius: 12px;
    padding: 36px 16px;
    text-align: center;
    color: var(--gray-600);
    font-size: 14px;
}
.apv-empty i { color: var(--green); margin-right: 6px; }

.apv-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.apv-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}
.apv-avatar {
    flex: 0 0 auto;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--green-lite);
    color: var(--green-dark);
    border: 1px solid var(--green-mid);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
}
.apv-who { flex: 1 1 180px; min-width: 0; }
.apv-user { font-size: 15px; font-weight: 700; color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apv-date { font-size: 13px; color: var(--gray-600); margin-top: 2px; }
.apv-meta { text-align: right; }
.apv-total { font-size: 16px; font-weight: 700; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.apv-sub { display: block; font-size: 12px; color: var(--gray-600); margin-top: 2px; }
.apv-day-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.apv-day-actions .ts-btn { white-space: nowrap; }

.apv-table-wrap { overflow-x: auto; }
.apv-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.apv-table th {
    text-align: left;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
}
.apv-table td {
    padding: 11px 16px;
    vertical-align: top;
    border-bottom: 1px solid var(--gray-100);
    overflow-wrap: anywhere;
}
.apv-table tbody tr:last-child td { border-bottom: none; }
.apv-table tbody tr:hover td { background: var(--gray-50); }
.apv-table .apv-col-ticket  { width: 16%; }
.apv-table .apv-col-loc     { width: 14%; }
.apv-table .apv-col-effort  { width: 9%; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.apv-table .apv-col-status  { width: 13%; }
.apv-table .apv-col-actions { width: 118px; white-space: nowrap; text-align: right; }
.apv-ticket { display: block; font-weight: 600; color: var(--gray-900); }
.apv-task { display: block; color: var(--text); line-height: 1.4; }
.apv-table td .apv-sub { margin-top: 3px; }
.apv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 860px) {
    .apv-meta { text-align: left; flex: 1 1 100%; order: 3; }
    .apv-day-actions { flex: 1 1 100%; order: 4; }
    .apv-day-actions .ts-btn { flex: 1; justify-content: center; }
    .apv-table { min-width: 620px; }
}

/* Ticket Start Time notes (timesheet week table, day header, team tickets, team overview) */
.ts-start-note { font-size: 11.5px; color: #475569; margin-top: 2px; white-space: nowrap; }
.ts-start-note i { font-size: 9px; color: #0ea16f; margin-right: 3px; }
.ts-start-day { margin-left: 10px; background: #ecfdf5; border: 1px solid #bbf7d0; border-radius: 999px; padding: 1px 9px; color: #166534; font-weight: 600; }
