/* Vaultly — shared styles for the sign-in screen and the storage app. */

:root {
  color-scheme: light dark;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #eef0f7;
  --border: #e2e5ef;
  --border-strong: #cdd2e2;

  --text: #16192a;
  --text-muted: #616a86;
  --text-faint: #8d95ad;

  --accent: #4a5cf5;
  --accent-hover: #3c4ce0;
  --accent-soft: #e9ebff;
  --accent-contrast: #ffffff;
  --danger: #d1364b;
  --danger-soft: #fdeaed;
  --success: #1f9d63;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(20, 24, 45, 0.06);
  --shadow: 0 4px 16px rgba(20, 24, 45, 0.08);
  --shadow-lg: 0 18px 48px rgba(20, 24, 45, 0.18);

  --header-h: 60px;
  --sidebar-w: 232px;
  --details-w: 316px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1018;
    --surface: #171a25;
    --surface-2: #1d212e;
    --surface-3: #252a3a;
    --border: #2a2f40;
    --border-strong: #3a4055;

    --text: #e9ecf5;
    --text-muted: #9aa3bd;
    --text-faint: #737d99;

    --accent: #7b88ff;
    --accent-hover: #8e99ff;
    --accent-soft: #232844;
    --accent-contrast: #10121c;
    --danger: #f2687d;
    --danger-soft: #33202a;
    --success: #4cc38a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- brand -- */

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--accent), #8b5cf6);
  color: #fff;
  flex: none;
}

.brand__mark svg {
  width: 17px;
  height: 17px;
}

/* -------------------------------------------------------------- sign in -- */

.auth {
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 32px 20px 20px;
  background:
    radial-gradient(1000px 520px at 12% -8%, var(--accent-soft), transparent 62%),
    radial-gradient(760px 420px at 96% 6%, rgba(139, 92, 246, 0.14), transparent 60%),
    var(--bg);
}

.auth__center {
  display: grid;
  place-items: center;
}

.auth__card {
  width: 100%;
  max-width: 392px;
  padding: 30px 30px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.auth__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.auth__title {
  margin: 0 0 4px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.auth__subtitle {
  margin: 0 0 22px;
  color: var(--text-muted);
}

.field {
  margin-bottom: 15px;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.field__control {
  position: relative;
  display: flex;
}

.input {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
}

.input::placeholder {
  color: var(--text-faint);
}

.input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field__control .input {
  padding-right: 60px;
}

.field__reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.field__reveal:hover {
  color: var(--text);
  background: var(--surface-3);
}

.auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 20px;
  font-size: 13px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover:not(:disabled) {
  background: var(--surface-3);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.btn--primary {
  color: var(--accent-contrast);
  background: var(--accent);
  border-color: transparent;
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn--block {
  width: 100%;
  padding: 11px 14px;
}

.btn--ghost {
  background: none;
  border-color: transparent;
  color: var(--text-muted);
}

.btn--ghost:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-3);
}

.btn--danger {
  color: var(--danger);
}

.btn--danger:hover:not(:disabled) {
  background: var(--danger-soft);
}

.auth__error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  border-radius: var(--radius);
}

.auth__error[hidden] {
  display: none;
}

.auth__hint {
  margin-top: 22px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
}

.auth__hint strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth__hint code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: 5px;
}

.auth__footer {
  margin-top: 28px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ------------------------------------------------------------------ app -- */

.app {
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  height: 100%;
}

.header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}

.header__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.search {
  position: relative;
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
}

.search svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.search .input {
  padding-left: 34px;
  padding-right: 34px;
  border-radius: 999px;
}

.search__clear {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.search__clear:hover {
  background: var(--surface-3);
  color: var(--text);
}

.header__right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.account {
  position: relative;
}

.account__button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 4px 4px;
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}

.account__button:hover,
.account__button[aria-expanded="true"] {
  background: var(--surface-2);
  border-color: var(--border);
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(150deg, #f0a04a, #e0645f);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.account__name {
  font-weight: 600;
  font-size: 13px;
}

.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 224px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 40;
}

.menu__header {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.menu__header strong {
  display: block;
  font-size: 13px;
}

.menu__header span {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

.menu__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.menu__item:hover {
  background: var(--surface-3);
}

.menu__item svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--text-muted);
}

.menu__item--danger,
.menu__item--danger svg {
  color: var(--danger);
}

.menu__item--danger:hover {
  background: var(--danger-soft);
}

.menu__sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--border);
}

/* ------------------------------------------------------------ app body -- */

.body {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: 100%;
  min-height: 0;
}

