/* Base themes: each base may look like a familiar kind of app. Set on <html data-base-theme="…"> while a base is
   open (and in the kiosk for that base's items), so dialogs follow too. Only colours, shapes and density change. */

/* Asset desk — Snipe-IT style: blue top bar, dark navy sidebar, squared panels */
:root[data-base-theme="asset"] {
  --accent: #3c8dbc; --topbar: #3c8dbc; --topbar-ink: #fff; --bg: #ecf0f5; --radius: 3px; --radius-lg: 4px;
  --font: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
:root[data-base-theme="asset"] .tabs { background: #367fa9; }
:root[data-base-theme="asset"] .sidebar { background: #222d32; border-right-color: #1a2226; }
:root[data-base-theme="asset"] .sidebar .input { background: #374850; border-color: #374850; color: #fff; }
:root[data-base-theme="asset"] .tree-table, :root[data-base-theme="asset"] .tree-group,
:root[data-base-theme="asset"] .view-item { color: #b8c7ce; }
:root[data-base-theme="asset"] .tree-table.current { color: #fff; }
:root[data-base-theme="asset"] .tree-table:hover, :root[data-base-theme="asset"] .view-item:hover { background: #1e282c; color: #fff; }
:root[data-base-theme="asset"] .view-item.on { background: #1e282c; color: #fff; box-shadow: inset 3px 0 0 #3c8dbc; }
:root[data-base-theme="asset"] .btn.primary { background: #3c8dbc; border-color: #367fa9; }

/* ERP — Odoo style: plum top bar, teal actions, light grey canvas */
:root[data-base-theme="erp"] {
  --accent: #017e84; --topbar: #714b67; --topbar-ink: #fff; --bg: #f9fafb; --surface-3: #f2f3f5; --radius: 4px;
  --font: Roboto, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
:root[data-base-theme="erp"] .tabs { background: #5f3f57; }
:root[data-base-theme="erp"] .tab.on { border-top: 2px solid #017e84; }
:root[data-base-theme="erp"] .sidebar { background: #f9fafb; }
:root[data-base-theme="erp"] .view-item.on { background: #e6f2f3; color: #01585c; }
:root[data-base-theme="erp"] .btn.primary { background: #714b67; border-color: #714b67; }

/* CRM — Salesforce style: navy global header, bright blue, soft grey canvas, rounded cards */
:root[data-base-theme="crm"] {
  --accent: #0176d3; --topbar: #032d60; --topbar-ink: #fff; --bg: #f3f3f3; --radius: 6px; --radius-lg: 10px;
  --font: "Salesforce Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
:root[data-base-theme="crm"] .tabs { background: #fff; color: #181818; border-bottom: 3px solid #0176d3; }
:root[data-base-theme="crm"] .tab:hover { background: #f3f3f3; }
:root[data-base-theme="crm"] .tab.on { background: #fff; box-shadow: inset 0 -3px 0 #0176d3; }
:root[data-base-theme="crm"] .view-item.on { background: #eef4ff; color: #014486; }

/* Help desk — Zendesk style: deep green-teal header, calm surfaces */
:root[data-base-theme="helpdesk"] {
  --accent: #1f73b7; --topbar: #03363d; --topbar-ink: #fff; --bg: #f8f9f9; --radius: 4px;
}
:root[data-base-theme="helpdesk"] .tabs { background: #17494d; }
:root[data-base-theme="helpdesk"] .sidebar { background: #f8f9f9; }
:root[data-base-theme="helpdesk"] .view-item.on { background: #edf7ff; box-shadow: inset 3px 0 0 #1f73b7; }

/* Notes — Notion style: almost no colour, warm grey sidebar, generous spacing */
:root[data-base-theme="notes"] {
  --accent: #2383e2; --topbar: #fbfbfa; --topbar-ink: #37352f; --bg: #ffffff; --ink: #37352f; --line: #e9e9e7;
  --line-2: #f1f1ef; --hover: #f1f1ef; --radius: 4px; --row-h: 36px;
  --font: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
}
:root[data-base-theme="notes"] .topbar { border-bottom: 1px solid #e9e9e7; }
:root[data-base-theme="notes"] .topbar .icon-btn:hover, :root[data-base-theme="notes"] .topbar .brand:hover,
:root[data-base-theme="notes"] .topbar .base-name:hover { background: rgba(55, 53, 47, .08); }
:root[data-base-theme="notes"] .tabs { background: #fbfbfa; color: #37352f; border-bottom: 1px solid #e9e9e7; }
:root[data-base-theme="notes"] .tab.on { background: #fff; box-shadow: inset 0 -2px 0 #37352f; }
:root[data-base-theme="notes"] .sidebar { background: #f7f7f5; }
:root[data-base-theme="notes"] .view-item.on { background: rgba(55, 53, 47, .08); }

/* Spreadsheet — Excel style: green ribbon, square corners, compact rows */
:root[data-base-theme="sheet"] {
  --accent: #217346; --topbar: #217346; --topbar-ink: #fff; --bg: #f3f3f3; --radius: 2px; --radius-lg: 3px; --row-h: 28px;
  --font: "Segoe UI", Calibri, Arial, sans-serif;
}
:root[data-base-theme="sheet"] .tabs { background: #185c37; }
:root[data-base-theme="sheet"] .grid th { background: #f3f3f3; }
:root[data-base-theme="sheet"] .view-item.on { background: #e1efe6; }

/* Church — warm and calm: deep blue with a gold accent */
:root[data-base-theme="church"] {
  --accent: #b7791f; --topbar: #23395b; --topbar-ink: #fff; --bg: #f7f5f0; --surface-3: #f1ede4; --radius: 8px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
:root[data-base-theme="church"] .tabs { background: #1b2d48; }
:root[data-base-theme="church"] .view-item.on { background: #f6ecd9; color: #6b4410; }

/* Midnight — dark, whatever the person's own theme */
:root[data-base-theme="midnight"] {
  --accent: #8b5cf6; --topbar: #111318; --topbar-ink: #e9ebef; --bg: #15171c; --surface: #1d2027; --surface-2: #22262e;
  --surface-3: #2a2f38; --ink: #e9ebef; --ink-2: #c1c6ce; --muted: #959ba5; --faint: #737a85; --line: #333943;
  --line-2: #2b3038; --hover: #262b34; --selected: color-mix(in srgb, #8b5cf6 18%, #1d2027); color-scheme: dark;
}
:root[data-base-theme="midnight"] .tabs { background: #0b0c10; }
