:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    background: #f3f4f6;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f3f4f6; }
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
textarea, select { font: inherit; }

.topbar {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    color: #fff;
    background: linear-gradient(110deg, #1e40af 0%, #1e40af 100%);
    box-shadow: 0 8px 25px rgba(19, 54, 151, .18);
    position: relative;
    z-index: 30;
}

.brand-group, .user-actions { display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #fff; color: #1e40af; }
.menu-toggle { display: none; width: 40px; height: 40px; border: 0; border-radius: 9px; color: #fff; background: rgba(255,255,255,.12); cursor: pointer; }
.menu-toggle svg { width: 21px; }
.user-summary { display: grid; text-align: right; line-height: 1.2; }
.user-summary span { font-weight: 700; font-size: 14px; }
.user-summary small { color: #bfdbfe; font-size: 11px; }
.app-shell { min-height: calc(100vh - 70px); display: grid; grid-template-columns: 254px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; justify-content: space-between; padding: 24px 16px 18px; background: #fff; border-right: 1px solid #e5e7eb; }
.navigation { display: grid; gap: 5px; }
.nav-label { margin: 18px 12px 6px; color: #9ca3af; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.nav-label:first-child { margin-top: 0; }
.nav-item { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 10px; color: #4b5563; font-size: 14px; font-weight: 650; text-decoration: none; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item.is-active { color: #1e40af; background: #eef2ff; box-shadow: inset 3px 0 #1e40af; }
.nav-item.is-disabled { opacity: .72; cursor: default; }
.sidebar-bottom { display: grid; gap: 10px; }
.sidebar-footer { display: flex; align-items: center; gap: 9px; padding: 13px; border-radius: 10px; color: #287257; background: #edf9f4; font-size: 12px; font-weight: 700; }
.sidebar-footer svg { width: 17px; }
.sidebar-overlay { display: none; }
.app-content { min-width: 0; }
.page { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0; }
.guest-body { background: #f3f4f6; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 34px 20px; }
.login-card { width: min(100%, 980px); min-height: 610px; display: grid; grid-template-columns: .92fr 1.08fr; border: 1px solid #d1d5db; border-radius: 22px; background: #fff; box-shadow: 0 22px 55px rgba(25, 49, 89, .12); overflow: hidden; }
.login-welcome { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 40px; color: #fff; background: #1e40af; overflow: hidden; }
.login-brand,.login-mobile-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; font-size: 16px; }
.login-brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #1e40af; background: #fff; font-weight: 900; box-shadow: 0 8px 24px rgba(16,41,111,.18); }
.login-welcome-copy { position: relative; z-index: 1; }
.login-welcome-copy p { margin: 0 0 8px; color: #dbeafe; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.login-welcome-copy h2 { max-width: 330px; margin: 0 0 16px; font-size: clamp(33px, 4vw, 48px); line-height: 1.04; letter-spacing: -.04em; }
.login-welcome-copy > span { display: block; max-width: 330px; color: #dbeafe; font-size: 15px; line-height: 1.65; }
.login-security { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: #dbeafe; font-size: 12px; font-weight: 650; }
.login-security svg { width: 18px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 62px 68px 36px; }
.login-mobile-brand { display: none; margin-bottom: 34px; color: #111827; }
.login-mobile-brand .login-brand-mark { color: #fff; background: #1e40af; }
.login-heading h1 { margin: 7px 0 10px; font-size: clamp(31px, 4vw, 42px); letter-spacing: -.04em; }
.login-heading > p:last-child { margin: 0; color: #6b7280; }
.login-form { display: grid; gap: 20px; margin-top: 32px; }
.login-field { display: grid; gap: 8px; }
.login-field label { color: #374151; font-size: 13px; font-weight: 750; }
.login-input { position: relative; }
.login-input > svg { width: 19px; position: absolute; z-index: 1; left: 15px; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.login-input input { width: 100%; min-height: 52px; padding: 11px 14px 11px 47px; border: 1px solid #d1d5db; border-radius: 12px; color: #111827; background: #f9fafb; transition: border-color .18s, box-shadow .18s, background .18s; }
.login-input input:focus { outline: 0; border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 4px rgba(30, 64, 175,.12); }
.login-input input::placeholder { color: #9ca3af; }
.login-button { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; border: 0; border-radius: 12px; color: #fff; background: #1e40af; box-shadow: 0 9px 18px rgba(30, 64, 175,.18); font-weight: 800; cursor: pointer; }
.login-button:hover { background: #1e3a8a; }
.login-button svg { width: 18px; }
.password-toggle { width: 42px; height: 42px; display: grid; place-items: center; position: absolute; right: 5px; top: 50%; transform: translateY(-50%); border: 0; border-radius: 9px; color: #6b7280; background: transparent; cursor: pointer; }
.password-toggle:hover { color: #1e40af; background: #eef2ff; }
.password-toggle svg { width: 18px; grid-area: 1 / 1; }
.password-icon-hide { display: none; }
.password-toggle[aria-pressed="true"] .password-icon-show { display: none; }
.password-toggle[aria-pressed="true"] .password-icon-hide { display: block; }
.login-input #password { padding-right: 52px; }
.login-help { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 22px 0 0; color: #9ca3af; font-size: 11px; text-align: center; }
.login-help svg { flex: 0 0 15px; width: 15px; }
.login-panel .alert { display: flex; align-items: center; gap: 9px; }
.login-panel .alert svg { flex: 0 0 18px; width: 18px; }
.card { width: min(100%, 440px); padding: 36px; border: 1px solid #e5e7eb; border-radius: 18px; background: #fff; box-shadow: 0 18px 50px rgba(25, 49, 89, .09); }
.card h1 { margin: 0 0 8px; font-size: 30px; }
.muted { color: #6b7280; }
.field { display: grid; gap: 8px; margin-top: 22px; }
.field label { font-weight: 700; }
.field input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px; }
.field input:focus { outline: 3px solid rgba(30, 64, 175, .18); border-color: #1e40af; }
.field textarea, .field select { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px; color: #111827; background: #fff; }
.field textarea:focus, .field select:focus { outline: 3px solid rgba(30, 64, 175, .18); border-color: #1e40af; }
.button { width: 100%; min-height: 46px; margin-top: 24px; border: 0; border-radius: 10px; color: #fff; background: #1e40af; font-weight: 800; cursor: pointer; }
.button:hover { background: #1e3a8a; }
.alert { margin-top: 20px; padding: 12px 14px; border-radius: 10px; background: #fff0f0; color: #a02121; border: 1px solid #ffd0d0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-heading h1 { margin: 5px 0 8px; font-size: clamp(26px, 3vw, 35px); letter-spacing: -.035em; }
.eyebrow { margin: 0; color: #1e40af; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.date-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid #e5e7eb; border-radius: 10px; color: #6b7280; background: #fff; font-size: 13px; }
.date-chip svg { width: 17px; }
.dashboard-page { max-width: 1380px; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.dashboard-heading h1 { margin: 5px 0 8px; font-size: clamp(28px,3vw,38px); letter-spacing: -.04em; }
.dashboard-heading-actions { display: flex; align-items: center; gap: 10px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.metric { min-height: 142px; display: flex; align-items: flex-start; gap: 15px; padding: 21px; border: 1px solid #e5e7eb; border-radius: 12px; color: inherit; background: #fff; box-shadow: 0 2px 7px rgba(17, 24, 39,.035); text-decoration: none; transition:border-color .16s,background .16s; }
.metric:hover { border-color:#d1d5db;background:#f9fafb; }
.metric-icon { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; }
.metric-icon svg { width: 22px; height: 22px; }
.metric strong { display: block; margin-top: 7px; color:#111827; font-size: clamp(23px,2vw,29px); letter-spacing: -.035em; white-space: nowrap; }
.metric small { display: block; margin-top: 6px; color: #9ca3af; font-size: 11px; }
.metric-blue .metric-icon { color: #1e40af; background: #eef2ff; }
.metric-violet .metric-icon { color: #7245c7; background: #f1eaff; }
.metric-emerald .metric-icon { color: #16835c; background: #e7f8f1; }
.metric-amber .metric-icon { color: #b06b09; background: #fff3db; }
.dashboard-main-grid { display:grid;grid-template-columns:minmax(0,1.75fr) minmax(300px,.75fr);gap:16px;margin-top:16px; }
.dashboard-lists-grid { display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px; }
.dashboard-card { min-width:0;padding:22px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;box-shadow:0 2px 7px rgba(17, 24, 39,.03); }
.dashboard-card-header { display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px; }
.dashboard-card-header h2 { margin:3px 0 0;font-size:18px;letter-spacing:-.02em; }
.dashboard-card-kicker { margin:0;color:#9ca3af;font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase; }
.dashboard-card-header > a { display:inline-flex;align-items:center;gap:6px;color:#1e40af;font-size:12px;font-weight:750;text-decoration:none;white-space:nowrap; }
.dashboard-card-header > a svg { width:16px; }
.sales-chart { height:235px;display:grid;grid-template-columns:repeat(6,1fr);align-items:end;gap:16px;padding:8px 6px 0;border-bottom:1px solid #e5e7eb;overflow:hidden; }
.sales-bar-column { height:218px;display:grid;grid-template-rows:24px 160px 24px;align-items:end;justify-items:center;gap:5px; }
.sales-bar-value { color:#6b7280;font-size:10px;white-space:nowrap; }
.sales-bar-track { width:min(48px,70%);height:160px;display:flex;align-items:flex-end;border-radius:6px 6px 0 0;background:#f3f4f6;overflow:hidden; }
.sales-bar-track span { width:100%;display:block;background:#1e40af;border-radius:5px 5px 0 0; }
.sales-level-0{height:0}.sales-level-1{height:10%}.sales-level-2{height:20%}.sales-level-3{height:30%}.sales-level-4{height:40%}.sales-level-5{height:50%}.sales-level-6{height:60%}.sales-level-7{height:70%}.sales-level-8{height:80%}.sales-level-9{height:90%}.sales-level-10{height:100%}
.sales-bar-column strong { color:#6b7280;font-size:11px;text-transform:uppercase; }
.fiscal-list { display:grid;gap:18px; }
.fiscal-item { display:grid;grid-template-columns:1fr auto;gap:5px 12px; }
.fiscal-item > div:first-child { display:grid; }
.fiscal-item > div span,.fiscal-item small { color:#9ca3af;font-size:10px; }
.fiscal-item > b { color:#1f2937;font-size:12px; }
.fiscal-progress { grid-column:1/-1;height:7px;border-radius:99px;background:#f3f4f6;overflow:hidden; }
.fiscal-progress span { display:block;height:100%;border-radius:inherit;background:#16835c; }.fiscal-level-0{width:0}.fiscal-level-1{width:10%}.fiscal-level-2{width:20%}.fiscal-level-3{width:30%}.fiscal-level-4{width:40%}.fiscal-level-5{width:50%}.fiscal-level-6{width:60%}.fiscal-level-7{width:70%}.fiscal-level-8{width:80%}.fiscal-level-9{width:90%}.fiscal-level-10{width:100%}
.dashboard-empty { min-height:185px;display:grid;place-content:center;justify-items:center;gap:7px;color:#6b7280;text-align:center; }
.dashboard-empty.compact { min-height:180px; }
.dashboard-empty > svg { width:28px;color:#9a6b23; }
.dashboard-empty span { font-size:11px; }
.dashboard-rows { display:grid; }
.dashboard-row { min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:12px 2px;border-top:1px solid #f3f4f6;color:inherit;text-decoration:none; }
.dashboard-row:first-child { border-top:0; }
.dashboard-row:hover strong { color:#1e40af; }
.dashboard-row-icon { width:38px;height:38px;display:grid;place-items:center;border-radius:10px;color:#1e40af;background:#eef2ff; }
.dashboard-row-icon svg { width:18px; }
.dashboard-row > div { min-width:0;display:grid;gap:3px; }
.dashboard-row > div strong,.dashboard-row > div small { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.dashboard-row > div small { color:#9ca3af;font-size:10px; }
.dashboard-row > b { color:#1f2937;font-size:12px;white-space:nowrap; }
.event-row { grid-template-columns:auto minmax(0,1fr) auto; }
.event-date { width:44px;height:47px;display:grid;place-content:center;justify-items:center;border:1px solid #e5e7eb;border-radius:10px;color:#1e40af;background:#f9fafb;line-height:1; }
.event-date b { font-size:17px; }.event-date small{margin-top:3px;font-size:8px;font-weight:800;}
.settings-page { max-width: 1040px; }
.settings-form { display: grid; gap: 20px; margin-top: 28px; }
.settings-card { padding: 26px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; box-shadow: 0 9px 26px rgba(17, 24, 39, .045); }
.settings-card-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding-bottom: 18px; border-bottom: 1px solid #f3f4f6; }
.settings-card-heading h2 { margin: 0 0 3px; font-size: 18px; }
.settings-card-heading p { margin: 0; color: #6b7280; font-size: 13px; }
.section-icon { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: #1e40af; background: #eef2ff; }
.section-icon svg { width: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
.field-full { grid-column: 1 / -1; }
.field-error { color: #b42318; font-size: 12px; }
.field-help { color: #6b7280; font-size: 11px; }
.current-logo { display: flex; align-items: center; gap: 12px; margin-top: 18px; color: #6b7280; font-size: 12px; }
.current-logo img { width: 64px; height: 64px; border: 1px solid #e5e7eb; border-radius: 12px; object-fit: contain; }
.form-actions { display: flex; justify-content: flex-end; padding-bottom: 30px; }
.primary-button { min-height: 46px; display: inline-flex; align-items: center; gap: 9px; padding: 0 19px; border: 0; border-radius: 10px; color: #fff; background: #1e40af; font-weight: 800; cursor: pointer; box-shadow: 0 8px 18px rgba(30, 64, 175, .2); text-decoration:none; }
.primary-button:hover { background: #1e3a8a; }
.primary-button svg { width: 18px; }
.success-alert { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 13px 15px; border: 1px solid #bce8d5; border-radius: 11px; color: #176b4d; background: #edfaf5; font-weight: 650; }
.success-alert svg { width: 19px; }
.error-summary { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 13px 15px; border: 1px solid #f2c4c0; border-radius: 11px; color: #9b2c24; background: #fff3f2; font-weight: 650; }
.error-summary svg { width: 19px; }
.clients-page { max-width: 1240px; }
.list-card { margin-top: 26px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; box-shadow: 0 9px 26px rgba(17, 24, 39, .045); overflow: hidden; }
.filters { display: flex; align-items: center; gap: 10px; padding: 18px; border-bottom: 1px solid #f3f4f6; }
.search-control { position: relative; flex: 1; }
.search-control svg { width: 18px; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.search-control input { width: 100%; min-height: 42px; padding: 9px 12px 9px 40px; border: 1px solid #d1d5db; border-radius: 10px; }
.filters select { min-height: 42px; padding: 8px 34px 8px 11px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; }
.secondary-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 10px; color: #4b5563; background: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
.secondary-button:hover { background: #f3f4f6; }
.secondary-button svg { width: 17px; }
.text-button { color: #1e40af; font-size: 13px; font-weight: 700; text-decoration: none; }
.list-meta { padding: 12px 20px; color: #6b7280; font-size: 12px; background: #f9fafb; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 18px; color: #6b7280; background: #f9fafb; font-size: 11px; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 15px 18px; border-top: 1px solid #f3f4f6; color: #4b5563; font-size: 13px; vertical-align: middle; }
.client-cell { min-width: 220px; display: flex; align-items: center; gap: 12px; }
.client-cell strong, .client-cell small, .table-subtext { display: block; }
.client-cell strong { color: #1f2937; font-size: 14px; }
.client-cell small, .table-subtext { margin-top: 3px; color: #9ca3af; font-size: 11px; }
.avatar { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #1e40af; background: #eef2ff; font-weight: 800; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.status-badge svg { width: 14px; height: 14px; }
.status-badge.is-active { color: #187052; background: #eaf8f2; }
.status-badge.is-inactive { color: #6b7280; background: #f3f4f6; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.row-actions form { margin: 0; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid #e5e7eb; border-radius: 9px; color: #4b5563; background: #fff; cursor: pointer; }
.icon-button:hover { color: #1e40af; background: #eef2ff; border-color: #93c5fd; }
.icon-button svg { width: 17px; height: 17px; }
.icon-button.is-danger { color:#a03935;background:#fff8f7;border-color:#efd2cf; }
.icon-button.is-danger:hover { color:#8f231d;background:#fdecea;border-color:#e5b4b0; }
.danger-button { min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 15px;border:0;border-radius:10px;color:#fff;background:#a7352f;font-weight:800;cursor:pointer; }
.danger-button:hover { background:#8f2924; }.danger-button svg{width:17px;}
.danger-eyebrow { color:#a03935; }
.void-confirmation { display:flex;gap:12px;margin:18px 0 4px;padding:14px;border:1px solid #efd2cf;border-radius:11px;color:#7f302c;background:#fff7f6; }
.void-confirmation > svg { flex:0 0 20px;width:20px; }.void-confirmation p{margin:4px 0 0;color:#86534f;font-size:12px;line-height:1.5;}
.invoice-row-void td { color:#6b7280;background:#f9fafb; }.invoice-row-void td:first-child strong{text-decoration:line-through;}
.empty-state { display: grid; justify-items: center; padding: 56px 20px; text-align: center; }
.empty-state > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; color: #1e40af; background: #eef2ff; }
.empty-state > span svg { width: 27px; }
.empty-state h2 { margin: 16px 0 5px; font-size: 18px; }
.empty-state p { margin: 0 0 18px; color: #6b7280; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 15px; border-top: 1px solid #f3f4f6; color: #6b7280; font-size: 12px; }
.pagination a { display: inline-flex; align-items: center; gap: 5px; color: #1e40af; font-weight: 700; text-decoration: none; }
.pagination svg { width: 15px; }
.modal { display: none; position: fixed; z-index: 100; inset: 0; }
.modal.is-open { display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(18, 28, 48, .58); backdrop-filter: blur(2px); }
.modal-dialog { width: min(760px, 100%); max-height: calc(100vh - 48px); position: relative; display: flex; flex-direction: column; border-radius: 17px; background: #fff; box-shadow: 0 25px 70px rgba(12, 26, 61, .28); overflow: hidden; }
.modal-dialog-small { width: min(480px, 100%); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid #e5e7eb; }
.modal-header h2 { margin: 4px 0 0; font-size: 21px; }
.modal-body { max-height: calc(100vh - 190px); padding: 4px 22px 24px; overflow-y: auto; }
.modal-form-grid { row-gap: 0; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 22px; border-top: 1px solid #e5e7eb; background: #f9fafb; }
.sr-only { width: 1px; height: 1px; position: absolute; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.catalog-page { max-width: 1320px; }
.catalog-avatar svg { width: 18px; }
.money-input { display: flex; align-items: stretch; }
.money-input span { display: grid; place-items: center; padding: 0 12px; border: 1px solid #d1d5db; border-right: 0; border-radius: 10px 0 0 10px; color: #6b7280; background: #f3f4f6; font-weight: 800; }
.money-input input { border-radius: 0 10px 10px 0; }
.check-control { min-height: 46px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check-control input { width: 18px; min-height: auto; height: 18px; accent-color: #1e40af; }
.events-page, .event-form-page { max-width: 1320px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 20px; color: #4b5563; font-size: 13px; font-weight: 700; text-decoration: none; }
.back-link:hover { color: #1e40af; }
.back-link svg { width: 17px; }
.event-form { display: grid; gap: 20px; margin-top: 28px; }
.items-heading { position: relative; }
.add-item-button { margin-left: auto; }
.event-items-wrap { margin-top: 16px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; box-shadow: inset 0 1px #fff, 0 7px 20px rgba(17, 24, 39, .045); overflow-x: auto; }
.event-items-wrap .data-table { border-collapse: separate; border-spacing: 0; }
.event-items-wrap .data-table th { padding: 13px 12px; color: #4b5563; background: linear-gradient(180deg, #f9fafb, #eef2ff); border-bottom: 1px solid #e5e7eb; }
.event-items-wrap .data-table td { padding: 11px 10px; background: #fff; }
.event-items-wrap .data-table tbody tr:nth-child(even) td { background: #f9fafb; }
.event-items-wrap .data-table tbody tr:hover td { background: #f9fafb; }
.event-items-table { min-width: 850px; }
.event-items-table select, .event-items-table input,.quote-items-table select,.quote-items-table input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 9px; color: #1f2937; background: #fff; transition: border-color .16s, box-shadow .16s, background .16s; }
.event-items-table select:focus,.event-items-table input:focus,.quote-items-table select:focus,.quote-items-table input:focus { outline: 0; border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 3px rgba(30, 64, 175,.11); }
.event-items-table input[type="number"],.quote-items-table input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
.event-items-table [data-item-total],.quote-items-table [data-quote-total] { color: #1e40af; font-weight: 800; white-space: nowrap; }
.event-items-table [data-item-remove],.quote-items-table [data-quote-remove] { color: #a13d38; background: #fff8f7; border-color: #f0d4d1; }
.event-items-table [data-item-remove]:hover,.quote-items-table [data-quote-remove]:hover { color: #8e241e; background: #fdecea; border-color: #eab9b5; }
.event-items-table td:first-child { min-width: 250px; }
.event-items-table td:nth-child(2) { width: 110px; }
.event-items-table td:nth-child(3), .event-items-table td:nth-child(4) { width: 150px; }
.event-items-empty { padding: 34px 20px; color: #6b7280; text-align: center; font-size: 13px; }
.compact-money { display: flex; align-items: stretch; }
.compact-money span { display: grid; place-items: center; padding: 0 8px; border: 1px solid #d1d5db; background: #f3f4f6; color: #6b7280; font-size: 12px; }
.compact-money span:first-child { border-right: 0; border-radius: 8px 0 0 8px; }
.compact-money span:last-child { border-left: 0; border-radius: 0 8px 8px 0; }
.compact-money span:first-child + input { border-radius: 0 8px 8px 0; }
.compact-money input:first-child { border-radius: 8px 0 0 8px; }
.event-totals { max-width: 420px; display: grid; gap: 10px; margin: 18px 0 0 auto; }
.event-totals > div { display: flex; justify-content: space-between; gap: 20px; color: #6b7280; }
.event-totals strong { color: #1f2937; }
.event-totals .grand-total { margin-top: 3px; padding-top: 12px; border-top: 1px solid #e5e7eb; color: #111827; font-weight: 800; }
.event-totals .grand-total strong { color: #1e40af; font-size: 19px; }
.event-actions { gap: 10px; }
.event-status { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-inquiry { color: #4b5563; background: #f3f4f6; }
.status-planning { color: #7453aa; background: #f1ebfb; }
.status-confirmed { color: #1e6ba5; background: #e7f3fb; }
.status-completed { color: #187052; background: #eaf8f2; }
.status-cancelled { color: #a03935; background: #fcebea; }
.quotations-page { max-width: 1320px; }
.quote-items-table { min-width: 980px; }
.quote-items-table td:first-child { min-width: 230px; }
.quote-items-table td:nth-child(2) { width: 90px; }
.quote-items-table td:nth-child(3),.quote-items-table td:nth-child(4),.quote-items-table td:nth-child(5){width:140px}
.document-number-chip { padding: 10px 14px; border: 1px solid #bfdbfe; border-radius: 10px; color: #1e40af; background: #eef2ff; font-weight: 800; }
.quote-status { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.quote-status.status-draft { color: #6b7280; background: #f3f4f6; }
.quote-status.status-sent { color: #1f68a0; background: #e8f3fb; }
.quote-status.status-accepted { color: #187052; background: #eaf8f2; }
.quote-status.status-rejected { color: #a03935; background: #fcebea; }
.quote-status.status-expired { color: #9b691f; background: #fff2dc; }
.fiscal-warning { display:flex;gap:13px;margin-top:22px;padding:16px;border:1px solid #f1d49b;border-radius:12px;color:#78531b;background:#fff8e9}.fiscal-warning svg{flex:0 0 21px}.fiscal-warning p{margin:4px 0 0;font-size:12px}.cai-value{display:block;max-width:210px;font:11px ui-monospace,monospace;overflow-wrap:anywhere}.deadline-expired{color:#a03935;font-weight:700}.data-table code{padding:4px 6px;border-radius:5px;background:#eef2ff;color:#1e40af;font-weight:700}.linked-document{display:flex;align-items:center;gap:9px;padding:11px 13px;border-radius:9px;color:#1e40af;background:#eef2ff;font-weight:650}.linked-document svg{width:18px}.primary-button:disabled,.secondary-button:disabled{opacity:.5;cursor:not-allowed}
.logout { margin: 0; }
.logout button { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.55); border-radius: 9px; padding: 8px 12px; color: #fff; background: rgba(255,255,255,.07); cursor: pointer; }
.logout button:hover { background: rgba(255,255,255,.15); }
.logout svg { width: 17px; }

@media (max-width: 1100px) {
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-main-grid { grid-template-columns:1fr; }
}

@media (max-width: 820px) {
    .topbar { padding: 0 16px; }
    .menu-toggle { display: grid; place-items: center; }
    .user-summary { display: none; }
    .app-shell { display: block; }
    .sidebar { width: min(86vw, 290px); position: fixed; z-index: 50; top: 70px; bottom: 0; left: 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 45px rgba(19, 34, 65, .17); overflow-y: auto; }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-overlay { position: fixed; z-index: 40; inset: 70px 0 0; width: 100%; border: 0; background: rgba(17, 28, 50, .46); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
    .sidebar-overlay.is-visible { display: block; opacity: 1; pointer-events: auto; }
    .page { width: min(100% - 32px, 720px); padding: 32px 0; }
    .card { padding: 26px 22px; }
    .login-card { min-height: 0; grid-template-columns: 1fr; }
    .login-welcome { min-height: 235px; padding: 28px 34px; }
    .login-welcome-copy { margin-top: 34px; }
    .login-welcome-copy h2 { max-width: none; font-size: 34px; }
    .login-welcome-copy > span { max-width: 520px; }
    .login-security { display: none; }
    .login-panel { padding: 42px 48px 30px; }
    .dashboard-heading { align-items:flex-start;flex-direction:column; }
    .dashboard-lists-grid { grid-template-columns:1fr; }
}

@media (max-width: 580px) {
    .auth-shell { padding: 14px; }
    .login-card { border-radius: 22px; }
    .login-welcome { min-height: 185px; padding: 24px; }
    .login-brand-mark { width: 38px; height: 38px; border-radius: 10px; }
    .login-welcome-copy { margin-top: 24px; }
    .login-welcome-copy p,.login-welcome-copy > span { display: none; }
    .login-welcome-copy h2 { margin: 0; font-size: 30px; }
    .login-panel { padding: 34px 22px 26px; }
    .login-heading h1 { font-size: 32px; }
    .brand span:last-child { display: none; }
    .logout button span { display: none; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .metric { min-height: 125px; }
    .dashboard-heading-actions { width:100%;align-items:stretch;flex-direction:column; }
    .dashboard-heading-actions > * { width:100%;justify-content:center; }
    .dashboard-card { padding:18px; }
    .dashboard-card-header { align-items:flex-start; }
    .sales-chart { height:210px;gap:7px;padding-left:0;padding-right:0; }
    .sales-bar-column { height:195px;grid-template-rows:20px 140px 20px; }
    .sales-bar-value { font-size:8px; }
    .sales-bar-track { width:65%;height:140px; }
    .dashboard-row { grid-template-columns:auto minmax(0,1fr) auto; }
    .dashboard-row > .quote-status { display:none; }
    .dashboard-row > b { font-size:11px; }
    .form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .settings-card { padding: 20px; }
    .form-actions .primary-button { width: 100%; justify-content: center; }
    .clients-page .page-heading { gap: 18px; }
    .clients-page .page-heading .primary-button { width: 100%; justify-content: center; }
    .heading-actions { width: 100%; align-items: stretch; flex-direction: column; }
    .heading-actions button { width: 100%; }
    .filters { align-items: stretch; flex-direction: column; }
    .modal.is-open { padding: 10px; }
    .modal-dialog { max-height: calc(100vh - 20px); }
    .modal-footer { flex-direction: column-reverse; }
    .modal-footer button { width: 100%; }
    .items-heading { align-items: flex-start; flex-wrap: wrap; }
    .add-item-button { width: 100%; margin-left: 0; }
    .event-actions { flex-direction: column-reverse; }
    .event-actions > * { width: 100%; justify-content: center; }
}

