﻿.admin-page {
    min-height: 100vh;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: #172033;
    background: radial-gradient(circle at top left, rgba(38, 99, 235, .12), transparent 30%), linear-gradient(180deg, #f8fafc 0%, #ffffff 45%);
    padding: 60px 28px 80px;
}

.admin-page-wide {
    max-width: 1800px;
}

.admin-page-full {
    max-width: none;
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
}

.admin-hero {
    max-width: 1180px;
    margin: 0 auto 30px;
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: center;
}

    .admin-hero h1 {
        font-size: clamp(2.2rem, 4vw, 3.6rem);
        letter-spacing: -0.05em;
        color: #0f172a;
        margin: 0 0 10px;
    }

    .admin-hero p {
        color: #64748b;
        font-size: 1.05rem;
        line-height: 1.65;
        margin: 0;
    }

.admin-card {
    max-width: 1180px;
    margin: 0 auto;
    background: rgba(255,255,255,.95);
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.admin-field label {
    display: block;
    color: #334155;
    font-weight: 800;
    margin-bottom: 7px;
    font-size: .9rem;
}

.admin-input {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    padding: 12px 13px;
    outline: none;
    background: #fff;
}

    .admin-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
    }

.admin-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .22);
}

.btn-secondary {
    background: #eff6ff;
    color: #2563eb;
}

.btn-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    background: #fff;
}

    .admin-table thead {
        background: #f8fafc;
    }

    .admin-table th {
        text-align: left;
        padding: 15px 16px;
        color: #475569;
        font-size: .76rem;
        letter-spacing: .06em;
        text-transform: uppercase;
        border-bottom: 1px solid #e2e8f0;
    }

    .admin-table td {
        padding: 15px 16px;
        color: #334155;
        border-bottom: 1px solid #eef2f7;
    }

    .admin-table tbody tr:hover {
        background: #f8fbff;
    }

.message {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 14px;
    font-weight: 800;
}

.message-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.message-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

@media (max-width: 900px) {
    .admin-form {
        grid-template-columns: 1fr 1fr;
    }

    .admin-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .admin-form {
        grid-template-columns: 1fr;
    }
}

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    z-index: 100;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 30px;
    padding: 8px 10px;
    border-radius: 14px;
}

    .brand-wrap:hover {
        background: #f8fafc;
    }

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: -.04em;
}

.brand-text strong {
    display: block;
    color: #0f172a;
    font-size: 1rem;
}

.brand-text span {
    display: block;
    color: #64748b;
    font-size: .75rem;
    margin-top: 3px;
    font-weight: 600;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
    transition: all .18s ease;
}

    .nav-item:hover {
        background: #eff6ff;
        color: #2563eb;
        transform: translateX(2px);
    }

    .nav-item.active {
        background: #eff6ff;
        color: #2563eb;
        box-shadow: inset 0 0 0 1px #bfdbfe;
    }

.nav-icon {
    font-size: 1.2rem;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
}

.nav-cta {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 14px;
    background: #2563eb;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .22);
}

    .nav-cta:hover {
        background: #1d4ed8;
        transform: translateY(-1px);
    }

@media (max-width: 900px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .nav-links {
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar-footer {
        display: none;
    }
}

.layout {
    display: flex;
}

.main-content {
    margin-left: 260px;
    width: 100%;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(38, 99, 235, .12), transparent 30%), linear-gradient(180deg, #f8fafc 0%, #ffffff 45%);
}

.admin-main {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
}

.admin-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 60px 24px 80px;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: #172033;
}

.admin-hero {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    align-items: center;
    margin-bottom: 34px;
}

.eyebrow {
    color: #2563eb;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .78rem;
    margin-bottom: 14px;
}

.admin-hero h1 {
    font-size: clamp(2.4rem, 4vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
    color: #0f172a;
    margin: 0 0 16px;
}

.admin-hero p {
    color: #475569;
    font-size: 1.08rem;
    line-height: 1.7;
    max-width: 720px;
    margin: 0;
}

.hero-status-card,
.admin-card,
.side-panel,
.form-panel {
    background: rgba(255,255,255,.95);
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
}

.hero-status-card {
    padding: 24px;
}

    .hero-status-card span {
        display: block;
        color: #64748b;
        font-size: .9rem;
        margin-bottom: 8px;
    }

    .hero-status-card strong {
        display: block;
        color: #0f172a;
        font-size: 2rem;
        letter-spacing: -0.04em;
    }

    .hero-status-card small {
        color: #2563eb;
        font-weight: 700;
    }

/*.admin-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}*/
.admin-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.admin-card {
    min-width: 0;
    padding: 30px;
    overflow: hidden;
}

/*.table-wrap {
    width: 100%;
    overflow-x: auto;
}*/
.table-wrap {
    width: 100%;
    overflow-x: visible; /* was auto */
}

/*.admin-card {
    
}*/

.card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 26px;
}

    .card-header h2,
    .side-panel h3 {
        color: #0f172a;
        margin: 0 0 8px;
        letter-spacing: -0.035em;
    }

    .card-header p {
        color: #64748b;
        margin: 0;
        line-height: 1.6;
    }

