
.btn-success,
.btn-warning,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: none;
    outline: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: transform 140ms ease-out, box-shadow 140ms ease-out, filter 140ms ease-out;
    white-space: nowrap;
}

.btn-success {
    background: radial-gradient(circle at 0% 0%, #b6ffe8, #5bffce 55%, #19c28c 100%);
    color: #020308;
    box-shadow: 0 16px 34px rgba(91, 255, 206, 0.35);
}

.btn-warning {
    background: radial-gradient(circle at 0% 0%, #ffe7b0, #ffb84d 55%, #d27600 100%);
    color: #020308;
    box-shadow: 0 16px 34px rgba(255, 184, 77, 0.35);
}

.btn-danger {
    background: radial-gradient(circle at 0% 0%, #ffb9c8, #ff6b8b 55%, #c72c4e 100%);
    color: #020308;
    box-shadow: 0 16px 34px rgba(255, 107, 139, 0.35);
}

.btn-success:hover,
.btn-warning:hover,
.btn-danger:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.btn-mini {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(142, 207, 255, 0.25);
    background: rgba(3, 7, 20, 0.97);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-mini:hover {
    border-color: rgba(77, 241, 255, 0.6);
    box-shadow: 0 0 0 1px rgba(77, 241, 255, 0.35);
}

.input-with-btn {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.btn-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.status-message.status-loading {
    margin-top: 8px;
    color: var(--muted);
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.status-spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(152, 162, 195, 0.45);
    border-top-color: rgba(77, 241, 255, 0.95);
    animation: azspin 800ms linear infinite;
}

@keyframes azspin {
    to { transform: rotate(360deg); }
}

.status-bar {
    margin-top: 8px;
    height: 6px;
    border-radius: 999px;
    background: rgba(142, 207, 255, 0.12);
    overflow: hidden;
}

.status-bar-fill {
    height: 100%;
    width: 45%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(77, 241, 255, 0.2), rgba(77, 241, 255, 0.9), rgba(157, 255, 245, 0.35));
    animation: azbar 950ms ease-in-out infinite;
}

@keyframes azbar {
    0% { transform: translateX(-60%); }
    50% { transform: translateX(40%); }
    100% { transform: translateX(160%); }
}

.empty-state {
    margin: 12px 0 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 184, 77, 0.28);
    background: rgba(10, 8, 2, 0.35);
    padding: 12px 12px;
    display: grid;
    gap: 8px;
}

.empty-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: rgba(255, 223, 160, 0.95);
}

.empty-sub {
    color: rgba(154, 164, 193, 0.95);
    font-size: 0.88rem;
}

@media (max-width: 560px) {
    .btn-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1024px) {
    .attendance-actions-bar,
    .inventory-actions-bar,
    .invoice-actions-bar,
    .expense-actions-bar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
        width: 100%;
    }

    .attendance-actions-bar .btn-mini,
    .inventory-actions-bar .btn-mini,
    .invoice-actions-bar .btn-mini,
    .expense-actions-bar .btn-mini {
        width: 100%;
        justify-content: center;
    }
}
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.82em;
    opacity: 0.95;
}

.sheet-mini-status {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--muted);
}

.tool-details {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(142, 207, 255, 0.22);
    background: rgba(3, 8, 22, 0.65);
    padding: 10px 12px;
}

