:root {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #111115;
  --surface-2: #17171d;
  --surface-3: #202028;
  --line: #292933;
  --text: #f5f4f7;
  --muted: #91909c;
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --purple-soft: rgba(139, 92, 246, .14);
  --danger: #fb7185;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "DM Sans", sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.material-symbols-rounded { font-family: "Material Symbols Rounded"; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-feature-settings: "liga"; -webkit-font-feature-settings: "liga"; font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24; }
.eyebrow { margin: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.primary, .danger, .logout-button, .nav-item, .icon-button { border: 0; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 11px; background: var(--purple); color: white; font-weight: 700; transition: transform .16s, background .16s; }
.primary:hover { background: #7c3aed; transform: translateY(-1px); }
.wide { width: 100%; min-height: 48px; }
.brand, .sidebar-brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg, #a78bfa, #6d28d9); box-shadow: 0 12px 32px rgba(109, 40, 217, .28); }
.brand-mark .material-symbols-rounded { font-size: 23px; }
.brand b, .sidebar-brand b { display: block; font: 800 22px/1 "Manrope"; letter-spacing: -.04em; }
.brand small, .sidebar-brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .8fr) minmax(500px, 1.2fr); }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(38px, 7vw, 110px); border-right: 1px solid var(--line); background: #0d0d10; }
.login-card .brand { margin-bottom: clamp(56px, 9vh, 100px); }
.login-card h1 { margin: 0; font: 800 clamp(40px, 5vw, 68px)/1.04 "Manrope"; letter-spacing: -.055em; }
.login-card h1 span { color: var(--purple-light); }
.login-copy { max-width: 540px; margin: 24px 0 28px; color: #aaa8b3; font-size: 16px; line-height: 1.65; }
.account-note { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: #777681; font-size: 11px; }
.account-note .material-symbols-rounded { font-size: 16px; color: var(--purple-light); }
.form-error { min-height: 18px; margin: 0 0 12px; color: var(--danger); font-size: 12px; }
.login-art { position: relative; min-height: 100vh; overflow: hidden; background: radial-gradient(circle at 40% 35%, #1e1633 0, #0d0d12 48%, #09090b 100%); }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.orb-one { width: 410px; height: 410px; top: 8%; right: 10%; background: rgba(139, 92, 246, .12); }
.orb-two { width: 300px; height: 300px; bottom: 8%; left: 8%; background: rgba(59, 130, 246, .08); }
.floating-image, .link-preview { position: absolute; border: 1px solid rgba(255,255,255,.09); background: rgba(22,22,29,.83); box-shadow: 0 28px 80px rgba(0,0,0,.35); backdrop-filter: blur(18px); }
.floating-image { width: 220px; height: 175px; display: grid; place-items: center; border-radius: 22px; }
.floating-image > .material-symbols-rounded { font-size: 64px; color: #c4b5fd; }
.floating-image small { position: absolute; right: 14px; bottom: 12px; left: 14px; overflow: hidden; color: #b6b3c0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.image-one { top: 18%; left: 19%; transform: rotate(-6deg); background: linear-gradient(145deg, rgba(91,33,182,.35), rgba(17,17,21,.9)); }
.image-two { right: 16%; bottom: 23%; transform: rotate(7deg); background: linear-gradient(145deg, rgba(30,64,175,.28), rgba(17,17,21,.9)); }
.link-preview { right: 25%; bottom: 13%; display: flex; align-items: center; gap: 12px; padding: 14px 17px; border-radius: 15px; }
.link-preview > span { width: 38px; height: 38px; border-radius: 11px; background: var(--purple-soft); color: #c4b5fd; }
.link-preview b, .link-preview small { display: block; }
.link-preview b { font-size: 12px; }.link-preview small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.app-shell { height: 100vh; height: 100dvh; display: grid; grid-template-columns: 255px minmax(0, 1fr); overflow: hidden; }
.sidebar { min-height: 0; display: flex; flex-direction: column; padding: 22px 14px 16px; border-right: 1px solid var(--line); background: #0d0d10; }
.sidebar-brand { padding: 0 9px 28px; }
.sidebar-brand .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.navigation { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 13px; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; font-weight: 700; }
.nav-item.active { background: var(--surface-3); color: white; }
.nav-item.active .material-symbols-rounded { color: var(--purple-light); }
.storage-card { margin: 24px 5px 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.storage-card > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; }
.storage-card span { color: var(--muted); }.storage-card b { font-size: 10px; }
.storage-track { height: 6px; margin: 11px 0 9px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.storage-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--purple); transition: width .3s; }
.storage-card small { color: #777681; font-size: 10px; }
.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.user-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--purple-soft); color: #c4b5fd; font-weight: 800; }
.user-card b, .user-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card b { font-size: 12px; }.user-card small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.logout-button { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 5px; padding: 9px; border-radius: 9px; background: transparent; color: var(--muted); font-size: 11px; }
.logout-button:hover { background: var(--surface); color: white; }
.workspace { min-width: 0; min-height: 0; overflow-y: auto; }
.topbar { position: sticky; z-index: 5; top: 0; display: grid; grid-template-columns: minmax(210px, 1fr) minmax(240px, 380px) auto; align-items: center; gap: 18px; padding: 20px clamp(22px, 4vw, 48px); border-bottom: 1px solid var(--line); background: rgba(9,9,11,.92); backdrop-filter: blur(18px); }
.topbar h2 { margin: 0; font: 800 25px/1 "Manrope"; letter-spacing: -.035em; }
.search-field { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.search-field .material-symbols-rounded { color: var(--muted); font-size: 19px; }
.search-field input { width: 100%; padding: 10px 0; border: 0; outline: 0; background: transparent; color: white; font-size: 12px; }
.content { padding: clamp(22px, 4vw, 48px); }
.dropzone { display: grid; place-items: center; min-height: 190px; padding: 28px; border: 1px dashed #444153; border-radius: 19px; background: linear-gradient(145deg, rgba(139,92,246,.08), rgba(17,17,21,.62)); text-align: center; outline: 0; transition: border .18s, background .18s, transform .18s; cursor: pointer; }
.dropzone:hover, .dropzone.dragging, .dropzone:focus-visible { border-color: var(--purple); background: rgba(139,92,246,.12); transform: translateY(-1px); }
.dropzone-icon { width: 54px; height: 54px; margin-bottom: 13px; border-radius: 16px; background: var(--purple-soft); color: #c4b5fd; font-size: 28px; }
.dropzone b, .dropzone span, .dropzone small { display: block; }
.dropzone b { font: 700 17px "Manrope"; }.dropzone div span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.dropzone small { margin-top: 15px; color: #696873; font-size: 10px; }
.library-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 34px 0 16px; }
.library-head h3 { display: inline; margin: 0; font: 700 18px "Manrope"; }
.library-head div > span { margin-left: 9px; color: var(--muted); font-size: 11px; }
select { padding: 9px 32px 9px 11px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--surface); color: #d8d6df; font-size: 11px; }
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.upload-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); transition: border .16s, transform .16s; cursor: pointer; }
.upload-card:hover { border-color: #454250; transform: translateY(-2px); }
.card-preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0a0a0d; }
.card-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.card-preview::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, rgba(0,0,0,.35)); pointer-events: none; }
.card-actions { position: absolute; z-index: 2; right: 9px; bottom: 9px; display: flex; gap: 5px; opacity: 0; transform: translateY(5px); transition: opacity .16s, transform .16s; }
.upload-card:hover .card-actions { opacity: 1; transform: none; }
.card-actions button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(12,12,15,.8); color: white; backdrop-filter: blur(9px); }
.card-actions button:hover { background: var(--purple); }
.card-info { padding: 13px; }
.card-info b { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 9px; }
.loading-state { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.loading-state span { width: 7px; height: 7px; border-radius: 50%; background: var(--purple-light); animation: pulse 1s infinite alternate; }
.loading-state span:nth-child(2) { animation-delay: .2s; }.loading-state span:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { to { opacity: .22; transform: translateY(-5px); } }
.empty-state { min-height: 280px; display: grid; place-items: center; align-content: center; padding: 35px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); text-align: center; }
.empty-state > .material-symbols-rounded { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-3); color: var(--purple-light); font-size: 27px; }
.empty-state h3 { margin: 16px 0 7px; font: 700 18px "Manrope"; }
.empty-state p { max-width: 470px; margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-3); color: white; }
.mobile-only { display: none; }
dialog { width: min(920px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 19px; background: #101014; color: white; box-shadow: 0 28px 100px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(5px); }
.dialog-shell { padding: 22px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.dialog-head h2 { max-width: 700px; margin: 0; overflow: hidden; font: 700 20px "Manrope"; text-overflow: ellipsis; white-space: nowrap; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr); gap: 20px; }
.detail-preview { min-height: 420px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #08080a; }
.detail-preview img { max-width: 100%; max-height: 68vh; display: block; object-fit: contain; }
.detail-content { min-width: 0; }
.detail-content dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 17px; }
.detail-content dl div { padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.detail-content dt { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.detail-content dd { margin: 5px 0 0; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.link-list { display: grid; gap: 9px; }
.link-list label { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.link-list label > span { display: grid; grid-template-columns: minmax(0, 1fr) 39px; margin-top: 6px; }
.link-list input { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px 0 0 9px; outline: 0; background: #0b0b0e; color: #d6d3df; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.link-list button { border: 1px solid var(--line); border-left: 0; border-radius: 0 9px 9px 0; background: var(--surface-3); color: white; }
.link-list button:hover { background: var(--purple); }
.dialog-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.danger { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 13px; border-radius: 10px; background: rgba(251,113,133,.1); color: var(--danger); font-weight: 700; }
.danger:hover { background: rgba(251,113,133,.18); }
.progress-toast, .toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; border: 1px solid var(--line); border-radius: 13px; background: #17171d; box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.progress-toast { display: flex; align-items: center; gap: 12px; padding: 14px 17px; }
.progress-toast b, .progress-toast small { display: block; }.progress-toast b { font-size: 11px; }.progress-toast small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.spinner { width: 27px; height: 27px; border: 3px solid var(--surface-3); border-top-color: var(--purple-light); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { max-width: min(380px, calc(100% - 30px)); padding: 12px 15px; color: #e8e6ed; font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: none; }
.sidebar-backdrop { display: none; }
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }.login-art { display: none; }.login-card { min-height: 100vh; border: 0; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 15; inset: 0 auto 0 0; width: min(285px, 86vw); transform: translateX(-102%); transition: transform .22s; }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { position: fixed; z-index: 14; inset: 0; display: block; background: rgba(0,0,0,.6); }
  .mobile-only { display: grid; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; padding: 16px 18px; }
  .topbar .search-field { grid-column: 1 / -1; grid-row: 2; }
  .topbar > .primary { padding: 10px; font-size: 0; }.topbar > .primary .material-symbols-rounded { font-size: 20px; }
}
@media (max-width: 700px) {
  .login-card { padding: 30px 23px; }.login-card .brand { margin-bottom: 70px; }
  .content { padding: 20px 15px; }.dropzone { min-height: 165px; }
  .upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-info { padding: 10px; }.card-meta span:last-child { display: none; }
  .card-actions { opacity: 1; transform: none; }
  .detail-grid { grid-template-columns: 1fr; }.detail-preview { min-height: 260px; }
  dialog { max-height: calc(100dvh - 20px); overflow-y: auto; }.dialog-shell { padding: 16px; }
}
@media (max-width: 430px) {
  .upload-grid { grid-template-columns: 1fr; }.library-head { align-items: flex-start; }
}

