:root {
    --bg: #f7f7fb;
    --surface: #ffffff;
    --surface-soft: #f6f2f7;
    --ink: #17131d;
    --muted: #746d7d;
    --line: #e9e4ef;
    --accent: #c33d74;
    --accent-dark: #922652;
    --accent-soft: #fde8f1;
    --mint: #2eb99f;
    --green: #138758;
    --amber: #b77912;
    --blue: #3978b8;
    --shadow: 0 24px 70px rgba(48, 35, 58, .12);
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(195, 61, 116, .10), transparent 28%),
        linear-gradient(180deg, #fbf9fc 0%, var(--bg) 44%, #f4f6fb 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
}

a { color: inherit; text-decoration: none; }

.topbar {
    align-items: center;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid rgba(233, 228, 239, .85);
    display: flex;
    gap: 18px;
    min-height: 74px;
    padding: 14px 34px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.guest-body .topbar {
    display: none;
}

.brand {
    align-items: center;
    color: var(--ink);
    display: inline-flex;
    font-size: 18px;
    font-weight: 850;
    gap: 10px;
    white-space: nowrap;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, var(--accent), #f2a65e);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.nav {
    align-items: center;
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 7px;
}

.nav a,
.button,
button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    justify-content: center;
    min-height: 34px;
    padding: 6px 14px;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.nav a,
.nav button {
    font-size: 13px;
    min-height: 30px;
    padding: 4px 13px;
}

.nav a.active {
    background: linear-gradient(#ef5d99, #c3276d);
    border-color: #9e1f58;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 1px 3px rgba(0, 0, 0, .16);
}

.nav a,
.button,
.link-button {
    background: #fff;
    border-color: var(--line);
    color: #4b4356;
}

.nav a:hover,
.button:hover,
.link-button:hover {
    border-color: #dacdde;
    box-shadow: 0 10px 24px rgba(48, 35, 58, .08);
    transform: translateY(-1px);
}

.link-button { color: var(--ink); }

.primary {
    background: linear-gradient(135deg, var(--accent), #eb6f92);
    border-color: transparent;
    box-shadow: 0 14px 28px rgba(195, 61, 116, .24);
    color: #fff;
}

.primary:hover {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    transform: translateY(-1px);
}

.wide { width: 100%; }
.small { min-height: 34px; padding: 6px 10px; }

.user-pill,
.count {
    background: #17131d;
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    padding: 9px 13px;
    white-space: nowrap;
}

.page {
    margin: 0 auto;
    max-width: 1240px;
    padding: 30px;
}

.guest-body .page {
    max-width: none;
    min-height: 100vh;
    padding: 0;
}

.login-shell {
    align-items: center;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(320px, 430px);
    justify-content: center;
    min-height: 100vh;
    padding: 92px 7vw 28px;
}

.login-stack {
    align-self: center;
    display: grid;
    gap: 8px;
}

.login-visual {
    align-items: stretch;
    background:
        linear-gradient(135deg, rgba(23, 19, 29, .74), rgba(195, 61, 116, .25)),
        url("https://images.unsplash.com/photo-1560066984-138dadb4c035?q=80&w=1400&auto=format&fit=crop");
    background-position: center;
    background-size: cover;
    border-radius: 28px;
    box-shadow: var(--shadow);
    display: flex;
    min-height: 500px;
    overflow: hidden;
    padding: 28px;
}

.visual-card {
    align-self: flex-end;
    color: #fff;
    max-width: 640px;
}

.visual-card h1 {
    color: #fff;
    font-size: 44px;
    line-height: 1.02;
    margin-bottom: 14px;
}

.visual-card p {
    color: rgba(255, 255, 255, .86);
    font-size: 16px;
    max-width: 560px;
}

.visual-metrics {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.visual-metrics div {
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--radius);
    min-width: 128px;
    padding: 13px;
}

.visual-metrics strong {
    display: block;
    font-size: 26px;
}

.visual-metrics span {
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.panel {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(233, 228, 239, .92);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    padding: 24px;
}

.data-panel {
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(48, 35, 58, .07);
    margin-bottom: 20px;
    overflow: hidden;
    padding: 20px;
}

.login-card {
    align-self: center;
    border-radius: 22px;
    box-shadow: 0 28px 90px rgba(48, 35, 58, .16);
    padding: 15px 18px;
    width: 100%;
}

.employee-code-card {
    padding: 14px 18px;
}

.employee-code-card h2 {
    font-size: 21px;
}

.login-card-brand {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px;
}

.login-card-brand span:last-child {
    color: var(--ink);
    font-size: 20px;
    font-weight: 500;
}

.hidden-login-card[hidden],
.admin-login-toggle[hidden] {
    display: none !important;
}

.admin-login-toggle {
    margin-top: 8px;
}

.employee-code-login-input {
    text-align: center;
}

.employee-code-login-label {
    text-align: center;
}

.employee-code-login-text {
    text-align: center;
}

.login-card .eyebrow {
    margin-bottom: 4px;
}

.login-card h2 {
    margin-bottom: 6px;
}

.login-card p {
    margin: 0 0 9px;
}

.login-card label {
    gap: 4px;
    margin-bottom: 8px;
}

.login-card input {
    min-height: 31px !important;
    padding-bottom: 4px !important;
    padding-top: 4px !important;
}

.login-card .primary {
    min-height: 32px;
    padding-bottom: 4px;
    padding-top: 4px;
}

.login-card .login-options {
    margin: 0 0 8px;
}

.hero-band {
    background:
        linear-gradient(135deg, rgba(23, 19, 29, .92), rgba(70, 54, 83, .86)),
        linear-gradient(135deg, var(--accent), var(--mint));
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: #fff;
    margin-bottom: 22px;
    padding: 30px;
}

h1,
h2 {
    color: var(--ink);
    letter-spacing: 0;
    margin: 0 0 14px;
}

h1 { font-size: 32px; line-height: 1.12; }
h2 { font-size: 24px; line-height: 1.16; }
p { line-height: 1.55; }

.hero-band h1,
.hero-band p {
    color: #fff;
}

.muted { color: var(--muted); }

.eyebrow {
    color: var(--accent);
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 12px;
    text-transform: uppercase;
}

label {
    color: #2a2431;
    display: grid;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    margin: 0 0 16px;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    font-weight: 400;
    min-height: 38px;
    outline: none;
    padding: 8px 12px;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(195, 61, 116, .12);
}

textarea { resize: vertical; }

.checkbox {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.checkbox input {
    accent-color: var(--accent);
    min-height: auto;
    width: auto;
}

.login-options {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 4px 0 18px;
}

.flash {
    border-radius: var(--radius);
    font-weight: 760;
    margin-bottom: 18px;
    padding: 13px 15px;
    transition: opacity .3s ease, transform .3s ease;
}

.flash.ok { background: #e8fbf5; color: var(--green); }
.flash.error { background: #fff0f1; color: #b42334; }

.flash.hide {
    opacity: 0;
    transform: translateY(-4px);
}

.demo-box {
    background: linear-gradient(180deg, #fff, #fcf8fb);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: #554d5f;
    display: grid;
    gap: 6px;
    margin-top: 20px;
    padding: 16px;
}

.demo-box strong { color: var(--ink); }

.stats-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.stats-grid article {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(48, 35, 58, .07);
    padding: 22px;
}

.stats-grid article:nth-child(1) { border-top: 4px solid var(--blue); }
.stats-grid article:nth-child(2) { border-top: 4px solid var(--amber); }
.stats-grid article:nth-child(3) { border-top: 4px solid var(--green); }
.stats-grid article:nth-child(4) { border-top: 4px solid var(--accent); }

.stats-grid strong {
    display: block;
    font-size: 30px;
    margin-bottom: 6px;
}

.stats-grid span {
    color: var(--muted);
    font-weight: 800;
}

.dashboard-metrics {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
}

.dashboard-metrics article {
    background: #fff;
    border: 1px solid #d3d3d3;
    border-radius: 2px;
    display: grid;
    gap: 5px;
    padding: 10px 12px;
}

.dashboard-metrics span {
    color: #70687a;
    font-size: 12px;
}

.dashboard-metrics strong {
    color: #202020;
    font-size: 18px;
    font-weight: 400;
}

.two-column {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: 380px minmax(0, 1fr);
}

.page-head {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.page-head h1 {
    font-size: 38px;
    margin-bottom: 8px;
}

.page-head p {
    margin: 0;
}

.compact-head {
    margin-bottom: 14px;
}

.compact-head h1 {
    font-size: 30px;
}

.compact-form {
    margin-bottom: 24px;
}

.form-grid {
    align-items: end;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(220px, 1.5fr) minmax(180px, .8fr) auto auto;
}

.users-form-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.assignment-form-grid {
    align-items: start;
    grid-template-columns: minmax(260px, 1.25fr) minmax(250px, 1.1fr) minmax(190px, .9fr) auto;
}

.reports-form-grid {
    grid-template-columns: minmax(160px, .75fr) minmax(160px, .75fr) minmax(220px, 1fr) auto;
}

.reports-form-grid .report-date-input,
.reports-form-grid .report-filter-control,
.reports-form-grid .report-filter-button {
    font-size: 13px !important;
}

.employee-code-grid {
    grid-template-columns: minmax(180px, 260px) auto;
}

.form-grid label {
    margin-bottom: 0;
}

.form-check {
    min-height: 48px;
    padding-bottom: 12px;
}

.form-actions {
    align-items: end;
    display: flex;
    min-height: 48px;
}

.resource-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
}

.users-grid {
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
}

.resource-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .90)),
        linear-gradient(135deg, rgba(195, 61, 116, .16), rgba(46, 185, 159, .10));
    border: 1px solid rgba(233, 228, 239, .95);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(48, 35, 58, .08);
    display: grid;
    gap: 16px;
    min-height: 220px;
    padding: 20px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.resource-card:hover {
    border-color: #ddcedf;
    box-shadow: 0 24px 62px rgba(48, 35, 58, .13);
    transform: translateY(-3px);
}

.resource-top {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.resource-icon,
.avatar {
    align-items: center;
    background: linear-gradient(135deg, var(--accent), #f2a65e);
    border-radius: 14px;
    color: #fff;
    display: inline-flex;
    font-size: 18px;
    font-weight: 900;
    height: 48px;
    justify-content: center;
    text-transform: uppercase;
    width: 48px;
}

.avatar {
    background: linear-gradient(135deg, #17131d, var(--accent));
    font-size: 15px;
}

.resource-card h2 {
    font-size: 23px;
    margin: 0;
}

.user-card p {
    margin: -8px 0 0;
}

.resource-meta {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 3px;
    padding: 14px;
}

.resource-meta span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.resource-meta strong {
    font-size: 25px;
}

.pill {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
    text-transform: uppercase;
}

.pill.on {
    background: #e6f7ef;
    color: #087044;
}

.pill.off {
    background: #f2edf4;
    color: var(--muted);
}

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

.card-tags span {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #4b4356;
    font-size: 12px;
    font-weight: 850;
    padding: 7px 10px;
    text-transform: uppercase;
}

.section-title,
.employee-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.table-wrap {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
}

.modern-table {
    border-radius: 16px;
}

.data-table-wrap {
    background: #fff;
    border: 1px solid #e6e1ea;
    border-radius: 12px;
    overflow-x: auto;
}

table {
    background: #fff;
    border-collapse: collapse;
    width: 100%;
}

.data-table {
    min-width: 860px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 16px 14px;
    text-align: left;
    vertical-align: middle;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid #ece8f0;
    padding: 15px 18px;
}

tbody tr:hover { background: #fcf9fd; }
tbody tr:last-child td { border-bottom: 0; }

th {
    background: #faf8fc;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.data-table th {
    background: #fff;
    color: #70687a;
    font-size: 12px;
    font-weight: 900;
}

.data-table .group-row th {
    background: #faf9fb;
    border-bottom: 1px solid #e6e1ea;
    color: #4f4659;
    font-size: 12px;
    padding-bottom: 13px;
    padding-top: 13px;
    text-transform: none;
}

.data-table tbody tr {
    background: #fff;
}

.data-table tbody tr:hover {
    background: #fbfafc;
}

.cell-main {
    align-items: center;
    display: flex;
    gap: 12px;
}

.cell-main strong {
    display: block;
    font-size: 16px;
    font-weight: 750;
}

.cell-main small {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-top: 3px;
}

.mini-icon {
    align-items: center;
    background: linear-gradient(135deg, var(--accent), #f2a65e);
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    text-transform: uppercase;
    width: 38px;
}

.mini-icon.dark {
    background: linear-gradient(135deg, #17131d, var(--accent));
}

.money-cell {
    font-weight: 400;
    white-space: nowrap;
}

.bar-cell {
    min-width: 160px;
}

.percent-bar {
    align-items: center;
    background: #f1eef4;
    display: flex;
    height: 26px;
    min-width: 132px;
    overflow: hidden;
    position: relative;
}

.percent-bar span {
    background: linear-gradient(90deg, #ff5f57 0%, #ffbd2e 45%, #7bd84b 78%, var(--mint) 100%);
    display: block;
    height: 100%;
}

.percent-bar strong {
    color: #17131d;
    font-size: 12px;
    font-weight: 950;
    left: 8px;
    position: absolute;
}

.actions-cell {
    text-align: right;
    white-space: nowrap;
}

.role-chip {
    background: #f4eff6;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #4b4356;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
    text-transform: uppercase;
}

.cash-session-bar {
    align-items: center;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(233, 228, 239, .92);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 14px 18px;
}

.cash-session-bar div {
    display: grid;
    gap: 4px;
}

.cash-session-bar .eyebrow {
    margin-bottom: 0;
}

.cash-session-bar strong {
    font-size: 18px;
}

.cash-session-bar small {
    color: var(--muted);
}

.open-cash-button,
.close-cash-button {
    min-height: 31px;
}

.grid-panel {
    background: #ececec;
    border: 1px solid #cfcfcf;
    border-radius: 2px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
    margin-bottom: 20px;
    overflow: hidden;
}

.grid-tabs {
    align-items: flex-end;
    background: #f3f3f3;
    border-bottom: 1px solid #c9c9c9;
    display: flex;
    gap: 2px;
    min-height: 34px;
    padding: 6px 6px 0;
}

.grid-tabs a {
    background: #d8d8d8;
    border: 1px solid #bfbfbf;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
    color: #333;
    font-size: 12px;
    font-weight: 800;
    min-height: 27px;
    padding: 7px 12px 6px;
}

.grid-tabs a.active {
    background: #fff;
    color: #222;
}

.grid-tabs .tab-add {
    align-items: center;
    background: #1f5b91;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 18px;
    height: 18px;
    justify-content: center;
    margin: 4px 0 0 4px;
    min-height: 18px;
    padding: 0;
    width: 18px;
}

.grid-toolbar {
    align-items: center;
    background: #f8f8f8;
    border-bottom: 1px solid #d2d2d2;
    color: #333;
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    padding: 7px 8px;
}

.grid-toolbar span {
    color: #777;
}

.admin-grid-wrap {
    background: #fff;
    overflow-x: auto;
}

.admin-grid {
    border-collapse: collapse;
    min-width: 760px;
    table-layout: fixed;
    width: 100%;
}

.admin-grid th,
.admin-grid td {
    border-bottom: 1px solid #d8d8d8;
    border-right: 1px solid #d3d3d3;
    color: #202020;
    font-size: 12px;
    height: 25px;
    line-height: 1.15;
    overflow: hidden;
    padding: 4px 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-grid .client-name-cell {
    font-size: 10px;
}

.admin-grid .item-col {
    width: 42px;
}

.admin-grid .money-col {
    width: 118px;
}

.admin-grid .value-col {
    width: 92px;
}

.admin-grid .status-col {
    width: 104px;
}

.admin-grid .phone-col {
    width: 108px;
}

.admin-grid td.assignment-client-name-cell {
    font-size: 12px !important;
}

.admin-grid td.cashier-client-name-cell {
    font-size: 12px !important;
}

.admin-grid td.report-client-name-cell {
    font-size: 12px !important;
}

.admin-grid td.employee-client-name-cell {
    font-size: 12px !important;
}

.admin-grid th {
    background: linear-gradient(#dfdfdf, #d1d1d1);
    color: #2d2d2d;
    font-weight: 900;
    text-align: left;
}

.admin-grid tbody tr:nth-child(even) {
    background: #fbfbfb;
}

.admin-grid tbody tr:hover {
    background: #edf5ff;
}

.admin-grid input[type="checkbox"] {
    border: 1px solid #bdbdbd;
    min-height: auto;
    padding: 0;
    width: 13px;
}

.grid-price-input {
    border: 1px solid #cfcfcf;
    border-radius: 2px;
    font-size: 12px;
    min-height: 24px !important;
    padding: 3px 6px !important;
    width: 90px;
}

.price-input-wrap {
    align-items: center;
    display: flex;
    gap: 4px;
}

.calculator-trigger {
    background: linear-gradient(#fefefe, #d9d9d9);
    border: 1px solid #a9a9a9;
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
    color: #202020;
    font-size: 10px;
    min-height: 24px;
    min-width: 34px;
    padding: 3px 5px;
}

.calculator-backdrop {
    align-items: center;
    background: rgba(23, 19, 29, .35);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 18px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 30;
}

.calculator-backdrop[hidden] {
    display: none;
}

.calculator-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
    padding: 12px;
    width: min(280px, 100%);
}

.calculator-display {
    background: #f8f8f8;
    border: 1px solid #d2d2d2;
    border-radius: 4px;
    color: #111;
    font-size: 22px;
    margin-bottom: 10px;
    min-height: 42px;
    padding: 8px 10px;
    text-align: right;
}

.calculator-grid {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, 1fr);
}

.calculator-grid button {
    border-color: #c9c9c9;
    font-size: 16px;
    min-height: 42px;
    padding: 6px;
}

.calculator-grid button[data-action="clear"],
.calculator-grid button[data-action="ok"] {
    grid-column: span 3;
}

.employee-bell {
    align-items: center;
    background: linear-gradient(#ef5d99, #c3276d);
    border: 1px solid #9e1f58;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 5px rgba(0, 0, 0, .22);
    color: #fff;
    display: inline-flex;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 28px;
    padding: 5px 9px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

.employee-bell span {
    align-items: center;
    background: rgba(255, 255, 255, .22);
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    height: 16px;
    justify-content: center;
    width: 16px;
}

.employee-bell strong {
    font-size: 13px;
    font-weight: 500;
}

.employee-bell.ringing {
    animation: bellPulse .45s ease-in-out 3;
}

@keyframes bellPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.row-handle {
    color: #8a8a8a;
    text-align: center;
    width: 22px;
}

.check-col {
    text-align: center;
    width: 26px;
}

.grid-action-head {
    background: #e6e6e6;
    color: #164f81;
    font-size: 17px;
    text-align: center;
    width: 78px;
}

.grid-actions {
    text-align: center;
    width: 78px;
}

.grid-actions form {
    display: inline-flex;
    margin: 0;
}

.grid-actions a {
    color: #b6b9be;
    display: inline-flex;
    font-size: 16px;
    font-weight: 900;
    justify-content: center;
    margin: 0 2px;
    width: 15px;
}

.grid-action-button {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #b6b9be;
    display: inline-flex;
    font-size: 16px;
    font-weight: 500;
    height: auto;
    justify-content: center;
    line-height: 1;
    min-height: 0;
    padding: 0;
    width: 15px;
}

.grid-actions a:hover,
.grid-action-button:hover {
    color: #1f5b91;
}

.grid-action-button.danger:hover {
    color: #b42334;
}

.state-button {
    border: 1px solid #b7b7b7;
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 1px 2px rgba(0, 0, 0, .18);
    cursor: pointer;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    justify-content: center;
    line-height: 1;
    min-height: 0;
    min-width: 66px;
    padding: 3px 8px;
    text-transform: uppercase;
}

.state-button:hover {
    filter: brightness(1.03);
    transform: none;
}

.state-button.active {
    background: linear-gradient(#67d95a, #2fae3f);
    border-color: #21872e;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

.state-button.inactive {
    background: linear-gradient(#f3f3f3, #cfcfcf);
    border-color: #a9a9a9;
    color: #555;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .65);
}

.state-button.asignado {
    background: linear-gradient(#5ea8ee, #236eb8);
    border-color: #185693;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .28);
}

.state-button.finalizado {
    background: linear-gradient(#f0b937, #bc7508);
    border-color: #975d04;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .28);
}

.state-button.pagado {
    background: linear-gradient(#55d78b, #15995b);
    border-color: #0b7542;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .28);
}

.state-button.parcial {
    background: linear-gradient(#9189a1, #635a74);
    border-color: #51485f;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .28);
}

.grid-pager {
    align-items: center;
    background: #eeeeee;
    border-top: 1px solid #d2d2d2;
    display: flex;
    gap: 12px;
    justify-content: center;
    min-height: 38px;
}

.grid-pager span,
.grid-pager strong {
    color: #333;
    font-size: 13px;
}

.grid-pager strong {
    align-items: center;
    background: #2f9ed8;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    height: 17px;
    justify-content: center;
    width: 17px;
}

/* Keep typography light unless a heavier style is explicitly requested. */
h1,
h2,
strong,
b,
label,
button,
.button,
.brand,
.brand-mark,
.nav a,
.link-button,
.user-pill,
.count,
.eyebrow,
.stats-grid span,
.resource-meta span,
.pill,
.role-chip,
.state-button,
.grid-tabs a,
.grid-toolbar strong,
.admin-grid th,
.grid-pager strong {
    font-weight: 500;
}

input,
select,
textarea,
.admin-grid td,
.money-cell,
.cell-main strong {
    font-weight: 400;
}

input,
select,
textarea {
    min-height: 28px !important;
    padding-bottom: 6px !important;
    padding-top: 6px !important;
}

textarea {
    height: 28px !important;
    resize: none;
}

.service-picker {
    min-height: 82px !important;
}

.service-checks-field {
    display: grid;
    gap: 7px;
}

.service-checks-field > span {
    color: #2a2431;
    font-size: 14px;
    font-weight: 400;
}

.service-checks {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 2px;
    max-height: 62px;
    min-height: 27px;
    overflow: auto;
    padding: 3px 7px;
}

.service-check {
    align-items: center;
    display: flex;
    font-size: 12px;
    font-weight: 400;
    gap: 6px;
    margin: 0;
}

.service-check[hidden] {
    display: none !important;
}

.service-check input {
    min-height: auto !important;
    width: auto;
}

.service-empty-message {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 13px;
    min-height: 19px;
}

.service-empty-message[hidden] {
    display: none !important;
}

.client-search-field {
    display: grid;
    gap: 7px;
}

.client-search-field > span {
    color: #2a2431;
    font-size: 14px;
    font-weight: 400;
}

.client-search-row {
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(160px, 1fr) auto;
}

.assignment-form-grid select.employee-select,
.assignment-form-grid select.employee-select option {
    font-size: 13px !important;
}

.assignment-form-grid .client-search-input {
    font-size: 13px !important;
}

.assignment-form-grid .client-search-input,
.assignment-form-grid select.employee-select {
    min-height: 27px !important;
    padding-bottom: 5px !important;
    padding-top: 5px !important;
}

.assignment-form-grid #openClientModal {
    min-height: 27px;
    padding-bottom: 4px;
    padding-top: 4px;
}

.modal-backdrop {
    align-items: center;
    background: rgba(23, 19, 29, .35);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 20px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 20;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
    max-width: 420px;
    padding: 18px;
    width: 100%;
}

.status {
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
    text-transform: uppercase;
}

.status.asignado { background: var(--blue); }
.status.finalizado { background: var(--amber); }
.status.pagado { background: var(--green); }
.status.parcial { background: #6f6680; }

.tablet-panel {
    margin: 0 auto;
    max-width: 980px;
}

.code-form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr auto;
}

.service-cards {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.service-card {
    background: linear-gradient(180deg, #fff, #fbf8fc);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.service-card h2 { margin-bottom: 6px; }
.service-card small { color: var(--muted); display: block; margin-bottom: 14px; }

@media (max-width: 1050px) {
    .login-shell {
        grid-template-columns: 1fr;
        padding: 108px 22px 34px;
    }

    .login-visual {
        min-height: 360px;
    }

    .visual-card h1 {
        font-size: 40px;
    }
}

@media (max-height: 760px) and (min-width: 1051px) {
    .topbar {
        min-height: 62px;
        padding-bottom: 10px;
        padding-top: 10px;
    }

    .login-shell {
        align-items: start;
        padding-bottom: 18px;
        padding-top: 76px;
    }

    .login-visual {
        min-height: 430px;
        padding: 24px;
    }

    .visual-card h1 {
        font-size: 38px;
    }

    .visual-card p,
    .demo-box {
        font-size: 14px;
    }

    .login-card {
        padding: 24px;
    }

    label {
        margin-bottom: 12px;
    }

    input,
    select,
    textarea {
        min-height: 44px;
    }

    .demo-box {
        margin-top: 14px;
        padding: 13px;
    }
}

@media (max-width: 880px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }

    .page { padding: 16px; }
    .stats-grid, .dashboard-metrics, .two-column, .code-form, .form-grid, .users-form-grid, .assignment-form-grid, .reports-form-grid, .employee-code-grid { grid-template-columns: 1fr; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .section-title, .employee-head { align-items: flex-start; flex-direction: column; }
    h1 { font-size: 26px; }
}

@media (max-width: 560px) {
    .guest-body .topbar {
        position: static;
    }

    .login-shell {
        padding: 16px;
    }

    .login-visual {
        border-radius: var(--radius);
        min-height: 300px;
        padding: 20px;
    }

    .login-card {
        border-radius: var(--radius);
        padding: 24px;
    }

    .visual-card h1 {
        font-size: 31px;
    }

    .visual-metrics {
        flex-direction: column;
    }
}
