/* ============================================================
   DriveFlow — white premium design system
   Mobile-first, heavy-but-tasteful motion, respects reduced motion.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fd;
  --bg-tint: #eef2ff;
  --ink: #0b1526;
  --ink-2: #1e2a45;
  --muted: #5d6c87;
  --faint: #8b98b3;
  --line: #e6ebf6;
  --brand-1: #4f46e5;
  --brand-2: #7c3aed;
  --brand-3: #06b6d4;
  --grad: linear-gradient(120deg, #4f46e5 0%, #7c3aed 52%, #06b6d4 115%);
  --grad-soft: linear-gradient(120deg, rgba(79,70,229,.12), rgba(124,58,237,.12), rgba(6,182,212,.12));
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 14px rgba(15, 23, 42, .06);
  --shadow-md: 0 2px 6px rgba(15, 23, 42, .06), 0 18px 44px -12px rgba(79, 70, 229, .18);
  --shadow-lg: 0 4px 12px rgba(15, 23, 42, .08), 0 32px 70px -18px rgba(79, 70, 229, .28);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-full: 999px;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

::selection { background: rgba(124, 58, 237, .22); }

.container { width: min(1160px, 92%); margin-inline: auto; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-2);
  background: var(--grad-soft);
  border: 1px solid rgba(124, 58, 237, .18);
  padding: .42rem .95rem; border-radius: var(--r-full);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); animation: pulse-dot 2s infinite; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  border: 0; border-radius: var(--r-full);
  font-weight: 700; font-size: 1rem; padding: .95rem 1.9rem;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s, filter .25s;
  overflow: hidden; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); filter: saturate(1.15); }
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s ease;
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost {
  background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: #c9d4f2; box-shadow: var(--shadow-md); }
.btn-danger { background: linear-gradient(120deg, #ef4444, #f43f5e); color: #fff; box-shadow: var(--shadow-sm); }
.btn-danger:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-sm { padding: .55rem 1.15rem; font-size: .88rem; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-block { width: 100%; }

/* ---------- Announcement bar ---------- */
.announce {
  display: none; text-align: center; font-size: .9rem; font-weight: 600; color: #fff;
  background: var(--grad); padding: .6rem 1rem; position: relative; z-index: 60;
  animation: slide-down .5s ease;
}
.announce.show { display: block; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  animation: slide-down .6s ease;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 14px; background: var(--grad); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-md);
  animation: floaty 5s ease-in-out infinite;
}
.logo-mark svg { width: 24px; height: 24px; }
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-links a { text-decoration: none; font-weight: 600; color: var(--muted); font-size: .95rem; transition: color .2s; position: relative; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2.5px; width: 0;
  background: var(--grad); border-radius: 3px; transition: width .3s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: none; align-items: center; gap: .8rem; }
