:root { color-scheme: dark; font-family: 'Segoe UI', system-ui, sans-serif; background:#0b121c; color:#f7fafc; font-synthesis:none; }
*{box-sizing:border-box}
body{margin:0; min-height:100vh; background: radial-gradient(circle at 85% 2%,rgba(60,105,162,.13),transparent 35%),#0b121c;}
button{font:inherit;color:inherit;cursor:pointer}
a{color:inherit;text-decoration:none}
.icon{width:24px;height:24px;flex:none}
.shell{min-height:100vh; display:flex; flex-direction:column}
.topbar{height:80px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #ffffff10; padding:0 max(20px, calc((100% - 1040px)/2)); }
.brand{display:flex;align-items:center;gap:11px;font:800 20px 'Segoe UI',system-ui,sans-serif;letter-spacing:-1px}
.brand-symbol{display:grid;place-items:center;background:linear-gradient(145deg,#286f83,#4ec7b2);width:37px;height:37px;border-radius:12px}
.brand-symbol .icon{width:22px;height:22px;stroke-width:2}
.brand-accent{color:#62dcca}
.topbar-note{font-size:12px;color:#a8b7c6;display:flex;align-items:center;gap:8px}
.online-dot{width:7px;height:7px;background:#79d7c2;border-radius:50%;box-shadow:0 0 0 4px #79d7c21c}
.main{width:min(100%, 1040px);margin:0 auto;padding:55px 20px 40px;flex:1}
.eyebrow{letter-spacing:2.4px;color:#74b9c3;font-size:11px;font-weight:800}
.intro h1,.module-panel h1{font:800 clamp(37px,6vw,64px)/1.14 'Segoe UI',system-ui,sans-serif;letter-spacing:-3px;margin:16px 0 16px}
.intro h1 span{color:#68d6c1}
.intro>p{font-size:16px;line-height:1.8;max-width:600px;color:#afbdc9}
.services{margin-top:55px}
.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:15px;margin-bottom:19px}
h2{font:800 21px 'Segoe UI',system-ui,sans-serif;letter-spacing:-.6px;margin:0 0 8px}
.section-heading p{margin:0;font-size:14px;color:#91a1ae}
.tertiary,.back{background:transparent;border:1px solid #293848;border-radius:11px;padding:11px 13px;display:flex;gap:8px;align-items:center;white-space:nowrap;font-size:13px;font-weight:700}
.tertiary .icon,.back .icon{width:17px;height:17px}
.tertiary:hover,.back:hover{background:#1a2a38}
.tiles{display:grid;grid-template-columns:repeat(3, minmax(0,1fr));gap:14px}
.tile,.add-tile{min-height:170px;background:#14212e;border:1px solid #263649;border-radius:18px;overflow:hidden;position:relative}
.tile:hover,.add-tile:hover{border-color:#557481;transform:translateY(-2px)}
.tile,.add-tile{transition:transform .16s,border-color .16s}
.tile-open{width:100%;height:100%;min-height:168px;padding:20px;background:none;border:0;display:flex;flex-direction:column;align-items:flex-start;text-align:left;position:relative}
.tile-icon,.module-icon{display:grid;place-items:center;background:var(--accent-bg, #1c353c);color:var(--accent,#64d5c9);width:54px;height:54px;border-radius:15px}
.tile-icon .icon{width:29px;height:29px}
.tile-copy{margin-top:auto;display:flex;flex-direction:column;gap:5px}
.tile-copy strong{font:800 17px 'Segoe UI',system-ui,sans-serif;letter-spacing:-.3px}
.tile-copy span{color:#9baeba;font-size:13px}
.tile-arrow{position:absolute;right:19px;bottom:22px;width:20px;height:20px;color:#718a9c}
.tile-blue{--accent:#79b5fa;--accent-bg:#173350}
.tile-purple{--accent:#c4a4f8;--accent-bg:#35284c}
.tile-cyan{--accent:#65dacf;--accent-bg:#163c40}
.tile-amber{--accent:#ebc58f;--accent-bg:#433524}
.tile-green{--accent:#9bdfb6;--accent-bg:#254337}
.tile-gray{--accent:#b1c4d2;--accent-bg:#293744}
.add-tile{border:1px dashed #52717a;background:#101b26;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:7px}
.add-tile .icon{color:#63d2c2;width:31px;height:31px}
.add-tile strong{font-weight:800;font-size:14px}
.add-tile span{font-size:12px;color:#98adb8}
.tile-controls{display:flex;gap:6px;padding:6px 12px 10px;background:#0b1520}
.tile-controls button{background:#263746;border:1px solid #375060;border-radius:8px;padding:4px 10px;font-size:12px}
.tile-controls button:hover{background:#385067}
.notice{display:flex;gap:14px;background:#142329;border:1px solid #294d52;border-radius:16px;margin-top:28px;padding:17px 20px;font-size:13px;line-height:1.7;color:#a9c1c5}
.notice .icon{color:#71d7be;margin-top:2px}
.notice b{color:#d5f6ec}
.footer{margin-top:auto;border-top:1px solid #ffffff12;padding:18px max(20px, calc((100% - 1040px)/2));display:flex;justify-content:space-between;gap:20px;color:#738796;font-size:11px}
.module-view{padding-top:5px}
.back{display:inline-flex;margin-bottom:23px}
.module-panel{background:#152330;border:1px solid #304659;border-radius:22px;padding:36px 34px 40px;max-width:740px}
.module-icon{width:70px;height:70px;border-radius:19px}
.module-icon .icon{width:39px;height:39px}
.module-panel .eyebrow{margin-top:25px;color:#8bb5c2}
.module-panel h1{margin:10px 0 18px}
.module-desc{font-size:16px;line-height:1.8;color:#b7c8d3;max-width:610px}
.pending-state{display:inline-block;border:1px solid #4b5968;border-radius:99px;padding:8px 13px;color:#b7cad6;font-size:12px;margin-top:18px}
.module-explanation{max-width:680px;margin-top:35px}
.module-explanation p{color:#a9bac9;font-size:15px;line-height:1.8}
@media(max-width:700px){.topbar{height:68px}.topbar-note{font-size:10px;max-width:150px;text-align:right}.main{padding-top:39px}.intro h1{letter-spacing:-2px}.tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.tile,.add-tile{min-height:155px}.tile-open{min-height:153px;padding:16px}.tile-icon{width:48px;height:48px;border-radius:13px}.tile-icon .icon{width:25px;height:25px}.tile-copy strong{font-size:15px}.tile-copy span{font-size:11px}.tile-arrow{right:12px;bottom:18px;width:16px;height:16px}.services{margin-top:39px}.section-heading{align-items:center}.section-heading p{font-size:12px;max-width:200px}.footer{flex-direction:column;gap:5px}.module-panel{padding:27px 20px}}
@media(max-width:360px){.tiles{grid-template-columns:1fr}.tile,.add-tile{min-height:130px}.tile-open{min-height:128px}.topbar-note{display:none}}
@media(prefers-reduced-motion:reduce){.tile,.add-tile{transition:none}}
/* Integrated service panels: responsive on both phone and desktop. */
.module-panel:has(.module-content){max-width:100%;}
.module-panel:has(.module-content) h1{font-size:clamp(28px,5vw,42px)}
.module-content{margin-top:18px;}
.breadcrumbs{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:16px 0 20px}
.breadcrumbs button{border:0;background:#263b51;border-radius:8px;padding:8px 10px;font-size:12px}
.breadcrumbs span{color:#8195a9}
.files{border:1px solid #385066;border-radius:12px;overflow:hidden}
.file-row{background:#182d3e;display:flex;align-items:center;gap:12px;min-height:57px;width:100%;padding:12px 14px;border:0;border-bottom:1px solid #2d4053;text-align:left}
.file-row:last-child{border-bottom:0}
.file-row:hover{background:#244156}
.file-icon .icon{width:23px;height:23px;color:#91b7cd}
.file-name{font-size:14px;flex:1;overflow-wrap:anywhere}
.file-action{font-size:11px;color:#7ad6c8}
.service-error{padding:14px;background:#4d2a34;border:1px solid #bb7383;border-radius:10px;line-height:1.6}
.loading,.library-count{font-size:13px;color:#93a8b9}
.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:12px;margin:18px 0}
.media-card{border:1px solid #33475a;border-radius:10px;background:#192b3c;text-align:left;padding:10px;min-height:195px;display:flex;flex-direction:column;gap:6px}
.media-card:hover{border-color:#74b7bc}
.media-card img,.poster-fallback{width:100%;height:140px;object-fit:cover;border-radius:6px;background:#26384b}
.poster-fallback{display:grid;place-items:center;font-size:26px}
.media-card strong{font-size:12px;line-height:1.35}
.media-card span:last-child{font-size:11px;color:#93a8b9}
.player-slot{margin:28px 0}
.player-slot video{display:block;width:100%;max-height:65vh;background:#050709;border-radius:12px;object-fit:contain}
.video-shell{position:relative;width:100%;background:#050709;border-radius:12px;overflow:hidden}
.video-actions{display:flex;justify-content:flex-end;padding:8px 10px;background:#101821}
.video-actions button{min-height:42px}
.video-shell:fullscreen,.video-shell.video-theatre{position:fixed;inset:0;z-index:10000;width:100vw;height:100vh;min-height:100vh;border-radius:0;display:flex;align-items:center;justify-content:center;background:#000;overflow:hidden}
.player-slot .video-shell:fullscreen video,.player-slot .video-shell.video-theatre video{display:block;max-height:none;width:100%;height:100%;object-fit:contain;border-radius:0}
.video-shell:fullscreen .video-actions,.video-shell.video-theatre .video-actions{position:absolute;top:max(8px,env(safe-area-inset-top));right:12px;z-index:10001;background:#000a;border-radius:8px}
.video-help{font-size:12px;color:#a5b7c5;line-height:1.6}

.image-overlay{position:fixed;inset:0;z-index:100;background:#05080bdb;display:grid;place-items:center;padding:20px}
.image-dialog{max-width:min(94vw,1100px);max-height:92vh;display:flex;flex-direction:column;align-items:flex-end;gap:12px}
.image-dialog img{max-width:100%;max-height:80vh;object-fit:contain;border-radius:12px}
/* Secure portal UI additions */
.plain{background:none;border:0;color:inherit;padding:0;cursor:pointer}
.session-info{display:flex;align-items:center;gap:12px;font-size:13px;color:#adbdc9}
.session-info .tertiary{font-size:12px;padding:8px 10px}
.auth-panel{max-width:500px;background:#162532;border:1px solid #304659;border-radius:25px;padding:36px;margin:15px auto}
.auth-panel h1{font-size:clamp(38px,6vw,56px);letter-spacing:-2px;line-height:1.1}
.auth-panel h1 span{color:#68d6c1}
.auth-panel p,.helper{color:#b9cad5;line-height:1.7;font-size:13px}
form{display:flex;flex-direction:column;gap:17px;margin-top:20px}
label{display:flex;flex-direction:column;gap:8px;color:#c9dbe3;font-size:13px;font-weight:650}
input,select{border-radius:11px;border:1px solid #42596c;background:#0c1924;color:#fff;padding:13px 14px;font:inherit;width:100%;min-width:0}
input:focus,select:focus{outline:2px solid #73daca;outline-offset:2px}
.primary{border:0;border-radius:11px;background:#59cdb8;color:#10202b;font-weight:800;padding:14px 20px}
.primary:hover{background:#83e8d5}
.service-iframe{display:block;border:1px solid #314b5e;border-radius:12px;width:100%;height:min(65vh,740px);margin-top:16px;background:white}
.json-result{max-height:65vh;overflow:auto;background:#0a1620;border:1px solid #274351;border-radius:12px;padding:17px;color:#d8e9f0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
@media(max-width:700px){.auth-panel{padding:23px 17px}.session-info{font-size:11px}.service-iframe{height:62vh}}

/* Offline demo is prominently labeled and does not impersonate authentication. */
.demo-banner{background:#342b1e;border:2px solid #c99a42;border-radius:12px;padding:14px 16px;line-height:1.6;color:#ffebc7;font-size:13px;margin-bottom:18px}
.demo-banner strong{color:#ffe6a6}
.demo-start{display:flex;flex-direction:column;gap:12px;margin-top:25px;border:1px solid #4b7584;border-radius:14px;padding:15px;background:#101e2c}
.demo-start .primary{width:100%}

/* Create-only file upload; each user explicitly selects the local file. */
.upload-panel{border-top:1px solid #273e4f;margin-top:16px;padding-top:16px;display:grid;gap:10px}
.upload-panel input[type="file"]{display:block;width:100%;max-width:100%;margin-top:8px}
.upload-panel button{justify-self:start}

/* Shared desktop shell: same destinations on Windows and phones, adapted to screen size. */
.desktop-dock{
  display:flex;align-items:center;justify-content:center;gap:8px;
  width:max-content;max-width:calc(100% - 32px);margin:16px auto 0;
  padding:8px;border:1px solid #345063;background:#142633;
  border-radius:18px;box-shadow:0 12px 34px #0003;
}
.desktop-dock button{
  display:flex;align-items:center;justify-content:center;gap:10px;
  min-width:105px;min-height:48px;padding:10px 15px;
  border:1px solid transparent;border-radius:12px;background:transparent;
  color:#cbdbe5;font-weight:700;font-size:13px;cursor:pointer;
}
.desktop-dock button:hover{background:#243a49}
.desktop-dock button[aria-current="page"]{background:#214b4b;border-color:#468d88;color:#e8fff9}
.desktop-dock button:focus-visible{outline:3px solid #77e8d2;outline-offset:2px}
.desktop-dock .icon{width:20px;height:20px}
.desktop-welcome h1{font-size:clamp(32px,5vw,54px);margin-bottom:10px}
.desktop-welcome + .services{margin-top:28px}
@media(max-width:700px){
  .desktop-dock{position:sticky;top:8px;z-index:20;width:calc(100% - 24px);margin:8px 12px 0;gap:3px;padding:5px;justify-content:space-around;box-shadow:0 8px 25px #0008}
  .desktop-dock button{flex:1;min-width:0;min-height:56px;padding:7px 3px;flex-direction:column;gap:3px;font-size:11px}
  .desktop-dock .icon{width:21px;height:21px}
  .main{padding-top:25px}
  .desktop-welcome + .services{margin-top:20px}
}
@media(prefers-reduced-motion:reduce){
  .desktop-dock button{transition:none}
}
