/* =====================================================
   DASHBOARD ATTENDANCE CARD
   ===================================================== */

.attendance-card {
    background: #fff;
    border: 1px solid #f0ece9;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 5px 22px rgba(35, 25, 15, 0.07);
    color: #202124;
}

/* HEADER */

.attendance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.attendance-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #202124;
}

.attendance-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.attendance-status-working {
    color: #73501b;
    background: #fff3d9;
    border: 1px solid #f1dfb8;
}

.attendance-status-pending {
    color: #555;
    background: #f1f2f4;
    border: 1px solid #e0e2e5;
}

.attendance-status-complete {
    color: #176b3a;
    background: #e4f5e9;
    border: 1px solid #c7e8d1;
}

/* MAIN CONTENT */

.attendance-content {
    display: grid;
    grid-template-columns: minmax(160px, 0.95fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 20px;
}

/* CIRCULAR PROGRESS */

.attendance-progress-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.attendance-progress {
    position: relative;
    width: min(100%, 210px);
    aspect-ratio: 1 / 1;
}

.attendance-progress-svg {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.attendance-progress-track,
.attendance-progress-bar {
    fill: none;
    stroke-width: 10;
}

.attendance-progress-track {
    stroke: #f0e8e6;
}

.attendance-progress-bar {
    fill: none;
    stroke: #f45100;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 301.593;
    stroke-dashoffset: var(--attendance-offset, 301.593);
    transition: stroke-dashoffset 0.5s ease;
}

.attendance-progress-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
}

.attendance-worked-time {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.attendance-worked-label {
    margin-top: 8px;
    color: #777;
    font-size: 0.95rem;
}

/* DETAILS */

.attendance-details {
    min-width: 0;
}

.attendance-detail-item {
    padding: 4px 0 12px;
}

.attendance-detail-item:last-child {
    padding-top: 12px;
    padding-bottom: 0;
}

.attendance-detail-label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #737373;
    font-size: 1.05rem;
}

.attendance-detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    font-size: 1.35rem;
    font-weight: 600;
}

.attendance-detail-time {
    margin-top: 4px;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 750;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.attendance-late,
.attendance-ontime,
.attendance-muted,
.attendance-countdown {
    margin-top: 8px;
    font-size: 0.95rem;
}

.attendance-late {
    color: #d77b24;
    font-weight: 600;
}

.attendance-ontime {
    color: #298653;
    font-weight: 600;
}

.attendance-muted {
    color: #888;
}

.attendance-countdown {
    color: #d77b24;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.attendance-divider {
    height: 1px;
    background: #eaeaea;
}

/* ACTION BUTTON */

.attendance-action {
    margin-top: 20px;
}

.attendance-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 70px;
    padding: 16px 22px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}

.attendance-button-checkin,
.attendance-button-checkout {
    color: #fff;
    background: #050505;
}

.attendance-button-checkin:hover,
.attendance-button-checkout:hover {
    color: #fff;
    background: #303030;
    transform: translateY(-1px);
}

.attendance-button-disabled {
    color: #777;
    background: #ededed;
    cursor: not-allowed;
}

.attendance-button-complete {
    color: #176b3a;
    background: #e4f5e9;
    cursor: default;
}

/* FOOTER */

.attendance-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    color: #777;
    font-size: 0.95rem;
}

.attendance-footer > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.attendance-footer-separator {
    color: #aaa;
}

.attendance-photo-notice {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff5e8;
    color: #975b12;
    font-size: 0.875rem;
}

/* RESPONSIVE */

@media (max-width: 575.98px) {
    .attendance-card {
        padding: 14px 12px;
        border-radius: 20px;
    }

    .attendance-header {
        align-items: flex-start;
        margin-bottom: 16px;
    }

    .attendance-title {
        font-size: 1.05rem;
    }

    .attendance-status {
        padding: 7px 10px;
        font-size: 0.75rem;
    }

    .attendance-content {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 15px;
    }

    .attendance-progress {
        width: min(100%, 180px);
    }

    .attendance-progress-track,
    .attendance-progress-bar {
        stroke-width: 8;
    }

    .attendance-worked-time {
        font-size: clamp(1.35rem, 6vw, 1.8rem);
        letter-spacing: -0.5px;
    }

    .attendance-worked-label {
        margin-top: 5px;
        font-size: 0.72rem;
    }

    .attendance-detail-label {
        font-size: 0.9rem;
        gap: 5px;
    }

    .attendance-detail-time {
        font-size: clamp(1.4rem, 6vw, 1.9rem);
    }

    .attendance-late,
    .attendance-ontime,
    .attendance-muted,
    .attendance-countdown {
        font-size: 0.78rem;
    }

    .attendance-button {
        min-height: 54px;
        padding: 11px 15px;
        font-size: 1rem;
    }

    .attendance-footer {
        gap: 7px;
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .attendance-progress-bar,
    .attendance-button {
        transition: none;
    }
}