.burger { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; padding: .5rem; }
.burger span { width: 24px; height: 2.5px; border-radius: 3px; background: var(--ink); transition: .3s; }
.mobile-menu {
  display: none; flex-direction: column; gap: .4rem; padding: 1rem 4% 1.4rem;
  background: #fff; border-bottom: 1px solid var(--line);
}
.mobile-menu.open { display: flex; animation: fade-up .3s ease; }
.mobile-menu a { text-decoration: none; font-weight: 700; padding: .8rem .4rem; border-radius: 10px; }
.mobile-menu a:hover { background: var(--bg-soft); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 4.5rem 0 3.5rem; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; z-index: 0; }
.orb-1 { width: 480px; height: 480px; background: #c7d2fe; top: -160px; left: -120px; animation: drift 14s ease-in-out infinite alternate; }
.orb-2 { width: 420px; height: 420px; background: #ddd6fe; top: -100px; right: -140px; animation: drift 18s ease-in-out infinite alternate-reverse; }
.orb-3 { width: 360px; height: 360px; background: #a5f3fc; bottom: -180px; left: 38%; animation: drift 16s ease-in-out infinite alternate; }
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 860px; margin-inline: auto; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(2.4rem, 6.4vw, 4.4rem); line-height: 1.08; margin: 1.4rem 0 1.2rem;
}
.hero p.lead { font-size: clamp(1.02rem, 2.4vw, 1.25rem); color: var(--muted); max-width: 640px; margin: 0 auto 2.2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero-visual { position: relative; margin-top: 3.5rem; }
.hero-card {
  background: rgba(255,255,255,.9); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 1.4rem; text-align: left; max-width: 560px; margin-inline: auto;
  animation: floaty 7s ease-in-out infinite;
}
.queue-row { display: flex; align-items: center; gap: 1rem; padding: .85rem .4rem; border-bottom: 1px solid var(--line); }
.queue-row:last-child { border-bottom: 0; }
.queue-icon { width: 44px; height: 44px; border-radius: 13px; background: var(--grad-soft); display: grid; place-items: center; flex-shrink: 0; }
.queue-icon svg { width: 22px; height: 22px; stroke: var(--brand-2); }
.queue-meta { flex: 1; min-width: 0; }
.queue-meta b { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-meta small { color: var(--muted); }
.queue-tag { font-size: .75rem; font-weight: 800; padding: .3rem .7rem; border-radius: var(--r-full); background: #ecfdf5; color: #059669; }
.queue-tag.fast { background: #eff6ff; color: #2563eb; }
.queue-tag.stable { background: #f5f3ff; color: #7c3aed; }
.check { color: #059669; font-weight: 800; }
.mini-bar { height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; margin-top: .5rem; }
.mini-bar i {
  display: block; height: 100%; width: 72%; border-radius: 99px; background: var(--grad);
  background-size: 200% 100%; animation: stripes 1.6s linear infinite;
  background-image: linear-gradient(120deg, #4f46e5, #7c3aed, #06b6d4, #4f46e5);
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; position: relative; }
.section.alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin: 1rem 0 .8rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.feat-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
.feat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 2rem 1.7rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .35s cubic-bezier(.34,1.4,.64,1), box-shadow .35s;
}
.feat-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform .45s ease;
}
.feat-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.feat-card:hover::before { transform: scaleX(1); }
.feat-icon {
  width: 58px; height: 58px; border-radius: 18px; background: var(--grad); color: #fff;
  display: grid; place-items: center; margin-bottom: 1.3rem; box-shadow: var(--shadow-md);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.feat-card:hover .feat-icon { transform: rotate(-8deg) scale(1.08); }
.feat-icon svg { width: 28px; height: 28px; }
.feat-card h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: .5rem; }
.feat-card p { color: var(--muted); font-size: .97rem; }

.steps { display: grid; gap: 1.4rem; grid-template-columns: 1fr; counter-reset: step; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 2.2rem 1.8rem; text-align: center; box-shadow: var(--shadow-sm); position: relative;
  transition: transform .3s, box-shadow .3s;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.step-num {
  width: 64px; height: 64px; margin: 0 auto 1.2rem; border-radius: 50%;
  background: var(--grad); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  display: grid; place-items: center; box-shadow: var(--shadow-md);
  animation: floaty 6s ease-in-out infinite;
}
.step h3 { font-family: var(--font-display); margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .95rem; }

.stats-band { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 2.6rem 1.5rem; display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; text-align: center; position: relative; overflow: hidden; }
.stats-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 300px at 20% 0%, rgba(124,58,237,.35), transparent), radial-gradient(600px 300px at 85% 100%, rgba(6,182,212,.28), transparent); }
.stat { position: relative; z-index: 1; }
.stat b { font-family: var(--font-display); font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 800; background: linear-gradient(120deg, #c4b5fd, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; }
.stat span { color: #a5b4d4; font-size: .92rem; font-weight: 600; }

.cta-band { text-align: center; padding: 2rem 0; }
.cta-card {
  background: var(--grad); border-radius: var(--r-lg); padding: 3.5rem 1.8rem; color: #fff;
  position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.cta-card::before { content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%; background: rgba(255,255,255,.12); top: -260px; right: -160px; animation: drift 12s ease-in-out infinite alternate; }
.cta-card::after { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.1); bottom: -220px; left: -120px; animation: drift 15s ease-in-out infinite alternate-reverse; }
.cta-card h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 4.6vw, 2.8rem); margin-bottom: .8rem; position: relative; z-index: 1; }
.cta-card p { opacity: .92; margin-bottom: 2rem; position: relative; z-index: 1; }
.cta-card .btn-ghost { position: relative; z-index: 1; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(6px); }

footer { border-top: 1px solid var(--line); padding: 2.6rem 0; color: var(--muted); font-size: .92rem; }
.foot-inner { display: flex; flex-direction: column; gap: 1.2rem; align-items: center; text-align: center; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .12s; } .reveal-d2 { transition-delay: .24s; } .reveal-d3 { transition-delay: .36s; }

/* ---------- Auth / cards ---------- */
.page-wrap { min-height: 100dvh; display: flex; flex-direction: column; background:
  radial-gradient(700px 380px at 12% -60px, rgba(124,58,237,.10), transparent),
  radial-gradient(700px 380px at 88% -40px, rgba(6,182,212,.10), transparent), var(--bg); }
.auth-shell { flex: 1; display: grid; place-items: center; padding: 3rem 4%; }
.auth-card {
  width: min(440px, 100%); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 2.4rem 2rem; animation: pop-in .55s cubic-bezier(.34,1.4,.64,1);
}
.auth-card h1 { font-family: var(--font-display); font-size: 1.7rem; text-align: center; margin: .9rem 0 .3rem; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: .95rem; margin-bottom: 1.6rem; }
.auth-tabs { display: flex; background: var(--bg-soft); border-radius: var(--r-full); padding: 4px; margin-bottom: 1.6rem; }
.auth-tabs button { flex: 1; border: 0; background: none; padding: .7rem; border-radius: var(--r-full); font-weight: 700; color: var(--muted); transition: .25s; }
.auth-tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 1.05rem; }
.field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: .85rem 1rem;
  background: #fff; transition: border-color .2s, box-shadow .2s; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(124,58,237,.14);
}
.field .hint { font-size: .82rem; color: var(--faint); margin-top: .35rem; }
.form-err { display: none; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: .9rem; font-weight: 600; border-radius: var(--r-sm); padding: .75rem 1rem; margin-bottom: 1rem; }
.form-err.show { display: block; animation: shake .4s; }

/* ---------- Dashboard ---------- */
.dash { min-height: 100dvh; background: var(--bg-soft); padding-bottom: 4rem; }
.dash-top { background: rgba(255,255,255,.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.dash-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; }
.user-chip { display: flex; align-items: center; gap: .7rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; }
.user-chip .email { font-size: .85rem; font-weight: 700; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { background: none; border: 0; color: var(--brand-2); font-weight: 700; font-size: .9rem; }
.link-btn:hover { text-decoration: underline; }

.tabs { display: flex; gap: .4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-full); padding: 5px; margin: 1.6rem auto; width: fit-content; max-width: 100%; box-shadow: var(--shadow-sm); }
.tabs button {
  border: 0; background: none; padding: .75rem 1.4rem; border-radius: var(--r-full);
  font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: .5rem;
  transition: .25s; font-size: .95rem;
}
.tabs button svg { width: 18px; height: 18px; }
.tabs button.active { background: var(--grad); color: #fff; box-shadow: var(--shadow-sm); }
.tabpane { display: none; }
.tabpane.active { display: block; animation: fade-up .45s ease; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 1.6rem; margin-bottom: 1.4rem; }
.panel h2 { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: .3rem; display: flex; align-items: center; gap: .7rem; }
.panel .desc { color: var(--muted); font-size: .94rem; margin-bottom: 1.3rem; }
.panel-icon { width: 46px; height: 46px; border-radius: 15px; background: var(--grad); color: #fff; display: inline-grid; place-items: center; flex-shrink: 0; }
.panel-icon svg { width: 24px; height: 24px; }

.inline-form { display: flex; flex-direction: column; gap: .8rem; }
.inline-form .row { display: flex; flex-direction: column; gap: .8rem; }
.inline-form input[type=text], .inline-form input[type=url] {
  flex: 1; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: .9rem 1.1rem;
}
.inline-form input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(124,58,237,.14); }

/* tree */
.tree { border: 1px solid var(--line); border-radius: var(--r-md); max-height: 380px; overflow: auto; padding: .6rem; background: #fbfcff; }
.tree-node { user-select: none; }
.tree-row { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 10px; transition: background .15s; }
.tree-row:hover { background: #eef2ff; }
.tree-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand-2); flex-shrink: 0; }
.tree-row .tname { font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-row .tsize { font-size: .78rem; color: var(--faint); margin-left: auto; flex-shrink: 0; }
.tree-kids { margin-left: 1.5rem; border-left: 2px solid var(--line); padding-left: .4rem; }
.tree-ico { width: 20px; height: 20px; flex-shrink: 0; }
.caret { border: 0; background: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); transition: transform .25s; flex-shrink: 0; }
.caret.open { transform: rotate(90deg); }
.caret svg { width: 14px; height: 14px; }

/* progress */
.progress-wrap { margin: 1.2rem 0; }
.progress-meta { display: flex; justify-content: space-between; font-size: .88rem; font-weight: 700; margin-bottom: .5rem; }
.progress { height: 14px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; border: 1px solid var(--line); }
.progress i {
  display: block; height: 100%; width: 0%; border-radius: 99px;
  background-image: linear-gradient(120deg, #4f46e5, #7c3aed, #06b6d4, #4f46e5);
  background-size: 200% 100%; animation: stripes 1.4s linear infinite;
  transition: width .5s ease;
}
.job-items { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); margin-top: 1rem; }
.job-item { display: flex; align-items: center; gap: .7rem; padding: .65rem .9rem; border-bottom: 1px solid var(--line); font-size: .88rem; animation: fade-up .3s ease; }
.job-item:last-child { border-bottom: 0; }
.job-item .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.badge { font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: .28rem .65rem; border-radius: var(--r-full); text-transform: uppercase; flex-shrink: 0; }
.badge.done { background: #ecfdf5; color: #059669; }
.badge.failed { background: #fef2f2; color: #dc2626; }
.badge.skipped { background: #fffbeb; color: #d97706; }
.badge.pending, .badge.processing { background: #eff6ff; color: #2563eb; }
.badge.processing { animation: pulse-dot 1.2s infinite; }

/* dropzone */
.dropzone {
  border: 2px dashed #c7d2fe; border-radius: var(--r-lg); background: #fafbff;
  padding: 3rem 1.5rem; text-align: center; cursor: pointer;
  transition: border-color .25s, background .25s, transform .25s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand-2); background: #f0edff; transform: scale(1.01); }
.dropzone .dz-icon {
  width: 74px; height: 74px; margin: 0 auto 1rem; border-radius: 50%;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  animation: floaty 5s ease-in-out infinite; box-shadow: var(--shadow-md);
}
.dropzone .dz-icon svg { width: 34px; height: 34px; }
.dropzone h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: .3rem; }
.dropzone p { color: var(--muted); font-size: .92rem; }

.up-file { border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.1rem; margin-top: .9rem; animation: fade-up .35s ease; background: #fff; }
.up-file .top { display: flex; align-items: center; gap: .7rem; }
.up-file .nm { flex: 1; font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-file .sz { font-size: .8rem; color: var(--faint); flex-shrink: 0; }
.up-file .bar { height: 9px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; margin-top: .7rem; }
.up-file .bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .3s; }
.up-actions { display: flex; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }
.chip-btn { border: 1.5px solid var(--line); background: #fff; border-radius: var(--r-full); padding: .4rem .95rem; font-size: .82rem; font-weight: 700; color: var(--muted); transition: .2s; }
.chip-btn:hover { border-color: var(--brand-2); color: var(--brand-2); }
.up-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: .6rem; font-size: .86rem; font-weight: 700; color: var(--brand-2); text-decoration: none; }
.up-link:hover { text-decoration: underline; }

/* manage */
.manage-bar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 1.2rem; }
.crumbs { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .9rem; font-weight: 700; }
.crumbs button { border: 0; background: none; color: var(--brand-2); font-weight: 700; font-size: .9rem; padding: .3rem .4rem; border-radius: 8px; }
.crumbs button:hover { background: var(--bg-tint); }
.crumbs .sep { color: var(--faint); }
.search-box { position: relative; flex: 1; min-width: 180px; }
.search-box input { width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-full); padding: .7rem 1rem .7rem 2.7rem; }
.search-box input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(124,58,237,.14); }
.search-box svg { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--faint); }
.file-grid { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.file-card {
  display: flex; align-items: center; gap: .9rem; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: .9rem 1rem; background: #fff; cursor: pointer; transition: transform .25s, box-shadow .25s, border-color .25s;
  animation: fade-up .4s ease backwards;
}
.file-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c9d4f2; }
.file-card.selected { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(124,58,237,.16); }
.file-card input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand-2); flex-shrink: 0; }
.file-thumb { width: 48px; height: 48px; border-radius: 13px; background: var(--grad-soft); display: grid; place-items: center; flex-shrink: 0; overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb svg { width: 24px; height: 24px; stroke: var(--brand-2); }
.file-meta { flex: 1; min-width: 0; }
.file-meta b { display: block; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta small { color: var(--faint); font-size: .8rem; }
.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--muted); }
.empty-state .big { width: 84px; height: 84px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; margin: 0 auto 1.2rem; animation: floaty 6s ease-in-out infinite; }
.empty-state .big svg { width: 40px; height: 40px; stroke: var(--faint); }
.skeleton { border-radius: var(--r-md); background: linear-gradient(100deg, #eef1f7 40%, #f7f9fd 50%, #eef1f7 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; height: 74px; }

/* modal */
.modal-ov {
  position: fixed; inset: 0; z-index: 100; background: rgba(11, 21, 38, .5);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 1rem;
  animation: fade-in .25s ease;
}
.modal {
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: min(680px, 100%); max-height: 88dvh; overflow: auto; padding: 1.8rem;
  animation: pop-in .4s cubic-bezier(.34,1.4,.64,1); position: relative;
}
.modal.wide { width: min(900px, 100%); }
.modal h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: .4rem; padding-right: 2.4rem; }
.modal .mdesc { color: var(--muted); font-size: .92rem; margin-bottom: 1.2rem; }
.modal-x { position: absolute; top: 1.1rem; right: 1.1rem; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bg-soft); font-size: 1.15rem; color: var(--muted); transition: .2s; }
.modal-x:hover { background: #fee2e2; color: #dc2626; transform: rotate(90deg); }
.modal-actions { display: flex; gap: .8rem; justify-content: flex-end; margin-top: 1.6rem; flex-wrap: wrap; }
.preview-body { background: #0b1526; border-radius: var(--r-md); min-height: 300px; display: grid; place-items: center; overflow: hidden; }
.preview-body img { max-height: 62dvh; width: auto; max-width: 100%; }
.preview-body video { width: 100%; max-height: 62dvh; background: #000; }
.preview-body iframe { width: 100%; height: 62dvh; border: 0; background: #fff; }
.preview-body pre { color: #dbe4ff; padding: 1.4rem; max-height: 62dvh; overflow: auto; width: 100%; font-size: .85rem; white-space: pre-wrap; }
.preview-body .pv-msg { color: #a5b4d4; padding: 3rem 1.5rem; text-align: center; }

/* admin */
.stat-cards { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-bottom: 1.4rem; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.4rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; animation: fade-up .5s ease backwards; }
.stat-card::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 180px; height: 180px; border-radius: 50%; background: var(--grad-soft); }
.stat-card b { font-family: var(--font-display); font-size: 2rem; display: block; }
.stat-card span { color: var(--muted); font-size: .88rem; font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.tbl th { text-align: left; padding: .85rem 1rem; background: var(--bg-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tbl td { padding: .85rem 1rem; border-top: 1px solid var(--line); }
.tbl tr:hover td { background: #fafbff; }
.pill { display: inline-block; font-size: .75rem; font-weight: 800; padding: .28rem .7rem; border-radius: var(--r-full); }
.pill.admin { background: #f5f3ff; color: #7c3aed; }
.pill.on { background: #ecfdf5; color: #059669; }
.pill.off { background: #fef2f2; color: #dc2626; }
.pill.muted { background: var(--bg-soft); color: var(--muted); }
.switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .tr { position: absolute; inset: 0; border-radius: 99px; background: #dbe2f1; transition: .3s; }
.switch .tr::before { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; top: 4px; left: 4px; transition: .3s cubic-bezier(.34,1.56,.64,1); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.switch input:checked + .tr { background: var(--grad); }
.switch input:checked + .tr::before { transform: translateX(22px); }
.status-line { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem; border-radius: var(--r-md); font-size: .92rem; font-weight: 600; margin-bottom: 1rem; }
.status-line.ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-line.warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.code { font-family: ui-monospace, monospace; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: .15rem .5rem; font-size: .85em; }

/* toasts */
.toasts { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .6rem; width: min(420px, 92%); }
.toast {
  background: var(--ink); color: #fff; border-radius: var(--r-md); padding: .95rem 1.2rem;
  font-size: .92rem; font-weight: 600; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: .7rem; animation: toast-in .4s cubic-bezier(.34,1.4,.64,1);
}
.toast.err { background: #b91c1c; }
.toast.ok { background: #047857; }
.toast.out { animation: toast-out .35s forwards; }

/* connect view */
.connect-card { text-align: center; max-width: 560px; margin: 0 auto; }
.drive-badge { width: 92px; height: 92px; margin: 0 auto 1.4rem; border-radius: 28px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-lg); animation: floaty 6s ease-in-out infinite; }
.drive-badge svg { width: 48px; height: 48px; }
.notice { border-radius: var(--r-md); padding: 1rem 1.2rem; font-size: .92rem; font-weight: 600; margin-bottom: 1.2rem; display: none; }
.notice.show { display: block; animation: fade-up .4s ease; }
.notice.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.notice.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }

/* ---------- Keyframes ---------- */
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(50px, 36px) scale(1.12); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(.92) translateY(16px); } 100% { opacity: 1; transform: none; } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@keyframes stripes { to { background-position: 200% 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(14px) scale(.95); } }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.spinner.dark { border-color: rgba(79,70,229,.25); border-top-color: var(--brand-1); }

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
  .nav-links { display: flex; }
  .nav-cta { display: flex; }
  .burger, .mobile-menu { display: none !important; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .stats-band { grid-template-columns: repeat(4, 1fr); }
  .inline-form .row { flex-direction: row; }
  .file-grid { grid-template-columns: 1fr 1fr; }
  .stat-cards { grid-template-columns: repeat(4, 1fr); }
  .auth-card { padding: 2.8rem 2.6rem; }
}
@media (min-width: 1024px) {
  .file-grid { grid-template-columns: 1fr 1fr 1fr; }
  .hero { padding: 6rem 0 4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Admin panel (migration 002) — tabs, charts, drawer, feed
   ============================================================ */
.pill.err { background: #fef2f2; color: #dc2626; }

.atabs {
  display: flex; gap: .4rem; flex-wrap: wrap;
  margin-bottom: 1.4rem; padding: .5rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  position: sticky; top: 76px; z-index: 40;
}
.atabs button {
  border: 0; background: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: .88rem; color: var(--muted);
  padding: .6rem 1.05rem; border-radius: var(--r-full); transition: .2s;
}
.atabs button:hover { background: var(--bg-soft); color: var(--ink); }
.atabs button.active { background: var(--grad); color: #fff; box-shadow: var(--shadow-sm); }

.atab { display: none; animation: fade-up-sm .35s ease; }
.atab.active { display: block; }
@keyframes fade-up-sm { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.chart-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; margin-bottom: 1.2rem; }
@media (min-width: 900px) { .chart-grid { grid-template-columns: repeat(3, 1fr); } }
.chart-card h3 { font-family: var(--font-display); font-size: .95rem; margin-bottom: .6rem; color: var(--ink-2); }
.chart { width: 100%; height: 180px; display: block; }

.row-flex { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.row-flex .grow { flex: 1; min-width: 200px; }
.row-flex input[type="search"], .row-flex input[type="text"] { height: 46px; }

.check-row { display: flex; align-items: center; gap: .8rem; padding: .45rem 0; font-weight: 600; color: var(--ink-2); }

.clickable { cursor: pointer; }
.clickable:hover td { background: var(--bg-tint); }
.code-block {
  background: #0b1526; color: #dbe7ff; border-radius: var(--r-sm);
  padding: .9rem 1rem; font-size: .8rem; white-space: pre-wrap; word-break: break-word;
  max-height: 220px; overflow: auto; margin: 0;
}
.detail-row td { background: var(--bg-soft); }

/* Activity feed */
.feed { display: flex; flex-direction: column; gap: .2rem; }
.feed-item {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: .85rem .4rem; border-bottom: 1px solid var(--line);
}
.feed-item:last-child { border-bottom: 0; }
.feed-ic { font-size: 1.2rem; line-height: 1.4; }
.feed-ts { color: var(--faint); font-size: .82rem; margin-top: .15rem; }

/* Broadcast banners (app dashboard) */
.bcasts { margin-bottom: 1.1rem; }
.bcast {
  display: flex; align-items: center; gap: .7rem;
  background: linear-gradient(120deg, #f5f3ff, #ecfeff);
  border: 1px solid #ddd6fe; border-radius: var(--r-md);
  padding: .8rem 1.1rem; margin-bottom: .6rem; font-weight: 600; color: var(--ink-2);
  animation: fade-up-sm .4s ease;
}
.bcast-ic { font-size: 1.15rem; }
.bcast-x {
  margin-left: auto; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: .95rem; padding: .3rem .5rem; border-radius: 8px;
}
.bcast-x:hover { background: rgba(0,0,0,.06); color: var(--ink); }

/* User drawer */
.drawer-ov {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(11, 21, 38, .45); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .25s ease;
}
.drawer-ov.open { opacity: 1; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 94vw);
  background: #fff; box-shadow: -20px 0 60px rgba(15,23,42,.25);
  transform: translateX(102%); transition: transform .32s cubic-bezier(.32,.72,.35,1);
  display: flex; flex-direction: column;
}
.drawer-ov.open .drawer { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0; }
.drawer-body { padding: 1.2rem 1.4rem 2rem; overflow-y: auto; }
.drawer-sec { margin-bottom: 1.6rem; }
.drawer-sec h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: .7rem; }
.user-head { display: flex; gap: .9rem; align-items: center; margin-bottom: .9rem; }
.avatar.big { width: 52px; height: 52px; font-size: 1.4rem; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.kv span { color: var(--muted); }
.kv b { color: var(--ink); font-weight: 700; text-align: right; }
.kv:last-child { border-bottom: 0; }
.quota-bar { height: 10px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; margin: .6rem 0 .4rem; }
.quota-bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .6s ease; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.drawer-actions .btn { font-size: .85rem; padding: .55rem 1rem; }

/* Branding: accent var + custom logo */
:root { --accent: #7c3aed; }
.logo-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; display: block; }

/* ============================================================
   Feature batch — replace-everywhere + bulk rename UI
   ============================================================ */
.rp-src-list { display: flex; flex-direction: column; gap: .5rem; }
.rp-src {
  display: flex; align-items: center; gap: .7rem;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: .7rem .9rem; cursor: pointer; transition: border-color .2s, background .2s;
}
.rp-src:hover { border-color: #c9d4f2; background: #fafbff; }
.rp-src input[type=radio] { accent-color: var(--brand-2); width: 18px; height: 18px; flex-shrink: 0; }
.rp-src .nm { flex: 1; min-width: 0; font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-src .sz { font-size: .8rem; color: var(--faint); flex-shrink: 0; }

.rp-matches { display: flex; flex-direction: column; gap: .5rem; max-height: 320px; overflow: auto; padding-right: .2rem; }
.rp-match {
  display: flex; align-items: center; gap: .7rem;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: .65rem .85rem; cursor: pointer; transition: border-color .2s, background .2s;
}
.rp-match:hover { border-color: #c9d4f2; background: #fafbff; }
.rp-match input[type=checkbox] { accent-color: var(--brand-2); width: 18px; height: 18px; flex-shrink: 0; }
.rp-match .rp-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rp-match .nm { font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-match .path { font-size: .78rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-match .sz { font-size: .8rem; color: var(--faint); flex-shrink: 0; }

.rename-modes { display: flex; gap: .5rem; flex-wrap: wrap; }
.rename-modes .chip-btn.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-sm); }
.rename-preview { border: 1px dashed var(--line); border-radius: var(--r-md); padding: .6rem .9rem; background: #fbfcff; }
.rp-row { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.rp-row:last-child { border-bottom: 0; }
.rp-row .old { color: var(--muted); text-decoration: line-through; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 44%; }
.rp-row .arr { color: var(--brand-2); font-weight: 800; flex-shrink: 0; }
.rp-row .new { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-row .new i { color: var(--faint); font-style: normal; font-weight: 600; }

/* ---------- Slim app footer (developer credit) ---------- */
.app-foot {
  border-top: 1px solid var(--line); padding: 1.1rem 0 1.4rem; margin-top: 2rem;
  color: var(--faint); font-size: .85rem; text-align: center;
}
.app-foot a, .dev-credit a { color: var(--brand-2); font-weight: 700; text-decoration: none; }
.app-foot a:hover, .dev-credit a:hover { text-decoration: underline; }
.dev-credit { margin-top: .6rem; font-size: .85rem; }

/* ============================================================
   Mobile overflow fixes (360px viewports) — desktop untouched
   ============================================================ */
@media (max-width: 600px) {
  .tabs { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 0 0 auto; padding: .7rem 1.05rem; font-size: .88rem; }
  .user-chip .email { display: none; }
  .dash-top-inner { padding: .7rem 0; }
  .panel { padding: 1.2rem 1rem; }
  .manage-bar { flex-direction: column; align-items: stretch; }
  .crumbs { order: 2; min-width: 0; }
  .crumbs button { overflow-wrap: anywhere; text-align: left; }
  .search-box { min-width: 0; width: 100%; }
  .progress-meta { flex-wrap: wrap; gap: .3rem .8rem; }
  .modal { padding: 1.4rem 1.1rem; }
  .modal-actions { justify-content: stretch; }
  .modal-actions .btn { flex: 1 1 auto; }
  .auth-card { padding: 1.8rem 1.2rem; }
  .auth-shell { padding: 2rem 4%; }
  #sel-actions { align-items: stretch; }
  #sel-actions .chip-btn { flex: 1 1 40%; text-align: center; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .atabs { top: 62px; }
  .row-flex .grow { min-width: 0; }
  .drawer { width: 94vw; }
  .hero { padding: 3rem 0 2.5rem; }
  .cta-card { padding: 2.4rem 1.2rem; }
  .rp-match .sz { display: none; }
  .toasts { width: 94%; }
}

/* ============================================================
   Premium polish pass — richer depth, glass accents, refined
   states. White theme kept; motion respects reduced-motion.
   ============================================================ */

/* App/admin page ambience */
.dash {
  background:
    radial-gradient(760px 380px at 6% -80px, rgba(124, 58, 237, .09), transparent 70%),
    radial-gradient(720px 360px at 96% -60px, rgba(6, 182, 212, .09), transparent 70%),
    var(--bg-soft);
}

/* Glassy panels with a gradient hairline */
.panel {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.panel::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad); opacity: .85;
}

/* Stat cards: gradient hairline + lift */
.stat-card { box-shadow: var(--shadow-md); transition: transform .3s ease, box-shadow .3s ease; }
.stat-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* File cards: premium hover ring */
.file-card { box-shadow: var(--shadow-sm); }
.file-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, .45);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .06), 0 20px 44px -14px rgba(124, 58, 237, .35);
}
.file-card.selected { box-shadow: 0 0 0 3px rgba(124, 58, 237, .18), var(--shadow-md); }

/* Buttons: glow + refined focus */
.btn-primary:hover { box-shadow: 0 4px 12px rgba(15, 23, 42, .08), 0 32px 70px -14px rgba(124, 58, 237, .5); }
.btn:focus-visible, .chip-btn:focus-visible, .link-btn:focus-visible,
.crumbs button:focus-visible, .caret:focus-visible {
  outline: 3px solid rgba(124, 58, 237, .4); outline-offset: 2px;
}
input:not([type=checkbox]):not([type=radio]):hover,
select:hover, textarea:hover { border-color: #c9d4f2; }

/* Tabs: active glow */
.tabs { box-shadow: var(--shadow-md); }
.tabs button.active { box-shadow: 0 6px 18px -6px rgba(124, 58, 237, .55); }

/* Modal: deeper, crisper */
.modal { border: 1px solid rgba(230, 235, 246, .9); box-shadow: 0 24px 80px -12px rgba(15, 23, 42, .28); }
.modal-x { display: grid; place-items: center; }

/* Toasts: icon bubble + accent edge */
.toast { position: relative; overflow: hidden; }
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.toast.err::before { background: #fca5a5; }
.toast.ok::before { background: #6ee7b7; }
.toast > span:first-child {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255, 255, 255, .16); display: grid; place-items: center; font-size: .85rem;
}

/* Empty states: gradient medallion */
.empty-state .big { background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .15); }
.empty-state .big svg { stroke: var(--brand-2); }
.empty-state h3 { font-family: var(--font-display); margin-bottom: .3rem; }

/* Skeletons: richer shimmer sweep */
.skeleton {
  position: relative; overflow: hidden;
  background: linear-gradient(100deg, #e9edf6 35%, #f6f8fd 50%, #e9edf6 65%);
  background-size: 200% 100%;
  box-shadow: inset 0 0 0 1px rgba(230, 235, 246, .7);
}

/* Dropzone: glow while dragging */
.dropzone.drag { box-shadow: 0 0 0 4px rgba(124, 58, 237, .15), var(--shadow-md); }

/* Announcement bar + nav: crisper glass */
.announce { box-shadow: 0 6px 20px -8px rgba(124, 58, 237, .5); }
.nav { box-shadow: 0 8px 30px -18px rgba(15, 23, 42, .25); }

/* Feature cards + steps: sheen sweep on hover */
.feat-card::after, .step::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%);
  transform: translateX(-120%); transition: transform .8s ease;
}
.feat-card:hover::after, .step:hover::after { transform: translateX(120%); }
.step { overflow: hidden; }

/* Rows: hover tint */
.queue-row, .job-item { transition: background .2s ease; }
.queue-row:hover, .job-item:hover { background: #fafbff; }

/* Progress bars: glow */
.progress i, .up-file .bar i, .mini-bar i { box-shadow: 0 0 12px rgba(124, 58, 237, .45); }

/* Pills + badges: soft ring */
.pill, .badge { box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05); }

/* Drawer: premium edge */
.drawer { border-left: 1px solid var(--line); }

/* ---- Clone auto-replace ---- */
.ar-box {
  margin-top: 1.2rem;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.2rem;
  background: linear-gradient(120deg, rgba(124,58,237,.05), rgba(6,182,212,.05));
  animation: fade-up .45s ease both;
}
.ar-head { display: flex; align-items: center; gap: .6rem; }
.ar-head h3 { margin: 0; font-size: 1.02rem; font-family: var(--font-display); }
.ar-tag {
  font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-2); background: #eef2ff; border: 1px solid #e0e7ff;
  padding: .28rem .65rem; border-radius: var(--r-full);
}
.ar-box .desc { margin: .5rem 0 0; }
.ar-box #ar-names {
  width: 100%; margin-top: .7rem; border: 1.5px solid var(--line); border-radius: 12px;
  padding: .85rem 1rem; font-size: .92rem; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.ar-box #ar-names:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.ar-note { margin: .7rem 0 0; font-size: .78rem; color: var(--faint); }
.ar-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem;
  margin-top: .7rem; padding: .7rem .85rem; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm);
  animation: fade-up .3s ease both;
}
.ar-name {
  flex: 1 1 170px; min-width: 0; font-weight: 700; font-size: .9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ar-attach { cursor: pointer; margin-left: auto; flex-shrink: 0; }
.ar-status { font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.ar-status.attached { color: #059669; }
.ar-status.uploading { color: #2563eb; animation: pulse-dot 1.2s infinite; }
.ar-status.error { color: #dc2626; }
.ar-status.pending { color: var(--faint); }
.ar-bar {
  flex: 1 1 100%; height: 6px; border-radius: 99px; background: #eef1f7; overflow: hidden;
}
.ar-bar i {
  display: block; height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2), #06b6d4);
  transition: width .2s;
}
.repl-badge {
  font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: #7c3aed; background: #f3efff; border: 1px solid #e2d7fb;
  padding: .22rem .55rem; border-radius: var(--r-full); flex-shrink: 0;
  animation: fade-up .3s ease;
}
@media (max-width: 600px) {
  .ar-attach { margin-left: 0; }
  .ar-row { gap: .4rem .6rem; }
}
