/* Hostiko Business Email: the Hostiko look, laid over style.css.
   Loaded after style.css on every page, so the brand tokens here win everywhere they are used.
   SiteBoma indigo #1E2A78 (siteboma.com buttons, logo) and a lighter indigo #4F5BD5 (accent). */

:root {
  --c-brand: #1E2A78;
  --c-brand-hover: #003a91;
  --c-brand-active: #002f78;
  --c-brand-light: #e6eefa;
  --c-brand-tint: #f3f7fd;
  --c-brand-band: #1E2A78;
  --c-brand-band-end: #1f63c9;
  --hk-green: #4F5BD5;
  --hk-green-ink: #4d7a14;   /* green text that stays readable on white (4.8:1) */
}
html.theme-dark {
  --c-brand: #4f8fe8;
  --c-brand-hover: #6aa2ee;
  --c-brand-active: #93bdf4;
  --c-brand-light: #1a2f52;
  --c-brand-tint: #15233d;
  --c-brand-band: #1E2A78;
  --c-brand-band-end: #1f63c9;
}
/* The reading pane stays light in dark mode (see style.css), so it keeps the light palette. */
html.theme-dark .reading-pane {
  --c-brand: #1E2A78;
  --c-brand-hover: #003a91;
  --c-brand-active: #002f78;
  --c-brand-light: #e6eefa;
}

