#status {
    margin-top: 10px;
}

#att-status-msg,
#emp-status-msg {
    margin-top: 8px;
}

#btn-open-sheet {
    width: 100%;
}

#btn-open-sheet.btn-primary {
    padding: 10px 18px;
}

#status.status-success {
    color: #5bffce;
}

#status.status-error {
    color: #ff6b8b;
}

#tbl-emps thead th {
    padding: 8px 8px;
    font-size: 0.68rem;
}

#tbl-emps tbody td {
    padding: 8px 8px;
    font-size: 0.82rem;
}

#tbl-emps {
    min-width: 0;
}

.table-scroll {
    overflow-x: auto;
    overflow-y: visible;
}

.emp-cell {
    display: grid;
    gap: 6px;
}

.emp-cell-wrap {
    cursor: pointer;
}

.emp-cell-wrap:hover .emp-name-btn {
    color: #6ff1ff;
}

.emp-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.emp-name-btn {
    border: none;
    background: none;
    padding: 0;
    color: #f3f6ff;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}

.emp-name-btn:hover {
    color: #6ff1ff;
}

.emp-code {
    font-size: 0.72rem;
    color: rgba(154, 164, 193, 0.8);
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(5, 10, 22, 0.6);
    border: 1px solid rgba(142, 207, 255, 0.15);
}

.emp-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.emp-profile {
    display: grid;
    gap: 16px;
}

.emp-view-sub {
    margin: 0;
    color: rgba(154, 164, 193, 0.85);
    font-size: 0.82rem;
}

.emp-profile-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.emp-profile-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.emp-profile-code {
    font-size: 0.78rem;
    color: rgba(154, 164, 193, 0.9);
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(142, 207, 255, 0.2);
    background: rgba(5, 10, 22, 0.7);
}

.emp-profile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emp-profile-section {
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(142, 207, 255, 0.18);
    background: rgba(5, 10, 22, 0.65);
}

.emp-profile-today {
    display: flex;
    align-items: center;
    gap: 8px;
}

.emp-profile-times {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: rgba(230, 240, 255, 0.85);
}

.emp-profile-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(5, 10, 22, 0.6);
    border: 1px solid rgba(142, 207, 255, 0.18);
}

.emp-profile-time-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(154, 164, 193, 0.85);
}

.emp-profile-actions {
    display: grid;
    gap: 8px;
}

.emp-profile-action-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(154, 164, 193, 0.8);
}

.emp-profile-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emp-profile-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(154, 164, 193, 0.8);
    margin-bottom: 10px;
}

.emp-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.emp-profile-note {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(230, 240, 255, 0.9);
    white-space: pre-wrap;
    word-break: break-word;
}

.emp-profile-meta {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(154, 164, 193, 0.85);
    margin-bottom: 6px;
}

.emp-profile-link {
    color: #6ff1ff;
    text-decoration: none;
    font-weight: 600;
    word-break: break-word;
}

.emp-profile-link:hover {
    text-decoration: underline;
}

.emp-profile-link.is-muted {
    color: rgba(154, 164, 193, 0.8);
    cursor: default;
}

.attendance-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.analytics-body {
    flex: 1;
    overflow: auto;
    min-height: 0;
    padding-right: 4px;
}

.analytics-table-scroll {
    max-height: 320px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.analytics-table-scroll .grid-table {
    min-width: 520px;
}

.analytics-table-scroll .grid-table thead th {
    padding: 8px;
    font-size: 0.68rem;
}

.analytics-table-scroll .grid-table tbody td {
    padding: 8px;
    font-size: 0.8rem;
}

.note-content {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(142, 207, 255, 0.18);
    background: rgba(3, 8, 22, 0.6);
    color: rgba(243, 246, 255, 0.9);
    min-height: 80px;
    white-space: pre-wrap;
}

.checkin-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(142, 207, 255, 0.18);
    background: rgba(5, 10, 22, 0.65);
}

.att-open-wrap {
    margin-top: 8px;
    display: none;
}

.checkin-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    color: rgba(220, 232, 255, 0.75);
}

.checkin-toggle input {
    accent-color: #6ff1ff;
    width: auto;
    height: auto;
    margin: 0;
    flex: 0 0 auto;
}

.checkin-summary-item {
    display: grid;
    gap: 4px;
}

.checkin-summary-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(154, 164, 193, 0.85);
}

.checkin-summary-value {
    font-size: 0.9rem;
    color: rgba(243, 246, 255, 0.9);
}

.analytics-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.analytics-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.analytics-controls {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.analytics-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart,
#attendance-chart {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow: hidden;
}
#attendance-chart > div,
#attendance-chart svg {
    width: 100% !important;
    max-width: 100% !important;
}

#modal-settings {
    z-index: 60;
}

#modal-secret {
    z-index: 80;
}

.row-expand-btn {
    display: none;
}

.row-expand-btn i {
    font-size: 0.85rem;
}

.row-analytics-btn i {
    font-size: 0.85rem;
}

.row-attendance-btn i,
.row-checkin-btn i,
.row-checkout-btn i {
    font-size: 0.85rem;
}

.row-note-btn i {
    font-size: 0.85rem;
}

@media (max-width: 720px) {
    .row-expand-btn {
        display: inline-flex;
    }

    .row-expand-btn i {
        font-size: 0.75rem;
    }

    .row-analytics-btn i {
        font-size: 0.75rem;
    }

    .row-attendance-btn i,
    .row-checkin-btn i,
    .row-checkout-btn i {
        font-size: 0.75rem;
    }

    .row-note-btn i {
        font-size: 0.75rem;
    }

    .attendance-actions-bar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .checkin-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .analytics-presets {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .analytics-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .analytics-range {
        grid-template-columns: minmax(0, 1fr);
    }

    .analytics-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .analytics-table-scroll {
        max-height: 260px;
        overflow: auto;
        border: 1px solid rgba(142, 207, 255, 0.18);
        background: rgba(3, 8, 22, 0.75);
    }

    .analytics-table-scroll .grid-table {
        min-width: 0;
    }

    .analytics-body {
        padding-right: 0;
    }

    .emp-profile-today {
        flex-direction: column;
        align-items: flex-start;
    }

    .emp-profile-times {
        flex-wrap: wrap;
        gap: 6px;
    }

    .emp-profile-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #tbl-emps tbody tr {
        grid-template-columns: minmax(0, 1fr);
        padding: 12px;
    }

    #tbl-emps tbody td[data-label="Employee"] {
        grid-column: 1 / -1;
    }

    #tbl-emps .emp-chip-row {
        gap: 4px;
    }

    #tbl-emps tbody td[data-label="Actions"] {
        flex-wrap: wrap;
    }
}