.body[data-details="open"] {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--details-w);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 12px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.nav__item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav__item[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.nav__item svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.nav__count {
  margin-left: auto;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.storage {
  margin-top: auto;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.storage__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.storage__bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.storage__fill {
  height: 100%;
  width: 56%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
}

.storage__note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ------------------------------------------------------------ main area -- */

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.main.is-dragover::after {
  content: "Drop files to upload";
  position: absolute;
  inset: 10px;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 80%, transparent);
  border: 2px dashed var(--accent);
  border-radius: var(--radius-lg);
  pointer-events: none;
  z-index: 10;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  min-width: 0;
  font-size: 15px;
}

.crumbs__item {
  padding: 4px 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.crumbs__item:hover {
  color: var(--text);
  background: var(--surface-3);
}

.crumbs__item--current {
  color: var(--text);
  cursor: default;
}

.crumbs__item--current:hover {
  background: none;
}

.crumbs__sep {
  color: var(--text-faint);
}

.toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.select {
  padding: 7px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.segmented {
  display: flex;
  padding: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.segmented button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 26px;
  padding: 0;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.segmented button svg {
  width: 15px;
  height: 15px;
}

.segmented button[aria-pressed="true"] {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 20px 28px;
}

/* ----------------------------------------------------------- list view -- */

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.row {
  cursor: pointer;
}

.row:hover td {
  background: var(--surface-2);
}

.row[data-selected="true"] td {
  background: var(--accent-soft);
}

.row__name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 500;
}

.row__name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-owner,
.col-size,
.col-modified {
  color: var(--text-muted);
  white-space: nowrap;
}

.col-size {
  font-variant-numeric: tabular-nums;
}

.col-actions {
  width: 40px;
  text-align: right;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface-3);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.star {
  color: var(--text-faint);
}

.star--on {
  color: #e8a13a;
}

.file-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: none;
}

.file-icon svg {
  width: 16px;
  height: 16px;
}

.file-icon--folder { color: #4a7cf5; background: #e6edff; }
.file-icon--doc    { color: #3b6fd4; background: #e6eeff; }
.file-icon--sheet  { color: #1f9d63; background: #e3f6ec; }
.file-icon--slide  { color: #d97706; background: #fdf0dc; }
.file-icon--pdf    { color: #d1364b; background: #fdeaed; }
.file-icon--image  { color: #8b5cf6; background: #f0eaff; }
.file-icon--video  { color: #db2777; background: #fdeaf4; }
.file-icon--audio  { color: #0891b2; background: #e0f5fa; }
.file-icon--archive{ color: #a16207; background: #f8f0dc; }
.file-icon--code   { color: #475569; background: #eaeef4; }
.file-icon--text   { color: #64748b; background: #eef1f6; }

@media (prefers-color-scheme: dark) {
  .file-icon--folder { color: #8ea9ff; background: #1e2540; }
  .file-icon--doc    { color: #83a6f0; background: #1c2440; }
  .file-icon--sheet  { color: #55c894; background: #16302a; }
  .file-icon--slide  { color: #eba445; background: #33260f; }
  .file-icon--pdf    { color: #f2687d; background: #331c22; }
  .file-icon--image  { color: #b394ff; background: #261f42; }
  .file-icon--video  { color: #f472b6; background: #351b2b; }
  .file-icon--audio  { color: #38bdd8; background: #122b33; }
  .file-icon--archive{ color: #d9a441; background: #302614; }
  .file-icon--code   { color: #94a3b8; background: #232936; }
  .file-icon--text   { color: #94a3b8; background: #232936; }
}

/* ----------------------------------------------------------- grid view -- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 12px;
  padding-top: 12px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.card[data-selected="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.card__thumb {
  display: grid;
  place-items: center;
  height: 84px;
  border-radius: 8px;
  background: var(--surface-2);
}

.card__thumb .file-icon {
  width: 42px;
  height: 42px;
}

.card__thumb .file-icon svg {
  width: 21px;
  height: 21px;
}

.card__name {
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__meta {
  font-size: 12px;
  color: var(--text-muted);
}

.card__star {
  position: absolute;
  top: 8px;
  right: 8px;
}

/* --------------------------------------------------------- empty state -- */

.empty {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 72px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--text-faint);
  background: var(--surface-2);
}

.empty__icon svg {
  width: 24px;
  height: 24px;
}

.empty h2 {
  margin: 6px 0 0;
  font-size: 16px;
  color: var(--text);
}

.empty p {
  margin: 0;
  max-width: 340px;
}

/* ------------------------------------------------------- details panel -- */

.details {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
}

.details__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 12px 16px;
  border-bottom: 1px solid var(--border);
}

.details__head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.details__body {
  padding: 16px;
}

.details__preview {
  display: grid;
  place-items: center;
  height: 148px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}

.details__preview .file-icon {
  width: 56px;
  height: 56px;
}

.details__preview .file-icon svg {
  width: 28px;
  height: 28px;
}

.details__name {
  margin: 0 0 2px;
  font-size: 15px;
  word-break: break-word;
}

.details__sub {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.details__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.details__list {
  margin: 0;
  border-top: 1px solid var(--border);
}

.details__list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.details__list dt {
  color: var(--text-muted);
}

.details__list dd {
  margin: 0;
  text-align: right;
  word-break: break-word;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-muted);
}

.tag--shared {
  color: var(--accent);
  background: var(--accent-soft);
}

/* -------------------------------------------------------------- modal -- */

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 15, 26, 0.5);
  backdrop-filter: blur(2px);
  z-index: 60;
}

.modal {
  width: 100%;
  max-width: 420px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.modal p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.progress {
  height: 8px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transition: width 0.14s linear;
}

.modal__file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.modal__file span:last-child {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* -------------------------------------------------------------- toast -- */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 80;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.18s ease-out;
}

.toast svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------- responsive -- */

@media (max-width: 1100px) {
  :root {
    --sidebar-w: 62px;
  }

  .nav__item {
    justify-content: center;
    padding: 10px;
  }

  .nav__item span,
  .nav__count,
  .storage__note,
  .storage__label span:last-child {
    display: none;
  }

  .storage {
    padding: 8px;
  }

  .sidebar {
    padding: 12px 8px;
  }

  .body[data-details="open"] {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }

  .details {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(340px, 88vw);
    box-shadow: var(--shadow-lg);
    z-index: 30;
  }
}

@media (max-width: 720px) {
  .header {
    gap: 10px;
    padding: 0 10px;
  }

  .brand span {
    display: none;
  }

  .account__name {
    display: none;
  }

  .col-owner,
  .col-modified {
    display: none;
  }

  .toolbar {
    padding: 12px;
  }

  .content {
    padding: 8px 12px 24px;
  }

  .auth__card {
    padding: 24px 20px;
  }
}