/* ---- Sign-in page ---- */
.hk-login-brand { justify-content: space-between; }
.hk-login-logo { display: block; height: 40px; width: auto; }
html.theme-dark .hk-login-logo { background: #ffffff; border-radius: 10px; padding: 5px 8px; height: 46px; }
.login-page .login-brand-tag { color: var(--hk-green-ink); }
html.theme-dark .login-page .login-brand-tag { color: var(--hk-green); }
.login-page .btn-primary { background: #1E2A78; }
.login-page .btn-primary:hover:not(:disabled) { background: #003a91; opacity: 1; }
html.theme-dark .login-page .btn-primary { background: #1f63c9; }
html.theme-dark .login-page .btn-primary:hover:not(:disabled) { background: #2a6fd6; opacity: 1; }
body.login-page { background-image:
  radial-gradient(1200px 520px at 0% 0%, rgba(30, 42, 120, .10), transparent 65%),
  radial-gradient(900px 420px at 100% 100%, rgba(79, 91, 213, .12), transparent 65%);
  background-attachment: fixed; }
.login-page .login-shell { background: transparent; }
.hk-link-btn { width: 100%; margin-top: 8px; background: transparent; border: 0; color: var(--c-brand); font-weight: 600; cursor: pointer; }
.hk-link-btn:hover { text-decoration: underline; }
.hk-login-help { margin: 14px 0 0; font-size: 12.5px; color: var(--c-text-muted); text-align: center; }
.hk-login-help a { color: var(--c-brand); font-weight: 600; text-decoration: none; }
.hk-login-help a:hover { text-decoration: underline; }

/* Adding another account: the server always comes from Hostiko, so no server fields. */
#aaAdvancedToggle, #aaAdvanced { display: none !important; }

/* ===================== Workspace (apps.php + assets/hostiko-apps.js) ===================== */
.hk-apps-page { background: var(--c-page-bg); color: var(--c-text); margin: 0; }
.hk-apps-shell { min-height: 100vh; display: flex; flex-direction: column; }
.hk-apps-title { flex: 0 1 auto; font-weight: 600; font-size: 15px; color: var(--c-text-on-brand); opacity: .95; }
.hk-apps-body { flex: 1; display: grid; grid-template-columns: 220px 1fr; min-height: 0; }
.hk-apps-nav { background: var(--c-bg); border-right: 1px solid var(--c-divider); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.hk-apps-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--c-text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; }
.hk-apps-link .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.hk-apps-link:hover { background: var(--c-hover); color: var(--c-text); }
.hk-apps-link.active { background: var(--c-brand-light); color: var(--c-brand); font-weight: 600; }
.hk-apps-main { padding: 22px 28px 60px; min-width: 0; max-width: 1180px; }
.hk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.hk-head h1 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.hk-sub { margin: 4px 0 0; color: var(--c-text-muted); font-size: 13.5px; }
.hk-sub-head { margin-top: 26px; align-items: center; }
.hk-head-actions, .hk-actions, .hk-row-actions, .hk-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hk-actions { justify-content: flex-end; margin-top: 6px; }
.hk-btn { font: inherit; font-size: 13.5px; font-weight: 600; border-radius: 8px; padding: 8px 14px; border: 1px solid var(--c-divider); background: var(--c-bg); color: var(--c-text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.hk-btn:hover { background: var(--c-hover); }
.hk-btn.primary { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.hk-btn.primary:hover { background: var(--c-brand-hover); }
.hk-btn.danger { background: #c4314b; border-color: #c4314b; color: #fff; }
.hk-btn.danger.ghost, .hk-btn.ghost.danger { background: transparent; color: #c4314b; border-color: transparent; }
.hk-btn.ghost { background: transparent; }
.hk-btn.small { padding: 5px 10px; font-size: 12.5px; }
.hk-btn.link { border: 0; background: none; padding: 0; color: var(--c-brand); font-weight: 600; }
.hk-btn.tab { border-radius: 999px; padding: 6px 14px; }
.hk-btn.tab.on { background: var(--c-brand-light); color: var(--c-brand); border-color: transparent; }
.hk-btn:disabled { opacity: .6; cursor: default; }
.hk-tabs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.hk-tabs input[type=search] { margin-left: auto; max-width: 260px; }
.hk-list { list-style: none; margin: 0; padding: 0; background: var(--c-bg); border: 1px solid var(--c-divider); border-radius: 12px; overflow: hidden; }
.hk-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--c-divider); }
.hk-row:first-child { border-top: 0; }
.hk-row[tabindex], .hk-row-main[tabindex] { cursor: pointer; }
.hk-row:hover { background: var(--c-hover); }
.hk-row.done strong { text-decoration: line-through; color: var(--c-text-muted); }
.hk-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hk-row-main strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-muted { color: var(--c-text-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.hk-muted.late { color: #c4314b; font-weight: 600; }
.hk-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--c-brand-light); color: var(--c-brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }
.hk-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.hk-ficon { font-size: 20px; width: 28px; text-align: center; }
.hk-empty { padding: 34px 20px; text-align: center; color: var(--c-text-muted); background: var(--c-bg); border: 1px dashed var(--c-divider); border-radius: 12px; }
.hk-loading { padding: 40px; text-align: center; color: var(--c-text-muted); }
.hk-h2 { font-size: 15px; margin: 22px 0 10px; }
.hk-month { font-size: 17px; margin: 0 0 10px; }
.hk-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--c-divider); gap: 1px; border: 1px solid var(--c-divider); border-radius: 12px; overflow: hidden; }
.hk-cal-dow { background: var(--c-actionbar-bg); padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--c-text-muted); text-align: center; }
.hk-cal-day { background: var(--c-bg); min-height: 96px; padding: 4px 5px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.hk-cal-day.out { background: var(--c-page-bg); }
.hk-cal-day.out .hk-cal-num { opacity: .45; }
.hk-cal-day.today .hk-cal-num { background: var(--c-brand); color: #fff; }
.hk-cal-num { font-size: 12px; font-weight: 600; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.hk-chip { font: inherit; font-size: 11.5px; text-align: left; border: 0; border-left: 3px solid var(--chip); background: color-mix(in srgb, var(--chip) 14%, transparent); color: var(--c-text); border-radius: 4px; padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.hk-more { font-size: 11px; color: var(--c-text-muted); }
.hk-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hk-note { font: inherit; text-align: left; border: 1px solid rgba(0,0,0,.06); border-radius: 12px; padding: 14px; min-height: 130px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; color: #1f2937; white-space: pre-line; }
.hk-note strong { font-size: 14.5px; }
.hk-note span { font-size: 13px; opacity: .85; }
.hk-note.c-yellow { background: #fff7c2; } .hk-note.c-blue { background: #dbeafe; } .hk-note.c-green { background: #dcfce7; } .hk-note.c-pink { background: #fce7f3; } .hk-note.c-white { background: #fff; }
.hk-crumbs { margin-bottom: 10px; font-size: 14px; }
.hk-drop { border: 2px dashed var(--c-divider); border-radius: 12px; padding: 12px; text-align: center; color: var(--c-text-muted); font-size: 13px; margin-bottom: 12px; }
.hk-drop.on { border-color: var(--c-brand); color: var(--c-brand); background: var(--c-brand-tint); }
.hk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 6px; }
.hk-stat { background: var(--c-bg); border: 1px solid var(--c-divider); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.hk-stat span { font-size: 12px; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.hk-stat strong { font-size: 20px; }
.hk-card { background: var(--c-bg); border: 1px solid var(--c-divider); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.hk-card h2 { margin: 0; font-size: 16px; }
.hk-card .hk-sub { margin-bottom: 12px; }
.hk-card > .hk-field, .hk-card > .hk-check, .hk-card > .hk-two { margin-top: 12px; }
.hk-card > .hk-actions { margin-top: 14px; }
.hk-help { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 14px; }
.hk-help .hk-card { margin: 0; display: flex; flex-direction: column; align-items: flex-start; }
.hk-help .hk-card .hk-btn { margin-top: auto; }
.hk-pre { background: var(--c-page-bg); border: 1px solid var(--c-divider); border-radius: 8px; padding: 12px; font-size: 13px; white-space: pre-wrap; margin: 0 0 8px; user-select: all; }
.hk-form { display: flex; flex-direction: column; gap: 12px; }
.hk-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hk-label { font-size: 12.5px; font-weight: 600; color: var(--c-text-secondary); }
.hk-hint { font-size: 12px; color: var(--c-text-muted); }
.hk-input { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--c-divider); border-radius: 8px; background: var(--c-bg); color: var(--c-text); width: 100%; box-sizing: border-box; }
.hk-input:focus { outline: 2px solid var(--c-brand); outline-offset: 0; border-color: transparent; }
textarea.hk-input { resize: vertical; }
.hk-inline .hk-input { flex: 1; width: auto; }
.hk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hk-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.hk-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 14px; z-index: 50; overflow: auto; }
.hk-modal[hidden] { display: none; }
.hk-modal-card { background: var(--c-bg); color: var(--c-text); border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.hk-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--c-divider); }
.hk-modal-head h2 { margin: 0; font-size: 16px; }
.hk-modal-body { padding: 16px 18px 18px; }
.hk-x { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--c-text-muted); }
.hk-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1f2937; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 90vw; }
.hk-toast.bad { background: #b42318; }
.hk-toast[hidden] { display: none; }
@media (max-width: 820px) {
  .hk-apps-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }   /* else the tab strip takes half the screen */
  .hk-apps-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--c-divider); padding: 8px; }
  .hk-apps-link { white-space: nowrap; padding: 8px 10px; }
  .hk-apps-main { padding: 16px 14px 60px; }
  .hk-cal-day { min-height: 64px; }
  .hk-chip { font-size: 10px; padding: 1px 3px; }
  .hk-two { grid-template-columns: 1fr; }
  .hk-row { flex-wrap: wrap; }
  .hk-row-actions { width: 100%; justify-content: flex-end; }
  .hk-apps-title { display: none; }
}

/* Inbox: Workspace links in the top bar; the local sidebar calendar gives way to the real one. */
.hk-topnav { display: flex; gap: 2px; margin-right: 6px; }
.hk-topnav a { color: var(--c-text-secondary); text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 9px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; }
.hk-topnav a:hover { color: var(--c-brand); background: var(--c-hover); }
.hk-topnav .icon { width: 15px; height: 15px; }
.hk-topnav a span { display: none; }                       /* icons with tooltips: labels never fit beside the search */
.hk-topnav .hk-topnav-all { display: none; }
.app-shell .topbar-search { max-width: min(460px, calc(100vw - 880px)); }
@media (max-width: 1199px) {
  .hk-topnav a { display: none; }
  .hk-topnav .hk-topnav-all { display: inline-flex; }        /* one "Workspace" icon instead of six */
  .app-shell .topbar-logo-text { display: none; }
  .app-shell .topbar-search { max-width: calc(100vw - 560px); min-width: 140px; }
}
@media (max-width: 720px) { .app-shell .topbar-search { max-width: none; min-width: 0; } }
#calPane { display: none !important; }

/* Writing assistant (assets/hostiko-ai.js) */
.hk-ai-menu { position: absolute; z-index: 70; background: var(--c-bg); color: var(--c-text); border: 1px solid var(--c-divider); border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.18); padding: 4px; display: flex; flex-direction: column; min-width: 230px; }
.hk-ai-menu button { font: inherit; font-size: 13.5px; text-align: left; border: 0; background: none; color: inherit; padding: 8px 12px; border-radius: 6px; cursor: pointer; }
.hk-ai-menu button:hover, .hk-ai-menu button:focus { background: var(--c-hover); outline: none; }
.reading-action-btn.hk-ai-btn, .compose-tool.hk-ai-btn { width: auto; padding: 0 10px; gap: 5px; display: inline-flex; align-items: center; color: var(--c-brand); font-weight: 600; font-size: 12.5px; }
.compose-tool.hk-ai-btn { margin-left: auto; }
.hk-ai-modal .hk-modal-card { max-width: 640px; }

/* Live demo banner (demo.php sets $_SESSION['hk_demo']) */
.hk-demo-bar { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 7px 16px; background: #fff7d6; color: #5c4800; font-size: 13px; border-bottom: 1px solid #f0e2a6; }
html.theme-dark .hk-demo-bar { background: #3a3110; color: #f5e7a8; border-color: #5a4b16; }
.hk-demo-short { display: none; }
@media (max-width: 640px) {
    /* One line on a phone: the full explanation took a fifth of the screen. */
    .hk-demo-bar { flex-wrap: nowrap; justify-content: space-between; gap: 10px; padding: 6px 12px; font-size: 12.5px; }
    .hk-demo-bar .hk-btn { flex: none; white-space: nowrap; }
    .hk-demo-more { display: none; }
    .hk-demo-short { display: inline; }
}
