/* Auth and dashboard app shell */
.app-page { min-height: 100vh; padding: 110px 0 72px; }
.app-shell { max-width: 1060px; margin: auto; }
.app-nav { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 0 28px; border-bottom:1px solid #292c39; }
.app-nav-links { display:flex; flex-wrap:wrap; gap:16px; }
.app-nav a { color:#b9b4cd; font-size:14px; }
.app-nav a:hover { color:#fff; }
.app-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:30px 0; }
.stat-card,.panel,.project-card,.auth-card { border:1px solid #2d3040; border-radius:14px; background:#12141d; }
.stat-card { padding:18px; }
.stat-card small { color:#959aa8; font:11px var(--mono); text-transform:uppercase; }
.stat-card strong { display:block; margin-top:8px; font-size:30px; letter-spacing:-.06em; }
.panel { padding:24px; }
.panel h2 { margin-top:0; }
.project-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:13px; }
.project-card { padding:17px; transition:transform .2s,border-color .2s; }
.project-card:hover { transform:translateY(-3px); border-color:#7357ba; }
.project-card h3 { margin:12px 0 7px; font-size:17px; letter-spacing:-.04em; }
.project-card p { margin:0; color:#9297a6; font-size:12px; }
.status { display:inline-flex; padding:4px 7px; border-radius:99px; background:#28233e; color:#cbbdff; font:10px var(--mono); }
.status.completed { background:rgba(34,197,94,.12); color:#8ee6ac; }
.status.failed { background:rgba(239,68,68,.12); color:#ffaaa1; }
.auth-wrap { display:grid; place-items:center; min-height:100vh; padding:30px; }
.auth-card { width:min(100%,450px); padding:30px; }
.auth-card h1 { margin-top:0; letter-spacing:-.055em; }
.form-stack { display:grid; gap:16px; }
.form-stack label { display:grid; gap:7px; color:#cbd0da; font-size:13px; }
.form-stack input,.form-stack textarea,.form-stack select { width:100%; padding:11px 12px; color:#fff; border:1px solid #383b4e; border-radius:8px; background:#181a25; font:inherit; }
.form-stack textarea { min-height:100px; resize:vertical; }
.form-stack input:focus,.form-stack textarea:focus,.form-stack select:focus { outline:2px solid rgba(139,92,246,.55); border-color:#8b5cf6; }
.form-error { padding:10px 12px; color:#ffb4ad; border-radius:8px; background:rgba(239,68,68,.1); font-size:13px; }
.project-detail { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(250px,.8fr); gap:20px; }
.project-video { width:100%; border-radius:12px; background:#090a0f; }
.project-meta p { padding:10px 0; margin:0; border-bottom:1px solid #2a2d3b; color:#adb1be; }
@media(max-width:800px){.app-grid,.project-grid{grid-template-columns:repeat(2,1fr)}.project-detail{grid-template-columns:1fr}}
@media(max-width:520px){.app-page{padding-top:90px}.app-grid,.project-grid{grid-template-columns:1fr}.app-nav{align-items:flex-start;flex-direction:column}}


.auth-wrap::before { content:""; position:fixed; width:720px; height:720px; top:-360px; right:-260px; border-radius:50%; background:radial-gradient(circle,rgba(124,58,237,.24),transparent 68%); pointer-events:none; }
.auth-card { position:relative; box-shadow:0 28px 70px rgba(0,0,0,.35); }
.auth-brand { display:inline-block; margin-bottom:30px; color:#fff!important; font-size:23px!important; font-weight:800; letter-spacing:-.07em; }
.auth-copy { margin:-3px 0 23px; color:#969baa; line-height:1.6; font-size:13px; }
.auth-switch { margin:22px 0 0; color:#9297a6; font-size:13px; }
.auth-switch a,.back-link,.section-title a { color:#c4b5fd; font-weight:700; }
.form-stack .button { justify-content:center; margin-top:3px; }
.form-options { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.checkbox-label { display:flex!important; align-items:center; flex-wrap:wrap; gap:8px; }
.checkbox-label input { width:auto; accent-color:#8b5cf6; }
.checkbox-label small { color:#858b9b; }
.welcome-row,.page-heading { display:flex; align-items:end; justify-content:space-between; gap:24px; margin:35px 0 25px; }
.welcome-row h1,.page-heading h1 { margin:5px 0 7px; letter-spacing:-.065em; }
.welcome-row p:not(.eyebrow),.page-heading p { margin:0; color:#969baa; }
.page-heading { align-items:center; }
.section-title { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.section-title h2 { margin:0; }
.empty-state { padding:42px 12px; text-align:center; }
.empty-state h2 { margin:0 0 8px; }
.empty-state p { max-width:420px; margin:0 auto 22px; color:#969baa; }
.create-panel { max-width:720px; margin:36px auto; }
.create-panel h1 { margin:7px 0; letter-spacing:-.06em; }
.progress i { transition:width .35s ease; }
.project-meta strong { float:right; color:#f2f1f7; font-weight:600; }
.delete-button { width:100%; margin-top:20px; padding:10px 12px; color:#ffaaa1; cursor:pointer; border:1px solid rgba(239,68,68,.28); border-radius:8px; background:rgba(239,68,68,.08); }
.delete-button:hover { background:rgba(239,68,68,.16); }
@media(max-width:620px){.form-options{grid-template-columns:1fr}.welcome-row,.page-heading{align-items:flex-start;flex-direction:column}.welcome-row .button{width:100%;justify-content:center}.auth-card{padding:25px 20px}.app-nav-links{gap:12px}}

.form-success { padding:10px 12px; color:#9ce8b4; border-radius:8px; background:rgba(34,197,94,.1); font-size:13px; }
.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.admin-table { display:grid; }
.admin-row { display:grid; grid-template-columns:2fr .8fr .55fr 1.35fr .75fr .65fr; align-items:center; gap:12px; padding:14px 0; border-bottom:1px solid #292c39; font-size:13px; }
.admin-row > span:first-child { display:grid; gap:3px; }
.admin-row small,.admin-person small { color:#8d92a1; font-size:11px; }
.admin-head { color:#878c9b; font:10px var(--mono); text-transform:uppercase; }
.table-action { padding:7px 9px; color:#d8cffc; cursor:pointer; border:1px solid #4b426b; border-radius:6px; background:#211c34; font-size:12px; }
.limit-form { display:flex; align-items:center; gap:6px; }
.limit-form input { width:76px; padding:7px 8px; color:#fff; border:1px solid #383b4e; border-radius:6px; background:#181a25; font:inherit; }
.limit-form input:focus { outline:2px solid rgba(139,92,246,.55); border-color:#8b5cf6; }
.admin-person { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 0; border-bottom:1px solid #292c39; }
.admin-person > div { display:grid; gap:3px; }
@media(max-width:720px){.settings-grid{grid-template-columns:1fr}.admin-table{overflow:auto}.admin-row{min-width:760px}.admin-table{display:block}}

/* Billing */
.usage-panel { display:grid; grid-template-columns:1fr auto; gap:18px 30px; }
.usage-panel h2 { margin:10px 0 5px; }
.usage-panel p { margin:0; color:#969baa; }
.usage-copy { display:grid; justify-items:end; align-content:center; gap:4px; color:#969baa; font-size:12px; }
.usage-copy strong { color:#fff; font-size:28px; letter-spacing:-.06em; }
.usage-track { grid-column:1 / -1; overflow:hidden; height:8px; border-radius:99px; background:#272a37; }
.usage-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#8b5cf6,#c084fc); }
.usage-note { grid-column:1 / -1; font-size:12px; }
.plan-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.plan-card { min-height:260px; display:flex; flex-direction:column; padding:22px; border:1px solid #2d3040; border-radius:14px; background:#12141d; }
.plan-card.current-plan { border-color:#7658c7; box-shadow:inset 0 0 0 1px rgba(139,92,246,.22); }
.plan-card h2 { margin:14px 0 10px; }
.plan-card > p:last-of-type { color:#969baa; line-height:1.55; }
.plan-price { display:flex; align-items:baseline; gap:6px; margin:0; }
.plan-price strong { font-size:32px; letter-spacing:-.06em; }
.plan-price span,.billing-hint { color:#898e9d; font-size:12px; }
.plan-card .button,.plan-current { margin-top:auto; }
.plan-current { color:#9ce8b4; font-size:13px; font-weight:700; }
.button-disabled { cursor:not-allowed; opacity:.55; }
@media(max-width:800px){.plan-grid{grid-template-columns:1fr}.plan-card{min-height:210px}}
@media(max-width:520px){.usage-panel{grid-template-columns:1fr}.usage-copy{justify-items:start}.billing-hint{display:none}}

/* Workspace navigation and beta feedback */
.app-page { padding-top: 68px; }
.app-nav { position:sticky; top:14px; z-index:20; min-height:64px; padding:10px 12px 10px 18px; border:1px solid rgba(79,83,108,.62); border-radius:16px; background:rgba(18,20,29,.88); box-shadow:0 16px 38px rgba(0,0,0,.22); backdrop-filter:blur(18px); }
.app-brand { margin:0; color:#fff!important; font-size:22px!important; font-weight:800; letter-spacing:-.075em; }
.app-nav-links { align-items:center; gap:3px; }
.app-nav a:not(.app-brand) { padding:8px 10px; border-radius:8px; color:#aeb1c1; font-size:13px; font-weight:700; }
.app-nav a:not(.app-brand):hover,.app-nav a:not(.app-brand).active { color:#fff; background:#282536; }
.account-menu { position:relative; margin-left:5px; }
.account-menu summary { display:flex; align-items:center; gap:8px; padding:5px 7px; cursor:pointer; list-style:none; border-radius:9px; color:#e7e4f3; font-size:13px; font-weight:700; }
.account-menu summary::-webkit-details-marker { display:none; }
.account-menu summary:hover { background:#282536; }
.account-avatar { display:grid; place-items:center; width:27px; height:27px; border-radius:50%; background:linear-gradient(135deg,#8b5cf6,#d946ef); color:#fff; font:700 12px var(--mono); }
.account-dropdown { position:absolute; right:0; top:calc(100% + 9px); min-width:150px; padding:6px; border:1px solid #393d51; border-radius:10px; background:#171923; box-shadow:0 16px 32px rgba(0,0,0,.35); }
.app-nav .account-dropdown a { display:block; padding:9px 10px; }
.app-menu-toggle { display:none; padding:8px 10px; color:#ddd7ef; cursor:pointer; border:1px solid #3b3d50; border-radius:8px; background:#211d31; font-size:12px; font-weight:700; }
.field-note { color:#83899a; font-size:11px; font-weight:400; }
.beta-feedback { max-width:720px; margin:20px 0 0; }
.beta-feedback h2 { margin:4px 0 5px; }
.beta-feedback > p:not(.eyebrow) { margin:0 0 18px; color:#969baa; font-size:13px; }
.compact-form { gap:12px; }
.feedback-options { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.compact-form textarea { min-height:76px; }
@media(max-width:720px){.app-page{padding-top:28px}.app-nav{top:8px;align-items:center;flex-direction:row;padding:9px 10px 9px 14px}.app-menu-toggle{display:inline-flex;align-items:center;gap:7px;margin-left:auto}.app-nav-links{display:none;position:absolute;left:0;right:0;top:calc(100% + 8px);align-items:stretch;padding:8px;border:1px solid #393d51;border-radius:12px;background:#171923;box-shadow:0 16px 32px rgba(0,0,0,.35)}.app-nav-links.open{display:flex;flex-direction:column}.app-nav .app-nav-links a:not(.app-brand){padding:11px}.account-menu{margin:3px 0 0}.account-menu summary{padding:9px}.account-dropdown{position:static;margin-top:3px;box-shadow:none}.feedback-options{grid-template-columns:1fr}}


.language-switch { display:flex; overflow:hidden; margin-left:5px; border:1px solid #3c3d50; border-radius:8px; }
.app-nav .language-switch a { padding:6px 7px!important; border-radius:0; color:#979cac; font:700 11px var(--mono); }
.app-nav .language-switch a + a { border-left:1px solid #3c3d50; }
.app-nav .language-switch a.active { color:#fff; background:#433560; }
@media(max-width:720px){.language-switch{margin:4px 0}.app-nav .language-switch{align-self:flex-start}.app-nav .language-switch a{padding:9px 12px!important}}

.site-language-switch { display:flex; overflow:hidden; margin-right:4px; border:1px solid rgba(255,255,255,.16); border-radius:7px; }
.site-language-switch a { padding:5px 7px; color:#aeb1c1; font:700 10px var(--mono); }
.site-language-switch a + a { border-left:1px solid rgba(255,255,255,.16); }
.site-language-switch a.active { color:#fff; background:rgba(139,92,246,.45); }


.verification-card{margin-top:18px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.verification-dialog{width:min(440px,calc(100vw - 32px));padding:0;border:1px solid #35364f;border-radius:18px;background:#141520;color:#f5f5fa;box-shadow:0 24px 80px rgba(0,0,0,.55)}
.verification-dialog::backdrop{background:rgba(2,3,10,.72);backdrop-filter:blur(5px)}
.verification-dialog-content{position:relative;padding:30px}
.verification-dialog h2{margin:8px 0 10px}
.verification-dialog p{color:#a5a7ba;line-height:1.5}
.dialog-close{position:absolute;top:12px;right:15px;border:0;background:transparent;color:#b8b9c9;font-size:28px;cursor:pointer}
.text-button{margin-top:12px;padding:0;border:0;background:transparent;color:#af7cff;font:inherit;cursor:pointer}
@media(max-width:620px){.verification-card{align-items:flex-start;flex-direction:column}}


/* Administration navigation */
.admin-brand-label { color:#a78bfa; font:700 10px var(--mono); letter-spacing:.08em; text-transform:uppercase; }
.admin-nav .app-nav-links { margin-left:auto; }


/* Video mode selection */
.mode-heading { max-width:720px; margin:38px auto 24px; }
.mode-heading .back-link { display:inline-block; margin-bottom:28px; }
.mode-heading h1 { margin:7px 0 9px; letter-spacing:-.065em; }
.mode-heading > p:last-child { margin:0; color:#989cab; line-height:1.6; }
.mode-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; max-width:900px; margin:0 auto; }
.mode-card { position:relative; display:flex; min-height:360px; flex-direction:column; gap:16px; padding:27px; overflow:hidden; border:1px solid #34364a; border-radius:18px; background:linear-gradient(145deg,#171827,#10111a); transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease; }
.mode-card:hover { transform:translateY(-4px); border-color:#8b5cf6; box-shadow:0 20px 42px rgba(0,0,0,.28); }
.mode-card::after { position:absolute; width:260px; height:260px; right:-130px; bottom:-155px; border-radius:50%; background:radial-gradient(circle,rgba(139,92,246,.35),transparent 68%); content:""; pointer-events:none; }
.mode-card-soon::after { background:radial-gradient(circle,rgba(45,212,191,.22),transparent 68%); }
.mode-card .eyebrow { margin:0 0 6px; }
.mode-card h2 { position:relative; z-index:1; margin:0; font-size:30px; letter-spacing:-.06em; }
.mode-card > p { position:relative; z-index:1; margin:0; color:#abaebe; line-height:1.55; }
.mode-card ul { position:relative; z-index:1; display:grid; gap:8px; padding:0; margin:0; color:#d4d2df; font-size:13px; list-style:none; }
.mode-card li::before { margin-right:8px; color:#a78bfa; content:"✓"; }
.mode-card-soon li::before { color:#5eead4; }
.mode-icon { position:relative; z-index:1; display:grid; place-items:center; width:48px; height:48px; border:1px solid rgba(167,139,250,.55); border-radius:14px; color:#e9e3ff; background:rgba(139,92,246,.14); font-size:23px; }
.mode-card-soon .mode-icon { border-color:rgba(94,234,212,.35); color:#baf8ef; background:rgba(45,212,191,.1); }
.mode-action { position:relative; z-index:1; margin-top:auto; color:#dcd4ff; font-size:13px; font-weight:800; }
.mode-card-soon .mode-action { color:#aeece4; }
.mode-unavailable { max-width:650px; margin:74px auto; text-align:center; }
.mode-unavailable .mode-icon { margin:0 auto 22px; width:62px; height:62px; font-size:29px; }
.mode-unavailable h1 { margin:0 0 10px; letter-spacing:-.065em; }
.mode-unavailable > p:not(.eyebrow) { max-width:500px; margin:0 auto 12px; color:#aeb1bf; line-height:1.6; }
.mode-unavailable .button { margin-top:18px; }
@media(max-width:700px){.mode-grid{grid-template-columns:1fr}.mode-card{min-height:0}.mode-heading{margin-top:30px}}


/* Explainer Motion laboratory */
.motion-lab-head { max-width:760px; margin:38px auto 24px; }
.motion-lab-head .back-link { display:inline-block; margin-bottom:27px; }
.motion-lab-head h1 { margin:7px 0 9px; letter-spacing:-.065em; }
.motion-lab-head > p:last-child { margin:0; color:#9b9ead; line-height:1.6; }
.motion-lab-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,.82fr); gap:16px; max-width:980px; margin:0 auto; }
.color-input { display:flex; align-items:center; gap:10px; }
.color-input input { width:48px!important; height:34px; padding:3px!important; cursor:pointer; }
.color-input code { color:#cfc8ee; font:12px var(--mono); }
.motion-result { display:flex; flex-direction:column; }
.motion-result .project-video { aspect-ratio:9 / 16; max-height:470px; object-fit:contain; margin-top:12px; }
.motion-video-placeholder { display:grid; place-items:center; aspect-ratio:9 / 16; max-height:470px; margin-top:12px; border:1px dashed #454963; border-radius:12px; background:radial-gradient(circle at 70% 15%,rgba(139,92,246,.22),transparent 36%),#0d0e17; color:#b8a2ff; font-size:54px; }
.motion-status { min-height:42px; margin:14px 0 0; color:#aaaebe; font-size:13px; line-height:1.5; }
.motion-result .button { width:fit-content; margin-top:14px; }
.motion-result .field-note { margin-top:auto; padding-top:18px; }
@media(max-width:800px){.motion-lab-grid{grid-template-columns:1fr}.motion-result .project-video,.motion-video-placeholder{max-height:none}}


/* Motion palette controls */
.palette-field { display:grid; gap:9px; }
.palette-field > div:first-child { display:flex; align-items:baseline; justify-content:space-between; gap:12px; color:#cbd0da; font-size:13px; }
.palette-field small { color:#858b9b; font-size:11px; }
.motion-palette { display:grid; gap:8px; }
.palette-colour { display:flex; align-items:center; gap:10px; }
.palette-colour input { width:48px!important; height:34px; padding:3px!important; cursor:pointer; }
.palette-colour code { min-width:76px; color:#cfc8ee; font:12px var(--mono); }
.palette-colour button { display:grid; place-items:center; width:26px; height:26px; padding:0; color:#d7caff; cursor:pointer; border:1px solid #46415d; border-radius:7px; background:#211d31; font-size:18px; line-height:1; }
.palette-colour button:hover { color:#fff; border-color:#8b5cf6; }
.palette-add { justify-self:start; }

.duration-control > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.duration-control output {
  color: #cfc8ee;
  font: 12px var(--mono);
}

.duration-control input[type="range"] {
  height: 18px;
  padding: 0;
  accent-color: #a78bfa;
}


.motion-outro-control {
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 13px;
  border:1px solid #34374a;
  border-radius:10px;
  background:#151722;
}
.motion-outro-control > span { display:grid; gap:4px; }
.motion-outro-control small { color:#858b9b; font-size:11px; line-height:1.35; }
.form-stack .motion-outro-control input[type="checkbox"] {
  width:19px!important;
  height:19px;
  flex:0 0 auto;
  padding:0!important;
  accent-color:#a78bfa;
}
