/* TaxOrbit on the M360 AdminKit theme. Colours come from the TaxOrbit logo:
   navy #021a42 (sidebar), royal blue #0b46b4 (primary), green #50c828 (active marker), check green #239b17, teal #0a9a8c. */
:root {
    --to-navy: #021a42;
    --to-blue: #0b46b4;
    --to-blue-soft: #e7eefb;
    --to-green: #50c828;
    --to-success: #239b17;
    --to-success-soft: #e9f6e5;
    --to-teal: #0a9a8c;
    --to-teal-soft: #e2f6f3;
    --to-warn: #d97706;
    --to-warn-soft: #fdf1e2;
    --to-danger: #d93025;
    --to-danger-soft: #fdeceb;
    --to-muted: #5d6670;
}

body { font-family: "Inter", "Segoe UI", system-ui, sans-serif; color: #0f1d33; }
.text-muted { color: var(--to-muted) !important; }

/* Sidebar: white logo panel on the navy sidebar, green marker on the active item */
.sidebar-brand.to-brand { background: #fff; display: flex; align-items: center; justify-content: center; padding: .7rem 1rem; min-height: 64px; }
.sidebar-brand.to-brand img { width: 100%; max-width: 205px; height: auto; display: block; }
.sidebar-item.active > .sidebar-link,
.sidebar-item.active .sidebar-link:hover { border-left-color: var(--to-green); background: linear-gradient(90deg, rgba(80, 200, 40, .16), rgba(11, 70, 180, .12) 55%, transparent); }
.sidebar-dropdown .sidebar-link.active, .sidebar-dropdown-list .sidebar-link.active { color: #fff; font-weight: 500; }
.sidebar-footnote { padding: 1rem 1.5rem; font-size: 11.5px; color: rgba(233, 236, 239, .45); }

/* Top bar: page title + company, company selector, user */
.to-topbar { gap: 12px; min-height: 62px; padding: .45rem 1rem; flex-wrap: nowrap; }
.to-topbar-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.to-topbar-title b { font-size: 15px; font-weight: 600; color: #0f1d33; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.to-topbar-title span { font-size: 12px; color: var(--to-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.to-company-select { min-width: 220px; max-width: 320px; }
.to-env { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: .35rem .55rem; border-radius: 6px; white-space: nowrap; }
.to-env-production { background: var(--to-success-soft); color: var(--to-success); }
.to-env-sandbox { background: var(--to-warn-soft); color: var(--to-warn); }
.to-env-none { background: #eef1f5; color: var(--to-muted); }
.to-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--to-blue); color: #fff; display: inline-grid; place-items: center; font-weight: 600; font-size: 12.5px; }

/* Stat tiles (no charts) */
.to-tile { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 10px; height: 100%; }
.to-tile .to-ti { width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; }
.to-tile .to-ti svg { width: 20px; height: 20px; }
.to-tile .to-tv { font-size: 1.45rem; font-weight: 600; line-height: 1.15; }
.to-tile .to-tl { font-size: 12.5px; color: var(--to-muted); }
.to-blue { background: var(--to-blue-soft); } .to-blue .to-ti { background: var(--to-blue); } .to-blue .to-tv { color: var(--to-blue); }
.to-green { background: var(--to-success-soft); } .to-green .to-ti { background: var(--to-success); } .to-green .to-tv { color: var(--to-success); }
.to-orange { background: var(--to-warn-soft); } .to-orange .to-ti { background: var(--to-warn); } .to-orange .to-tv { color: var(--to-warn); }
.to-red { background: var(--to-danger-soft); } .to-red .to-ti { background: var(--to-danger); } .to-red .to-tv { color: var(--to-danger); }
.to-teal { background: var(--to-teal-soft); } .to-teal .to-ti { background: var(--to-teal); } .to-teal .to-tv { color: var(--to-teal); }

/* Onboarding stepper */
.to-steps { display: flex; overflow-x: auto; gap: 0; padding: .25rem 0; }
.to-step { flex: 1; min-width: 104px; text-align: center; position: relative; font-size: 12px; color: var(--to-muted); }
.to-step:not(:last-child)::after { content: ""; position: absolute; top: 14px; left: calc(50% + 18px); right: calc(-50% + 18px); border-top: 2px dotted #cfd7e3; }
.to-step.done:not(:last-child)::after { border-top: 2px solid var(--to-success); }
.to-step .to-c { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 6px; background: #f1f4f8; border: 1px solid #cfd7e3; font-weight: 600; position: relative; z-index: 1; }
.to-step.done .to-c { background: var(--to-success); border-color: var(--to-success); color: #fff; }
.to-step.current .to-c { background: var(--to-blue); border-color: var(--to-blue); color: #fff; box-shadow: 0 0 0 4px var(--to-blue-soft); }
.to-step.current { color: #0f1d33; font-weight: 600; }
.to-dots { display: inline-flex; gap: 3px; }
.to-dots i { width: 15px; height: 5px; border-radius: 2px; background: #d3dbe6; }
.to-dots i.on { background: var(--to-success); }
.to-dots i.cur { background: var(--to-blue); }

/* Forms and tables */
.form-label.required::after, th.required::after { content: " *"; color: var(--to-danger); }
.table > :not(caption) > * > * { vertical-align: middle; }
.to-lines input, .to-lines select { min-width: 0; }
.to-lines td { padding: .35rem .35rem; }
.to-mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.to-pre { font: 12px/1.5 ui-monospace, Consolas, monospace; background: #f6f8fb; border: 1px solid #e4e9f0; border-radius: 6px; padding: 10px 12px; max-height: 320px; overflow: auto; white-space: pre; margin: 0; }
.to-summary div { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid #e4e9f0; font-variant-numeric: tabular-nums; }
.to-summary div.to-total { font-weight: 700; font-size: 1.05rem; border-bottom: 0; }
.btn-submit { background: #2aa31a; border-color: #2aa31a; color: #fff; }
.btn-submit:hover, .btn-submit:focus { background: #22891a; border-color: #22891a; color: #fff; }
.to-logo-box { border: 1px solid #e4e9f0; border-radius: 10px; padding: 18px; text-align: center; }
.to-monogram { width: 72px; height: 72px; border-radius: 16px; display: inline-grid; place-items: center; background: var(--to-blue); color: #fff; font-weight: 700; font-size: 24px; }
.to-quick-invoice { zoom: .8; }

/* Printed invoice */
.to-paper { background: #fff; color: #161616; border: 1px solid #d8d8d8; border-radius: 6px; padding: 24px; }
.to-fbr-mark { display: inline-block; border: 2px solid #161616; border-radius: 6px; padding: 5px 9px; font-size: 10.5px; font-weight: 700; line-height: 1.2; letter-spacing: .04em; text-transform: uppercase; }
@media print {
    .sidebar, .navbar, .footer, .no-print { display: none !important; }
    .main { margin: 0 !important; width: 100% !important; }
    .content { padding: 0 !important; }
    .to-paper { border: 0; }
}

/* Login */
.to-auth { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #f4f6fa 0%, #e7eefb 100%); padding: 16px; }
.to-auth .card { width: min(420px, 100%); }
