/*
  Core Microsystems Inc.
  My Core
  File: assets/style.css
  Version: v0.6
  Notes:
  - v0.6: password rules checklist, Invited tag
  - v0.5: colour themes (maps themes.css tokens onto My Core), Appearance page
  - v0.4: no footer; app version beside the product name
  - v0.3: Core standard v2: Core Sig type scale, My Core header style, 1320px width
  - v0.2: standard page width 1440px (shared by all Core apps)
  - Same look as Core Ticket and Core Sign; colours come only from brand.css.
*/

*{ box-sizing:border-box; }
[hidden]{ display:none !important; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; font-family:var(--font); background:var(--bg-soft); color:var(--ink);
  line-height:1.6; font-size:.95rem; min-height:100vh; display:flex; flex-direction:column;
  font-variant-numeric:tabular-nums;
}
.container{ width:min(1440px, calc(100% - 3rem)); margin-inline:auto; }
a{ color:var(--blue-600); }
h1{ font-size:1.6rem; line-height:1.25; margin:.2rem 0 .6rem; color:var(--blue-950); }
h2{ font-size:1.05rem; line-height:1.3; margin:0 0 .7rem; color:var(--blue-950); }
h3{ font-size:.95rem; margin:0 0 .6rem; color:var(--blue-950); }
p{ margin:0 0 .8rem; }
code{ background:var(--bg-soft); border:1px solid var(--border); border-radius:5px; padding:0 .35rem; font-size:.85em; }
:focus-visible{ outline:3px solid var(--blue-500); outline-offset:2px; }
.muted{ color:var(--muted); }
.small{ font-size:.85rem; }
.nowrap{ white-space:nowrap; }
.right{ text-align:right; }
.strong{ font-weight:600; }

/* ===== Header (as Core Sign / coremicrosystems.ca) ===== */
.site-header{ position:sticky; top:0; z-index:50; background:#fff; border-bottom:1px solid var(--border); }
.header-inner{ display:flex; align-items:center; gap:1.4rem; min-height:var(--header-h); }
.brand{ display:flex; align-items:center; gap:.75rem; text-decoration:none; flex:none; }
.brand-logo{ height:44px; width:auto; display:block; }
.brand-fallback{ font-weight:700; color:var(--blue-950); font-size:1.05rem; }
.brand-product{
  font-weight:700; font-size:1.75rem; line-height:1; letter-spacing:-.01em; color:var(--blue-950);
  padding-left:.85rem; border-left:2px solid var(--border);
}
.nav{ display:flex; align-items:center; gap:1.4rem; }
.nav-link{
  text-decoration:none; color:#334155; font-weight:600; font-size:.95rem;
  padding:.35rem .2rem; border-bottom:2px solid transparent;
  transition:transform .15s ease, color .15s ease;
}
.nav-link:hover{ color:var(--blue-800); transform:translateY(-1px); }
.nav-link.is-active{ color:var(--blue-950); border-bottom-color:var(--blue-500); }
.header-tools{ margin-left:auto; display:flex; align-items:center; gap:.8rem; }
.quickfind{ margin:0; }
.quickfind input{
  width:14rem; font:inherit; font-size:.88rem; color:var(--ink); background:var(--bg-soft);
  padding:.5rem .9rem; border:1px solid var(--border); border-radius:999px;
}
.quickfind input:focus{ outline:none; background:#fff; border-color:var(--blue-500); box-shadow:0 0 0 3px rgba(41,171,226,.25); }
.signout{ margin:0; }
.nav-button{ background:none; border:0; cursor:pointer; font:inherit; font-weight:600; font-size:.9rem; color:#334155; padding:.35rem .2rem; }
.nav-button:hover{ color:var(--blue-800); }

/* ===== Page ===== */
.page{ flex:1; padding:2rem 0 3rem; }
.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1.2rem; flex-wrap:wrap; }
.page-head h1{ margin:0; }
.cols{ display:grid; grid-template-columns:minmax(0, 1fr) 350px; gap:1.25rem; align-items:start; }
.col-main, .col-side{ min-width:0; }
.panel{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--shadow-soft); padding:1.5rem 1.6rem; margin-bottom:1.25rem;
}
.panel.narrow{ max-width:680px; }
.panel-head{ display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:.7rem; }
.panel-head h2{ margin:0; }
.panel-head a{ font-weight:600; font-size:.88rem; text-decoration:none; }
.row2{ display:grid; grid-template-columns:1fr 1fr; gap:0 1rem; }
.row3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:0 1rem; }
.btn-row{ display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; }
.empty{ text-align:center; color:var(--muted); padding:2rem 1rem; margin:0; }

