/* slides.css - aibusinessmanager.au / slides */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #1e293b; background: #eef1f5; }
[hidden] { display: none !important; }
button, select, input { font: inherit; color: inherit; }
.muted { color: #64748b; }

/* top bar */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
       padding: 10px 18px; background: #0f172a; color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; }
.brand small { display: block; font-weight: 400; font-size: 11.5px; color: #94a3b8; }
.logo { width: 32px; height: 32px; border-radius: 8px; background: #c2410c; display: grid; place-items: center; font-weight: 800; }
.top nav { display: flex; gap: 8px; }
.btn { border: 1px solid #c2410c; background: #c2410c; color: #fff; border-radius: 8px; padding: 7px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: #475569; color: inherit; }
.top .btn.ghost { color: #e2e8f0; }
.btn.small { padding: 5px 10px; font-size: 13.5px; }
.btn.danger, button.danger { color: #b91c1c; }
.btn.ghost.danger { border-color: #fca5a5; }

/* list */
.list-view { max-width: 880px; margin: 0 auto; padding: 24px 18px 60px; }
.intro h1 { margin: 0 0 6px; font-size: 24px; }
.intro p { margin: 6px 0; max-width: 70ch; }
.doc-list { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.doc { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; background: #fff; border: 1px solid #e2e8f0;
       border-radius: 10px; padding: 12px 14px; }
.doc .name { font-weight: 650; font-size: 16px; color: #0f172a; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; }
.doc .name:hover { text-decoration: underline; }
.doc .meta { grid-column: 1; font-size: 13px; color: #64748b; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.doc .acts { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 8px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: #e2e8f0; color: #334155; }
.tag.kept { background: #ccfbf1; color: #115e59; }
.tag.warn { background: #fee2e2; color: #991b1b; }
.empty { background: #fff; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 30px; text-align: center; }
.counts { margin-top: 14px; font-size: 13px; }

.docbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; max-width: 860px; width: 100%; margin: 16px auto 0; padding: 0 18px; }
input.title { flex: 1 1 260px; min-width: 0; font-size: 20px; font-weight: 700; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; background: transparent; }
input.title:hover, input.title:focus { border-color: #cbd5e1; background: #fff; outline: none; }
.docbar-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.save-state { font-size: 13px; color: #64748b; min-width: 70px; text-align: right; }
.save-state.bad { color: #b91c1c; font-weight: 600; }
.keep { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; cursor: pointer; padding: 4px 10px; border-radius: 99px; border: 1px solid #cbd5e1; background: #fff; }
.keep:has(input:checked) { background: #ccfbf1; border-color: #5eead4; color: #115e59; }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 25; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
             box-shadow: 0 10px 30px rgba(15,23,42,.15); padding: 6px; display: flex; flex-direction: column; min-width: 190px; }
.menu-list button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.menu-list button:hover { background: #f1f5f9; }
.expiry { max-width: 860px; width: 100%; margin: 2px auto 0; padding: 0 26px; font-size: 13px; color: #64748b; }
.expiry.warn { color: #b91c1c; font-weight: 600; }
.expiry button { border: 0; background: none; color: #c2410c; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }
.notice { max-width: 860px; width: calc(100% - 36px); margin: 10px auto 0; padding: 10px 14px; border-radius: 10px; background: #fef3c7; border: 1px solid #fcd34d; font-size: 14px;
          display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.notice.bad { background: #fee2e2; border-color: #fca5a5; }


.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 9px 16px; border-radius: 10px; z-index: 60; font-size: 14px;
         box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100% - 30px); }
.docbar { max-width: none; margin-top: 10px; }
.expiry, .notice { max-width: none; }
.expiry { padding: 0 26px 6px; }
.notice { width: calc(100% - 36px); }
.keep:has(input:checked) { background: #ffedd5; border-color: #fdba74; color: #9a3412; }
.tag.kept { background: #ffedd5; color: #9a3412; }
.who { color: #e2e8f0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; align-self: center; }
.top nav { align-items: center; }
.top a.btn { text-decoration: none; display: inline-block; }
.intro a { color: #c2410c; font-weight: 600; }

/* the editor */
.edit-view { display: flex; flex-direction: column; height: calc(100vh - 52px); overflow: hidden; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 5px 12px; background: #fff; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.toolbar .grp { display: flex; align-items: center; gap: 2px; }
.toolbar .grp + .grp { padding-left: 10px; border-left: 1px solid #e2e8f0; }
.toolbar select { height: 30px; border: 1px solid #e2e8f0; border-radius: 6px; padding: 0 6px; background: #fff; font-size: 13.5px; }
.tb { min-width: 32px; height: 30px; border: 1px solid transparent; border-radius: 6px; background: none; cursor: pointer; font-size: 15px; display: inline-grid; place-items: center; padding: 0 6px; }
.tb:hover { background: #f1f5f9; }
.tb.on { background: #ffedd5; border-color: #fdba74; }
.tb.wide { font-size: 13.5px; padding: 0 9px; }
.tb.strong { font-weight: 700; color: #c2410c; }
.tb:disabled { opacity: .35; cursor: default; background: none; }
.toolbar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.sw { font-weight: 800; border-bottom: 4px solid #dc2626; line-height: 1.1; padding: 0 3px; }

.work { flex: 1; display: flex; min-height: 0; }
.thumbs { width: 220px; flex: none; overflow-y: auto; background: #f8fafc; border-right: 1px solid #e2e8f0; padding: 12px 10px 40px; display: flex; flex-direction: column; gap: 10px; }
.thumb { position: relative; display: flex; gap: 6px; align-items: flex-start; cursor: pointer; border-radius: 8px; padding: 4px; }
.thumb .n { width: 18px; text-align: right; font-size: 12px; color: #64748b; padding-top: 2px; flex: none; }
.thumb .tf { width: 176px; height: 99px; overflow: hidden; border-radius: 4px; border: 2px solid #e2e8f0; background: #fff; position: relative; flex: none; }
.thumb .tf .slide { transform: scale(0.1375); transform-origin: 0 0; pointer-events: none; }
.thumb.on .tf { border-color: #ea580c; box-shadow: 0 0 0 2px #fed7aa; }
.thumb.drop-before::before { content: ""; position: absolute; left: 24px; right: 4px; top: -7px; height: 4px; border-radius: 2px; background: #ea580c; }
.thumb.drop-after::after { content: ""; position: absolute; left: 24px; right: 4px; bottom: -7px; height: 4px; border-radius: 2px; background: #ea580c; }
.thumb.dragging { opacity: .4; }
.add-thumb { margin-left: 24px; width: 176px; height: 40px; border: 2px dashed #cbd5e1; border-radius: 6px; background: none; color: #64748b; cursor: pointer; font-weight: 600; }
.add-thumb:hover { border-color: #ea580c; color: #c2410c; }

.stage-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 18px; overflow: hidden; background: #e2e8f0; }
.stage { position: relative; box-shadow: 0 6px 28px rgba(15,23,42,.18); flex: none; }
.stage > .slide { transform-origin: 0 0; position: absolute; left: 0; top: 0; }
.slide-tools { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; }
.notes-box { margin-top: 10px; flex: none; }
.notes-box textarea { display: block; height: 64px; resize: vertical; min-height: 40px; max-height: 240px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px;
                      font: 14px/1.4 system-ui, sans-serif; background: #fff; color: #1e293b; }
.btn.present { background: #c2410c; border-color: #c2410c; color: #fff; }
.slide-tools .btn.ghost { background: #fff; }

/* a slide: 1280 x 720 units, scaled to fit */
.slide { position: relative; width: 1280px; height: 720px; overflow: hidden; background: var(--bg); color: var(--fg); font-family: var(--bfont); }
.slide .it { position: absolute; }
.slide .tx { display: flex; flex-direction: column; overflow: visible; }
.slide .tx.va-t { justify-content: flex-start; } .slide .tx.va-m { justify-content: center; } .slide .tx.va-b { justify-content: flex-end; }
.slide .txi { outline: none; line-height: 1.22; overflow-wrap: break-word; min-height: 1em; }
.slide .tx.al-l .txi { text-align: left; } .slide .tx.al-c .txi { text-align: center; } .slide .tx.al-r .txi { text-align: right; }
.slide .tx.title .txi { font-family: var(--tfont); font-weight: 700; color: var(--tc, inherit); letter-spacing: -0.01em; }
.slide .tx.sub .txi { color: var(--sub); }
.slide .txi p, .slide .txi div { margin: 0; }
.slide .txi ul, .slide .txi ol { margin: 0; padding-left: 1.15em; }
.slide .txi li { margin: 0.18em 0; }
.slide .txi li::marker { color: var(--accent); }
.slide .txi a { color: var(--accent); }
.slide .txi:empty::before { content: attr(data-ph); color: var(--ph); pointer-events: none; }
.slide.noph .txi:empty::before { content: none; }
.slide .im img { width: 100%; height: 100%; display: block; object-fit: fill; user-select: none; -webkit-user-drag: none; }
.slide.edit .it { cursor: move; }
.slide.edit .it.editing { cursor: text; }
.slide.edit .tx:not(.editing):hover { outline: calc(1px / var(--s, 1)) dashed #94a3b8; }
.slide.edit .tx.blank { outline: calc(1px / var(--s, 1)) dashed #cbd5e1; }

/* the selection box and its handles (kept the same size on screen whatever the zoom) */
.selbox { position: absolute; z-index: 10000; pointer-events: none; outline: calc(2px / var(--s, 1)) solid #ea580c; }
.selbox .h { position: absolute; width: calc(11px / var(--s, 1)); height: calc(11px / var(--s, 1)); background: #fff; border: calc(2px / var(--s, 1)) solid #ea580c;
             border-radius: 2px; pointer-events: auto; transform: translate(-50%, -50%); box-sizing: border-box; }
.selbox .h.nw { left: 0; top: 0; cursor: nwse-resize; } .selbox .h.n { left: 50%; top: 0; cursor: ns-resize; } .selbox .h.ne { left: 100%; top: 0; cursor: nesw-resize; }
.selbox .h.e { left: 100%; top: 50%; cursor: ew-resize; } .selbox .h.se { left: 100%; top: 100%; cursor: nwse-resize; } .selbox .h.s { left: 50%; top: 100%; cursor: ns-resize; }
.selbox .h.sw { left: 0; top: 100%; cursor: nesw-resize; } .selbox .h.w { left: 0; top: 50%; cursor: ew-resize; }
.selbox.editing { outline-style: dashed; }

/* themes */
.slide { --on: #ffffff; }
.th-clean    { --bg: #ffffff; --fg: #1e293b; --sub: #64748b; --accent: #0f766e; --tc: #0f172a; --ph: #cbd5e1; --tfont: Arial, Helvetica, sans-serif; --bfont: Arial, Helvetica, sans-serif; }
.th-midnight { --bg: #0f172a; --fg: #e2e8f0; --sub: #94a3b8; --accent: #38bdf8; --tc: #ffffff; --ph: #475569; --tfont: "Trebuchet MS", Arial, sans-serif; --bfont: "Trebuchet MS", Arial, sans-serif; }
.th-sunrise  { --bg: #fff7ed; --fg: #431407; --sub: #9a3412; --accent: #ea580c; --tc: #7c2d12; --ph: #fdba74; --tfont: Georgia, "Times New Roman", serif; --bfont: Arial, Helvetica, sans-serif; }
.th-forest   { --bg: #f0fdf4; --fg: #14532d; --sub: #15803d; --accent: #16a34a; --tc: #14532d; --ph: #86efac; --tfont: Georgia, serif; --bfont: Verdana, Arial, sans-serif; }
.th-ocean    { --bg: linear-gradient(135deg, #0c4a6e 0%, #0369a1 100%); --fg: #f0f9ff; --sub: #bae6fd; --accent: #7dd3fc; --tc: #ffffff; --ph: #38bdf8; --tfont: Verdana, Arial, sans-serif; --bfont: Arial, sans-serif; }
.th-bold     { --bg: #111827; --fg: #f9fafb; --sub: #fde047; --accent: #fde047; --tc: #fde047; --ph: #4b5563; --tfont: Impact, "Arial Black", sans-serif; --bfont: Arial, sans-serif; --on: #111827; }

/* menus */
.menu-pop { position: fixed; z-index: 56; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 12px 34px rgba(15,23,42,.2); padding: 10px;
            display: grid; grid-template-columns: repeat(3, 150px); gap: 8px; }
.menu-pop button { border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 6px; cursor: pointer; font-size: 12.5px; color: #334155; display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.menu-pop button:hover { border-color: #ea580c; }
.menu-pop .mini { height: 74px; border-radius: 4px; background: #f8fafc; border: 1px solid #e2e8f0; position: relative; }
.menu-pop .mini i { position: absolute; background: #cbd5e1; border-radius: 2px; }
.palette { position: fixed; z-index: 57; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 10px 30px rgba(15,23,42,.18); padding: 8px; width: 186px; }
.palette .none { width: 100%; height: 28px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; cursor: pointer; margin-bottom: 6px; font-size: 13px; }
.palette .sw-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.palette .sw-grid button { height: 28px; border: 1px solid rgba(0,0,0,.15); border-radius: 6px; cursor: pointer; }
.palette .sw-grid button:hover { outline: 2px solid #ea580c; }

@media (max-width: 800px) {
    .top { padding: 8px 10px; }
    .brand small, #navFiles, .who { display: none; }
    .toolbar { flex-wrap: nowrap; overflow-x: auto; }
    .toolbar .grp { flex: none; }
    .work { flex-direction: column-reverse; }
    .thumbs { width: auto; height: 120px; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-top: 1px solid #e2e8f0; padding: 8px; }
    .thumb { flex: none; } .add-thumb { margin: 0; flex: none; height: 99px; width: 90px; }
    .doc { grid-template-columns: 1fr; } .doc .acts { grid-column: 1; grid-row: auto; }
    .menu-pop { grid-template-columns: repeat(2, 140px); }
}

/* the slideshow */
.show { position: fixed; inset: 0; z-index: 100; background: #000; outline: none; cursor: none; user-select: none; }
.show.mouse { cursor: default; }
.show-stage { position: absolute; inset: 0; overflow: hidden; }
.show-stage .layer { position: absolute; left: 50%; top: 50%; transform-origin: 0 0; }
.show-stage .layer .slide { box-shadow: none; }
.show-black { position: absolute; inset: 0; background: #000; z-index: 3; }
.show-notes { position: absolute; left: 0; right: 0; bottom: 0; max-height: 34%; overflow: auto; z-index: 4; background: rgba(15,23,42,.92); color: #f8fafc;
              font: 20px/1.45 system-ui, sans-serif; padding: 14px 24px 60px; white-space: pre-wrap; }
.show-bar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 6px; padding: 6px 10px;
            background: rgba(15,23,42,.85); border-radius: 12px; color: #fff; font: 14px system-ui, sans-serif; opacity: 0; transition: opacity .25s; }
.show.mouse .show-bar { opacity: 1; }
.show-bar button { border: 0; background: rgba(255,255,255,.1); color: #fff; border-radius: 8px; height: 32px; padding: 0 12px; cursor: pointer; font: inherit; }
.show-bar button:hover { background: rgba(255,255,255,.25); }
.show-bar span { min-width: 64px; text-align: center; }
@keyframes tr-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tr-slide-in { from { translate: 100% 0; } to { translate: 0 0; } }
@keyframes tr-slide-out { from { translate: 0 0; } to { translate: -100% 0; } }
@keyframes tr-slide-in-back { from { translate: -100% 0; } to { translate: 0 0; } }
@keyframes tr-slide-out-back { from { translate: 0 0; } to { translate: 100% 0; } }
@keyframes tr-zoom-in { from { opacity: 0; scale: .86; } to { opacity: 1; scale: 1; } }
.wrapL { position: absolute; inset: 0; }
.wrapL.in.fade { animation: tr-fade-in .55s ease both; }
.wrapL.in.slide { animation: tr-slide-in .5s cubic-bezier(.2,.7,.2,1) both; } .wrapL.out.slide { animation: tr-slide-out .5s cubic-bezier(.2,.7,.2,1) both; }
.wrapL.in.slide.back { animation-name: tr-slide-in-back; } .wrapL.out.slide.back { animation-name: tr-slide-out-back; }
.wrapL.in.zoom { animation: tr-zoom-in .5s ease both; }
@media (prefers-reduced-motion: reduce) { .wrapL { animation: none !important; } }

/* printing (PDF): one slide per page, or slide + notes */
.print-area { display: none; }
@media print {
    body > *:not(.print-area) { display: none !important; }
    body { background: #fff; }
    .print-area { display: block; }
    .pslide { width: 297mm; height: 167.06mm; overflow: hidden; position: relative; break-after: page; }
    .pslide .slide { transform: scale(var(--ps)); transform-origin: 0 0; }
    .pnote { break-after: page; padding: 0; font: 11pt/1.45 Arial, sans-serif; color: #111; }
    .pnote .pslide { width: 180mm; height: 101.25mm; border: 1px solid #cbd5e1; break-after: avoid; margin-bottom: 8mm; }
    .pnote h3 { margin: 0 0 4mm; font-size: 12pt; color: #475569; }
    .pnote .txt { white-space: pre-wrap; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* shapes */
.slide .sh .shp { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; }
.slide .sh.tx { color: var(--on); }
.slide .sh .txi { position: relative; padding: 0 6%; }
.slide .sh.line { overflow: visible; }
.slide .sh.line svg { overflow: visible; }
/* tables */
.slide .tb { overflow: visible; }
.slide .tbl { width: 100%; border-collapse: collapse; table-layout: fixed; outline: none; }
.slide .tbl td, .slide .tbl th { border: 1px solid rgba(127,127,127,.45); padding: .28em .5em; vertical-align: top; text-align: left; overflow-wrap: break-word; line-height: 1.25; }
.slide .tb.hdr tr:first-child th { background: var(--accent); color: var(--on); font-weight: 700; }
.slide .tbl tr:nth-child(even) td { background: rgba(127,127,127,.09); }
.slide .tbl td:focus, .slide .tbl th:focus { outline: none; }
/* guides while moving */
.slide .guide { position: absolute; z-index: 9999; pointer-events: none; background: #db2777; }
.slide .guide.v { top: 0; bottom: 0; width: calc(1px / var(--s, 1)); }
.slide .guide.h { left: 0; right: 0; height: calc(1px / var(--s, 1)); }
/* the shape menu */
.menu-pop.shapes { grid-template-columns: repeat(4, 96px); }
.menu-pop.shapes button { align-items: center; color: #c2410c; }
.menu-pop.shapes svg { width: 40px; height: 26px; }
.menu-pop.shapes span { color: #334155; }

.open-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; font-size: 13.5px; }
.list-view .open-row .btn.ghost { color: #c2410c; border-color: #fdba74; background: #fff; }
