:root {
  --azure: #0ea5e9;
  --azure-dark: #0284c7;
  --azure-pale: #e0f2fe;
  --ink: #0f172a;
  --slate: #475569;
  --muted: #64748b;
  --line: #dce7f1;
  --canvas: #f8fafc;
  --surface: rgba(255, 255, 255, .84);
  --danger: #dc2626;
  --success: #059669;
  --warning: #d97706;
  --shadow: 0 18px 45px rgba(15, 23, 42, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at top right, #e0f2fe 0, transparent 34rem), var(--canvas);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.glass {
  border: 1px solid rgba(148, 163, 184, .24);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 800; letter-spacing: -.04em; }
.brand img { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; }
.brand span { color: var(--azure); }
.brand small { display: block; color: var(--muted); font-size: .58rem; letter-spacing: .14em; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 .35rem; color: var(--azure-dark); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 42px; padding: .65rem 1rem; border: 1px solid transparent; border-radius: 11px;
  background: var(--azure); color: white; font-weight: 750; transition: .18s ease;
}
.button:hover { transform: translateY(-1px); background: var(--azure-dark); box-shadow: 0 8px 18px rgba(14, 165, 233, .22); }
.button:disabled { cursor: not-allowed; opacity: .58; transform: none; box-shadow: none; }
.button.ghost { background: transparent; border-color: var(--line); color: var(--slate); }
.button.ghost:hover { background: #fff; color: var(--azure-dark); }
.button.danger { background: var(--danger); }
.button.small { min-height: 34px; padding: .45rem .65rem; font-size: .82rem; }
.button.wide { width: 100%; }

/* Authentication */
.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 1.25rem; }
.auth-card { width: min(100%, 455px); padding: 2.25rem; border-radius: 24px; text-align: center; }
.auth-card .brand { justify-content: center; margin-bottom: 2rem; font-size: 1.25rem; }
.auth-card h1 { margin: 0; font-size: clamp(1.75rem, 5vw, 2.3rem); letter-spacing: -.06em; }
.auth-card p { color: var(--slate); }
.google-button { margin: 1.5rem 0 .75rem; background: #fff; border-color: var(--line); color: var(--ink); }
.google-mark { display: inline-grid; width: 20px; height: 20px; place-items: center; color: #4285f4; font-size: 1.1rem; }
.security-note { display: flex; gap: .55rem; align-items: flex-start; margin-top: 1.5rem; color: var(--muted); font-size: .82rem; text-align: left; }
.status-message { min-height: 1.5rem; margin: .75rem 0 0; color: var(--danger); font-size: .88rem; }
.landing-page { min-height: 100vh; overflow: hidden; background: radial-gradient(circle at 78% 18%, rgba(125, 211, 252, .32), transparent 25rem), linear-gradient(135deg, #fbfdff 0%, #eef8ff 52%, #fff 100%); }
.landing-header { position: relative; z-index: 1; max-width: 1240px; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 480px); align-items: center; gap: clamp(2rem, 7vw, 7rem); max-width: 1160px; min-height: 570px; margin: 0 auto; padding: 4rem 1.25rem 3rem; }
.landing-copy h1 { max-width: 680px; margin: 0; font-size: clamp(2.8rem, 6vw, 5.4rem); letter-spacing: -.075em; line-height: .98; }
.landing-copy h1 span { color: var(--azure-dark); }
.landing-lede { max-width: 540px; margin: 1.4rem 0; color: var(--slate); font-size: 1.08rem; }
.landing-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.landing-cta { min-height: 48px; padding-inline: 1.15rem; }
.landing-proof { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.7rem; color: var(--muted); font-size: .78rem; font-weight: 700; }
.landing-proof i { margin-right: .3rem; color: var(--azure-dark); }
.landing-preview { position: relative; padding: 1.1rem; border-radius: 24px; transform: rotate(2deg); background: rgba(255, 255, 255, .68); box-shadow: 0 30px 70px rgba(2, 132, 199, .16); }
.preview-top, .preview-storage, .preview-files > div { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.preview-top { padding-bottom: 1rem; border-bottom: 1px solid var(--line); color: var(--slate); font-size: .8rem; font-weight: 750; }
.window-dots { display: flex; gap: .3rem; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #bae6fd; }
.preview-storage { margin: 1.2rem 0; padding: 1rem; border-radius: 14px; background: linear-gradient(120deg, #e0f2fe, #fff); }
.preview-storage span, .preview-files small { display: block; color: var(--muted); font-size: .7rem; }
.preview-storage strong { display: block; margin-top: .25rem; font-size: 1.4rem; }
.preview-storage strong small { display: inline; font-size: .72rem; font-weight: 500; }
.preview-storage > i { color: var(--azure-dark); font-size: 1.4rem; }
.preview-files > div { padding: .75rem .3rem; border-bottom: 1px solid #edf2f7; color: var(--slate); font-size: .82rem; }
.preview-files > div > i { width: 30px; color: var(--azure-dark); font-size: 1rem; }
.preview-files > div > span { flex: 1; }
.preview-files b { color: #94a3b8; letter-spacing: .1em; }
.landing-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 1160px; margin: 0 auto; padding: 0 1.25rem 4rem; }
.landing-features article { padding: 1.2rem 0; border-top: 1px solid rgba(125, 211, 252, .55); }
.landing-features article > i { color: var(--azure-dark); font-size: 1.2rem; }
.landing-features h2 { margin: .75rem 0 .25rem; font-size: 1rem; }
.landing-features p { margin: 0; color: var(--muted); font-size: .84rem; }
.auth-modal-card { width: min(100%, 440px); }
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; color: var(--muted); font-size: .75rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; margin-bottom: 1rem; padding: .25rem; border-radius: 10px; background: #f1f5f9; }
.auth-tab { padding: .55rem; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-weight: 700; }
.auth-tab.active { color: var(--azure-dark); background: #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.email-auth-form label { display: block; margin: .7rem 0 .3rem; color: var(--slate); font-size: .8rem; font-weight: 700; }
.email-auth-form input { width: 100%; padding: .7rem .75rem; border: 1px solid var(--line); border-radius: 9px; outline: 0; }
.email-auth-form input:focus { border-color: var(--azure); box-shadow: 0 0 0 3px rgba(14, 165, 233, .12); }
.email-auth-form .button { margin-top: 1rem; }

/* Drive */
.app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 1.25rem; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .72); }
.sidebar .brand { margin: .25rem .35rem 1.7rem; font-size: 1.16rem; }
.new-upload { width: 100%; margin-bottom: 1.35rem; }
.nav-label { margin: 1rem .7rem .35rem; color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .12em; }
.nav-button { display: flex; align-items: center; width: 100%; gap: .75rem; padding: .68rem .75rem; border: 0; border-radius: 10px; color: var(--slate); background: transparent; font-weight: 650; text-align: left; }
.nav-button:hover, .nav-button.active { color: var(--azure-dark); background: var(--azure-pale); }
.storage-card { margin-top: auto; padding: 1rem; border-radius: 14px; }
.storage-card strong { display: block; margin-top: .65rem; font-size: .83rem; }
.meter { overflow: hidden; height: 8px; margin-top: .55rem; border-radius: 8px; background: #e5edf5; }
.meter > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--azure), #38bdf8); transition: width .35s ease; }
.storage-card .muted { display: block; margin-top: .4rem; font-size: .76rem; }
.main { min-width: 0; padding: 1.2rem clamp(1rem, 3vw, 3rem) 3rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 58px; }
.topbar h1 { margin: 0; font-size: 1.45rem; letter-spacing: -.045em; }
.user-menu { display: flex; align-items: center; gap: .65rem; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--azure-pale); color: var(--azure-dark); font-size: .78rem; font-weight: 800; }
.user-menu .button { padding: .4rem .55rem; min-height: 35px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 1.8rem 0 1.25rem; padding: 1.35rem 1.5rem; border-radius: var(--radius); background: linear-gradient(115deg, #fff 0%, #f0f9ff 100%); border: 1px solid #d7eefb; }
.hero h2 { margin: 0; font-size: 1.28rem; letter-spacing: -.04em; }
.hero p { margin: .25rem 0 0; color: var(--slate); }
.hero .account-id { color: var(--azure-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; font-weight: 800; }
.drive-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 1rem 0; }
.search { display: flex; flex: 1; align-items: center; gap: .5rem; max-width: 480px; padding: .62rem .8rem; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.toolbar-select { padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; color: var(--slate); background: #fff; }
.upload-drop { display: grid; min-height: 130px; place-items: center; margin-bottom: 1.2rem; padding: 1.25rem; border: 1.5px dashed #7dd3fc; border-radius: var(--radius); color: var(--slate); background: rgba(240, 249, 255, .6); text-align: center; transition: .2s ease; }
.upload-drop.dragging { border-color: var(--azure-dark); background: var(--azure-pale); }
.upload-drop strong { display: block; color: var(--ink); }
.upload-drop p { margin: .2rem 0 .75rem; font-size: .86rem; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .9rem; }
.file-card { position: relative; min-width: 0; padding: 1rem; border-radius: 14px; cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.file-card:hover { transform: translateY(-2px); border-color: #7dd3fc; }
.file-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: #eff6ff; color: var(--azure-dark); font-size: 1.25rem; }
.file-card h3 { overflow: hidden; margin: .8rem 0 .22rem; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.file-card p { margin: 0; color: var(--muted); font-size: .76rem; }
.star-button { position: absolute; top: .7rem; right: .7rem; padding: .35rem; border: 0; color: #94a3b8; background: transparent; }
.star-button.is-starred { color: #f59e0b; }
.empty { padding: 3rem 1rem; color: var(--muted); text-align: center; }
.empty i { display: block; margin-bottom: .7rem; color: #7dd3fc; font-size: 2rem; }
.progress-panel { margin: .8rem 0; padding: .85rem 1rem; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.progress-panel[hidden] { display: none; }
.progress-header { display: flex; justify-content: space-between; gap: .75rem; font-size: .84rem; }
.progress-header span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-track { height: 7px; margin-top: .55rem; overflow: hidden; border-radius: 8px; background: #e5edf5; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--azure); transition: width .15s linear; }

/* Dialogs and admin */
.modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(15, 23, 42, .42); }
.modal-card { width: min(100%, 680px); max-height: min(90vh, 760px); overflow: auto; padding: 1.4rem; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(15, 23, 42, .26); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.modal-header h2 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.icon-button { border: 0; padding: .3rem .45rem; color: var(--slate); background: transparent; font-size: 1.1rem; }
.preview-content { display: grid; min-height: 250px; place-items: center; margin: 1rem 0; overflow: hidden; border-radius: 12px; background: #f1f5f9; }
.preview-content img, .preview-content video, .preview-content audio, .preview-content iframe { width: 100%; max-height: 58vh; border: 0; }
.preview-content audio { padding: 2rem; }
.preview-fallback { padding: 2rem; color: var(--slate); text-align: center; }
.modal-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.admin-panel { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.admin-panel h2 { margin: 0; font-size: 1.2rem; }
.admin-summary { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: .8rem; margin: 1rem 0; }
.stat { padding: .9rem; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.stat span { display: block; color: var(--muted); font-size: .72rem; }
.stat strong { font-size: 1.15rem; }
.admin-list { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th, td { padding: .75rem; border-bottom: 1px solid #edf2f7; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.inline-form { display: flex; gap: .4rem; align-items: center; }
.inline-form select, .inline-form input { width: 90px; padding: .38rem; border: 1px solid var(--line); border-radius: 7px; }

/* Pricing */
.marketing-header { display: flex; align-items: center; justify-content: space-between; max-width: 1160px; margin: 0 auto; padding: 1.1rem 1.25rem; }
.pricing-main { max-width: 1160px; margin: 2rem auto 4rem; padding: 0 1.25rem; text-align: center; }
.pricing-main h1 { max-width: 720px; margin: .3rem auto; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.07em; line-height: 1.05; }
.pricing-main > p { max-width: 650px; margin: 1rem auto 2rem; color: var(--slate); }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: left; }
.plan { position: relative; display: flex; min-height: 395px; flex-direction: column; padding: 1.35rem; border-radius: var(--radius); }
.plan.featured { border: 2px solid var(--azure); }
.plan-badge { position: absolute; top: -.7rem; left: 1.1rem; padding: .2rem .55rem; border-radius: 20px; background: var(--azure); color: #fff; font-size: .67rem; font-weight: 800; letter-spacing: .06em; }
.plan h2 { margin: 0; font-size: 1.15rem; }
.plan .price { margin: .75rem 0; font-size: 2rem; font-weight: 800; letter-spacing: -.06em; }
.plan .price small { color: var(--muted); font-size: .8rem; font-weight: 500; letter-spacing: 0; }
.plan ul { flex: 1; padding: 0; list-style: none; color: var(--slate); font-size: .85rem; }
.plan li { margin: .65rem 0; }
.plan li::before { content: '✓'; margin-right: .5rem; color: var(--success); font-weight: 800; }
.checkout { text-align: center; }
.checkout .upi-qr { width: 220px; height: 220px; margin: 1rem auto; border-radius: 12px; border: 1px solid var(--line); }
.checkout code { display: block; overflow-wrap: anywhere; padding: .65rem; border-radius: 8px; color: var(--slate); background: #f8fafc; font-size: .75rem; }
.checkout label { display: block; margin: 1rem 0 .35rem; font-weight: 700; text-align: left; }
.checkout input { width: 100%; padding: .65rem; border: 1px solid var(--line); border-radius: 9px; }
.checkout small { display: block; margin: .8rem 0; color: var(--muted); }

.toast { position: fixed; z-index: 50; right: 1rem; bottom: 1rem; max-width: min(92vw, 390px); padding: .75rem 1rem; border-radius: 11px; color: #fff; background: #0f172a; box-shadow: var(--shadow); }
.toast.error { background: var(--danger); }

@media (max-width: 960px) {
  .landing-hero { grid-template-columns: 1fr; min-height: auto; gap: 2rem; padding-top: 3.5rem; }
  .landing-copy h1 { max-width: 700px; }
  .landing-preview { width: min(100%, 480px); transform: rotate(1deg); }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; display: flex; height: auto; padding: .75rem 1rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: .2rem 0 .65rem; }
  .sidebar nav { display: flex; overflow-x: auto; gap: .3rem; }
  .nav-label, .sidebar .storage-card { display: none; }
  .nav-button { width: auto; white-space: nowrap; }
  .new-upload { position: absolute; top: .75rem; right: 1rem; width: auto; margin: 0; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .landing-header { padding: .85rem 1rem; }
  .landing-header .brand { font-size: .98rem; }
  .landing-header .brand img { width: 32px; height: 32px; }
  .landing-hero { padding: 2.5rem 1rem 2rem; }
  .landing-copy h1 { font-size: clamp(2.7rem, 14vw, 4rem); }
  .landing-actions .button { width: 100%; }
  .landing-proof { gap: .6rem .85rem; }
  .landing-features { grid-template-columns: 1fr; padding: 0 1rem 2.5rem; }
  .landing-preview { padding: .8rem; }
  .main { padding: .85rem .85rem 2rem; }
  .user-name { display: none; }
  .hero { display: block; }
  .hero .button { margin-top: 1rem; }
  .drive-toolbar { align-items: stretch; flex-direction: column; }
  .search { max-width: none; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .marketing-header { padding: .85rem 1rem; }
  .auth-card { padding: 1.6rem; }
}
