:root {
  color-scheme: dark;
  --bg: #0c0e12;
  --panel: #13161c;
  --panel2: #191d25;
  --border: #252a34;
  --text: #eef0f5;
  --muted: #929aa9;
  --accent: #7b8cff;
  --green: #70ceac;
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button,
a {
  color: inherit;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  border-radius: 8px;
  padding: 9px 12px;
}
button:hover {
  background: #ffffff0a;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
a {
  text-decoration: none;
}
input,
select {
  background: #101319;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--accent);
}
input::placeholder {
  color: #6e7685;
}
.muted {
  color: var(--muted);
  line-height: 1.8;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #737e94;
}
.primary {
  background: var(--accent);
  color: #0a0c16;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 8px;
}
.primary:hover {
  background: #94a2ff;
}
.primary.danger {
  background: #ec7d85;
}
.subtle {
  border-color: var(--border);
  background: var(--panel);
  font-size: 12px;
  color: #c5cbd6;
}
.brandmark {
  font-size: 32px;
  font-weight: 800;
  background: #232a47;
  letter-spacing: -2px;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4daff;
}
.brandmark span {
  color: var(--accent);
}
.brandmark.small {
  width: 40px;
  height: 40px;
  font-size: 23px;
  border-radius: 10px;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 242px;
  flex-shrink: 0;
  border-inline-end: 1px solid var(--border);
  background: #101217;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  letter-spacing: -0.5px;
  font-weight: 650;
}
.brand small {
  display: block;
  font-size: 7px;
  letter-spacing: 1.4px;
  color: #798398;
  margin-top: 5px;
}
.workspace-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #616c80;
  margin: 50px 12px 16px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: start;
  padding: 13px 15px;
  margin-bottom: 5px;
  color: #969faf;
}
.nav-item > span:first-child {
  font-size: 20px;
  width: 23px;
}
.nav-item.active {
  background: #7b8cff16;
  color: #acb6ff;
  border: 1px solid #7b8cff25;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 60px;
}
.storage-label {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 12px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.sidebar-bottom > p {
  font-size: 11px;
  color: #6f7b8b;
  margin: 12px;
}
.account {
  border-top: 1px solid var(--border);
  margin-top: 25px;
  padding-top: 22px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.avatar {
  height: 33px;
  width: 33px;
  display: grid;
  place-items: center;
  background: #29314d;
  color: #b8c2ff;
  border-radius: 50%;
}
.account strong {
  font-size: 11px;
}
.account small {
  display: block;
  color: #68758a;
  font-size: 9px;
  margin-top: 4px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account button {
  margin-inline-start: auto;
  padding: 7px;
  font-size: 20px;
  color: #8b95a6;
}
.main {
  margin-inline-start: 242px;
  width: calc(100% - 242px);
}
.topbar {
  height: 77px;
  padding: 0 42px;
  border-bottom: 1px solid #21252d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #6e788b;
}
.topbar-brand span {
  color: #a0a9b9;
  margin-inline-start: 10px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.private-badge {
  font-size: 10px;
  color: var(--green);
  border: 1px solid #70ceac25;
  padding: 6px 10px;
  border-radius: 20px;
}
.content {
  max-width: 1600px;
  margin: auto;
  padding: 42px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.8px;
  margin: 12px 0 8px;
  font-weight: 600;
}
.page-heading p {
  font-size: 12px;
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0 40px;
}
.stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(130deg, #171b23, #12151b);
  padding: 20px;
  display: grid;
  grid-template-columns: 38px 1fr;
  column-gap: 14px;
}
.stat-icon {
  background: #7b8cff16;
  color: #96a4ff;
  border: 1px solid #7b8cff22;
  border-radius: 9px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 21px;
}
.stat-icon.green {
  background: #70ceac10;
  color: #70ceac;
  border-color: #70ceac22;
}
.stat-icon.violet {
  color: #bf9cff;
  background: #bf9cff10;
  border-color: #bf9cff22;
}
.stat-icon.amber {
  color: #e8b470;
  background: #e8b47010;
  border-color: #e8b47022;
}
.stat span {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}
.stat strong {
  font-size: 25px;
  letter-spacing: -0.7px;
  font-weight: 600;
  white-space: nowrap;
}
.stat small {
  grid-column: 2;
  font-size: 9px;
  color: #69758a;
  margin-top: 10px;
}
.files-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
h2 {
  font-size: 17px;
  font-weight: 550;
  margin: 0;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
.search-wrap {
  position: relative;
  flex: 1;
}
.search-wrap span {
  position: absolute;
  inset-inline-start: 14px;
  top: 8px;
  font-size: 24px;
  color: #657186;
}
.search-wrap input {
  width: 100%;
  padding-inline-start: 43px;
  background: var(--panel);
}
select {
  font-size: 11px;
  background: var(--panel);
  max-width: 180px;
}
.icon-button {
  background: var(--panel);
  border: 1px solid var(--border);
}
.view-toggle {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 8px;
  flex-shrink: 0;
}
.view-toggle button {
  padding: 5px 9px;
  color: #6d788e;
}
.view-toggle .selected {
  background: #2b3241;
  color: #dce2f5;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  font-size: 11px;
  color: #7d8ba0;
  margin-bottom: 13px;
}
.breadcrumbs button {
  padding: 5px;
}
.sync-status {
  color: #c7b781;
  font-size: 11px;
  margin-bottom: 16px;
  line-height: 1.7;
}
.sync-status:empty {
  display: none;
}
.file-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}
.file-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  background: var(--panel);
  transition: border-color 0.15s;
}
.file-card:hover {
  border-color: #505f86;
}
.thumbnail {
  height: 148px;
  background: linear-gradient(145deg, #1b2330, #151b25);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
}
.thumbnail img,
.thumbnail video {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.thumbnail video {
  pointer-events: none;
}
.file-symbol {
  font-size: 43px;
  color: #6a7aa1;
}
.file-symbol.video {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #7b8cff40;
  color: #b0baff;
  font-size: 25px;
  background: #7b8cff0d;
}
.file-type {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  background: #0a0d16bb;
  border: 1px solid #ffffff12;
  font-size: 8px;
  padding: 4px 6px;
  border-radius: 4px;
  color: #d7deef;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.file-info {
  padding: 14px;
}
.file-name {
  font-size: 11px;
  font-weight: 550;
  display: block;
  width: 100%;
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0;
  border-radius: 0;
}
.file-details {
  font-size: 9px;
  color: #768298;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 8px;
}
.file-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #222733;
  margin-top: 12px;
  padding-top: 8px;
  gap: 1px;
}
.file-actions button,
.file-actions a {
  padding: 5px 7px;
  font-size: 12px;
  border-radius: 5px;
  color: #9da8bd;
}
.file-actions button:hover,
.file-actions a:hover {
  color: #dce2ff;
  background: #ffffff08;
}
.file-actions .delete {
  color: #c2858e;
}
.folders {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.folder {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 11px;
  max-width: 240px;
}
.folder span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.folder-icon {
  color: #d4b479;
  font-size: 20px;
}
.file-grid.list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.list .file-card {
  display: flex;
  align-items: center;
}
.list .thumbnail {
  width: 80px;
  height: 78px;
  flex-shrink: 0;
}
.list .file-symbol {
  font-size: 26px;
}
.list .file-info {
  display: grid;
  grid-template-columns: 1fr 180px 170px;
  align-items: center;
  width: 100%;
  gap: 20px;
}
.list .file-actions {
  border: 0;
  margin: 0;
  padding: 0;
}
.list .file-details {
  margin: 0;
}
.list .file-type {
  display: none;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #8491a6;
  margin-top: 25px;
}
.pagination > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.workspace-footer {
  border-top: 1px solid #1c222c;
  margin-top: 40px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  color: #475469;
  font-size: 8px;
  letter-spacing: 1px;
}
.empty {
  text-align: center;
  padding: 55px 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.empty > div {
  font-size: 42px;
  color: #657599;
}
.empty h3 {
  font-size: 16px;
}
.empty p {
  font-size: 12px;
}
.upload-progress,
.recovery {
  padding: 16px;
  border: 1px solid #7b8cff40;
  background: #7b8cff0b;
  border-radius: 9px;
  margin-bottom: 20px;
  font-size: 12px;
}
.upload-progress progress {
  width: 100%;
  height: 6px;
  margin-top: 10px;
  accent-color: var(--accent);
}
.recovery > div {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-wrap: anywhere;
}
dialog {
  background: #141922;
  color: var(--text);
  border: 1px solid #343e53;
  border-radius: 15px;
  padding: 24px;
  max-width: 900px;
  width: 90vw;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(4px);
}
.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.preview-heading strong {
  font-size: 13px;
}
#preview-content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  background: #080b10;
  border-radius: 8px;
  overflow: hidden;
}
#preview-content img,
#preview-content video {
  max-width: 100%;
  max-height: 65vh;
  display: block;
}
#preview-content p {
  padding: 20px;
  color: var(--muted);
}
#preview-meta {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.preview-actions {
  display: flex;
  gap: 10px;
}
#action-dialog {
  max-width: 500px;
}
#action-dialog p {
  overflow-wrap: anywhere;
  font-size: 12px;
}
#action-dialog label {
  display: block;
  margin: 18px 0 10px;
  font-size: 12px;
}
#action-input {
  width: 100%;
}
.action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
#toast {
  position: fixed;
  bottom: 25px;
  inset-inline-end: 25px;
  max-width: calc(100vw - 50px);
  padding: 15px 23px;
  border-radius: 9px;
  background: #233e35;
  border: 1px solid #47745e;
  z-index: 100;
  font-size: 12px;
  box-shadow: 0 6px 30px #0005;
}
#toast.error {
  background: #482731;
  border-color: #8f4d5e;
}
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 20%, #1c244030, transparent 60%), var(--bg);
  padding: 60px 20px;
}
.language {
  position: absolute;
  top: 25px;
  inset-inline-end: 25px;
  color: #a9b5cf;
}
.login-card {
  width: 420px;
  max-width: 100%;
  padding: 32px;
}
.login-card .brandmark {
  margin-bottom: 32px;
}
.login-card h1 {
  font-size: 28px;
  line-height: 1.5;
  margin-top: 12px;
}
.login-card p {
  font-size: 12px;
}
.login-card form {
  margin-top: 30px;
}
.login-card label {
  font-size: 12px;
  display: block;
  margin: 18px 0 10px;
  color: #c1c9db;
}
.login-card input {
  width: 100%;
  padding: 14px;
  background: #121721;
}
.wide {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
}
.login-foot {
  font-size: 10px;
  color: #627089;
  text-align: center;
  margin-top: 27px;
}
.login-bottom {
  position: absolute;
  bottom: 25px;
  display: flex;
  gap: 30px;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #47536b;
}
.login-bottom span {
  color: #394359;
}
#error {
  color: #ef939d;
  min-height: 16px;
}
.loading {
  opacity: 0.45;
  pointer-events: none;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1600px) {
  .file-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .thumbnail {
    height: 170px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 205px;
  }
  .main {
    margin-inline-start: 205px;
    width: calc(100% - 205px);
  }
  .content {
    padding: 30px;
  }
  .file-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
    column-gap: 9px;
    grid-template-columns: 30px 1fr;
  }
  .stat-icon {
    height: 30px;
  }
  .stat strong {
    font-size: 21px;
  }
  .list .file-info {
    grid-template-columns: 1fr 130px;
    gap: 10px;
  }
  .list .file-actions {
    grid-column: 2;
    grid-row: 1/3;
  }
  .list .file-details {
    grid-column: 1;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 75px;
    padding: 24px 10px;
  }
  .brand > span:last-child,
  .workspace-label,
  .nav-item > span:last-child,
  .sidebar-bottom {
    display: none;
  }
  .brand {
    justify-content: center;
    margin-bottom: 40px;
  }
  .nav-item {
    justify-content: center;
    padding: 12px 8px;
  }
  .nav-item > span:first-child {
    width: auto;
  }
  .main {
    margin-inline-start: 75px;
    width: calc(100% - 75px);
  }
  .topbar {
    padding: 0 25px;
    height: 65px;
  }
  .content {
    padding: 25px;
  }
  .stat {
    display: block;
  }
  .stat-icon {
    width: 32px;
    margin-bottom: 12px;
  }
  .stat small {
    display: block;
  }
  .file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search-wrap {
    flex-basis: 100%;
  }
  .toolbar select {
    flex: 1;
    max-width: none;
  }
  .stats {
    margin-bottom: 30px;
  }
}
@media (max-width: 540px) {
  .sidebar {
    width: 57px;
    padding: 20px 6px;
  }
  .brandmark.small {
    width: 33px;
    height: 33px;
    font-size: 20px;
  }
  .main {
    margin-inline-start: 57px;
    width: calc(100% - 57px);
  }
  .content {
    padding: 22px 14px;
  }
  .topbar {
    padding: 0 14px;
  }
  .topbar-brand {
    display: none;
  }
  .topbar-actions {
    justify-content: space-between;
    width: 100%;
  }
  .private-badge {
    font-size: 8px;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading .eyebrow {
    font-size: 8px;
  }
  .page-heading > .primary {
    padding: 10px 13px;
    font-size: 11px;
  }
  .page-heading p {
    font-size: 10px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .stat {
    display: grid;
    grid-template-columns: 30px 1fr;
    padding: 14px;
  }
  .stat strong {
    font-size: 20px;
  }
  .stat span {
    font-size: 10px;
  }
  .stat-icon {
    margin: 0;
  }
  .file-grid {
    gap: 10px;
  }
  .thumbnail {
    height: 108px;
  }
  .file-info {
    padding: 10px;
  }
  .file-name {
    font-size: 10px;
  }
  .file-details {
    font-size: 8px;
    flex-wrap: wrap;
  }
  .file-actions {
    justify-content: space-between;
  }
  .file-actions button,
  .file-actions a {
    padding: 4px;
    font-size: 11px;
  }
  .toolbar {
    gap: 6px;
  }
  .toolbar select {
    width: 85px;
    padding: 10px 6px;
    font-size: 10px;
  }
  .view-toggle button {
    padding: 5px 6px;
  }
  .list .thumbnail {
    width: 52px;
    height: 65px;
  }
  .list .file-info {
    padding: 8px;
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .list .file-actions {
    grid-row: 3;
    grid-column: 1;
    justify-content: flex-start;
  }
  .list .file-details {
    display: none;
  }
  .pagination {
    gap: 8px;
    align-items: flex-start;
  }
  .pagination > div {
    gap: 5px;
  }
  .pagination .subtle {
    font-size: 9px;
    padding: 7px;
  }
  .workspace-footer {
    font-size: 7px;
    gap: 10px;
    letter-spacing: 0.3px;
  }
  .login-card {
    padding: 20px 5px;
  }
  dialog {
    padding: 16px;
  }
  .preview-heading strong {
    font-size: 11px;
  }
  .file-type {
    font-size: 7px;
  }
}
.thumbnail{position:relative;overflow:hidden}.thumbnail img,.hover-preview{width:100%;height:100%;object-fit:cover}.hover-preview{position:absolute;inset:0;z-index:3}.play-overlay{position:absolute;inset:0;display:grid;place-items:center;font-size:46px;color:white;text-shadow:0 2px 10px #000;pointer-events:none}.hover-loading:after{content:'…';position:absolute;top:10px;left:10px;background:#151a28;border-radius:50%;padding:5px;z-index:4}.file-details{flex-wrap:wrap}#thumbnail-status{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto}#watch-filter{max-width:160px}