.tool-details summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tool-details-body {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

.tool-steps {
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.tool-note {
    margin-top: 10px;
    border-radius: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(77, 241, 255, 0.22);
    background: rgba(6, 12, 28, 0.8);
    color: rgba(154, 164, 193, 0.95);
}

.tool-details-inner {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(130, 196, 255, 0.18);
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.dash-metric {
    border-radius: 16px;
    border: 1px solid rgba(142, 207, 255, 0.18);
    background: rgba(3, 8, 22, 0.75);
    padding: 10px 12px;
}

.dash-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(154, 164, 193, 0.9);
}

.dash-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2px;
}

.chart-wrap {
    margin-top: 12px;
    border-radius: 18px;
    border: 1px solid rgba(142, 207, 255, 0.18);
    background: rgba(3, 8, 22, 0.75);
    padding: 10px;
    overflow: hidden;
    min-width: 0;
}

.chart {
    width: 100%;
    height: 280px;
    max-width: 100%;
    display: block;
    overflow: hidden;
}

.table-wrap {
    margin-top: 12px;
    min-width: 0;
}

.table-title {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.table-scroll {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(142, 207, 255, 0.18);
    background: rgba(3, 8, 22, 0.75);
    min-width: 0;
    -webkit-overflow-scrolling: touch;
}

.grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
}

.grid-table thead th {
    position: sticky;
    top: 0;
    background: rgba(5, 10, 24, 0.95);
    color: rgba(154, 164, 193, 0.95);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 10px 10px;
    border-bottom: 1px solid rgba(142, 207, 255, 0.16);
}

.grid-table tbody td {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(142, 207, 255, 0.08);
    color: rgba(247, 249, 252, 0.92);
    font-size: 0.86rem;
    white-space: nowrap;
}

.grid-table tbody tr:hover td {
    background: rgba(77, 241, 255, 0.06);
}

.table-scroll.no-scroll {
    overflow: visible;
}

.table-title--legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.table-legend {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: rgba(154, 164, 193, 0.9);
}

.grid-table thead th {
    overflow: visible;
    z-index: 30;
}

.th-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.th-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: rgba(154, 164, 193, 0.85);
    cursor: help;
    position: relative;
    z-index: 999;
}

.th-help i {
    font-size: 0.72rem;
}

.th-help::after {
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: rgba(10, 14, 28, 0.96);
    color: rgba(243, 246, 255, 0.95);
    border: 1px solid rgba(142, 207, 255, 0.25);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.68rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
    width: max-content;
    max-width: 240px;
    text-transform: none;
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.th-help::before {
    content: "";
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent rgba(142, 207, 255, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 999;
}

.th-help:hover::after,
.th-help:focus::after,
.th-help:hover::before,
.th-help:focus::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(230, 240, 255, 0.9);
    background: rgba(5, 10, 22, 0.75);
    border: 1px solid rgba(142, 207, 255, 0.2);
}

.btn-row-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.btn-row-inline .btn-primary,
.btn-row-inline .btn-ghost {
    width: 100%;
}

.connect-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.oauth-disclaimer {
    flex: 1 1 100%;
    font-size: 0.78rem;
    color: rgba(154, 164, 193, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(142, 207, 255, 0.18);
    background: rgba(3, 8, 22, 0.55);
    padding: 8px 10px;
}

.oauth-disclaimer a {
    color: #6ff1ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.oauth-disclaimer--footer {
    max-width: var(--max-width);
    margin: 16px auto 0;
    padding: 10px 20px 0;
    border: none;
    background: transparent;
    color: rgba(154, 164, 193, 0.85);
    font-size: 0.75rem;
}

.sheet-connection-card {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15, 20, 35, 0.55);
    border: 1px solid rgba(120, 140, 200, 0.2);
}

.sheet-meta-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    font-size: 0.95rem;
    padding: 4px 0;
}

