:root { --ink:#f6f8f6; --muted:#8a918c; --line:rgba(255,255,255,.10); --panel:#121613; --panel-2:#171d18; --accent:#54ee91; --accent-dark:#103a26; --danger:#d84e3b; }
* { box-sizing:border-box; }
body { margin:0; min-width:320px; color:var(--ink); background:#060806 radial-gradient(circle at 86% 0%, rgba(38,126,75,.16), transparent 32rem); font-family:"Avenir Next", "Helvetica Neue", sans-serif; }
button, input, select, textarea { font:inherit; }
button { cursor:pointer; }
.login-screen { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-card { width:min(100%, 430px); padding:42px; border:1px solid var(--line); border-radius:28px; background:rgba(18,22,19,.92); box-shadow:0 28px 80px rgba(0,0,0,.42); }
.brand-mark, .brand { color:var(--accent); font-size:13px; font-weight:800; letter-spacing:.1em; text-decoration:none; }
.brand-mark span, .brand span { color:#fff; }
h1,h2,p { margin:0; }
.login-logo { display:block; width:min(100%, 255px); height:auto; margin:4px 0 36px; filter:brightness(0) invert(1); }
.login-form, .form-panel { display:grid; gap:16px; margin-top:0; }
label { display:grid; gap:8px; color:var(--muted); font-size:13px; font-weight:700; }
input, select, textarea { min-height:46px; width:100%; border:1px solid var(--line); border-radius:11px; padding:0 13px; color:var(--ink); background:#0d110e; outline:0; }
textarea { min-height:90px; padding:12px 13px; resize:vertical; }
input:focus, select:focus, textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(84,238,145,.14); }
.button { border:1px solid transparent; border-radius:11px; min-height:44px; padding:0 16px; font-weight:800; transition:transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform:translateY(-1px); }
.button--accent { background:var(--accent); color:#07150c; box-shadow:0 12px 26px rgba(84,238,145,.20); }
.button--secondary { color:#fff; background:transparent; border-color:rgba(216,78,59,.72); }
.form-error { color:#ff8c7d !important; font-size:14px; }
.app-shell { min-height:100vh; display:grid; grid-template-columns:250px minmax(0,1fr); }
.sidebar { position:sticky; top:0; height:100vh; display:flex; flex-direction:column; padding:30px 18px 18px; border-right:1px solid var(--line); background:#0d100e; }
.brand { font-size:15px; }
.current-user { margin:10px 0 42px; color:var(--muted); font-size:13px; }
.navigation { display:grid; gap:5px; }
.navigation__item { border:0; border-radius:10px; padding:13px 14px; color:var(--muted); background:transparent; text-align:left; font-weight:700; }
.navigation__item:hover, .navigation__item.is-active { color:#fff; background:rgba(255,255,255,.08); }
.sidebar__logout { margin-top:auto; }
.content { min-width:0; padding:48px clamp(24px, 5vw, 78px); }
.page { display:none; max-width:1300px; }
.page.is-active { display:block; }
.page-header { margin-bottom:34px; }
.page-header--row { display:flex; align-items:end; justify-content:space-between; gap:20px; }
.page-header span { color:var(--accent); font-size:12px; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.page-header h1 { margin-top:8px; font-size:42px; letter-spacing:-.045em; }
.page-header p { margin-top:9px; color:var(--muted); font-size:16px; }
.metrics { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:16px; }
.metric, .panel, .client-card { border:1px solid var(--line); border-radius:18px; background:linear-gradient(145deg, rgba(25,30,26,.96), rgba(14,17,15,.96)); }
.metric { min-height:150px; padding:22px; }
.metric span { color:var(--muted); font-size:14px; font-weight:700; }
.metric strong { display:block; margin-top:20px; font-size:38px; }
.filters { display:flex; flex-wrap:wrap; gap:14px; padding:18px; margin-bottom:18px; border:1px solid var(--line); border-radius:16px; background:rgba(17,22,18,.62); }
.filters label { min-width:230px; }
.data-list { display:grid; gap:10px; }
.client-card { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px; }
.client-card h2 { font-size:18px; }
.client-card p { margin-top:5px; color:var(--muted); font-size:14px; }
.badge { display:inline-flex; padding:6px 9px; border-radius:999px; color:var(--accent); background:rgba(84,238,145,.1); font-size:12px; font-weight:800; }
.admin-grid { display:grid; grid-template-columns:1.4fr 1fr; gap:18px; margin-bottom:18px; }
.panel { padding:22px; margin-top:18px; }
.form-panel { margin-top:0; }
.form-panel h2 { margin-bottom:4px; font-size:20px; }
.row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 0; border-bottom:1px solid var(--line); }
.row:last-child { border-bottom:0; }
.row p { color:var(--muted); font-size:13px; }
.dialog { width:min(100% - 32px, 520px); border:1px solid var(--line); border-radius:22px; padding:0; color:var(--ink); background:#151a16; box-shadow:0 28px 80px rgba(0,0,0,.6); }
.dialog::backdrop { background:rgba(0,0,0,.68); backdrop-filter:blur(3px); }
.dialog .form-panel { padding:26px; }
.dialog__title { display:flex; align-items:center; justify-content:space-between; }
.icon-button { width:34px; height:34px; border:0; border-radius:9px; color:#fff; background:rgba(255,255,255,.08); font-size:24px; }
.empty { padding:28px; border:1px dashed var(--line); border-radius:16px; color:var(--muted); text-align:center; }
.eyebrow { color:var(--accent); font-size:12px; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.invoice-workspace { display:grid; grid-template-columns:minmax(390px,.85fr) minmax(560px,1.15fr); gap:18px; align-items:start; }
.invoice-form, .invoice-preview-panel { margin-top:0; padding:24px; }
.invoice-form__heading, .invoice-preview-panel__heading, .invoice-list-panel__heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.invoice-form h2, .invoice-preview-panel h2, .invoice-list-panel h2 { margin-top:6px; font-size:24px; }
.invoice-number { padding:9px 12px; border:1px solid rgba(84,238,145,.28); border-radius:10px; color:var(--accent); background:rgba(84,238,145,.08); font-weight:800; white-space:nowrap; }
.form-section-title { margin:28px 0 14px; padding-bottom:10px; border-bottom:1px solid var(--line); font-size:14px; letter-spacing:.04em; text-transform:uppercase; }
.invoice-lookup-row { display:flex; align-items:flex-start; gap:10px; }
.invoice-lookup-row label { flex:1; }
.invoice-lookup-row .button { margin-top:25px; }
.invoice-fields { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; }
.invoice-field--wide { grid-column:span 2; }
.invoice-fields small, .invoice-lookup-row small { color:var(--muted); font-size:11px; line-height:1.35; }
.invoice-form__actions { display:flex; align-items:center; gap:14px; margin-top:24px; }
.form-status { color:var(--accent); font-size:13px; font-weight:700; }
.form-status.is-error { color:#ff8c7d; }
.invoice-preview-panel { min-height:calc(100vh - 180px); }
.invoice-empty-preview { min-height:560px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; color:var(--muted); text-align:center; }
.invoice-empty-preview strong { color:var(--ink); font-size:18px; }
.invoice-preview-wrap { margin-top:20px; padding:18px; overflow:auto; border-radius:13px; background:#080a09; }
.invoice-document { width:760px; min-height:1075px; margin:auto; padding:44px; color:#0d1b2d; background:#fff; font-family:Arial, sans-serif; font-size:12px; box-shadow:0 4px 18px rgba(0,0,0,.3); }
.invoice-document__logo { display:flex; align-items:center; height:64px; margin-bottom:24px; }
.invoice-document__logo img { display:block; width:245px; max-height:64px; object-fit:contain; object-position:left center; }
.invoice-bank-table, .invoice-service-table { width:100%; border-collapse:collapse; }
.invoice-bank-table td { padding:5px 7px; border:1px solid #1f2933; vertical-align:top; }
.invoice-bank-table__label { width:70px; font-weight:700; }
.invoice-document__title { margin:28px 0 18px; color:#0d1b2d; font-size:21px; }
.invoice-party { display:grid; grid-template-columns:108px 1fr; gap:8px; margin:8px 0; line-height:1.35; }
.invoice-service-table { margin-top:42px; }
.invoice-service-table th, .invoice-service-table td { padding:8px 6px; border-bottom:1px solid #203044; text-align:right; vertical-align:top; }
.invoice-service-table th { border-top:1px solid #203044; font-size:10px; }
.invoice-service-table th:nth-child(2), .invoice-service-table td:nth-child(2) { text-align:left; }
.invoice-document__summary { display:grid; grid-template-columns:1fr 280px; gap:20px; margin-top:30px; line-height:1.55; }
.invoice-document__totals { display:grid; grid-template-columns:1fr auto; gap:2px 18px; font-size:13px; font-weight:700; text-align:right; }
.invoice-document__signatures { display:grid; grid-template-columns:1.4fr .8fr 1.2fr; gap:36px; margin-top:100px; text-align:center; font-size:10px; font-weight:700; }
.invoice-document__signatures span { border-top:1px solid #78818a; padding-top:5px; }
.invoice-document__footer { margin-top:160px; color:#5d6670; font-size:9px; }
.invoice-list-panel { margin-top:18px; }
.invoice-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 0; border-bottom:1px solid var(--line); }
.invoice-row:last-child { border-bottom:0; }
.invoice-row p { margin-top:5px; color:var(--muted); font-size:13px; }
.invoice-row__actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; }
.invoice-row__actions > strong { min-width:120px; text-align:right; }
.invoice-status-select { min-height:38px; width:auto; padding:0 28px 0 10px; font-size:13px; }
.invoice-open-button { min-height:38px; padding:0 12px; font-size:13px; }
@media (max-width:900px) { .app-shell { grid-template-columns:1fr; } .sidebar { position:static; height:auto; } .navigation { grid-template-columns:repeat(2, 1fr); } .sidebar__logout { margin-top:24px; } .metrics { grid-template-columns:repeat(2, 1fr); } .admin-grid { grid-template-columns:1fr; } }
@media (max-width:1100px) { .invoice-workspace { grid-template-columns:1fr; } .invoice-preview-panel { min-height:auto; } }
@media (max-width:560px) { .content { padding:28px 18px; } .login-card { padding:30px 24px; } .login-logo { width:215px; margin-bottom:30px; } .page-header--row, .client-card, .invoice-row { align-items:stretch; flex-direction:column; } .page-header h1 { font-size:34px; } .metrics, .invoice-fields { grid-template-columns:1fr; } .filters label { min-width:100%; } .invoice-field--wide { grid-column:span 1; } .invoice-lookup-row { flex-direction:column; } .invoice-lookup-row .button { width:100%; margin-top:0; } .invoice-form__actions { align-items:stretch; flex-direction:column; } .invoice-row__actions { justify-content:flex-start; } .invoice-row__actions > strong { text-align:left; } }
@media print { @page { size:A4; margin:0; } body { min-width:0; background:#fff; } .sidebar, .page:not(#page-invoices), #page-invoices > .page-header, .invoice-form, .invoice-list-panel, .invoice-preview-panel__heading, .invoice-empty-preview { display:none !important; } .app-shell, .content, #page-invoices, .invoice-workspace, .invoice-preview-panel, .invoice-preview-wrap { display:block !important; margin:0; padding:0; border:0; box-shadow:none; background:#fff; } .invoice-document { width:210mm; min-height:297mm; padding:14mm; box-shadow:none; print-color-adjust:exact; -webkit-print-color-adjust:exact; } }
