/* ============================================================================
   platform.css · the Amity (ekoapp) product shell — dark icon rail + topbar +
   secondary panel + chat area. The 3 CPF-restaurant demos live inside this frame
   so the deck looks like the real Mity platform, not a microsite.
   ========================================================================== */
.pf { display: grid; grid-template-columns: 76px 1fr; height: 100vh; height: 100dvh; overflow: hidden; }

/* ---- left dark icon rail ---- */
.pf-rail { background: #1b1b1d; color: #cfd4d2; display: flex; flex-direction: column; align-items: center; padding: 12px 0 16px; gap: 2px; position: sticky; top: 0; height: 100vh; overflow: hidden; }
.pf-rail__logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 12px; flex: none; }
.pf-rail__logo svg { width: 26px; height: 26px; }
.pf-rail__nav { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 100%; overflow-y: auto; }
.pf-rail__item { width: 60px; padding: 8px 0 6px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #9aa19e; font-size: 9.5px; font-weight: 600; transition: color .15s, background .15s; position: relative; flex: none; }
.pf-rail__item .mi { width: 21px; height: 21px; }
.pf-rail__item:hover { color: #fff; background: rgba(255,255,255,.06); }
.pf-rail__item.is-on { color: #fff; }
.pf-rail__item.is-on .mi { color: var(--mint); }
.pf-rail__item.is-on::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--mint); }
.pf-rail__dot { position: absolute; top: 6px; right: 14px; width: 7px; height: 7px; border-radius: 50%; background: #f0584a; }

/* ---- main column ---- */
.pf-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pf-top { height: var(--top-h); flex: none; display: flex; align-items: center; gap: 13px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.pf-top__brand { display: inline-flex; align-items: center; }
.pf-top__brand img { height: 22px; }
.pf-top__spacer { flex: 1; }
.pf-top__avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--mint-tint); display: grid; place-items: center; flex: none; }
.pf-top__avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-top__gear { width: 32px; height: 32px; display: grid; place-items: center; color: var(--text-soft); border-radius: 8px; }
.pf-top__gear .mi { width: 19px; height: 19px; }
.pf-top__gear:hover { background: var(--soft); color: var(--text-1); }
.pf-theme { width: 32px; height: 32px; flex: none; display: grid; place-items: center; color: var(--text-soft); border: 1px solid var(--line); border-radius: 999px; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.pf-theme .mi { width: 17px; height: 17px; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.pf-theme:hover { background: var(--soft); color: var(--text-1); }
.pf-theme:hover .mi { transform: rotate(-18deg); }
[data-theme="dark"] .pf-theme { color: var(--mint-700); border-color: var(--line); }

/* role switcher (Frontliner / Operation Head / Executive) */
.role-pill { display: inline-flex; gap: 3px; padding: 3px; background: var(--soft); border-radius: var(--r-pill); margin-left: 4px; }
.role-pill button { font-size: 12px; font-weight: 700; color: var(--text-soft); padding: 6px 13px; border-radius: var(--r-pill); transition: all .15s; white-space: nowrap; }
.role-pill button:hover { color: var(--text-1); }
.role-pill button.is-active { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }

/* per-role use-case tabs (Frontliner only) */
.pf-demos { display: inline-flex; gap: 3px; padding: 3px; background: var(--soft); border-radius: var(--r-pill); }
.pf-demos[hidden] { display: none; }
.pf-demos button { font-size: 12px; font-weight: 600; color: var(--text-soft); padding: 6px 12px; border-radius: var(--r-pill); transition: all .15s; white-space: nowrap; }
.pf-demos button.is-on { background: var(--surface); color: var(--text-1); box-shadow: var(--shadow-sm); }

@media (max-width: 1240px) { .mt-top__title { display: none; } }
@media (max-width: 1080px) { .role-pill button { padding: 6px 9px; font-size: 11px; } }

/* ---- body: secondary panel + content ---- */
.pf-body { flex: 1; display: flex; min-height: 0; }
.scene { flex: 1; display: flex; min-width: 0; min-height: 0; overflow: hidden; animation: scene-in .4s cubic-bezier(.2,.7,.2,1); }

/* secondary panel (left of the chat) */
.pf-panel { width: 248px; flex: none; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; padding: 14px 12px; gap: 4px; overflow-y: auto; }
.pf-panel__new { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14px; color: var(--text-1); border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 13px; box-shadow: var(--shadow-sm); }
.pf-panel__new .mi { width: 17px; height: 17px; color: var(--mint-700); }
.pf-panel__new:hover { border-color: var(--mint); }
.pf-panel__item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); padding: 9px 12px; border-radius: 10px; }
.pf-panel__item .mi { width: 17px; height: 17px; color: var(--text-soft); }
.pf-panel__item:hover { background: var(--soft); color: var(--text-1); }
.pf-panel__sec { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); padding: 14px 12px 6px; }
.pf-panel__empty { font-size: 12.5px; color: var(--text-soft); text-align: center; padding: 24px 8px; }
.pf-panel__chat { display: flex; gap: 10px; padding: 10px; border-radius: 12px; cursor: default; }
.pf-panel__chat.is-on { background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.pf-panel__chat .av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; overflow: hidden; }
.pf-panel__chat .av img { width: 100%; height: 100%; object-fit: cover; }
.pf-panel__chat__b { min-width: 0; flex: 1; }
.pf-panel__chat__t { display: flex; align-items: baseline; gap: 6px; }
.pf-panel__chat__t b { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-panel__chat__t span { font-size: 10.5px; color: var(--text-soft); margin-left: auto; flex: none; }
.pf-panel__chat__p { font-size: 12px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-panel__tabs { display: flex; gap: 6px; padding: 4px 4px 8px; font-size: 12.5px; }
.pf-panel__tabs span { color: var(--text-soft); font-weight: 600; padding: 4px 8px; border-radius: 8px; }
.pf-panel__tabs span.is-on { color: var(--text-1); background: var(--soft); }
.pf-search { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 10px; padding: 8px 11px; margin-bottom: 8px; }
.pf-search .mi { width: 15px; height: 15px; color: var(--text-soft); }
.pf-search span { font-size: 13px; color: var(--text-soft); }

/* ---- chat content area ---- */
.pf-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--softer); }
.pf-chat__head { height: 60px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 1px solid var(--line); background: var(--surface); }
.pf-chat__head .av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; color: #fff; overflow: hidden; background: var(--ink); }
.pf-chat__head .av img { width: 100%; height: 100%; object-fit: cover; }
.pf-chat__head__b b { font-family: var(--font-display); font-weight: 800; font-size: 15px; display: block; }
.pf-chat__head__b span { font-size: 11.5px; color: var(--text-soft); }
.pf-chat__head__act { margin-left: auto; display: inline-flex; gap: 6px; color: var(--text-soft); }
.pf-chat__head__act .mi { width: 18px; height: 18px; }

@media (max-width: 1080px) { .pf-panel { display: none; } }
@media (max-width: 720px) { .pf { grid-template-columns: 60px 1fr; } .pf-rail__item { width: 52px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