.sheet-meta-label {
    color: rgba(230, 240, 255, 0.65);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.sheet-meta-value {
    color: #f3f6ff;
    word-break: break-word;
}

.settings-panel {
    margin-top: 4px;
}

.settings-fields {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.settings-split {
    display: grid;
    gap: 10px;
}

.lock-controls {
    margin-top: 12px;
    display: grid;
    gap: 8px;
    justify-items: start;
}

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

.settings-panel .lock-toggle {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

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

.tool-company {
    display: none;
    font-size: clamp(1.1rem, 1.6vw, 1.6rem);
    font-weight: 700;
    color: rgba(230, 240, 255, 0.96);
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.sheet-tool-thumb {
    width: clamp(120px, 18vw, 190px);
    height: clamp(120px, 18vw, 190px);
}

.tool-hero-card.is-collapsed {
    padding: 14px 16px;
}

.tool-hero-card.is-collapsed .tool-desc {
    display: none;
}

.tool-hero-card.is-collapsed .tool-toolbar,
.tool-hero-card.is-collapsed #status,
.tool-hero-card.is-collapsed #mini-status,
.tool-hero-card.is-collapsed #connected-panel {
    display: none !important;
}

.tool-hero-card.has-company #tool-company-name {
    display: block;
}

.tool-hero-card.is-collapsed .tool-header {
    position: relative;
    align-items: center;
}

.tool-hero-card.is-collapsed .tool-header-content {
    padding-right: 48px;
}

.tool-hero-card.is-collapsed .tool-header-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
}

.tool-hero-card .tool-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stack-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.settings-btn {
    width: 40px;
    height: 40px;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-body {
    display: grid;
    gap: 12px;
}

.card-collapsed .card-body {
    display: none;
}

.card-locked .card-head h3 {
    color: rgba(255, 255, 255, 0.7);
}

.dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.dashboard-actions,
.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-filter {
    border-radius: 999px;
    border: 1px solid rgba(142, 207, 255, 0.25);
    background: rgba(5, 10, 22, 0.6);
    color: var(--muted);
    padding: 6px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btn-filter.is-active {
    background: rgba(77, 241, 255, 0.18);
    border-color: rgba(77, 241, 255, 0.5);
    color: #e9f8ff;
}

.instruction-card .card-head h3 {
    margin-bottom: 4px;
}

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

.instruction-block {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(142, 207, 255, 0.18);
    background: rgba(3, 8, 22, 0.55);
}

.instruction-block h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: #f3f6ff;
}

.instruction-list {
    margin: 0;
    padding-left: 18px;
    color: rgba(220, 232, 255, 0.75);
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
}

.table-actions .btn-mini,
.dashboard-actions .btn-mini,
.attendance-actions-bar .btn-mini {
    width: auto;
    height: auto;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(142, 207, 255, 0.2);
    background: rgba(5, 10, 22, 0.85);
    box-shadow: none;
}

.table-actions .btn-primary.btn-mini,
.dashboard-actions .btn-primary.btn-mini,
.attendance-actions-bar .btn-primary.btn-mini {
    background: radial-gradient(circle at 0% 0%, #a9fff7, #4df1ff 50%, #13a3b2 100%);
    color: #020308;
    border: none;
    box-shadow: 0 12px 24px rgba(0, 200, 255, 0.45);
}

.table-actions .btn-success.btn-mini,
.dashboard-actions .btn-success.btn-mini,
.attendance-actions-bar .btn-success.btn-mini {
    background: radial-gradient(circle at 0% 0%, #b6ffe8, #5bffce 55%, #19c28c 100%);
    color: #020308;
    border: none;
    box-shadow: 0 12px 24px rgba(91, 255, 206, 0.35);
}

.table-actions .btn-warning.btn-mini,
.dashboard-actions .btn-warning.btn-mini,
.attendance-actions-bar .btn-warning.btn-mini {
    background: radial-gradient(circle at 0% 0%, #ffe7b0, #ffb84d 55%, #d27600 100%);
    color: #020308;
    border: none;
    box-shadow: 0 12px 24px rgba(255, 184, 77, 0.35);
}

.table-actions .btn-mini span,
.dashboard-actions .btn-mini span,
.attendance-actions-bar .btn-mini span {
    font-size: 0.7rem;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(7, 10, 18, 0.72);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    z-index: 50;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal.open {
    display: flex;
}

.modal-card {
    width: min(620px, 96vw);
    background: #0f1424;
    border: 1px solid rgba(120, 140, 200, 0.3);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 20px 60px rgba(5, 8, 18, 0.65);
    max-height: min(90vh, 720px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-card-wide {
    width: min(1040px, 96vw);
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 720px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.modal-body {
    display: grid;
    gap: 12px;
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-icon {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #f3f6ff;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.modal-open {
    overflow: hidden;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #021017;
    background: rgba(152, 162, 195, 0.35);
}

.status-chip--present,
.status-chip--active {
    background: linear-gradient(135deg, #7fffd4, #4df1ff);
    color: #021019;
}

.status-chip--late {
    background: linear-gradient(135deg, #ffdba8, #ffb84d);
    color: #2a1900;
}

.status-chip--not_set {
    background: linear-gradient(135deg, #ffd29c, #ff9c3f);
    color: #2a1900;
}

.status-chip--absent,
.status-chip--inactive {
    background: linear-gradient(135deg, #ffb9c8, #ff6b8b);
    color: #2a0611;
}

.status-chip--leave,
.status-chip--half_day,
.status-chip--halfday {
    background: linear-gradient(135deg, #ffe9a8, #f6d167);
    color: #2c1d00;
}

.status-chip--unknown {
    background: rgba(152, 162, 195, 0.35);
    color: #0a0f1f;
}

.divider {
    margin: 16px 0;
    height: 1px;
    background: rgba(142, 207, 255, 0.16);
}

@media (max-width: 960px) {
    .dash-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chart {
        height: 240px;
    }

    .grid-table {
        min-width: 640px;
    }
}

@media (max-width: 960px) {
    .sheet-meta-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 961px) {
    .grid-table thead th.sticky-col,
    .grid-table tbody td.sticky-col {
        position: sticky;
        left: 0;
        z-index: 2;
        background: rgba(5, 10, 24, 0.98);
        box-shadow: 8px 0 16px rgba(5, 10, 24, 0.4);
    }

    .grid-table thead th.sticky-col {
        z-index: 5;
    }
}

@media (max-width: 720px) {
    .card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .table-title--legend {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-legend {
        width: 100%;
        flex-wrap: wrap;
    }

    .connect-buttons {
        width: 100%;
    }

    .connect-buttons .btn-success,
    .connect-buttons .btn-ghost,
    .connect-buttons .btn-danger {
        width: 100%;
        justify-content: center;
    }

    .table-scroll {
        border: none;
        background: transparent;
        overflow: visible;
    }

    .chart-wrap {
        padding: 8px;
    }

    .chart {
        height: 220px;
    }

    .status-chip {
        padding: 2px 8px;
        font-size: 0.58rem;
        letter-spacing: 0.08em;
    }

    .meta-chip {
        padding: 2px 6px;
        font-size: 0.56rem;
        letter-spacing: 0.06em;
    }

    .btn-filter {
        padding: 6px 8px;
        font-size: 0.62rem;
        letter-spacing: 0.06em;
    }

    .dashboard-toolbar {
        align-items: stretch;
    }

    .dashboard-actions,
    .dashboard-filters {
        width: 100%;
    }

    .dashboard-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

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

    .settings-fields .field-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .lock-controls {
        width: 100%;
    }

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

    .grid-table thead {
        display: none;
    }

    .grid-table tbody {
        display: grid;
        gap: 12px;
    }

    .grid-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 12px;
        border-radius: 16px;
        border: 1px solid rgba(142, 207, 255, 0.18);
        background: rgba(3, 8, 22, 0.75);
    }

    .grid-table tbody td {
        padding: 0;
        border: none;
        white-space: normal;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .grid-table tbody td.card-detail {
        display: none;
    }

    .grid-table tbody tr.is-expanded td.card-detail {
        display: flex;
    }

    .grid-table tbody td::before {
        content: attr(data-label);
        font-size: 0.62rem;
        text-transform: uppercase;
        letter-spacing: 0.16em;
        color: rgba(154, 164, 193, 0.85);
    }

    .grid-table tbody td[data-label="Actions"] {
        grid-column: 1 / -1;
        align-items: flex-start;
        flex-direction: row;
        gap: 8px;
    }

    .grid-table tbody td[data-label="Actions"]::before {
        margin-bottom: 2px;
    }

    .grid-table tbody td[data-label="Actions"] .btn-mini {
        flex: 1;
        justify-content: center;
        height: auto;
        width: auto;
        padding: 6px 10px;
        border-radius: 999px;
        font-size: 0.72rem;
    }

    .grid-table tbody td[data-label="Actions"] .row-expand-btn {
        flex: 0.7;
    }

    .grid-table tbody td[data-label="Actions"] .row-analytics-btn {
        flex: 0.9;
    }

    .grid-table tbody td[data-label="Actions"] .row-attendance-btn {
        flex: 0.9;
    }

    .grid-table tbody td[data-label="Actions"] .row-checkin-btn {
        flex: 0.9;
    }

    .grid-table tbody td[data-label="Actions"] .row-checkout-btn {
        flex: 0.9;
    }

    .grid-table tbody td[data-label="Actions"] .row-note-btn {
        flex: 0.9;
    }

    .grid-table tbody td[data-label="Actions"] .row-edit-btn {
        display: none;
    }

    .grid-table tbody tr.is-expanded td[data-label="Actions"] .row-edit-btn {
        display: inline-flex;
    }

    .modal-card-wide {
        max-height: 92vh;
    }

    .tool-hero-card.is-collapsed .tool-header-actions {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 560px) {
    .sheet-tool-thumb {
        width: clamp(180px, 70vw, 220px);
        height: clamp(180px, 70vw, 220px);
    }
}

@media (min-width: 721px) and (max-width: 1024px) {
    .table-scroll {
        overflow-x: auto;
        overflow-y: auto;
        touch-action: pan-x pan-y;
    }

    .grid-table {
        min-width: 960px;
    }
}
