:root {
    --bg: #0f172a;
    --panel: #111827;
    --panel-2: #ffffff;
    --line: #e5e7eb;
    --text: #0f172a;
    --muted: #64748b;
    --sidebar: #0b1220;
    --gold: #DAA520;
    --gold-dark: #b78816;
    --danger: #b91c1c;
    --success: #15803d;
    --warn: #b45309;
    --shadow: 0 12px 40px rgba(15,23,42,.08);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: #f8fafc;
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar {
    background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
    color: #fff;
    padding: 28px 20px;
}
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.brand-mark {
    width: 50px; height: 50px; border-radius: 16px; background: var(--gold); color: #111827;
    display:flex; align-items:center; justify-content:center; font-weight: 800;
}
.brand-title { font-size: 20px; font-weight: 800; }
.brand-subtitle { color: rgba(255,255,255,.7); font-size: 13px; }
.sidebar-meta { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); padding: 16px; border-radius: 18px; }
.meta-label { color: rgba(255,255,255,.6); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.meta-value { margin-top: 6px; font-weight: 600; word-break: break-word; }
.meta-pill { display: inline-block; margin-top: 10px; padding: 5px 10px; border-radius: 999px; background: rgba(218,165,32,.14); color: var(--gold); font-size: 12px; font-weight: 700; }
.credit-box { margin-top: 14px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); display:flex; align-items:center; justify-content:space-between; }
.credit-box strong { font-size: 22px; }
.nav { margin-top: 24px; display: grid; gap: 8px; }
.nav-link { padding: 12px 14px; border-radius: 12px; color: rgba(255,255,255,.88); font-weight: 600; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-cta { margin-top: 24px; }
.main { padding: 28px; }
.topbar { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom: 24px; }
.topbar h1 { margin:0 0 6px; font-size: 30px; }
.muted { color: var(--muted); margin: 0; }
.topbar-actions { display:flex; gap: 10px; flex-wrap:wrap; }
.btn {
    border: none; padding: 12px 16px; border-radius: 12px; font-weight: 700; cursor: pointer;
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.btn-primary { background: var(--gold); color: #111827; }
.btn-primary:hover { background: var(--gold-dark); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #fecaca; }
.btn-block { width: 100%; }
.grid-4 { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:16px; }
.grid-2 { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:16px; }
.card {
    background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow);
}
.card h3, .card h2 { margin-top:0; }
.stat-value { font-size: 34px; font-weight: 800; margin-top: 8px; }
.stat-label { color: var(--muted); font-size: 14px; }
.banner {
    background: linear-gradient(120deg, #111827 0%, #1f2937 100%); color:#fff;
    border-radius: 22px; padding: 24px; margin-bottom: 20px; display:flex; justify-content:space-between; gap:20px; align-items:center;
}
.banner h2 { margin:0 0 6px; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align:left; vertical-align: top; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.badge {
    display:inline-block; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.badge-queued { background: #fef3c7; color: #92400e; }
.badge-running { background: #dbeafe; color: #1d4ed8; }
.badge-completed { background: #dcfce7; color: #166534; }
.badge-failed { background: #fee2e2; color: #991b1b; }
.badge-paused { background: #e0e7ff; color: #4338ca; }
.badge-cancelled { background: #e5e7eb; color: #374151; }
.progress {
    height: 12px; background: #e5e7eb; border-radius:999px; overflow:hidden;
}
.progress > span { display:block; height:100%; background: var(--gold); }
.form-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field { display:grid; gap:8px; margin-bottom: 14px; }
label { font-weight: 700; }
input, select, textarea {
    width:100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #d1d5db; background:#fff; font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
.alert {
    padding: 14px 16px; border-radius: 14px; margin-bottom: 16px; font-weight: 600;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-warn { background: #fef3c7; color: #92400e; }
.kpi-list { display:grid; gap:12px; }
.kpi-row { display:flex; justify-content:space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.auth-wrap {
    min-height: 100vh; display:flex; align-items:center; justify-content:center;
    background: radial-gradient(circle at top left, #1f2937 0%, #0f172a 40%, #020617 100%);
    padding: 28px;
}
.auth-card {
    width:100%; max-width: 460px; background:#fff; border-radius:24px; padding: 30px; box-shadow: var(--shadow);
}
.auth-card h1 { margin-top:0; }
.auth-card .btn { width: 100%; }
.footer-note { color: var(--muted); font-size: 14px; margin-top: 14px; }
.inline-actions { display:flex; gap:8px; flex-wrap:wrap; }
.small { font-size: 13px; color: var(--muted); }
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .form-grid, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { padding-bottom: 10px; }
    .topbar { flex-direction: column; }
}


/* Users admin page upgrade */
.users-toolbar {
    margin-bottom: 16px;
}
.users-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 16px;
}
.mini-stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
}
.mini-stat-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}
.mini-stat-value {
    font-size: 28px;
    font-weight: 800;
}
.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.form-grid-4 {
    grid-template-columns: repeat(4, minmax(0,1fr));
}
.users-table-wrap {
    overflow-x: auto;
}
.users-admin-table {
    width: 100%;
    min-width: 1100px;
}
.users-admin-table th,
.users-admin-table td {
    vertical-align: middle;
}
.user-cell {
    min-width: 280px;
}
.user-card-inline {
    display: flex;
    align-items: center;
    gap: 14px;
}
.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(218,165,32,.16);
    color: var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}
.credits-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--line);
    font-weight: 700;
}
.role-select-wide {
    min-width: 150px;
}
.compact-input {
    min-width: 200px;
}
.btn-sm {
    padding: 10px 14px;
    border-radius: 12px;
}
@media (max-width: 1200px) {
    .users-kpis,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }
}


/* Users page fit improvements */
.users-admin-table {
    min-width: 0;
    table-layout: fixed;
}
.users-admin-table th:nth-child(1),
.users-admin-table td:nth-child(1) { width: 24%; }
.users-admin-table th:nth-child(2),
.users-admin-table td:nth-child(2) { width: 8%; }
.users-admin-table th:nth-child(3),
.users-admin-table td:nth-child(3) { width: 9%; }
.users-admin-table th:nth-child(4),
.users-admin-table td:nth-child(4) { width: 16%; }
.users-admin-table th:nth-child(5),
.users-admin-table td:nth-child(5) { width: 20%; }
.users-admin-table th:nth-child(6),
.users-admin-table td:nth-child(6) { width: 10%; }
.users-admin-table th:nth-child(7),
.users-admin-table td:nth-child(7) { width: 13%; }

.role-select-wide {
    min-width: 96px;
    width: 100%;
}

.compact-input {
    min-width: 0;
    width: 100%;
}

.user-cell {
    min-width: 0;
}

.users-admin-table .btn-sm,
.users-admin-table .btn-danger,
.users-admin-table .btn-primary {
    white-space: nowrap;
}

@media (max-width: 1280px) {
    .users-table-wrap {
        overflow-x: auto;
    }
    .users-admin-table {
        min-width: 980px;
    }
}


/* Users page cleanup */
.role-select-wide {
    min-width: 130px !important;
    width: 130px !important;
}
.users-admin-table select {
    min-width: 130px !important;
}


/* Role selector width fix */
.role-select-wide,
.users-admin-table select[name="role"] {
    min-width: 170px !important;
    width: 170px !important;
    max-width: 170px !important;
    padding-right: 36px !important;
}


/* Users pro admin panel */
.users-search {
    display: flex;
    gap: 10px;
    align-items: center;
}
.users-search input {
    min-width: 260px;
}
.users-admin-table {
    min-width: 1180px;
    table-layout: fixed;
}
.users-admin-table th:nth-child(1),
.users-admin-table td:nth-child(1) { width: 24%; }
.users-admin-table th:nth-child(2),
.users-admin-table td:nth-child(2) { width: 8%; }
.users-admin-table th:nth-child(3),
.users-admin-table td:nth-child(3) { width: 14%; }
.users-admin-table th:nth-child(4),
.users-admin-table td:nth-child(4) { width: 16%; }
.users-admin-table th:nth-child(5),
.users-admin-table td:nth-child(5) { width: 19%; }
.users-admin-table th:nth-child(6),
.users-admin-table td:nth-child(6) { width: 8%; }
.users-admin-table th:nth-child(7),
.users-admin-table td:nth-child(7) { width: 11%; }

.role-select-wide,
.users-admin-table select[name="role"] {
    min-width: 180px !important;
    width: 180px !important;
    max-width: 180px !important;
    padding-right: 36px !important;
}

.compact-input {
    width: 100%;
    min-width: 0;
}

.pagination-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    margin-top: 16px;
}

@media (max-width: 1280px) {
    .users-search {
        width: 100%;
        flex-wrap: wrap;
    }
}


/* Users advanced admin page */
.users-vertical-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.users-vertical-stack .card {
    width: 100%;
}
.users-toolbar {
    margin-bottom: 16px;
}
.users-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 16px;
}
.mini-stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
}
.mini-stat-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}
.mini-stat-value {
    font-size: 28px;
    font-weight: 800;
}
.users-search {
    display: flex;
    gap: 10px;
    align-items: center;
}
.users-search input {
    min-width: 260px;
}
.users-admin-table {
    min-width: 1180px;
    table-layout: fixed;
}
.users-admin-table th:nth-child(1),
.users-admin-table td:nth-child(1) { width: 26%; }
.users-admin-table th:nth-child(2),
.users-admin-table td:nth-child(2) { width: 8%; }
.users-admin-table th:nth-child(3),
.users-admin-table td:nth-child(3) { width: 14%; } /* wider role column */
.users-admin-table th:nth-child(4),
.users-admin-table td:nth-child(4) { width: 16%; }
.users-admin-table th:nth-child(5),
.users-admin-table td:nth-child(5) { width: 18%; }
.users-admin-table th:nth-child(6),
.users-admin-table td:nth-child(6) { width: 8%; }
.users-admin-table th:nth-child(7),
.users-admin-table td:nth-child(7) { width: 10%; }

.role-select-wide,
.users-admin-table select[name="role"] {
    min-width: 180px !important;
    width: 180px !important;
    max-width: 180px !important;
    padding-right: 36px !important;
}

.compact-input {
    width: 100%;
    min-width: 0;
}
.pagination-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    margin-top: 16px;
}
.sortable-link {
    color: inherit;
    text-decoration: none;
}
.sortable-link:hover {
    text-decoration: underline;
}
.user-card-inline {
    display: flex;
    align-items: center;
    gap: 14px;
}
.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(218,165,32,.16);
    color: var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.status-active {
    background: #dcfce7;
    color: #166534;
}
.status-muted {
    background: #e5e7eb;
    color: #475569;
}
.status-current {
    background: #dbeafe;
    color: #1d4ed8;
}
.role-admin {
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
}
.role-user {
    border-color: #e5e7eb !important;
    background: #fff !important;
}

@media (max-width: 1280px) {
    .users-kpis,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }
    .users-search {
        width: 100%;
        flex-wrap: wrap;
    }
}


/* Users spacing + column fix */
.users-vertical-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.users-admin-table th:nth-child(3),
.users-admin-table td:nth-child(3) { width: 12% !important; } /* role */

.users-admin-table th:nth-child(4),
.users-admin-table td:nth-child(4) { width: 12% !important; } /* adjust credits smaller */

.users-admin-table th:nth-child(5),
.users-admin-table td:nth-child(5) { width: 20% !important; } /* reset password */

.role-select-wide,
.users-admin-table select[name="role"] {
    
    
    max-
}

.users-admin-table input[name="amount"] {
    max-width: 110px;
    min-width: 90px;
    width: 100%;
}

.users-admin-table .compact-input {
    width: 100%;
}

.card + .card {
    margin-top: 0 !important;
}


/* Restore full role selector width while keeping columns aligned */
.role-select-wide,
.users-admin-table select[name="role"]{
    min-width:180px !important;
    width:180px !important;
    max-width:180px !important;
}

/* Make adjust credits smaller instead */
.users-admin-table th:nth-child(4),
.users-admin-table td:nth-child(4){
    width:10% !important;
}

.users-admin-table input[name="amount"]{
    max-width:90px;
}

/* Ensure spacing between stacked sections */
.users-vertical-stack{
    display:flex;
    flex-direction:column;
    gap:28px;
}


/* Final users table overlap fix */
.users-admin-table th:nth-child(3),
.users-admin-table td:nth-child(3){
    width: 15% !important; /* role */
}

.users-admin-table th:nth-child(4),
.users-admin-table td:nth-child(4){
    width: 8% !important; /* adjust credits */
}

.users-admin-table input[name="amount"]{
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.users-admin-table td:nth-child(4) .compact-input{
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
}

.users-admin-table td:nth-child(4){
    overflow: hidden;
}

.users-admin-table td:nth-child(5){
    width: 20% !important;
}


/* No-overlap users table fix */
.users-table-wrap{
    overflow-x:auto;
}

.users-admin-table{
    min-width: 1280px !important;
    table-layout: fixed !important;
}

.users-admin-table th:nth-child(1),
.users-admin-table td:nth-child(1){ width: 24% !important; }

.users-admin-table th:nth-child(2),
.users-admin-table td:nth-child(2){ width: 8% !important; }

.users-admin-table th:nth-child(3),
.users-admin-table td:nth-child(3){ width: 14% !important; } /* role */

.users-admin-table th:nth-child(4),
.users-admin-table td:nth-child(4){ width: 7% !important; } /* adjust credits */

.users-admin-table th:nth-child(5),
.users-admin-table td:nth-child(5){ width: 21% !important; } /* reset password */

.users-admin-table th:nth-child(6),
.users-admin-table td:nth-child(6){ width: 10% !important; } /* delete */

.users-admin-table th:nth-child(7),
.users-admin-table td:nth-child(7){ width: 10% !important; } /* update */

.users-admin-table select[name="role"],
.role-select-wide{
    min-width: 170px !important;
    width: 170px !important;
    max-width: 170px !important;
}

.users-admin-table input[name="amount"],
.users-admin-table td:nth-child(4) .compact-input{
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.users-admin-table td,
.users-admin-table th{
    overflow: hidden;
}

@media (max-width: 1400px){
    .users-admin-table{
        min-width: 1320px !important;
    }
}


/* Users page fit-on-one-page update */
.users-table-wrap{
    overflow-x: hidden !important;
}

.users-admin-table{
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
}

.users-admin-table th,
.users-admin-table td{
    overflow: hidden;
    word-break: break-word;
}

.users-admin-table th:nth-child(1),
.users-admin-table td:nth-child(1){ width: 28% !important; } /* user */

.users-admin-table th:nth-child(2),
.users-admin-table td:nth-child(2){ width: 8% !important; } /* credits */

.users-admin-table th:nth-child(3),
.users-admin-table td:nth-child(3){ width: 12% !important; } /* role */

.users-admin-table th:nth-child(4),
.users-admin-table td:nth-child(4){ width: 8% !important; } /* adjust credits */

.users-admin-table th:nth-child(5),
.users-admin-table td:nth-child(5){ width: 18% !important; } /* reset password */

.users-admin-table th:nth-child(6),
.users-admin-table td:nth-child(6){ width: 10% !important; } /* delete */

.users-admin-table th:nth-child(7),
.users-admin-table td:nth-child(7){ width: 10% !important; } /* update */

.role-select-wide,
.users-admin-table select[name="role"]{
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.users-admin-table input[name="amount"],
.users-admin-table td:nth-child(4) .compact-input{
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.users-admin-table td:nth-child(5) .compact-input{
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.users-admin-table .btn-sm,
.users-admin-table .btn-danger,
.users-admin-table .btn-primary{
    width: 100% !important;
    min-width: 0 !important;
    white-space: nowrap;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.users-search{
    flex-wrap: wrap;
    justify-content: flex-end;
}

.users-search input{
    min-width: 220px !important;
    width: 220px !important;
    max-width: 100%;
}

.form-grid.form-grid-4{
    grid-template-columns: 1.4fr 1fr 0.8fr 0.8fr !important;
}

.user-avatar{
    width: 34px !important;
    height: 34px !important;
    font-size: 18px;
}

.user-card-inline{
    gap: 10px !important;
}

.credits-pill{
    min-width: 0 !important;
    width: 72px;
    padding: 8px 10px !important;
}

.inline-actions{
    gap: 6px !important;
}

.status-badge{
    padding: 4px 8px !important;
    font-size: 11px !important;
}

@media (max-width: 1350px){
    .users-admin-table{
        font-size: 14px;
    }
    .users-admin-table th,
    .users-admin-table td{
        padding: 10px 8px !important;
    }
    .users-search input{
        width: 180px !important;
        min-width: 180px !important;
    }
}

@media (max-width: 1100px){
    .users-table-wrap{
        overflow-x: auto !important;
    }
    .users-admin-table{
        min-width: 980px !important;
    }
}


/* Job logs */
.job-logs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.job-log-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: #fff;
}
.job-log-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.job-log-level {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
}
.job-log-message {
    line-height: 1.5;
}
.log-error {
    border-color: #fecaca;
    background: #fff7f7;
}
.log-error .job-log-level {
    color: #991b1b;
}
.log-warn {
    border-color: #fde68a;
    background: #fffbeb;
}
.log-warn .job-log-level {
    color: #92400e;
}
.log-info {
    border-color: #dbeafe;
    background: #f8fbff;
}
.log-info .job-log-level {
    color: #1d4ed8;
}


.action-stack { display:flex; flex-wrap:wrap; gap:6px; min-width: 0; }
.live-dot { width:10px; height:10px; border-radius:999px; display:inline-block; background:#22c55e; box-shadow:0 0 0 0 rgba(34,197,94,.45); animation:pulseLive 1.8s infinite; }
.live-dot.idle { background:#94a3b8; box-shadow:none; animation:none; }
.live-inline { display:inline-flex; align-items:center; gap:8px; }
.live-note { color: var(--muted); font-size: 12px; }
@keyframes pulseLive { 0% { box-shadow:0 0 0 0 rgba(34,197,94,.45); } 70% { box-shadow:0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow:0 0 0 0 rgba(34,197,94,0); } }

.btn-icon-only { min-width: 38px; width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.btn-icon-only span { font-size: 16px; line-height: 1; }
.btn-refresh { display:inline-flex; align-items:center; gap:8px; }
@media (max-width: 768px) { .btn-refresh span { display:none; } }


.progress > span { transition: width .6s ease; }
.create-job-card { width: 100%; }
.form-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.job-route-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 6px; }
.route-column { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: #fafafa; }
.route-title { font-weight: 800; margin-bottom: 12px; font-size: 15px; }
.expand-job-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: inline-flex; align-items:center; justify-content:center; transition: transform .2s ease, background .2s ease; }
.expand-job-btn.is-open span { transform: rotate(180deg); display:inline-block; }
.expand-job-btn:hover { background: #f8fafc; }
.job-detail-row.is-hidden { display: none; }
.job-detail-panel { background: #f8fafc; border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.folder-summary { margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.folder-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.folder-card { border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; }
.folder-card.done { border-color: #bbf7d0; background: #f0fdf4; }
.folder-card.active { border-color: #bfdbfe; background: #eff6ff; }
.folder-card-top { display:flex; justify-content:space-between; gap: 10px; align-items:center; margin-bottom: 8px; }
.folder-state { font-size: 12px; color: var(--muted); font-weight: 700; }
.folder-metrics { display:flex; flex-wrap:wrap; gap: 8px 12px; font-size: 12px; color: var(--muted); }
.folder-empty { color: var(--muted); font-size: 13px; }
@media (max-width: 900px) {
  .form-grid-wide, .job-route-grid { grid-template-columns: 1fr; }
}


.single-project-row{grid-template-columns:1fr !important;}
.field-full-width{grid-column:1 / -1;}
.btn-refresh[disabled]{opacity:.65;pointer-events:none;}

.auth-card-wide {
    max-width: 520px;
}

.social-auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 10px;
}

.social-btn {
    text-align: center;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 16px 0;
}

.auth-divider span {
    background: #fff;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
}


/* Auth toggles */
.toggle-card {
    position: relative;
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 16px;
    align-items: center;
    margin: 18px 0 16px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 6px 18px rgba(15,23,42,.04);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}
.toggle-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
}
.toggle-card-compact {
    margin-top: 12px;
    margin-bottom: 16px;
}
.toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.toggle-switch {
    position: relative;
    width: 56px;
    height: 34px;
    border-radius: 999px;
    background: #e5e7eb;
    box-shadow: inset 0 1px 2px rgba(15,23,42,.10);
    transition: background-color .25s ease, box-shadow .25s ease, transform .2s ease;
}
.toggle-switch::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15,23,42,.18);
    transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .25s ease;
}
.toggle-copy {
    display: grid;
    gap: 4px;
}
.toggle-copy strong {
    font-size: 16px;
    line-height: 1.2;
}
.toggle-copy span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
}
.toggle-input:focus-visible + .toggle-switch {
    outline: 3px solid rgba(218,165,32,.28);
    outline-offset: 3px;
}
.toggle-input:checked + .toggle-switch {
    background: rgba(218,165,32,.88);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.08), 0 0 0 6px rgba(218,165,32,.10);
}
.toggle-input:checked + .toggle-switch::before {
    transform: translateX(22px);
    box-shadow: 0 4px 12px rgba(15,23,42,.22);
}
.toggle-input:checked + .toggle-switch + .toggle-copy strong {
    color: #111827;
}
.toggle-input:checked + .toggle-switch + .toggle-copy span {
    color: #475569;
}
.toggle-card:has(.toggle-input:checked) {
    border-color: rgba(218,165,32,.55);
    background: linear-gradient(180deg, #fffdf6 0%, #fffaf0 100%);
    box-shadow: 0 12px 28px rgba(218,165,32,.12);
}
@media (prefers-reduced-motion: reduce) {
    .toggle-card,
    .toggle-switch,
    .toggle-switch::before {
        transition: none;
    }
}
@media (max-width: 640px) {
    .toggle-card {
        grid-template-columns: 60px 1fr;
        gap: 14px;
        padding: 16px;
        border-radius: 18px;
    }
    .toggle-copy strong {
        font-size: 15px;
    }
    .toggle-copy span {
        font-size: 13px;
    }
}