.btn-primary,
.btn-secondary,
.btn-danger {
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .25);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    background: #fff;
}

/*.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    background: #fff;
}*/

    .admin-table thead {
        background: #f8fafc;
    }

    .admin-table th {
        text-align: left;
        padding: 16px 18px;
        color: #475569;
        font-size: .78rem;
        letter-spacing: .06em;
        text-transform: uppercase;
        border-bottom: 1px solid #e2e8f0;
    }

    .admin-table td {
        padding: 12px 14px;
        color: #334155;
        font-size: 0.9rem;
        border-bottom: 1px solid #eef2f7;
    }

.entity-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.entity-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-cell {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.link-button,
.danger-button {
    border: none;
    background: transparent;
    font-weight: 800;
    cursor: pointer;
}

.link-button {
    color: #2563eb;
}

.danger-button {
    color: #dc2626;
}

.form-panel {
    padding: 24px;
    margin-bottom: 26px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

    .form-grid.one-column {
        grid-template-columns: 1fr;
    }

.form-field label {
    display: block;
    color: #334155;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-control-custom {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    padding: 14px 15px;
    outline: none;
    color: #0f172a;
    background: #fff;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.info-message,
.success-message,
.error-message {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 700;
}

.info-message {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.success-message {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.error-message {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.empty-state {
    text-align: center;
    padding: 54px 20px;
    border: 2px dashed #bfdbfe;
    border-radius: 24px;
    background: #f8fbff;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.side-panel {
    padding: 26px;
}

.check-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid #e2e8f0;
}

    .check-item span {
        width: 38px;
        height: 38px;
        border-radius: 14px;
        background: #eff6ff;
        color: #2563eb;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .check-item p {
        color: #64748b;
        margin: 4px 0 0;
    }

.quick-links {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

    .quick-links a {
        color: #2563eb;
        font-weight: 800;
        text-decoration: none;
        background: #eff6ff;
        border-radius: 14px;
        padding: 13px 15px;
    }

.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.confirm-modal {
    width: min(460px, 92vw);
    background: white;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
}

@media (max-width: 1200px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }
}

/*@media (max-width: 960px) {
    .admin-main {
        margin-left: 0;
        width: 100%;
    }*/

    .admin-hero,
    .admin-shell {
        grid-template-columns: 1fr;
    }
.admin-page-wide {
    max-width: 1600px;
}

.history-table-wrap {
    overflow-x: visible;
}

.history-table {
    min-width: 100%;
}

.status-badge {
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.8rem;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-default {
    background: #e2e8f0;
    color: #334155;
}

.violation-count {
    font-weight: 900;
}

.violation-none {
    color: #16a34a;
}

.violation-low {
    color: #d97706;
}

.violation-high {
    color: #dc2626;
}

.wage-rates-table-wrap {
    overflow-x: visible;
}

.wage-rates-table {
    min-width: 100%;
}

    .wage-rates-table th,
    .wage-rates-table td {
        padding: 12px 14px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

        .wage-rates-table td:first-child,
        .wage-rates-table th:first-child {
            white-space: normal;
            min-width: 220px;
        }

.rate-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
    background: #eff6ff;
    color: #2563eb;
}

.payroll-uploads-table-wrap {
    overflow-x: visible;
}

.payroll-uploads-table {
    min-width: 100%;
}

    .payroll-uploads-table th,
    .payroll-uploads-table td {
        padding: 12px 14px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

        .payroll-uploads-table td:first-child,
        .payroll-uploads-table th:first-child {
            white-space: normal;
            min-width: 240px;
        }

.wage-rates-table-wrap {
    overflow-x: visible;
}

.wage-rates-table {
    min-width: 100%;
}

    .wage-rates-table th,
    .wage-rates-table td {
        padding: 12px 14px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

        .wage-rates-table td:first-child,
        .wage-rates-table th:first-child {
            white-space: normal;
            min-width: 240px;
        }

.rate-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
    background: #eff6ff;
    color: #2563eb;
}

.violations-table-wrap {
    overflow-x: visible;
}

.violations-table {
    min-width: 100%;
}

    .violations-table th,
    .violations-table td {
        padding: 12px 14px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

        .violations-table td:first-child,
        .violations-table th:first-child {
            white-space: normal;
            min-width: 220px;
        }

.description-cell {
    white-space: normal !important;
    min-width: 260px;
    max-width: 420px;
    line-height: 1.4;
}

.form-field-full {
    grid-column: 1 / -1;
}

.severity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
    font-size: 0.82rem;
}

.severity-critical {
    background: #fee2e2;
    color: #991b1b;
}

.severity-warning {
    background: #fef3c7;
    color: #92400e;
}

.severity-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.severity-default {
    background: #e2e8f0;
    color: #334155;
}

.disclaimer-card ul {
    margin-left: 18px;
    margin-bottom: 16px;
}

.disclaimer-card li {
    margin-bottom: 6px;
}

.highlight {
    font-weight: 700;
    color: #0f172a;
    background: #f1f5f9;
    padding: 10px;
    border-radius: 8px;
}

.callout {
    margin-top: 16px;
    padding: 14px;
    border-radius: 10px;
    background: #f1f5f9;
}

    .callout.warning {
        background: #fef3c7;
        color: #92400e;
    }

    .callout.success {
        background: #dcfce7;
        color: #166534;
    }

.workflow-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
    font-weight: 600;
}

    .workflow-box div {
        background: #eef2ff;
        padding: 8px 12px;
        border-radius: 8px;
    }

.upload-admin-card {
    min-width: 0;
}

.upload-type-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.upload-type-button {
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all .18s ease;
}

    .upload-type-button:hover,
    .upload-type-button.active {
        background: #eff6ff;
        color: #2563eb;
        border-color: #bfdbfe;
    }

.file-panel {
    border: 2px dashed #bfdbfe;
    background: #f8fbff;
    border-radius: 24px;
    padding: 28px;
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
}

.file-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
}

.success-panel {
    margin-top: 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

@media (max-width: 640px) {
    .file-panel {
        grid-template-columns: 1fr;
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.dashboard-kpi-card {
    background: rgba(255,255,255,.95);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .06);
}

    .dashboard-kpi-card span {
        display: block;
        color: #64748b;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .dashboard-kpi-card strong {
        color: #0f172a;
        font-size: 2.1rem;
        letter-spacing: -.05em;
    }

    .dashboard-kpi-card small {
        display: block;
        color: #64748b;
        margin-top: 6px;
    }

    .dashboard-kpi-card.danger {
        border-color: #fecaca;
    }

    .dashboard-kpi-card.warning {
        border-color: #fed7aa;
    }

.dashboard-overview {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: center;
}

.chart-panel {
    display: grid;
    justify-items: center;
    gap: 18px;
}

.dashboard-pie {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.dashboard-pie-inner {
    width: 122px;
    height: 122px;
    border-radius: 50%;
    background: white;
    display: grid;
    place-items: center;
    text-align: center;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

    .dashboard-pie-inner strong {
        color: #0f172a;
        font-size: 2rem;
        line-height: 1;
    }

    .dashboard-pie-inner span {
        color: #64748b;
        font-size: .82rem;
        font-weight: 700;
    }

.chart-legend {
    display: grid;
    gap: 8px;
    color: #475569;
    font-weight: 700;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: 8px;
}

    .legend-dot.success {
        background: #16a34a;
    }

    .legend-dot.warning {
        background: #f59e0b;
    }

    .legend-dot.danger {
        background: #dc2626;
    }

.summary-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

    .summary-list div {
        background: #f8fbff;
        border: 1px solid #dbeafe;
        border-radius: 18px;
        padding: 18px;
    }

    .summary-list span {
        display: block;
        color: #64748b;
        font-weight: 700;
        margin-bottom: 6px;
    }

    .summary-list strong {
        color: #0f172a;
        font-size: 1.4rem;
    }

.dashboard-table {
    min-width: 100%;
}

.status-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
    font-size: .82rem;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-default {
    background: #e2e8f0;
    color: #334155;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #e2e8f0;
}

    .breakdown-row span {
        color: #475569;
        font-weight: 700;
    }

    .breakdown-row strong {
        color: #0f172a;
    }

.muted-text {
    color: #64748b;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dashboard-grid,
    .summary-list {
        grid-template-columns: 1fr;
    }
}

.users-table {
    min-width: 100%;
}

.role-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
    background: #eff6ff;
    color: #2563eb;
    font-size: .82rem;
}

.billing-table {
    min-width: 100%;
}

.billing-modal {
    max-width: 520px;
}

.billing-table th,
.billing-table td {
    white-space: nowrap;
}