/* ---------------------------------------------------------
   time.css — Employee Time Tracking (My Time, Time History)
   v2 — Nayax-inspired, uses CSS variables from base.css
--------------------------------------------------------- */

/* ══ Hub Layout (2-column: clock + sidebar) ══════════════ */
.tt-hub {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 14px;
    align-items: start;
}

/* ══ Status Badge ════════════════════════════════════════ */
.tt-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 8px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
    line-height: 1;
}
.tt-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tt-badge--open  { background: #ECFDF5; color: #047857; }
.tt-badge--open::before  { background: #10B981; }
.tt-badge--break { background: #FFF7ED; color: #B45309; }
.tt-badge--break::before { background: var(--warn); }
.tt-badge--done  { background: #EFF6FF; color: #1D4ED8; }
.tt-badge--done::before  { background: #3B82F6; }
.tt-badge--none  { background: var(--bg); color: var(--text-mute); }
.tt-badge--none::before  { background: var(--border-strong); }

/* ══ Main Clock Card ══════════════════════════════════════ */
.tt-clock-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 320px;
}

/* Clock-in time display */
.tt-clock {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.tt-clock__label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.tt-clock__time {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -.04em;
    color: var(--text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.tt-clock__date {
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 4px;
}
.tt-clock--idle .tt-clock__time {
    color: var(--text-mute);
    font-weight: 600;
    letter-spacing: 0;
}

/* Live elapsed pill */
.tt-elapsed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-soft);
}
.tt-elapsed__label {
    font-size: 12.5px;
    color: var(--text-soft);
    font-weight: 500;
}
.tt-elapsed__value {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}

/* Action buttons area */
.tt-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: auto;
}

/* ══ Sidebar ══════════════════════════════════════════════ */
.tt-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Stat card */
.tt-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 18px;
}
.tt-stat__label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: .07em;
}
.tt-stat__value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
}
.tt-stat__hint {
    font-size: 11.5px;
    color: var(--text-mute);
    margin-top: 1px;
}

/* ══ Compliance Card ══════════════════════════════════════ */
.tt-compliance { padding: 16px 18px; }
.tt-compliance__title {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 10px;
}
.tt-ok {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #15803d;
    font-weight: 500;
}
.tt-ok i { font-size: 18px; }
.tt-warnings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tt-warn-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    font-size: 12.5px;
    color: #92400e;
    line-height: 1.45;
}
.tt-warn-item i { flex-shrink: 0; margin-top: 1px; }

/* ══ Break Confirmation Modal ═════════════════════════════ */
.tt-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
}
.tt-modal.is-open { display: block; }

.tt-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
}
.tt-modal__dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, calc(100vw - 28px));
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 26px;
}
.tt-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    border: 1px solid var(--border-soft);
}
.tt-modal__close:hover { background: var(--bg-soft); color: var(--text); }

.tt-modal__head {
    margin: 0 0 14px;
}
.tt-modal__head h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 3px;
    line-height: 1.2;
}
.tt-modal__head p {
    font-size: 13px;
    color: var(--text-soft);
    margin: 0;
}

.tt-modal__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.tt-modal__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-soft);
}
.tt-modal__row strong {
    color: var(--text);
    font-weight: 600;
}
.tt-modal__note {
    padding: 11px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}
.tt-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 16px;
}

/* ══ Responsive ═══════════════════════════════════════════ */
@media (max-width: 900px) {
    .tt-hub {
        grid-template-columns: 1fr;
    }
    .tt-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .tt-stat {
        flex: 1 1 140px;
    }
    .tt-compliance {
        width: 100%;
    }
}
@media (max-width: 480px) {
    .tt-clock__time { font-size: 38px; }
    .tt-stat__value  { font-size: 22px; }
    .tt-modal__actions { grid-template-columns: 1fr; }
}
