﻿.attendance-page {
    padding: 20px;
    min-height: 100%;
    background: #f8fafc;
}

.attendance-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 20px 24px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.attendance-hero-main h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.attendance-hero-main p {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: #64748b;
}

.attendance-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #2563eb;
}

.attendance-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.attendance-alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #fecaca;
    border-radius: 16px;
    background: #fef2f2;
    color: #991b1b;
}

.attendance-alert-title {
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 800;
}

.attendance-alert-message {
    font-size: 13px;
    line-height: 1.5;
}

.attendance-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.attendance-grid-top {
    grid-template-columns: 1fr 1.1fr;
}

.attendance-grid-bottom {
    grid-template-columns: 1fr;
}

.adm-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.adm-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px 16px 20px;
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
}

    .adm-panel-header h3 {
        margin: 4px 0 4px 0;
        font-size: 20px;
        font-weight: 800;
        line-height: 1.2;
        color: #0f172a;
    }

    .adm-panel-header p {
        margin: 0;
        font-size: 13px;
        color: #64748b;
    }

.adm-panel-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #2563eb;
}

.adm-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.adm-panel-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #edf2f7;
    background: #f8fafc;
}

.adm-panel-body {
    padding: 16px 20px 20px 20px;
}

.adm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

    .adm-btn:hover {
        transform: translateY(-1px);
    }

    .adm-btn:disabled {
        opacity: 0.6;
        cursor: default;
        transform: none;
    }

.adm-btn-sm {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 12px;
}

.adm-btn-light {
    background: #ffffff;
    border-color: #dbe3ee;
    color: #0f172a;
}

    .adm-btn-light:hover {
        background: #f8fafc;
    }

.adm-btn-primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

    .adm-btn-primary:hover {
        background: #1d4ed8;
        border-color: #1d4ed8;
    }

.adm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.adm-kpi-card {
    padding: 18px;
    border-radius: 18px;
    color: #ffffff;
}

    .adm-kpi-card.primary {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    }

    .adm-kpi-card.success {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
    }

    .adm-kpi-card.danger {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    }

    .adm-kpi-card.dark {
        background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    }

.adm-kpi-label {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.95;
}

.adm-kpi-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
}

.adm-kpi-sub {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.85;
}

.adm-summary-topline,
.adm-filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.adm-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
}

    .adm-chip.success {
        background: #dcfce7;
        color: #166534;
    }

    .adm-chip.danger {
        background: #fee2e2;
        color: #991b1b;
    }

    .adm-chip.dark {
        background: #e2e8f0;
        color: #0f172a;
    }

.adm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

    .adm-badge.success {
        background: #dcfce7;
        color: #166534;
    }

    .adm-badge.danger {
        background: #fee2e2;
        color: #991b1b;
    }

.adm-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

    .adm-filter-group label {
        font-size: 12px;
        font-weight: 700;
        color: #475569;
    }

.adm-select,
.adm-input {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    outline: none;
}

    .adm-select:focus,
    .adm-input:focus {
        border-color: #93c5fd;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }

.adm-tabbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.adm-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

    .adm-tab:hover {
        transform: translateY(-1px);
        background: #f8fafc;
    }

    .adm-tab.active.success {
        background: #ecfdf5;
        border-color: #86efac;
        color: #166534;
    }

    .adm-tab.active.danger {
        background: #fef2f2;
        border-color: #fca5a5;
        color: #991b1b;
    }

.adm-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    font-size: 11px;
    font-weight: 800;
}

.adm-table-wrap {
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
}

.adm-table {
    width: 100%;
    min-width: 860px;
    border-collapse: separate;
    border-spacing: 0;
}

    .adm-table thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        padding: 14px 14px;
        background: #f8fafc;
        border-bottom: 1px solid #e5e7eb;
        color: #334155;
        font-size: 12px;
        font-weight: 800;
        text-align: left;
        white-space: nowrap;
    }

    .adm-table tbody td {
        padding: 14px 14px;
        border-bottom: 1px solid #edf2f7;
        background: #ffffff;
        color: #0f172a;
        font-size: 14px;
        vertical-align: middle;
    }

    .adm-table tbody tr:hover td {
        background: #f8fbff;
    }

    .adm-table tbody tr:last-child td {
        border-bottom: none;
    }