/* ===== Buttons (as Core Sign) ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.4rem;
  text-decoration:none; border-radius:999px; padding:.7rem 1.3rem;
  font:inherit; font-weight:600; cursor:pointer; white-space:nowrap;
  background:transparent; color:var(--blue-800); border:1px solid rgba(12,74,110,.35);
  transition:transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ transform:translateY(-1px); border-color:rgba(12,74,110,.6); background:rgba(12,74,110,.06); color:var(--blue-800); }
.btn:active{ transform:translateY(0); }
.btn:disabled{ opacity:.45; cursor:not-allowed; transform:none; }
.btn-primary{ background:var(--blue-500); border-color:var(--blue-500); color:#fff; }
.btn-primary:hover{ background:var(--blue-600); border-color:var(--blue-600); color:#fff; }
.btn-ok{ background:#15803d; border-color:#15803d; color:#fff; }
.btn-ok:hover{ background:#14532d; border-color:#14532d; color:#fff; }
.btn-small{ padding:.45rem .95rem; font-size:.85rem; }
.btn.wide{ width:100%; }
.linkish{ color:var(--muted); font-size:.88rem; font-weight:600; }

/* ===== Forms (as Core Sign) ===== */
label{ display:block; font-weight:600; font-size:.88rem; color:var(--blue-950); margin-bottom:.9rem; }
input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea{
  display:block; width:100%; margin-top:.35rem;
  font:inherit; font-weight:400; color:var(--ink); background:#fff;
  padding:.65rem .85rem; border:1px solid rgba(2,6,23,.18); border-radius:var(--radius-sm);
}
textarea{ resize:vertical; line-height:1.5; }
input:focus, select:focus, textarea:focus{ outline:none; border-color:var(--blue-500); box-shadow:0 0 0 3px rgba(41,171,226,.25); }
label.check{ display:flex; gap:.55rem; align-items:center; font-weight:500; font-size:.9rem; color:var(--ink); }
label.check input{ width:1.05rem; height:1.05rem; margin:0; accent-color:var(--blue-500); flex:none; }
label.inline{ display:flex; align-items:center; gap:.5rem; margin:0; font-weight:600; }
label.inline select{ margin:0; width:auto; padding:.45rem .7rem; }
.subform{ border:1px dashed rgba(2,6,23,.18); border-radius:var(--radius-sm); padding:1rem 1rem .2rem; margin:0 0 1rem; background:var(--bg-soft); }
.subform legend{ font-weight:700; font-size:.88rem; color:var(--blue-950); padding:0 .3rem; }
form.subform{ padding-bottom:1rem; margin-top:1.2rem; }
.color-pick{ display:flex; align-items:center; gap:.75rem; margin-top:.35rem; font-weight:400; }
.color-pick input{ width:3rem; height:2.3rem; border:1px solid rgba(2,6,23,.18); border-radius:var(--radius-sm); padding:2px; background:#fff; }

/* ===== Notices (as Core Sign) ===== */
.flash{ padding:.75rem 1rem; border-radius:var(--radius-sm); margin:0 0 1rem; font-size:.9rem; border:1px solid; }
.flash-ok{ background:#e7f6ec; color:#14532d; border-color:#b7e2c4; }
.flash-warn{ background:#fff4d6; color:#5c3a00; border-color:#f2d48a; }
.flash-bad{ background:#fdecea; color:#7a1a12; border-color:#f4c3bd; }
.flash-info{ background:#eef6fb; color:var(--blue-800); border-color:#d3e7f3; }

/* ===== Ticket numbers (Core Sign reference tag) ===== */
.tno{
  display:inline-block; font:600 .78rem/1.5 Consolas, 'Courier New', monospace; letter-spacing:.04em;
  color:var(--blue-800); background:#eef6fb; border:1px solid #d3e7f3; border-radius:5px; padding:0 .4rem; white-space:nowrap;
}
.tno-b{ color:var(--muted); }
.th-no .tno{ font-size:.92rem; padding:.05rem .5rem; }

/* ===== Status and priority pills ===== */
.pill{ display:inline-block; font-size:.78rem; font-weight:700; padding:.15rem .6rem; border-radius:999px; white-space:nowrap; border:1px solid transparent; }
.st-new{ background:#e6f5fc; color:var(--blue-800); }
.st-open{ background:#e3f5f3; color:#0f5e57; }
.st-in-progress{ background:#eef0fe; color:#3730a3; }
.st-waiting-on-client{ background:#fff4d6; color:#7a4b00; }
.st-waiting-on-third-party{ background:#f6ede4; color:#6b3f1d; }
.st-resolved{ background:#e7f6ec; color:#14532d; }
.st-closed{ background:var(--bg-soft); color:var(--muted); border-color:var(--border); }
.pr-low{ background:var(--bg-soft); color:var(--muted); }
.pr-normal{ background:#fff; color:var(--muted); border-color:var(--border); }
.pr-high{ background:#fff1e6; color:#9a3b00; }
.pr-critical{ background:#b42318; color:#fff; }
.tag{ display:inline-block; font-size:.72rem; font-weight:700; padding:.05rem .5rem; border-radius:999px; background:var(--bg-soft); color:var(--muted); vertical-align:middle; }

/* ===== Dashboard tiles (as Core Sign) ===== */
.status-strip{ display:grid; grid-template-columns:repeat(6, 1fr); gap:.8rem; margin-bottom:1.25rem; }
.status-strip .ss{
  display:grid; gap:.1rem; align-content:start; text-decoration:none; color:var(--ink);
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius-sm);
  padding:.9rem 1rem; box-shadow:var(--shadow-soft); transition:transform .15s ease, border-color .15s ease;
}
.status-strip .ss:hover{ transform:translateY(-2px); border-color:var(--blue-500); }
.ss-n{ font-size:1.9rem; font-weight:700; line-height:1.1; color:var(--blue-950); }
.ss-l{ font-size:.82rem; font-weight:600; color:var(--muted); display:flex; align-items:center; gap:.4rem; }
.ss-l::before{ content:""; width:.55rem; height:.55rem; border-radius:50%; background:var(--blue-500); flex:none; }
.ss.st-open .ss-l::before{ background:#14b8a6; }
.ss.st-in-progress .ss-l::before{ background:#6366f1; }
.ss.st-waiting-on-client .ss-l::before{ background:#d97706; }
.ss.st-waiting-on-third-party .ss-l::before{ background:#a16207; }
.ss.st-resolved .ss-l::before{ background:#16a34a; }

/* ===== Tables (as Core Sign) ===== */
.table-scroll{ overflow-x:auto; }
.grid{ width:100%; border-collapse:collapse; background:#fff; }
.grid th{ text-align:left; font-size:.78rem; color:var(--muted); font-weight:700; padding:.6rem .8rem; border-bottom:1px solid var(--border); white-space:nowrap; }
.grid td{ padding:.7rem .8rem; border-bottom:1px solid var(--border); vertical-align:top; }
.grid tbody tr:last-child td{ border-bottom:0; }
.grid td a{ font-weight:600; text-decoration:none; }
.grid tr[data-href]{ cursor:pointer; }
.grid tr[data-href]:hover td{ background:#f5fafd; }
.grid .subj strong{ display:block; font-weight:600; color:var(--ink); }
.grid .subj small{ color:var(--muted); font-size:.82rem; }
.grid tr.inactive td{ opacity:.55; }

/* ===== Filters ===== */
.filters{ display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; padding:1rem 1.2rem; }
.filters input[type=search]{ flex:1 1 15rem; margin:0; max-width:420px; }
.filters select{ width:auto; margin:0; flex:0 1 auto; padding:.6rem .8rem; }
.filters label.check{ margin:0; }

/* ===== Ticket page ===== */
.ticket-head{ margin-bottom:1.25rem; }
.th-no{ margin-bottom:.3rem; }
.ticket-head h1{ margin-bottom:.5rem; }
.th-meta{ display:flex; flex-wrap:wrap; gap:.5rem 1rem; align-items:center; font-size:.9rem; }
.th-meta a{ font-weight:600; text-decoration:none; }
.prose{ overflow-wrap:anywhere; }
.contact-card{ margin:0; line-height:1.75; }
.meta-foot{ margin:.6rem 0 0; }
.resolve{ border-color:#b7e2c4; }
.close-form{ display:flex; gap:.6rem; align-items:center; margin:0; }
.close-form label{ margin:0; }

.timeline{ list-style:none; margin:0 0 1rem; padding:0; }
.tl-sys{ display:flex; justify-content:space-between; gap:1rem; font-size:.84rem; color:var(--muted); padding:.35rem 0 .35rem .9rem; border-left:2px solid var(--border); margin-left:.4rem; }
.tl-sys time{ white-space:nowrap; }
.tl-item{ border:1px solid var(--border); border-radius:var(--radius-sm); margin:.7rem 0; background:#fff; overflow:hidden; }
.tl-head{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; padding:.55rem .9rem; border-bottom:1px solid var(--border); font-size:.88rem; background:var(--bg-soft); }
.tl-head strong{ color:var(--blue-950); }
.tl-head time{ margin-left:auto; color:var(--muted); font-size:.82rem; }
.tl-kind{ color:var(--muted); }
.tl-body{ padding:.75rem .9rem; overflow-wrap:anywhere; }
.tl-reply{ border-left:4px solid var(--blue-500); }
.tl-note{ border-color:#f2d48a; border-left:4px solid #d97706; }
.tl-note .tl-head{ background:#fffaf0; border-bottom-color:#f2d48a; }
.tl-resolution{ border-color:#b7e2c4; border-left:4px solid #16a34a; }
.tl-resolution .tl-head{ background:#f1faf4; border-bottom-color:#b7e2c4; }

.reply{ border-top:1px solid var(--border); padding-top:1.1rem; }
.reply textarea{ margin-top:.7rem; }
.reply.is-note textarea{ background:#fffaf0; border-color:#f2d48a; }
.seg{ display:inline-flex; gap:.3rem; padding:.25rem; background:var(--bg-soft); border-radius:999px; }
.seg label{ display:flex; align-items:center; gap:.4rem; margin:0; padding:.4rem .9rem; border-radius:999px; font-weight:600; font-size:.88rem; color:var(--muted); cursor:pointer; }
.seg label:has(input:checked){ background:#fff; color:var(--blue-950); box-shadow:var(--shadow-soft); }
.seg input{ accent-color:var(--blue-500); margin:0; }
.reply-foot{ display:flex; align-items:center; gap:1rem; margin-top:.8rem; flex-wrap:wrap; }
.reply-foot .btn{ margin-left:auto; }

/* ===== Sign in ===== */
.auth{ min-height:55vh; display:grid; place-items:center; }
.auth-card{ width:100%; max-width:440px; padding:2rem; }

/* ===== Settings (as Core Sign tabs) ===== */
.tabs{ display:flex; gap:.2rem; flex-wrap:wrap; border-bottom:2px solid var(--border); margin:0 0 1.2rem; }
.tabs a{ padding:.6rem 1rem; text-decoration:none; font-weight:600; color:var(--muted); border-bottom:3px solid transparent; margin-bottom:-2px; }
.tabs a:hover{ color:var(--blue-800); }
.tabs a.on{ color:var(--blue-950); border-bottom-color:var(--blue-500); }
.add-box summary{ cursor:pointer; font-weight:600; color:var(--blue-800); }
.add-box[open] summary{ margin-bottom:1rem; }
.placeholders{ line-height:2.1; }
.sync-notes{ margin:0 0 1.2rem; padding-left:1.2rem; display:grid; gap:.35rem; font-size:.9rem; }
.tab-count{ display:inline-block; min-width:1.4rem; margin-left:.3rem; padding:0 .4rem; border-radius:999px;
  background:var(--bg-soft); color:var(--muted); font-size:.75rem; text-align:center; }
.tabs a.on .tab-count{ background:#e6f5fc; color:var(--blue-800); }
.col-main > .tabs{ margin-bottom:1rem; }
.user-filter{ display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; margin:0 0 1rem; }
.user-filter input[type=search]{ flex:1 1 14rem; margin:0; max-width:380px; }
.user-filter label.check{ margin:0; }
.imp-new{ background:#e7f6ec; color:#14532d; }
.imp-update{ background:#e6f5fc; color:var(--blue-800); }
.imp-same{ background:var(--bg-soft); color:var(--muted); border-color:var(--border); }
.imp-problem{ background:#fdecea; color:#7a1a12; }
.import-summary{ display:flex; gap:.5rem; flex-wrap:wrap; }
.import-actions{ margin-top:1.2rem; }
.import-actions form{ margin:0; }
.sync-msg{ margin:-.2rem 0 .9rem; }
.sync-msg:empty{ display:none; }
.sync-result{ margin:.6rem 0 0; }
.ok-text{ color:#14532d; font-weight:600; }
.bad-text{ color:#b42318; font-weight:600; }
.section-gap{ margin-top:1.6rem; padding-top:1.2rem; border-top:1px solid var(--border); }
.logo-preview{ display:flex; gap:1rem; align-items:center; flex-wrap:wrap; margin:0 0 1rem; }
.logo-preview img{ height:40px; width:auto; display:block; }
.logo-preview-dark{ background:var(--blue-950); border-radius:var(--radius-sm); padding:.5rem .8rem; }
.sticky-save{ position:sticky; bottom:1rem; text-align:right; margin-bottom:1rem; }
.email-log{ list-style:none; margin:0; padding:0; display:grid; gap:.5rem; font-size:.87rem; }
.email-log li{ padding:.5rem .7rem; border-radius:var(--radius-sm); background:var(--bg-soft); border-left:4px solid #16a34a; }
.email-log li.bad{ border-left-color:#dc2626; background:#fdf2f2; }

.cat-main{ padding:.7rem 0; border-bottom:1px solid var(--border); }
.cat-main:last-child{ border-bottom:0; }
.cat-row{ display:grid; grid-template-columns:minmax(0, 1fr) 4.5rem auto; gap:.6rem; align-items:center; margin:.3rem 0; }
.cat-row input:not([type=checkbox]){ margin:0; padding:.5rem .7rem; }
.cat-row label{ margin:0; }
.cat-name.strong{ font-weight:700; color:var(--blue-950); }
.cat-sub{ padding-left:1.7rem; position:relative; }
.cat-sub::before{ content:""; position:absolute; left:.65rem; top:-.3rem; bottom:50%; width:.7rem; border-left:1px solid var(--border); border-bottom:1px solid var(--border); }
.cat-sort{ text-align:center; }

/* ===== Footer (as Core Sign) ===== */
.footer{ background:var(--blue-950); color:rgba(255,255,255,.9); padding:1.4rem 0; font-size:.8rem; }
.footer-row{ display:flex; align-items:center; gap:1rem; flex-wrap:wrap; }
.footer-logo{ height:34px; width:auto; display:block; }
.footer-text{ flex:1; }
.footer-muted{ color:rgba(255,255,255,.65); }
.footer-link{ color:rgba(255,255,255,.85); text-decoration:none; }
.footer-link:hover{ color:#fff; }

/* ===== Responsive ===== */
@media (max-width: 1100px){
  .status-strip{ grid-template-columns:repeat(3, 1fr); }
  .quickfind input{ width:11rem; }
}
@media (max-width: 1000px){
  .cols{ grid-template-columns:1fr; }
  .nav{ gap:.9rem; }
  .nav-link{ font-size:.88rem; }
}
@media (max-width: 860px){
  .header-inner{ flex-wrap:wrap; row-gap:.2rem; padding:.5rem 0 0; min-height:0; }
  .header-tools{ margin-left:auto; }
  .nav{ order:3; width:100%; overflow-x:auto; gap:1.1rem; padding:.1rem 0 .4rem; scrollbar-width:none; }
  .nav::-webkit-scrollbar{ display:none; }
  .nav-link{ white-space:nowrap; }
}
@media (max-width: 560px){
  .brand-logo{ height:34px; }
  .brand-product{ font-size:1.35rem; padding-left:.6rem; }
  .header-tools{ width:100%; margin-left:0; }
  .quickfind{ flex:1; }
  .quickfind input{ width:100%; }
  .panel{ padding:1.2rem; }
  .row2, .row3{ grid-template-columns:1fr; }
  .status-strip{ grid-template-columns:repeat(2, 1fr); }
  .reply-foot .btn{ margin-left:0; width:100%; }
}
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; }
}

/* ===== My Core: app tiles ===== */
.greet{ display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1.6rem; }
.greet h1{ margin:0; font-size:1.85rem; }
.greet .date{ margin:0 0 .2rem; color:var(--muted); font-size:.9rem; }
.app-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:1rem; }
.tile{
  display:flex; flex-direction:column; gap:.9rem; padding:1.35rem; text-decoration:none; color:var(--ink);
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-soft);
  transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
a.tile:hover{ transform:translateY(-2px); border-color:var(--blue-500); color:var(--ink); }
.tile-top{ display:flex; align-items:center; justify-content:space-between; gap:.75rem; }
.tile-icon{ width:48px; height:48px; border-radius:12px; background:#e6f5fc; color:var(--blue-800); display:flex; align-items:center; justify-content:center; flex:none; }
.tile-name{ font-size:1.1rem; font-weight:700; color:var(--blue-950); }
.tile-desc{ font-size:.9rem; color:var(--muted); }
.tile.off{ opacity:.6; box-shadow:none; }
.badge-code{ display:inline-flex; align-items:center; gap:.3rem; font-size:.78rem; font-weight:700; color:#7a4b00; background:#fff4d6; padding:.2rem .6rem; border-radius:999px; }
.badge-admin{ font-size:.75rem; font-weight:700; color:var(--blue-800); background:#e6f5fc; padding:.15rem .55rem; border-radius:999px; }
.admin-strip{ margin-top:2rem; display:flex; align-items:center; justify-content:space-between; gap:1.2rem; flex-wrap:wrap; }
.admin-strip .who{ display:flex; align-items:center; gap:1rem; }
.admin-strip .tile-icon{ background:var(--blue-950); color:#fff; }
.admin-strip h2{ margin:0; }
.admin-strip p{ margin:0; color:var(--muted); font-size:.9rem; }
.user-chip{ display:flex; align-items:center; gap:.6rem; }
.avatar{ width:36px; height:36px; border-radius:50%; background:var(--blue-950); color:#fff; display:flex; align-items:center; justify-content:center; font-size:.85rem; font-weight:700; flex:none; }
.user-chip .who{ display:flex; flex-direction:column; line-height:1.25; }
.user-chip .who strong{ font-size:.9rem; color:var(--ink); }
.user-chip .who span{ font-size:.78rem; color:var(--muted); }

/* ===== Sign-in steps ===== */
.code-input{ font-size:1.4rem !important; font-weight:600 !important; letter-spacing:.35em; text-align:center; }
.secret-key{ font:600 1.05rem/1.6 Consolas, 'Courier New', monospace; letter-spacing:.08em; background:var(--bg-soft); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.7rem .9rem; word-break:break-all; }
.recovery{ display:grid; grid-template-columns:repeat(2, 1fr); gap:.4rem .8rem; font:600 1rem Consolas, 'Courier New', monospace; background:var(--bg-soft); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.9rem 1rem; margin:0 0 1rem; list-style:none; }
.steps{ margin:0 0 1rem; padding-left:1.2rem; display:grid; gap:.35rem; font-size:.92rem; }

/* ===== Staff and access ===== */
.access-grid{ display:grid; gap:.1rem; border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; margin:0 0 1rem; }
.access-row{ display:grid; grid-template-columns:minmax(0, 1fr) auto auto; gap:1rem; align-items:center; padding:.55rem .8rem; background:#fff; }
.access-row + .access-row{ border-top:1px solid var(--border); }
.access-row label{ margin:0; }
.access-row .app-name{ font-weight:600; color:var(--blue-950); }
.access-row .muted{ font-size:.8rem; }
.check.disabled{ opacity:.45; }
.app-chips{ display:flex; flex-wrap:wrap; gap:.3rem; }
.app-chip{ font-size:.75rem; font-weight:600; padding:.1rem .5rem; border-radius:999px; background:var(--bg-soft); color:var(--ink); border:1px solid var(--border); white-space:nowrap; }
.app-chip.admin{ background:#e6f5fc; color:var(--blue-800); border-color:#d3e7f3; }
.secret-flash{ font:600 1.05rem Consolas, 'Courier New', monospace; }
.app-card .row3{ align-items:end; }

/* ===== Core standard v2: type scale (from Core Sig), header (from My Core), 1320px width ===== */
.container{ width:min(1320px, calc(100% - 3rem)); }
body{ font-size:14px; }
h1, .page-head h1, .greet h1{ font-size:19px; font-weight:600; }
h2, .panel-head h2{ font-size:15px; }
h3{ font-size:14px; }
label{ font-size:12px; }
label.check, label.inline{ font-size:13px; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea{ font-size:14px; padding:9px 10px; }
.btn{ font-size:14px; padding:8px 14px; }
.btn-small{ font-size:13px; padding:6px 12px; }
.grid{ font-size:14px; }
.grid th{ font-size:12px; }
.small{ font-size:12px; }
.flash{ font-size:13px; }
.pill{ font-size:12px; }
/* Header: menu on the left after the logo; selected item underlined; others brand blue; lift on hover */
.header-inner{ justify-content:flex-start; }
.nav{ gap:1.4rem; }
.nav-link, .nav-button{ font-size:13px; font-weight:600; color:var(--blue-800); text-decoration:none; background:none; border:0;
  border-bottom:2px solid transparent; padding:.35rem .1rem; cursor:pointer; transition:transform .15s ease, color .15s ease; }
.nav-link:hover, .nav-button:hover{ color:var(--blue-500); transform:translateY(-1px); }
.nav-link.is-active{ color:var(--blue-950); border-bottom-color:var(--blue-500); }
.nav-right{ margin-left:auto; }
.tile-name{ font-size:15px; }
.tile-desc{ font-size:13px; }
.greet .date{ font-size:12px; }
.user-chip .who strong{ font-size:13px; } .user-chip .who span{ font-size:12px; }
.access-row .app-name{ font-size:14px; }

/* Core standard v3: no footer; app version beside the product name */
.brand-ver{ font-size:12px; font-weight:600; color:#64748b; margin-left:-4px; white-space:nowrap; }

/* ===== Core themes: maps My Core's theme tokens (--ct-*, from themes.css) onto this app's colours ===== */
:root[data-core-theme]{
  --bg-soft:var(--ct-page, #f3f4f6); --bg:var(--ct-page, #f3f4f6); --card:var(--ct-card, #fff); --border:var(--ct-line, #e2e5ea);
  --ink:var(--ct-text, #0b1220); --muted:var(--ct-muted, #475569); --label:var(--ct-text, #0b1220); --field:var(--ct-field, #fff);
  --blue-950:var(--ct-heading, #003057); --blue-800:var(--ct-link, #005a8f); --blue-600:var(--ct-accent-hover, #1986b5); --blue-500:var(--ct-accent, #29ABE2);
  --border-strong:var(--ct-line, #d8dfe6);
}
:root[data-core-theme] body{ background:var(--ct-page, #f3f4f6); color:var(--ct-text, #0b1220); }
:root[data-core-theme] .site-header{ background:var(--ct-header, #fff); border-bottom-color:var(--ct-line, #e2e5ea); }
:root[data-core-theme] :is(.brand-product, .brand-app){ color:var(--ct-heading, #003057); border-left-color:var(--ct-line, #e2e5ea); }
:root[data-core-theme] .brand-ver{ color:var(--ct-muted, #64748b); }
:root[data-core-theme] .brand-fallback{ color:var(--ct-heading, #003057); }
:root[data-core-theme] :is(.nav-link, .nav-button){ color:var(--ct-link, #005a8f); }
:root[data-core-theme] :is(.nav-link, .nav-button):hover{ color:var(--ct-accent, #29ABE2); }
:root[data-core-theme] .nav-link.is-active{ color:var(--ct-nav-active, #003057); border-bottom-color:var(--ct-underline, #29ABE2); }
:root[data-core-theme] :is(.panel, .tile, .tl-item, .grid, .auth-card){ background:var(--ct-card, #fff); border-color:var(--ct-line, #e2e5ea); color:var(--ct-text, #0b1220); }
:root[data-core-theme] .grid :is(th, td){ border-color:var(--ct-line, #e2e5ea); }
:root[data-core-theme] .grid tr[data-href]:hover td{ background:var(--ct-card2, #f5fafd); }
:root[data-core-theme] :is(h1, h2, h3, label){ color:var(--ct-heading, #003057); }
:root[data-core-theme] input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]), :root[data-core-theme] select, :root[data-core-theme] textarea{
  background:var(--ct-field, #fff); color:var(--ct-text, #0b1220); border-color:var(--ct-line, rgba(2,6,23,.18)); }
:root[data-core-theme] .quickfind input{ background:var(--ct-card2, #f3f4f6); }
:root[data-core-theme] .btn{ color:var(--ct-link, #005a8f); border-color:var(--ct-line, rgba(12,74,110,.35)); }
:root[data-core-theme] .btn:hover{ background:var(--ct-card2, rgba(12,74,110,.06)); color:var(--ct-link, #005a8f); }
:root[data-core-theme] .btn-primary, :root[data-core-theme] .btn-primary:hover{ background:var(--ct-accent, #29ABE2); border-color:var(--ct-accent, #29ABE2); color:var(--ct-on-accent, #fff); }
:root[data-core-theme] .btn-primary:hover{ background:var(--ct-accent-hover, #1986b5); border-color:var(--ct-accent-hover, #1986b5); }
:root[data-core-theme] :is(.subform, .tl-head, .seg, .tag, .app-chip, .email-log li){ background:var(--ct-card2, #f3f4f6); border-color:var(--ct-line, #e2e5ea); color:var(--ct-text, #0b1220); }
:root[data-core-theme] :is(.tile-icon, .badge-admin, .tno, .app-chip.admin, .tab-count){ background:var(--ct-soft, #e6f5fc); color:var(--ct-soft-text, #005a8f); border-color:transparent; }
:root[data-core-theme] .tabs a.on{ color:var(--ct-nav-active, #003057); border-bottom-color:var(--ct-underline, #29ABE2); }
:root[data-core-theme] .tabs{ border-bottom-color:var(--ct-line, #e2e5ea); }
:root[data-core-theme] .tabs a{ color:var(--ct-muted, #475569); }
:root[data-core-theme] :is(.muted, .tile-desc, .tl-kind, .tl-sys){ color:var(--ct-muted, #475569); }
:root[data-core-theme] :is(.tile-name, .ss-n, .tl-head strong){ color:var(--ct-heading, #003057); }
:root[data-core-theme] .status-strip .ss{ background:var(--ct-card, #fff); border-color:var(--ct-line, #e2e5ea); }
:root[data-core-theme] .avatar{ background:var(--ct-accent, #003057); color:var(--ct-on-accent, #fff); }
:root[data-core-theme] a{ color:var(--ct-link, #005a8f); }
/* Status colours keep their meaning; dark themes get darker versions */
:root[data-core-theme] :is(.st-new, .st-open, .st-in-progress, .imp-update){ background:var(--ct-soft, #e6f5fc); color:var(--ct-soft-text, #005a8f); }
:root[data-core-theme] :is(.st-resolved, .imp-new, .flash-ok){ background:var(--ct-ok-bg, #e7f6ec); color:var(--ct-ok-tx, #14532d); border-color:transparent; }
:root[data-core-theme] :is(.st-waiting-on-client, .st-waiting-on-third-party, .pr-high, .flash-warn, .badge-code){ background:var(--ct-warn-bg, #fff4d6); color:var(--ct-warn-tx, #7a4b00); border-color:transparent; }
:root[data-core-theme] :is(.flash-bad, .imp-problem){ background:var(--ct-bad-bg, #fdecea); color:var(--ct-bad-tx, #7a1a12); border-color:transparent; }
:root[data-core-theme] :is(.st-closed, .pr-low, .pr-normal, .imp-same){ background:var(--ct-card2, #f3f4f6); color:var(--ct-muted, #475569); border-color:var(--ct-line, #e2e5ea); }
:root[data-core-theme] .flash-info{ background:var(--ct-soft, #eef6fb); color:var(--ct-soft-text, #005a8f); border-color:transparent; }
:root[data-core-theme] .tl-note{ border-left-color:var(--ct-warn-tx, #d97706); }
:root[data-core-theme] .tl-note .tl-head{ background:var(--ct-warn-bg, #fffaf0); }
:root[data-core-theme] .tl-reply{ border-left-color:var(--ct-accent, #29ABE2); }
:root[data-core-theme] .tl-resolution{ border-left-color:var(--ct-ok-tx, #16a34a); }

/* ===== Appearance page ===== */
.theme-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:12px; margin:0 0 1rem; }
.theme-card{ display:block; margin:0; cursor:pointer; border:2px solid var(--ct-line, #e2e5ea); border-radius:12px; overflow:hidden; background:var(--ct-card, #fff); }
.theme-card input{ position:absolute; opacity:0; pointer-events:none; }
.theme-card:has(input:checked){ border-color:var(--ct-accent, #29ABE2); }
.theme-card:has(input:focus-visible){ outline:3px solid var(--ct-accent, #29ABE2); outline-offset:2px; }
.theme-swatch{ display:block; height:64px; padding:8px; }
.theme-swatch .bar{ display:flex; align-items:center; gap:6px; height:16px; padding:0 6px; border-radius:4px; }
.theme-swatch .bar i{ display:block; width:22px; height:4px; border-radius:2px; }
.theme-swatch .body{ display:flex; gap:6px; margin-top:8px; }
.theme-swatch .body i{ display:block; height:24px; border-radius:4px; flex:1; }
.theme-swatch .body b{ display:block; width:28px; height:12px; border-radius:999px; align-self:center; }
.theme-name{ display:flex; justify-content:space-between; gap:6px; padding:6px 10px 8px; font-size:13px; font-weight:600; color:var(--ct-text, #0b1220); }
.theme-name small{ font-weight:400; font-size:12px; color:var(--ct-muted, #475569); }
.option-list{ display:grid; gap:.6rem; margin:0 0 1rem; }
.option-list .hint{ display:block; font-size:12px; font-weight:400; color:var(--ct-muted, #475569); margin-left:1.6rem; }
.mode-row{ display:flex; gap:1.2rem; flex-wrap:wrap; margin:0 0 .8rem; }
.sticky-save{ position:sticky; bottom:1rem; text-align:right; }
.user-chip, .user-chip *{ text-decoration:none; }
:root[data-core-theme] .user-chip .who strong{ color:var(--ct-text, #0b1220); }
:root[data-core-theme] .user-chip .who span{ color:var(--ct-muted, #475569); }
.option-list label.check{ flex-wrap:wrap; align-items:flex-start; }
.option-list label.check input{ margin-top:2px; }
.option-list .hint{ flex-basis:100%; margin-top:-2px; }

/* Password rules checklist (ticks as you type) */
.pw-rules{ list-style:none; margin:-.3rem 0 .9rem; padding:0; display:grid; gap:3px; font-size:12px; color:var(--ct-muted, #475569); }
.pw-rules li{ position:relative; padding-left:20px; }
.pw-rules li::before{ content:""; position:absolute; left:2px; top:3px; width:10px; height:10px; border-radius:50%; border:1.5px solid currentColor; opacity:.6; }
.pw-rules li.ok{ color:var(--ct-ok-tx, #14532d); }
.pw-rules li.ok::before{ content:"\2713"; border:0; opacity:1; top:-1px; width:auto; height:auto; font-weight:700; }
.tag-invited{ background:var(--ct-warn-bg, #fff4d6); color:var(--ct-warn-tx, #7a4b00); }
