:root {
    --ink: #182230;
    --text: #475467;
    --muted: #667085;
    --line: #e4e7ec;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --phone: #f8f9fb;
    --brand: #4f46e5;
    --brand-dark: #4338ca;
    --brand-soft: #eef2ff;
    --amber: #f79009;
    --amber-soft: #fffaeb;
    --amber-line: #fedf89;
    --red: #b42318;
    --red-soft: #fff5f4;
    --green: #067647;
    --green-soft: #ecfdf3;
    --shadow: 0 8px 28px rgba(24, 34, 48, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #eef1f5; }
body { min-height: 100%; margin: 0; color: var(--ink); background: #eef1f5; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.primary, .secondary, .reject {
    min-height: 48px; padding: 0 22px; border-radius: 13px; display: inline-flex; align-items: center;
    justify-content: center; gap: 8px; font-weight: 750; transition: .16s ease;
}
.primary { color: #fff; background: var(--brand); border: 1px solid var(--brand); }
.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }
.primary:disabled { opacity: .44; cursor: not-allowed; transform: none; }
.secondary { color: #344054; background: #fff; border: 1px solid #d0d5dd; }
.secondary:hover { background: #f9fafb; }
.reject { color: var(--red); background: transparent; border: 0; }
.full { width: 100%; }

.flash-stack { position: fixed; z-index: 500; right: 22px; bottom: 22px; display: grid; gap: 10px; width: min(420px, calc(100% - 24px)); }
.flash { color: #fff; background: var(--ink); border-radius: 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; box-shadow: 0 18px 45px rgba(24, 34, 48, .25); font-weight: 700; }
.flash-success { background: #05603a; }
.flash-error { background: #912018; }
.flash-warning { background: #9a4e02; }
.flash button { color: inherit; background: transparent; border: 0; padding: 0 4px; font-size: 23px; line-height: 1; }

/* Login */
.login-page { background: radial-gradient(circle at 50% 0, #e5e9ff 0, #f4f6fa 42%, #edf0f5 100%); }
.login-shell { min-height: 100vh; padding: 28px; display: grid; place-items: center; }
.login-card { width: min(440px, 100%); background: rgba(255,255,255,.96); border: 1px solid rgba(208,213,221,.8); border-radius: 28px; padding: 38px; box-shadow: 0 24px 80px rgba(24,34,48,.13); }
.login-mark { width: 58px; height: 58px; display: grid; place-items: center; color: #fff; background: var(--brand); border-radius: 18px; margin-bottom: 24px; box-shadow: 0 10px 26px rgba(79,70,229,.26); }
.eyebrow { color: var(--brand); letter-spacing: .08em; text-transform: uppercase; font-size: 11px; font-weight: 800; }
.login-card h1 { margin: 8px 0 9px; font-size: 32px; }
.login-card > p { color: var(--muted); margin: 0 0 26px; line-height: 1.55; }
.login-card > small { color: var(--muted); display: block; margin-top: 20px; line-height: 1.5; }
.login-form { display: grid; gap: 17px; }
.login-form label, .form-grid label { color: var(--text); display: grid; gap: 7px; font-size: 12px; font-weight: 750; }
.login-form input, .form-grid input { width: 100%; border: 1px solid #d0d5dd; border-radius: 11px; padding: 13px 14px; outline: 0; color: var(--ink); background: #fff; }
.login-form input:focus, .form-grid input:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px var(--brand-soft); }
.form-error { color: var(--red); background: #fee4e2; border-radius: 11px; padding: 12px 14px; margin-bottom: 18px; font-size: 13px; font-weight: 650; }

/* Contractor */
.contractor-page { background: #eef1f5; }
.worker-app { min-height: 100vh; padding: 34px 0 52px; display: grid; place-items: start center; }
.phone { width: min(610px, calc(100% - 24px)); min-height: calc(100vh - 68px); background: var(--phone); border-radius: 48px; position: relative; overflow: hidden; box-shadow: 0 12px 44px rgba(24,34,48,.13); }
.phone-speaker { width: 120px; height: 7px; margin: 18px auto 29px; background: #d0d5dd; border-radius: 999px; }
.phone-content { padding: 0 32px 150px; }
.phone-content h1 { margin: 0 0 20px; font-size: 31px; line-height: 1.15; }
.week-picker { margin-bottom: 34px; }
.week-picker h2, .worker-section > h2 { margin: 0 0 8px; font-size: 21px; }
.week-picker > p, .step-explanation { color: var(--muted); margin: 0 0 17px; font-size: 13px; line-height: 1.55; }
.week-options { display: grid; gap: 12px; }
.week-option { background: #fff; border: 1px solid #d0d5dd; border-radius: 16px; display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 16px 17px; transition: .16s ease; }
.week-option:hover { border-color: #a5b4fc; }
.week-option.selected { background: var(--brand-soft); border-color: #a5b4fc; box-shadow: 0 0 0 1px #c7d2fe; }
.week-option label { cursor: pointer; display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 12px; }
.week-option input, .service-radios input, .term input, .no-term input { opacity: 0; position: absolute; pointer-events: none; }
.week-option label > i, .service-radios i, .term i, .no-term i { flex: none; width: 20px; height: 20px; background: #fff; border: 1px solid #98a2b3; border-radius: 50%; }
.week-option.selected label > i { border: 6px solid var(--brand); }
.week-option label > span { display: grid; gap: 4px; }
.week-option label small { color: var(--brand); text-transform: uppercase; font-size: 10px; font-weight: 800; }
.week-option label strong { font-size: 16px; line-height: 1.35; }
.week-option label em { color: var(--muted); font-size: 12px; font-style: normal; }
.week-option > button { color: var(--brand); background: transparent; border: 0; padding: 7px; font-size: 12px; font-weight: 750; }
.week-details { grid-column: 1 / -1; border-top: 1px solid var(--line); color: var(--text); margin: 13px 0 0; padding-top: 13px; font-size: 13px; line-height: 1.55; }
.worker-section { margin-top: 8px; }
.service-radios { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.service-radios label { min-height: 44px; padding: 0 13px; display: flex; align-items: center; gap: 8px; color: #344054; background: #fff; border: 1px solid #d0d5dd; border-radius: 12px; font-size: 14px; font-weight: 650; cursor: pointer; }
.service-radios label.selected { color: var(--brand-dark); background: var(--brand-soft); border-color: #a5b4fc; }
.service-radios label.selected i { background: var(--brand); border: 0; position: relative; }
.service-radios label.selected i::after { content: ""; width: 7px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; position: absolute; left: 5px; top: 5px; transform: rotate(-45deg); }
.required-hint { color: var(--red); text-align: center; margin: 10px 0 0; font-size: 12px; }
.notice { display: flex; align-items: flex-start; gap: 11px; color: var(--text); background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: 15px; padding: 14px; margin-bottom: 18px; }
.notice > i { flex: none; width: 18px; height: 18px; margin-top: 2px; background: var(--amber); border-radius: 50%; }
.notice p { margin: 0; line-height: 1.5; }
.terms-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.terms-heading h2 { margin: 0 0 5px; font-size: 21px; }
.terms-heading p { color: var(--muted); margin: 0; font-size: 12px; }
.terms-heading > button { color: var(--brand); background: transparent; border: 0; flex: none; padding: 6px; font-size: 12px; font-weight: 750; }
.terms-progress { color: var(--muted); display: grid; gap: 7px; margin-bottom: 14px; font-size: 11px; font-weight: 750; }
.terms-progress > i { height: 5px; background: #e4e7ec; border-radius: 999px; overflow: hidden; }
.terms-progress > i > b { display: block; width: 0; height: 100%; background: var(--brand); border-radius: inherit; transition: width .2s ease; }
.day-tabs { display: grid; grid-template-columns: repeat(7, 1fr); overflow: hidden; background: #fff; border-radius: 16px; margin-bottom: 19px; }
.day-tabs button { min-width: 0; color: var(--text); background: #fff; border: 0; display: grid; place-items: center; gap: 7px; padding: 13px 2px; font-size: 11px; font-weight: 750; position: relative; }
.day-tabs button.active:not(.holiday) { color: #fff; background: var(--brand); }
.day-tabs button.holiday { color: var(--red); background: #fff0ef; border-radius: 14px; }
.day-tabs button.holiday.active { box-shadow: inset 0 0 0 2px #e7584e; }
.day-tabs button em { width: 6px; height: 6px; background: #12b76a; border-radius: 50%; position: absolute; top: 7px; right: 7px; }
.day-tabs button em.no-work { background: #98a2b3; }
.term-card { background: #fff; border-radius: 20px; padding: 20px 21px 12px; margin-bottom: 18px; }
.service-caption, .summary-label { color: var(--brand); letter-spacing: .05em; text-transform: uppercase; font-size: 11px; font-weight: 800; }
.term-card h3 { margin: 12px 0 14px; font-size: 21px; }
.term { min-height: 57px; border: 1px solid #d0d5dd; border-radius: 14px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 11px; padding: 8px 16px; margin-bottom: 11px; cursor: pointer; }
.term.selected { background: var(--brand-soft); border-color: #a5b4fc; }
.term.disabled { opacity: .55; cursor: not-allowed; background: #f2f4f7; }
.term.selected i { background: var(--brand); border: 0; box-shadow: inset 0 0 0 6px var(--brand), inset 0 0 0 8px #fff; }
.term strong { font-size: 17px; }
.term small { color: var(--muted); font-size: 12px; text-align: right; }
.term.disabled small { color: var(--red); font-weight: 700; }
.no-term { min-height: 38px; color: var(--muted); background: #f9fafb; border-radius: 10px; display: flex; align-items: center; gap: 12px; padding: 0 16px; font-size: 13px; cursor: pointer; }
.no-term.selected i { background: #98a2b3; box-shadow: inset 0 0 0 5px #fff; }
.service-terms > .primary { min-height: 58px; font-size: 16px; }

.summary-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; }
.summary-title h1 { margin: 0; }
.summary-title span { color: var(--muted); font-size: 13px; }
.summary-notice { color: var(--text); background: var(--brand-soft); border-radius: 16px; display: flex; align-items: center; gap: 13px; padding: 21px 16px; margin-bottom: 32px; }
.summary-notice b { width: 23px; height: 23px; display: grid; place-items: center; color: #fff; background: var(--brand); border-radius: 50%; }
.summary-label { color: var(--muted); display: block; margin: 0 2px 13px; }
.service-pill { display: inline-flex; min-width: 117px; justify-content: center; color: var(--brand-dark); background: var(--brand-soft); border-radius: 11px; padding: 12px 18px; margin-bottom: 30px; font-size: 14px; font-weight: 750; }
.chosen-list { display: grid; gap: 12px; margin-bottom: 34px; }
.chosen-card { background: #fff; border-radius: 17px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px 12px; padding: 18px 20px; }
.chosen-card > b { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 50%; }
.chosen-card > strong { font-size: 16px; }
.chosen-card > span { color: var(--text); text-align: right; }
.chosen-card > p { color: var(--text); margin: 0; }
.chosen-card > small { color: var(--muted); text-align: right; }
.empty-days { color: var(--text); background: #fff; border-radius: 16px; padding: 18px 22px; margin-bottom: 34px; line-height: 1.65; }
.summary-screen > .secondary, .summary-screen > .reject { margin-top: 13px; }
.change-hint { color: var(--muted); text-align: center; font-size: 12px; }

.worker-nav { height: 112px; border-top: 1px solid var(--line); background: rgba(248,249,251,.97); display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 22px; position: absolute; left: 0; right: 0; bottom: 0; }
.worker-nav a { color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 13px; font-weight: 650; }
.worker-nav a + a { border-left: 1px solid var(--line); }
.worker-nav a.active { color: var(--brand); font-weight: 750; }

.worker-history-header { margin-bottom: 26px; }
.worker-history-header > span { color: var(--muted); letter-spacing: .06em; font-size: 11px; font-weight: 800; }
.worker-history-header h1 { margin: 7px 0 9px; }
.worker-history-header p { color: var(--muted); margin: 0; line-height: 1.55; }
.worker-history-list { display: grid; gap: 16px; }
.history-order-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 5px 18px rgba(24,34,48,.05); }
.history-order-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 17px; }
.history-order-title span { color: var(--brand); text-transform: uppercase; font-size: 11px; font-weight: 800; }
.history-order-title h2 { margin: 6px 0 0; font-size: 18px; line-height: 1.35; }
.history-order-title button { color: var(--brand); background: transparent; border: 0; flex: none; padding: 5px 0; font-size: 13px; font-weight: 750; }
.decision-status { display: inline-flex; border-radius: 999px; margin-top: 14px; padding: 6px 9px; font-size: 11px; font-weight: 750; }
.decision-status.accepted { color: var(--green); background: var(--green-soft); }
.decision-status.rejected { color: var(--text); background: #f2f4f7; }
.history-order-meta { display: grid; gap: 16px; padding-top: 17px; }
.history-order-meta > div { color: var(--text); display: flex; align-items: flex-start; gap: 11px; }
.history-order-meta svg { color: var(--muted); flex: none; }
.history-order-meta span, .modal-section { display: grid; gap: 4px; }
.history-order-meta small, .modal-section small { color: var(--muted); letter-spacing: .04em; font-size: 10px; font-weight: 750; }
.history-order-meta strong, .modal-section strong { font-size: 13px; line-height: 1.4; }

.empty-state { min-height: 230px; color: var(--text); background: #fff; border: 1px dashed #cdd3dc; border-radius: 18px; display: grid; place-items: center; align-content: center; gap: 9px; padding: 30px; text-align: center; }
.empty-state.compact { min-height: 160px; }
.empty-state p { color: var(--muted); margin: 0; max-width: 440px; line-height: 1.55; }
.empty-state .primary { margin-top: 10px; }
.empty-state-icon { width: 42px; height: 42px; color: var(--brand); background: var(--brand-soft); display: grid; place-items: center; border-radius: 50%; }

/* Admin */
.admin-page { background: var(--bg); }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.admin-sidebar { height: 100vh; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; position: sticky; top: 0; }
.admin-logo { border-bottom: 1px solid var(--line); display: grid; gap: 5px; padding: 32px 36px 24px; }
.admin-logo strong { font-size: 20px; }
.admin-logo small { color: var(--muted); font-size: 13px; }
.admin-sidebar nav { display: grid; gap: 10px; padding: 28px 24px; }
.admin-sidebar nav a { min-height: 47px; color: var(--text); border-radius: 11px; display: flex; align-items: center; gap: 12px; padding: 0 19px; font-size: 15px; font-weight: 650; }
.admin-sidebar nav a.active { color: var(--brand-dark); background: var(--brand-soft); font-weight: 750; }
.admin-sidebar nav a i { width: 12px; height: 12px; background: var(--brand); border-radius: 50%; }
.admin-person { border-top: 1px solid var(--line); margin: auto 24px 25px; padding-top: 25px; }
.admin-person > div { display: flex; align-items: center; gap: 11px; }
.admin-person b { width: 40px; height: 40px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.admin-person span { display: grid; gap: 4px; }
.admin-person span small { color: var(--muted); font-size: 12px; }
.admin-person > a { color: var(--text); display: flex; align-items: center; gap: 8px; padding: 22px 12px 0; font-weight: 650; }
.admin-main { width: 100%; max-width: 1380px; margin: 0 auto; padding: 38px 42px 70px; }
.add-header, .section-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 25px; margin-bottom: 25px; }
.add-header > div > span, .section-header > div > span { color: var(--muted); letter-spacing: .04em; font-size: 12px; font-weight: 750; }
.add-header h1, .section-header h1 { margin: 12px 0 7px; font-size: 30px; }
.add-header p, .section-header p { color: var(--text); margin: 0; }
.week-create-select, .section-header label { color: var(--muted); display: grid; gap: 7px; font-size: 12px; font-weight: 750; }
.week-create-select select, .section-header select { background: #fff; border: 1px solid #d0d5dd; border-radius: 10px; padding: 11px 36px 11px 13px; }
.admin-notice { margin-bottom: 26px; padding: 18px; }
.order-management { background: #fff; border-radius: 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 25px; margin-bottom: 24px; padding: 24px; box-shadow: var(--shadow); }
.order-management > div { display: grid; gap: 6px; }
.order-management span { color: var(--brand); letter-spacing: .05em; font-size: 11px; font-weight: 750; }
.order-management h2 { margin: 0; font-size: 23px; }
.order-management p { color: var(--muted); margin: 0; }
.locked-order-note { width: fit-content; color: #344054; background: #f2f4f7; border-radius: 10px; display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; padding: 9px 12px; font-size: 12px; font-weight: 650; }
.description-card, .admin-slot-card, .staff-table-card, .contractor-table, .audit-card { background: #fff; border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.description-card { margin-bottom: 27px; }
.description-card h2, .slots-heading h2, .slot-card-title h2, .staff-table-top h2 { margin: 0 0 5px; font-size: 20px; }
.description-card > p, .slots-heading p, .staff-table-top p { color: var(--muted); margin: 0 0 19px; font-size: 13px; }
.description-card label { color: var(--muted); letter-spacing: .04em; display: grid; gap: 10px; margin-top: 18px; font-size: 11px; font-weight: 750; }
.description-card input, .description-card textarea { width: 100%; color: var(--text); background: #fff; border: 1.4px solid #d0d5dd; border-radius: 11px; padding: 13px 16px; outline: 0; resize: vertical; }
.description-card textarea { min-height: 250px; line-height: 1.55; }
.description-card input:focus, .description-card textarea:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px var(--brand-soft); }
.slots-heading { display: flex; align-items: center; justify-content: space-between; margin: 42px 0 22px; }
.slots-heading > div p { margin-bottom: 0; }
.slots-heading > span { color: var(--muted); background: #fff; border: 1px solid #d0d5dd; border-radius: 11px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13px; }
.slots-heading > span i { width: 12px; height: 12px; background: #fee4e2; border-radius: 3px; }
.admin-tables { display: grid; gap: 20px; }
.slot-card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.slot-card-title span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; color: #344054; }
th, td { border-bottom: 1px solid var(--line); text-align: left; }
.admin-slot-card table { min-width: 780px; table-layout: fixed; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.admin-slot-card th, .admin-slot-card td { height: 52px; text-align: center; padding: 6px 12px; font-size: 13px; }
.admin-slot-card thead th { height: 58px; color: var(--text); font-size: 12px; }
.admin-slot-card thead th b { display: block; }
.admin-slot-card thead th small { display: block; margin-top: 4px; font-size: 9px; }
.admin-slot-card th:first-child { width: 170px; background: #f9fafb; }
.admin-slot-card tbody th { text-align: left; }
.admin-slot-card tr:last-child th, .admin-slot-card tr:last-child td { border-bottom: 0; }
.holiday { color: var(--red) !important; background: var(--red-soft) !important; }
.admin-slot-card select { width: 72px; height: 38px; color: var(--ink); text-align: center; background: #fff; border: 1px solid #aeb8c7; border-radius: 9px; font-weight: 700; }
.admin-slot-card select:focus { border-color: var(--brand); outline: 3px solid rgba(79,70,229,.16); }
.admin-form-submit { background: #fff; border-radius: 18px; display: flex; justify-content: flex-end; align-items: center; gap: 24px; margin-top: 24px; padding: 22px 24px; box-shadow: var(--shadow); }
.admin-form-submit p { color: var(--muted); margin: 0; font-size: 13px; }
.admin-form-submit .primary { min-width: 220px; min-height: 54px; }

.staff-table-card { padding: 24px; }
.staff-table-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 20px; }
.staff-table-top p { margin: 0; }
.staff-table-top > span { max-width: 390px; color: var(--muted); text-align: right; font-size: 12px; }
.staff-overview-table { min-width: 1080px; table-layout: fixed; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.staff-overview-table th, .staff-overview-table td { border-right: 1px solid var(--line); }
.staff-overview-table th:last-child, .staff-overview-table td:last-child { border-right: 0; }
.staff-overview-table thead th { height: 60px; color: var(--text); text-align: center; background: #f9fafb; padding: 0 10px; font-size: 11px; }
.staff-overview-table thead th:first-child { width: 185px; text-align: left; }
.staff-overview-table thead span, .staff-overview-table thead strong { display: block; }
.staff-overview-table thead strong { margin-top: 5px; font-size: 14px; }
.service-group th { color: #344054; text-align: left; height: 43px; padding: 0 15px; font-size: 14px; }
.service-group th i { display: inline-block; width: 9px; height: 9px; margin-right: 9px; border-radius: 3px; }
.service-engraving th { background: #fff8ee; } .service-engraving th i { background: #ef9b36; }
.service-laser th { background: #f3f2ff; } .service-laser th i { background: #7065ee; }
.service-packing th { background: #eef7ff; } .service-packing th i { background: #4b8fe2; }
.service-gluing th { background: #effaf4; } .service-gluing th i { background: #35a874; }
.service-technical_assembly th { background: #f1f3f6; } .service-technical_assembly th i { background: #7b8495; }
.service-time-row > th { height: 76px; color: #344054; text-align: left; vertical-align: top; background: #fbfcfd; padding: 13px 15px; font-size: 13px; }
.service-time-row > td { height: 76px; vertical-align: top; padding: 8px; }
.staff-cell { display: flex; flex-wrap: wrap; gap: 5px; }
.staff-cell > span { flex: 0 0 100%; color: var(--muted); font-size: 10px; font-weight: 750; }
.staff-cell small { color: #344054; background: #f0f2f6; border-radius: 7px; padding: 5px 7px; font-size: 10px; font-weight: 650; }
.staff-cell small.empty-name { color: #a3aab5; background: transparent; padding-left: 0; }
.empty-cell { color: #b2b8c2; text-align: center; display: block; padding-top: 9px; }

.audit-summary { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 22px; }
.audit-summary > div { background: #fff; display: grid; gap: 8px; padding: 20px; }
.audit-summary span { color: var(--muted); letter-spacing: .04em; font-size: 10px; font-weight: 750; }
.green-text { color: var(--green); }
.audit-card h2 { margin: 0 0 20px; }
.audit-list article { display: grid; grid-template-columns: 12px 1fr; gap: 13px; }
.audit-list i { width: 10px; height: 10px; margin-top: 5px; background: var(--brand); border-radius: 50%; }
.audit-list p { color: var(--text); margin: 5px 0; font-size: 13px; }
.audit-list small { color: var(--muted); font-size: 11px; }

.contractor-table { padding: 24px; }
.contractor-table table { min-width: 760px; }
.contractor-table th, .contractor-table td { padding: 14px 12px; font-size: 13px; }
.contractor-table thead th { color: var(--muted); letter-spacing: .04em; font-size: 11px; }
.contractor-table tbody tr:last-child td { border-bottom: 0; }
.table-empty { color: var(--muted); text-align: center; padding: 36px !important; }
.table-button { color: var(--text); background: #fff; border: 1px solid #d0d5dd; border-radius: 8px; padding: 7px 9px; font-size: 11px; }
.table-button.danger { color: var(--red); }

.modal-backdrop { position: fixed; z-index: 400; inset: 0; background: rgba(24,34,48,.53); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.modal-open { overflow: hidden; }
.modal { width: min(100%, 540px); max-height: 90vh; overflow: auto; background: #fff; border-radius: 18px; padding: 27px; position: relative; box-shadow: 0 25px 80px rgba(24,34,48,.28); }
.modal > h2 { margin: 0 38px 20px 0; font-size: 21px; }
.modal > p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.modal-close { width: 34px; height: 34px; color: var(--text); background: #f2f4f7; border: 0; border-radius: 9px; display: grid; place-items: center; position: absolute; top: 16px; right: 16px; font-size: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .full-row { grid-column: 1 / -1; }
.history-modal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.history-modal-top .decision-status { margin: 0; }
.history-modal-top .service-pill { margin-bottom: 20px; }
.modal-section { border-top: 1px solid var(--line); padding: 15px 0; }
.modal-section p { color: var(--text); white-space: pre-wrap; margin: 0; line-height: 1.65; }
.modal .locked-note { color: #344054; background: #f2f4f7; border-radius: 10px; display: flex; align-items: center; gap: 7px; margin: 8px 0 0; padding: 12px; font-size: 12px; font-weight: 600; line-height: 1.45; }
.modal .locked-note svg { flex: none; }

@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { height: auto; position: static; }
    .admin-logo { padding: 18px 22px; }
    .admin-sidebar nav { grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 12px; }
    .admin-sidebar nav a { justify-content: center; text-align: center; padding: 0 7px; font-size: 12px; }
    .admin-person { display: none; }
    .admin-main { padding: 25px 18px 55px; }
}

@media (max-width: 640px) {
    .worker-app { padding: 0; }
    .phone { width: 100%; min-height: 100vh; border-radius: 0; box-shadow: none; }
    .phone-speaker { display: none; }
    .phone-content { padding: 27px 18px 120px; }
    .phone-content h1 { font-size: 28px; }
    .week-option { padding: 15px 13px; }
    .week-option label strong { font-size: 14px; }
    .week-option > button { padding-right: 0; }
    .service-radios label { flex: 1 1 44%; padding: 0 10px; font-size: 13px; }
    .terms-heading { align-items: flex-start; }
    .day-tabs button { font-size: 10px; }
    .term-card { padding: 17px 14px 12px; }
    .term { grid-template-columns: 22px 1fr; }
    .term small { grid-column: 2; text-align: left; }
    .chosen-card { grid-template-columns: 28px 1fr; }
    .chosen-card > span, .chosen-card > small { grid-column: 2; text-align: left; }
    .worker-nav { height: 90px; padding-top: 15px; position: fixed; }
    .admin-sidebar nav { grid-template-columns: repeat(2, 1fr); }
    .add-header, .section-header, .slots-heading, .order-management, .staff-table-top { flex-direction: column; }
    .admin-form-submit { flex-direction: column; align-items: stretch; }
    .admin-form-submit .primary { width: 100%; }
    .audit-summary { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full-row { grid-column: auto; }
    .login-shell { padding: 14px; }
    .login-card { padding: 28px 22px; border-radius: 22px; }
    .flash-stack { left: 12px; right: 12px; bottom: 12px; width: auto; }
}