.adm-site-name,
.adm-person-name {
    font-weight: 700;
    color: #0f172a;
}

.adm-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.adm-progress-track {
    position: relative;
    width: 100px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.adm-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.adm-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 180px;
    padding: 24px;
    border: 1px dashed #dbe3ee;
    border-radius: 16px;
    background: #fbfdff;
    color: #64748b;
    text-align: center;
}

.adm-state-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.adm-state-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.adm-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: adm-spin .8s linear infinite;
}

@keyframes adm-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1200px) {
    .attendance-grid-top {
        grid-template-columns: 1fr;
    }

    .adm-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .attendance-page {
        padding: 12px;
    }

    .attendance-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .attendance-hero-main h1 {
        font-size: 24px;
    }

    .attendance-hero-actions {
        width: 100%;
    }

    .adm-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .adm-panel-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .adm-filter-group {
        min-width: 100%;
    }

    .adm-kpi-grid {
        grid-template-columns: 1fr;
    }

    .adm-table {
        min-width: 720px;
    }
}

.worksite-assign-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.worksite-assign-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 16px;
}

.assign-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

    .assign-list-item + .assign-list-item {
        margin-top: 10px;
    }

.assign-list-name {
    font-weight: 700;
    color: #0f172a;
}

.assign-list-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.assign-help {
    margin-top: 12px;
    font-size: 12px;
    color: #64748b;
}

@media (max-width: 1200px) {
    .worksite-assign-grid {
        grid-template-columns: 1fr;
    }
}

.attendance-alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.attendance-alert-warn {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.adm-btn-danger {
    background: #ffffff;
    border-color: #fecaca;
    color: #b91c1c;
}

    .adm-btn-danger:hover {
        background: #fef2f2;
        border-color: #fca5a5;
    }

.adm-field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.adm-check-row {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}

    .adm-check-row input {
        margin-top: 3px;
    }

.adm-search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.adm-select-sm {
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 13px;
}

.adm-input-sm {
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 13px;
}

.worksite-assign-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 16px;
}

.assign-result-wrap {
    margin-top: 16px;
}

.assign-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

    .assign-list-item + .assign-list-item {
        margin-top: 10px;
    }

.assign-list-name {
    font-weight: 700;
    color: #0f172a;
}

.assign-list-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.assign-help {
    margin-top: 12px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .worksite-assign-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .adm-search-row {
        grid-template-columns: 1fr;
    }
}

.attendance-alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.register-site-page .invalid-feedback {
    font-size: 12px;
}

.register-site-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 16px;
}

.register-site-actions {
    flex-wrap: wrap;
}

.register-site-address-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.register-site-table {
    min-width: 760px;
}

.adm-table-empty {
    padding: 20px 0;
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

.adm-row-active td {
    background: #eff6ff !important;
}

.adm-mono {
    font-family: Consolas, Monaco, monospace;
}

@media (max-width: 1200px) {
    .register-site-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .register-site-address-row {
        grid-template-columns: 1fr;
    }

    .register-site-actions {
        width: 100%;
    }

    .register-site-table {
        min-width: 680px;
    }
}

.attendance-alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.register-site-page .invalid-feedback {
    font-size: 12px;
}

.register-site-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 16px;
}

.register-site-actions {
    flex-wrap: wrap;
}

.register-site-address-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.register-site-table {
    min-width: 760px;
}

.adm-table-empty {
    padding: 20px 0;
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

.adm-row-active td {
    background: #eff6ff !important;
}

.adm-mono {
    font-family: Consolas, Monaco, monospace;
}

.adm-form-section {
    margin-top: 8px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f8fafc;
}

.adm-form-section-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.adm-form-section-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
}

.adm-input.is-invalid,
.adm-select.is-invalid {
    border-color: #fca5a5;
    background: #fffefe;
}

    .adm-input.is-invalid:focus,
    .adm-select.is-invalid:focus {
        border-color: #f87171;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
    }

.adm-field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.adm-check-row {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}

    .adm-check-row input {
        margin-top: 3px;
    }

.assign-list-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.assign-help {
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .register-site-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .register-site-address-row {
        grid-template-columns: 1fr;
    }

    .register-site-actions {
        width: 100%;
    }

    .register-site-table {
        min-width: 680px;
    }
}