/* Colombo ERP (plain PHP edition): hand-written stylesheet, no build step. */
:root {
  --navy-950: #040d22; --navy-900: #07183a; --navy-800: #0b2455; --brand: #0b63ce; --brand-dark: #0a4fa8; --brand-50: #eef5fe; --brand-100: #dcebfd;
  --gold: #e0a526; --gold-50: #fef8e6; --gold-700: #8a6100; --ink: #0f1b33; --ink-600: #4a5a78; --ink-500: #647391; --ink-400: #8493ad; --line: #e3e9f3; --surface: #f2f5fa;
  --ok: #166534; --ok-100: #dcf5e5; --danger: #b42318; --danger-100: #fde8e6; --radius: 12px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; background: var(--surface); color: var(--ink); line-height: 1.5; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0; color: var(--navy-900); } h2 { font-size: 1.05rem; margin: 0 0 .75rem; color: var(--navy-900); } h3 { font-size: .95rem; margin: 0 0 .5rem; color: var(--navy-900); }
.muted { color: var(--ink-500); } .strong { font-weight: 600; color: var(--navy-900); } .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hidden { display: none !important; } .inline { display: inline; } .right { text-align: right; } .pad { padding: .5rem .85rem; display: block; }
.demo-banner { background: var(--gold); color: var(--navy-900); text-align: center; font-size: .8rem; font-weight: 600; padding: .35rem; }

.shell { display: flex; min-height: 100vh; }
.sidebar { width: 15.5rem; flex: none; background: var(--navy-900); color: #cbd5e1; padding: 1rem .75rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-size: 1.15rem; margin: .25rem .5rem 1rem; } .brand:hover { text-decoration: none; }
.brand-mark { background: var(--gold); color: var(--navy-900); font-weight: 800; border-radius: 10px; width: 2rem; height: 2rem; display: grid; place-items: center; }
.org { background: var(--navy-800); border-radius: 10px; padding: .55rem .75rem; margin-bottom: 1rem; } .org small { display: block; color: var(--gold); font-size: .65rem; letter-spacing: .08em; } .org strong { color: #fff; font-size: .9rem; }
.nav-title { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: #8aa0c4; margin: 1rem .6rem .3rem; }
.nav-link { display: block; color: #d5def0; padding: .45rem .75rem; border-radius: 8px; font-size: .92rem; } .nav-link:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.nav-link.active { background: var(--brand); color: #fff; font-weight: 600; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.25rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.search { flex: 1; max-width: 34rem; } .top-actions { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.menu-toggle { display: none; }
.content { padding: 1.5rem 1.5rem 3rem; max-width: 84rem; width: 100%; margin: 0 auto; flex: 1; }
.footer { text-align: center; color: var(--ink-400); font-size: .78rem; padding: 1rem; }
details.menu { position: relative; } details.menu > summary { list-style: none; cursor: pointer; } details.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + .35rem); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(7,24,58,.15); min-width: 12rem; z-index: 40; padding: .3rem; }
.menu-panel.wide { width: 21rem; max-height: 24rem; overflow-y: auto; }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .5rem .75rem; border-radius: 7px; color: var(--ink); font: inherit; cursor: pointer; } .menu-panel a:hover, .menu-panel button:hover { background: var(--brand-50); text-decoration: none; }
.notif { border-bottom: 1px solid var(--line); } .notif span { display: block; font-size: .82rem; color: var(--ink-600); } .notif small { color: var(--ink-400); } .notif.unread { background: var(--brand-50); }
.dot { background: #dc2626; color: #fff; border-radius: 99px; padding: 0 .4rem; font-size: .7rem; }
.link-btn { color: var(--brand) !important; font-size: .85rem; }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; } .page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem; margin-bottom: 1.25rem; box-shadow: 0 1px 2px rgba(7,24,58,.04); }
.card.table-card { padding: 0; overflow: hidden; } .card.empty { text-align: center; padding: 2.5rem 1rem; }
.grid { display: grid; gap: 1.25rem; } .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid.side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kpi { border-radius: var(--radius); padding: 1rem 1.15rem; color: #fff; display: block; } .kpi:hover { text-decoration: none; filter: brightness(1.05); } .kpi b { display: block; font-size: 2rem; line-height: 1.1; } .kpi span { font-weight: 600; font-size: .9rem; } .kpi small { display: block; opacity: .85; font-size: .78rem; }
.kpi.blue { background: linear-gradient(135deg, #0b63ce, #1f7be8); } .kpi.navy { background: linear-gradient(135deg, #0b2455, #123470); } .kpi.gold { background: linear-gradient(135deg, #f2b93b, #e0a526); color: var(--navy-900); } .kpi.red { background: linear-gradient(135deg, #b42318, #dc2626); } .kpi.green { background: linear-gradient(135deg, #15803d, #16a34a); }

.btn { display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid #cbd5e1; color: var(--navy-900); border-radius: 9px; padding: .5rem .9rem; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; } .btn:hover { background: var(--brand-50); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn-primary:hover { background: var(--brand-dark); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy-900); } .btn-gold:hover { background: #f2b93b; }
.btn-ghost { border-color: transparent; background: transparent; } .btn-sm { padding: .3rem .65rem; font-size: .82rem; } .btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn:focus-visible, .input:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid #cbd5e1; border-radius: 9px; padding: .5rem .7rem; font: inherit; background: #fff; color: var(--ink); } textarea.input { resize: vertical; }
.input-error { border-color: var(--danger); } .label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .25rem; color: var(--navy-900); } .req { color: var(--danger); }
.hint { color: var(--ink-500); font-size: .78rem; margin: .25rem 0 0; } .field-error { color: var(--danger); font-size: .82rem; margin: .25rem 0 0; }
.check { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; max-width: 56rem; } .form-grid .wide, .field.wide { grid-column: 1 / -1; } .form-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.static { margin: 0; padding: .5rem .7rem; background: var(--surface); border-radius: 9px; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; padding: .9rem; } .filters .field { min-width: 11rem; flex: 1; } .actions-inline { display: flex; gap: .5rem; flex: none !important; min-width: 0 !important; }
.table-wrap { overflow-x: auto; } .table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-500); padding: .7rem 1rem; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; } .table tr:last-child td { border-bottom: 0; } .table tr:hover td { background: #fafcff; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: .25rem; border-radius: 99px; padding: .1rem .6rem; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.badge-neutral { background: #e8edf5; color: #3d4c6a; } .badge-blue { background: var(--brand-100); color: var(--brand-dark); } .badge-gold { background: #fcefc9; color: var(--gold-700); } .badge-ok { background: var(--ok-100); color: var(--ok); } .badge-danger { background: var(--danger-100); color: var(--danger); }
.alert { padding: .7rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .92rem; } .alert-ok { background: var(--ok-100); color: var(--ok); } .alert-error { background: var(--danger-100); color: var(--danger); } .alert-warn { background: var(--gold-50); color: var(--gold-700); }
.dl { display: grid; gap: .8rem; margin: 0; } .dl dt { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-500); font-weight: 600; } .dl dd { margin: .1rem 0 0; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: .75rem; }
.list { list-style: none; margin: 0; padding: 0; } .list li { padding: .6rem 0; border-bottom: 1px solid var(--line); } .list li:last-child { border-bottom: 0; }
.bar { height: .6rem; background: #e8edf5; border-radius: 99px; overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; } .gap-s { gap: .4rem; }
.tabs { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tag { display: inline-block; background: var(--brand-100); color: var(--brand-dark); border-radius: 6px; padding: 0 .4rem; font-size: .75rem; margin-right: .2rem; }
.board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; } .board .col { min-width: 16rem; width: 16rem; background: #eaeff7; border-radius: var(--radius); padding: .6rem; } .board .col h3 { display: flex; justify-content: space-between; }
.card-task { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; margin-bottom: .5rem; color: var(--ink); } .card-task:hover { text-decoration: none; border-color: var(--brand); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-950), var(--navy-800)); padding: 1rem; }
.login-card { background: #fff; border-radius: 16px; padding: 2rem; width: 100%; max-width: 26rem; } .login-card h1 { margin-bottom: .25rem; }
.demo-box { background: var(--gold-50); border: 1px solid #f2d98a; border-radius: 10px; padding: .75rem; font-size: .82rem; margin-top: 1rem; } .demo-box code { background: #fff; padding: 0 .3rem; border-radius: 4px; }

/* Notes */
.note-body { min-height: 22rem; outline: none; line-height: 1.7; overflow-wrap: anywhere; }
.note-body:empty::before { content: attr(data-placeholder); color: var(--ink-400); }
.note-body h1 { font-size: 1.6rem; margin: 1.2em 0 .4em; } .note-body h2 { font-size: 1.3rem; margin: 1.1em 0 .4em; } .note-body h3 { font-size: 1.1rem; margin: 1em 0 .3em; }
.note-body p { margin: .55em 0; } .note-body ul { list-style: disc; padding-left: 1.5rem; } .note-body ol { list-style: decimal; padding-left: 1.5rem; } .note-body a { text-decoration: underline; }
.note-body blockquote { border-left: 4px solid var(--line); padding: .1em 1em; color: var(--ink-600); margin: .8em 0; } .note-body pre, .note-body code { font-family: Consolas, monospace; background: #f1f5f9; border-radius: 6px; } .note-body pre { padding: .75em 1em; overflow-x: auto; }
.note-title { width: 100%; border: 0; border-bottom: 1px solid transparent; background: transparent; font-size: 1.6rem; font-weight: 700; color: var(--navy-900); padding: 0 0 .4rem; } .note-title:focus { outline: none; border-bottom-color: var(--brand); }
.toolbar { display: flex; flex-wrap: wrap; gap: .25rem; margin: .5rem 0; }
[data-save-status] { font-size: .8125rem; font-weight: 600; } [data-save-status][data-tone="ok"] { color: var(--ok); } [data-save-status][data-tone="warn"] { color: var(--gold-700); } [data-save-status][data-tone="error"] { color: var(--danger); } [data-save-status][data-tone="muted"] { color: var(--ink-500); }

/* Mind map */
.mm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1rem; }
.mm-stage { position: relative; height: calc(100vh - 17rem); min-height: 22rem; background-color: #fbfcfe; background-image: radial-gradient(#d5dded 1px, transparent 1px); background-size: 22px 22px; touch-action: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mm-stage:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; } .mm-stage svg.main { position: absolute; inset: 0; width: 100%; height: 100%; }
.mm-mini { position: absolute; right: .75rem; bottom: .75rem; width: 180px; height: 110px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.mm-hint { position: absolute; left: .75rem; bottom: .75rem; font-size: .7rem; color: var(--ink-500); background: rgba(255,255,255,.85); padding: .15rem .5rem; border-radius: 5px; pointer-events: none; }
.mm-edit { position: absolute; z-index: 20; border: 2px solid var(--brand); border-radius: 9px; padding: 0 .5rem; background: #fff; font: inherit; font-size: .9rem; box-shadow: 0 4px 14px rgba(0,0,0,.2); outline: none; }
.mm-swatch { width: 1.6rem; height: 1.6rem; border-radius: 99px; border: 2px solid #cbd5e1; cursor: pointer; } .mm-swatch[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.mm-row { display: flex; align-items: center; justify-content: space-between; gap: .4rem; background: var(--surface); border-radius: 8px; padding: .4rem .5rem; margin-bottom: .35rem; font-size: .85rem; }
.mm-row .input { height: 2.1rem; flex: 1; } .mm-link-btn { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .35rem .5rem; margin-top: .3rem; font: inherit; font-size: .85rem; cursor: pointer; } .mm-link-btn:hover { background: var(--brand-50); }
.mm-field { margin-bottom: .6rem; }
.convert-item { display: flex; gap: .6rem; padding: .5rem 1rem; border-bottom: 1px solid var(--line); }

@media (max-width: 1000px) {
  .sidebar { position: fixed; left: -17rem; z-index: 50; transition: left .2s; } .sidebar.open { left: 0; } .menu-toggle { display: inline-flex; }
  .grid.two, .grid.three, .grid.four, .grid.side, .form-grid, .mm-layout { grid-template-columns: 1fr; } .content { padding: 1rem; }
}
@media print {
  .no-print { display: none !important; }
  body * { visibility: hidden !important; } .print-area, .print-area *, [data-stage], [data-stage] * { visibility: visible !important; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; } [data-stage] { position: fixed !important; inset: 0 !important; height: 100vh !important; border: 0; } .mm-mini { display: none !important; }
}
