:root {
  color-scheme: dark;
  --bg: #04130f;
  --surface: #0a1d17;
  --surface-2: #10271f;
  --line: #234137;
  --text: #f2f8f5;
  --muted: #91a9a0;
  --accent: #58e3aa;
  --accent-deep: #103c2e;
  --danger: #ff7b79;
  --warning: #ffd479;
  --shadow: 0 24px 80px rgba(0, 0, 0, .32);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(92, 225, 165, .14), transparent 36rem),
    radial-gradient(circle at 100% 20%, rgba(66, 135, 245, .09), transparent 30rem),
    var(--bg);
}
button, input, select { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  height: 72px;
  padding: 0 clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(7, 17, 15, .8);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; gap: 11px; align-items: center; text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: #062019; font-weight: 900; }
.header-actions, .button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shell { width: min(1120px, calc(100% - 32px)); margin: clamp(40px, 7vw, 90px) auto; }
.card { background: linear-gradient(145deg, rgba(19, 35, 31, .95), rgba(10, 24, 20, .95)); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.auth-card { width: min(520px, 100%); margin: 0 auto; padding: clamp(26px, 5vw, 46px); }
.compact { padding: 18px 22px; border-radius: 16px; box-shadow: none; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.03; letter-spacing: -.055em; }
h2 { margin: 0 0 6px; }
.auth-card h1 { font-size: clamp(2rem, 7vw, 3.25rem); }
.lead { color: var(--muted); line-height: 1.65; margin: 18px 0 28px; }
.danger-text { color: var(--warning); }
.stack { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: #c6d9d2; font-size: .9rem; font-weight: 650; }
input {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  background: #081512;
  border-radius: 11px;
  padding: 13px 14px;
  outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(92, 225, 165, .12); }
.button {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface-2);
  border-radius: 11px;
  padding: 11px 15px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.button:hover { transform: translateY(-1px); border-color: #496158; }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button.primary { background: var(--accent); color: #052119; border-color: var(--accent); }
.button.ghost { background: transparent; box-shadow: none; }
.button.danger { color: #ffd0ce; border-color: rgba(255, 123, 121, .4); background: rgba(255, 123, 121, .08); }
.secret-output { display: block; padding: 16px; margin: 20px 0; background: #06100e; border: 1px dashed var(--accent); border-radius: 12px; overflow-wrap: anywhere; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; user-select: all; }
.separator { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; }
.separator::before, .separator::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.dashboard-head h1 { margin-bottom: 8px; }
.dashboard-head p:last-child { margin: 0; }
.file-picker { display: inline-block; white-space: nowrap; }
.file-picker input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.file-picker:focus-within { outline: 3px solid rgba(88, 227, 170, .45); outline-offset: 3px; }
.quota { margin-bottom: 20px; }
.quota-label { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: .86rem; color: var(--muted); }
progress { width: 100%; height: 8px; appearance: none; display: block; }
progress::-webkit-progress-bar { background: #07120f; border-radius: 20px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 20px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 20px; }
.table-card { overflow-x: auto; box-shadow: none; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 17px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:last-child, .data-table th:last-child { text-align: right; }
.file-name { font-weight: 700; overflow-wrap: anywhere; }
.file-meta { display: block; color: var(--muted); font-size: .78rem; margin-top: 4px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; }
.actions .button { padding: 8px 11px; font-size: .82rem; }
.empty-state { text-align: center; padding: 70px 24px; color: var(--muted); }
.empty-state h2 { color: var(--text); }
.upload-status { margin: 0 0 18px; color: var(--accent); }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: min(420px, calc(100% - 44px)); padding: 14px 18px; border-radius: 12px; background: #182a25; border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 30; }
.toast.error { color: #ffd0ce; border-color: rgba(255, 123, 121, .5); }
footer { color: #6f8980; text-align: center; padding: 20px 16px 34px; font-size: .78rem; }

.admin-grid { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 20px; align-items: start; }
.admin-panel { padding: 24px; }
.admin-panel h2 { margin-bottom: 18px; }
.credentials { margin-top: 18px; }
.audit-list { display: grid; gap: 9px; max-height: 440px; overflow: auto; }
.audit-event { border-left: 2px solid var(--line); padding: 5px 0 5px 12px; font-size: .84rem; }
.audit-event time { color: var(--muted); display: block; font-size: .74rem; }
.quota-input { min-width: 90px; max-width: 130px; }

@media (max-width: 780px) {
  .site-header { padding: 0 16px; }
  #identity { display: none; }
  .shell { margin-top: 34px; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .admin-grid { grid-template-columns: 1fr; }
  .table-card { overflow-x: auto; }
  .data-table { min-width: 660px; }
}

/* Salattu tiedostonhallinta */
.site-header,
.brand,
.header-actions,
.shell,
.vault-dashboard,
.dashboard-copy,
.library-toolbar,
.library-panel,
.item-main {
  min-width: 0;
}

.site-header {
  width: 100%;
  height: auto;
  min-height: 72px;
  gap: 16px;
}

.header-actions {
  justify-content: flex-end;
}

.vault-dashboard {
  width: 100%;
}

.vault-heading {
  align-items: flex-start;
  margin-bottom: 24px;
}

.dashboard-copy {
  max-width: 720px;
}

.dashboard-copy h1 {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
}

.vault-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(88, 227, 170, .25);
  border-radius: 999px;
  background: rgba(88, 227, 170, .08);
  color: var(--accent);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.vault-badge > span:first-child {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #062019;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  margin-bottom: 16px;
}

.library-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(8, 24, 19, .9);
  color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}

.library-search-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 227, 170, .11);
}

.library-search-field input {
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.library-search-field input:focus {
  border: 0;
  box-shadow: none;
}

.toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  white-space: nowrap;
}

.button-icon {
  font-size: 1.12rem;
  line-height: 1;
}

.quota {
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(16, 39, 31, .96), rgba(7, 25, 19, .96));
}

.quota-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.quota-heading > div {
  display: grid;
  gap: 3px;
}

.quota-caption {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

#quota-label {
  font-size: .95rem;
}

.quota-percent {
  color: var(--accent);
  font-size: .9rem;
  font-weight: 800;
}

#quota-fill {
  height: 8px;
  border: 0;
}

#quota-fill::-webkit-progress-bar {
  border-radius: 99px;
  background: #05130f;
}

#quota-fill::-webkit-progress-value {
  border-radius: 99px;
  background: linear-gradient(90deg, #36c990, var(--accent));
}

#quota-fill::-moz-progress-bar {
  border-radius: 99px;
  background: linear-gradient(90deg, #36c990, var(--accent));
}

.library-panel {
  overflow: hidden;
  box-shadow: none;
}

.library-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.breadcrumbs::-webkit-scrollbar {
  display: none;
}

.breadcrumb-button {
  min-height: 40px;
  padding: 8px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.breadcrumb-button:hover,
.breadcrumb-button:focus-visible {
  background: rgba(88, 227, 170, .08);
  color: var(--text);
}

.breadcrumb-button:disabled {
  color: var(--text);
  cursor: default;
  opacity: 1;
}

.breadcrumb-separator {
  color: #527066;
}

.result-summary {
  flex: none;
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  white-space: nowrap;
}

.library-list {
  display: grid;
}

.library-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}

.library-item:last-child {
  border-bottom: 0;
}

.library-item:hover {
  background: rgba(88, 227, 170, .035);
}

.item-icon {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(88, 227, 170, .18);
  border-radius: 12px;
  background: rgba(88, 227, 170, .08);
  color: var(--accent);
}

.folder-icon::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 7px;
  bottom: 9px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.folder-icon::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  width: 13px;
  height: 7px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.file-icon::before {
  content: "";
  position: absolute;
  inset: 8px 10px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.file-icon::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 14px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor;
  opacity: .75;
}

.item-main {
  display: grid;
  gap: 4px;
}

.item-title {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-weight: 780;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.item-title {
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

button.item-title:hover,
button.item-title:focus-visible {
  color: var(--accent);
}

.item-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.button.small {
  min-height: 44px;
  padding: 9px 11px;
  font-size: .8rem;
}

.library-empty {
  padding: 72px 24px;
}

.library-empty p {
  max-width: 520px;
  margin: 8px auto 0;
  line-height: 1.6;
}

.empty-folder-icon {
  position: relative;
  display: block;
  width: 66px;
  height: 48px;
  margin: 0 auto 24px;
  border: 2px solid rgba(88, 227, 170, .58);
  border-radius: 8px 12px 12px;
  background: rgba(88, 227, 170, .08);
}

.empty-folder-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: -10px;
  width: 27px;
  height: 10px;
  border: 2px solid rgba(88, 227, 170, .58);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: rgba(88, 227, 170, .08);
}

.modal {
  width: min(480px, calc(100% - 28px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--text);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(0, 9, 7, .78);
  backdrop-filter: blur(5px);
}

.modal-card {
  padding: clamp(22px, 5vw, 32px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, #10271f, #081a15);
}

.modal-card h2 {
  margin-top: 0;
  font-size: 1.55rem;
}

.modal-card select {
  width: 100%;
  min-height: 48px;
  padding: 11px 40px 11px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #081512;
  color: var(--text);
  outline: none;
}

.modal-card select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 227, 170, .12);
}

.modal-note {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

@media (max-width: 780px) {
  .site-header {
    align-items: stretch;
    flex-wrap: wrap;
    padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  }

  .brand {
    min-height: 44px;
  }

  .header-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
  }

  .header-actions .button {
    display: grid;
    min-width: 0;
    min-height: 44px;
    place-items: center;
    padding: 9px 7px;
    text-align: center;
  }

  .shell {
    width: min(100% - 28px, 1120px);
    margin-top: 28px;
  }

  .vault-heading {
    gap: 14px;
  }

  .vault-badge {
    align-self: flex-start;
  }

  .library-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .library-search-field {
    grid-column: 1 / -1;
  }

  .toolbar-button {
    width: 100%;
    padding-inline: 10px;
  }

  .library-navigation {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 11px 14px;
  }

  .breadcrumbs {
    width: 100%;
  }

  .result-summary {
    padding-left: 9px;
  }

  .library-item {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px 12px;
    min-height: 84px;
    padding: 13px 14px;
  }

  .item-icon {
    grid-column: 1;
    grid-row: 1;
    width: 40px;
    height: 40px;
  }

  .item-main {
    grid-column: 2;
    grid-row: 1;
  }

  .item-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: wrap;
  }

  .item-actions .button {
    flex: 1 1 auto;
  }

  .library-empty {
    padding: 58px 20px;
  }

  .modal-actions .button {
    flex: 1;
  }
}

@media (max-width: 430px) {
  .shell {
    width: min(100% - 20px, 1120px);
  }

  .dashboard-copy h1 {
    font-size: 2.25rem;
  }

  .vault-badge {
    font-size: .7rem;
  }

  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .library-search-field,
  .toolbar-button {
    grid-column: auto;
  }

  .quota-heading {
    align-items: center;
  }

  .toast {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    max-width: calc(100% - 20px);
  }
}

/* FITPEE-BLUE-GLASS START */

:root {
  color-scheme: dark;

  --bg: #020617;

  --surface: rgba(255, 255, 255, .07);
  --surface-2: rgba(255, 255, 255, .105);

  --line: rgba(255, 255, 255, .14);

  --text: #ffffff;
  --muted: #9eacc2;

  --accent: #93c5fd;
  --accent-deep: rgba(37, 99, 235, .20);

  --danger: #fb7185;
  --warning: #facc15;

  --shadow:
    0 24px 80px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255, 255, 255, .04);
}

body {
  color: var(--text);
  background:
    radial-gradient(
      circle at 12% -10%,
      rgba(37, 99, 235, .28),
      transparent 34rem
    ),
    radial-gradient(
      circle at 95% 15%,
      rgba(59, 130, 246, .16),
      transparent 34rem
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(30, 64, 175, .12),
      transparent 40rem
    ),
    #020617;
  background-attachment: fixed;
}

::selection {
  color: white;
  background: rgba(59, 130, 246, .55);
}

.site-header {
  border-color: rgba(255, 255, 255, .09);
  background: rgba(2, 6, 23, .72);
  box-shadow: 0 8px 35px rgba(0, 0, 0, .18);

  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.brand-mark {
  color: #06101f;
  background:
    linear-gradient(
      135deg,
      #dbeafe,
      #93c5fd
    );

  box-shadow:
    0 7px 24px rgba(59, 130, 246, .28),
    inset 0 1px 0 rgba(255, 255, 255, .6);
}

.card,
.compact,
.quota,
.library-panel,
.modal-card {
  color: white;

  border-color: rgba(255, 255, 255, .14);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, .095),
      rgba(255, 255, 255, .045)
    );

  box-shadow: var(--shadow);

  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
}

.compact,
.library-panel {
  box-shadow:
    0 12px 42px rgba(0, 0, 0, .20),
    inset 0 1px 0 rgba(255, 255, 255, .035);
}

.eyebrow {
  color: #93c5fd;
}

.lead,
.muted,
.file-meta,
.result-summary,
.quota-caption,
.audit-event time,
.modal-note,
footer {
  color: #9eacc2;
}

label {
  color: #cbd8e9;
}

input,
.modal-card select {
  color: white;
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .075);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .025);
}

input::placeholder {
  color: #71809a;
}

input:focus,
.modal-card select:focus {
  border-color: #93c5fd;

  box-shadow:
    0 0 0 3px rgba(59, 130, 246, .18),
    inset 0 1px 0 rgba(255, 255, 255, .03);
}

.button {
  color: #e7eef8;

  border-color: rgba(255, 255, 255, .13);

  background: rgba(255, 255, 255, .085);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .035);
}

.button:hover {
  border-color: rgba(147, 197, 253, .30);
  background: rgba(255, 255, 255, .125);
}

.button.primary {
  color: #06101f;

  border-color: rgba(191, 219, 254, .75);

  background:
    linear-gradient(
      135deg,
      #dbeafe,
      #93c5fd
    );

  box-shadow:
    0 10px 28px rgba(59, 130, 246, .22),
    inset 0 1px 0 rgba(255, 255, 255, .7);
}

.button.primary:hover {
  color: #020617;
  border-color: #dbeafe;

  background:
    linear-gradient(
      135deg,
      #eff6ff,
      #bfdbfe
    );
}

.button.ghost {
  color: #cdd9e8;
  border-color: transparent;
  background: transparent;
}

.button.ghost:hover {
  color: white;
  background: rgba(255, 255, 255, .07);
}

.button.danger {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, .28);
  background: rgba(225, 29, 72, .11);
}

.secret-output {
  color: #bfdbfe;

  border-color: rgba(147, 197, 253, .42);

  background: rgba(2, 6, 23, .62);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .025);
}

.separator {
  color: #8796ad;
}

.separator::before,
.separator::after {
  background: rgba(255, 255, 255, .12);
}

.vault-badge {
  color: #bfdbfe;

  border-color: rgba(147, 197, 253, .24);

  background: rgba(59, 130, 246, .13);
}

.vault-badge > span:first-child {
  color: #06101f;

  background:
    linear-gradient(
      135deg,
      #dbeafe,
      #93c5fd
    );
}

.library-search-field {
  color: #9eacc2;

  border-color: rgba(255, 255, 255, .14);

  background: rgba(255, 255, 255, .065);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .025);
}

.library-search-field:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .16);
}

.library-search-field input {
  background: transparent;
}

.quota {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, .09),
      rgba(255, 255, 255, .045)
    );
}

.quota-percent {
  color: #93c5fd;
}

progress::-webkit-progress-bar,
#quota-fill::-webkit-progress-bar {
  background: rgba(2, 6, 23, .68);
}

progress::-webkit-progress-value,
#quota-fill::-webkit-progress-value {
  background:
    linear-gradient(
      90deg,
      #3b82f6,
      #93c5fd
    );
}

progress::-moz-progress-bar,
#quota-fill::-moz-progress-bar {
  background:
    linear-gradient(
      90deg,
      #3b82f6,
      #93c5fd
    );
}

.library-navigation,
.library-item,
.data-table th,
.data-table td {
  border-color: rgba(255, 255, 255, .09);
}

.breadcrumb-button {
  color: #9eacc2;
}

.breadcrumb-button:hover,
.breadcrumb-button:focus-visible {
  color: white;
  background: rgba(59, 130, 246, .11);
}

.breadcrumb-button:disabled {
  color: white;
}

.breadcrumb-separator {
  color: #5c6b83;
}

.library-item:hover {
  background: rgba(59, 130, 246, .065);
}

.item-icon {
  color: #93c5fd;

  border-color: rgba(147, 197, 253, .20);

  background: rgba(59, 130, 246, .13);
}

.item-title {
  color: white;
}

button.item-title:hover,
button.item-title:focus-visible {
  color: #bfdbfe;
}

.empty-state h2 {
  color: white;
}

.empty-folder-icon {
  border-color: rgba(147, 197, 253, .58);
  background: rgba(59, 130, 246, .11);
}

.empty-folder-icon::before {
  border-color: rgba(147, 197, 253, .58);
  background: rgba(59, 130, 246, .11);
}

.upload-status {
  color: #93c5fd;
}

.toast {
  color: white;

  border-color: rgba(255, 255, 255, .14);

  background: rgba(15, 27, 53, .90);

  box-shadow: var(--shadow);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.modal::backdrop {
  background: rgba(1, 4, 15, .78);
  backdrop-filter: blur(7px);
}

.modal-card {
  background:
    linear-gradient(
      145deg,
      rgba(21, 35, 67, .98),
      rgba(8, 16, 37, .98)
    );
}

/* FITPEE-BLUE-GLASS END */

/* PILVI-E2EE-BRAND-ICON START */

.brand-mark {
  position: relative;
  overflow: hidden !important;

  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;

  padding: 0 !important;

  color: transparent !important;

  border: 1px solid rgba(147, 197, 253, .38) !important;
  border-radius: 11px !important;

  background:
    url("/pilvi-e2ee-icon-v2.png")
    center center / cover
    no-repeat !important;

  box-shadow:
    0 7px 24px rgba(59, 130, 246, .30),
    inset 0 1px 0 rgba(255, 255, 255, .30) !important;
}

.brand-mark > * {
  visibility: hidden !important;
}

.brand-mark::before,
.brand-mark::after {
  content: none !important;
}

/* PILVI-E2EE-BRAND-ICON END */



/* Pilvipee 0.2.1 - responsive encrypted preview */

dialog.preview-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  box-sizing: border-box;
  width: min(1100px, 94vw);
  height: min(850px, 90dvh);
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  background: #020617;
  color: #f1f5f9;
  border: 1px solid #334155;
  border-radius: 16px;
}

.preview-modal::backdrop {
  background: rgba(0, 0, 0, 0.92);
}

.preview-panel {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 12px;
  padding: 20px;
}

.preview-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.preview-header > div:first-child {
  min-width: 0;
}

.preview-header h2 {
  margin: 4px 0 0;
  font-size: clamp(16px, 2vw, 24px);
  overflow-wrap: anywhere;
}

.preview-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
}

.preview-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.preview-content {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.preview-content img,
.preview-content video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-content audio {
  width: min(100%, 600px);
}

.preview-text {
  box-sizing: border-box;
  width: 100%;
  max-height: 100%;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
}

.preview-panel > .muted {
  flex-shrink: 0;
  margin: 0;
  font-size: 12px;
  text-align: center;
}

#preview-status:empty {
  display: none;
}

dialog.preview-modal[data-expanded] {
  width: 100%;
  height: 100dvh;
  border: 0;
  border-radius: 0;
}

@media (max-width: 767px) {
  dialog.preview-modal {
    width: 100%;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .preview-panel {
    padding: 12px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .preview-expand {
    display: none !important;
  }
}


/* Pilvipee 0.2.1 - mobile layout correction */

html {
  width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
}

.library-list {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

.vault-dashboard,
.dashboard-head,
.library-panel,
.library-navigation,
.library-item,
.item-actions,
.quota-heading,
.admin-grid,
.table-card {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 780px) {

  .site-header {
    width: 100%;
    padding-inline: 12px;
    gap: 8px;
  }

  .header-actions {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 6px;
  }

  .header-actions .button {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 4px;
    font-size: 13px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .shell {
    width: calc(100% - 24px);
    max-width: 100%;
    margin: 24px auto;
  }

  input,
  select,
  textarea {
    font-size: 16px;
    min-width: 0;
    max-width: 100%;
  }

  .library-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-search-field {
    grid-column: 1 / -1;
  }

  .toolbar-button {
    min-width: 0;
    white-space: normal;
    padding-inline: 8px;
    font-size: 13px;
  }

  .library-item {
    grid-template-columns: 40px minmax(0, 1fr);
    min-width: 0;
    padding: 12px;
    gap: 10px;
  }

  .item-meta {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .item-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .item-actions .button {
    width: 100%;
    min-width: 0;
    padding-inline: 5px;
    white-space: normal;
    text-align: center;
  }

  .admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-card {
    overflow-x: auto;
  }
}

@media (max-width: 430px) {

  .shell {
    width: calc(100% - 20px);
  }

  .item-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quota-heading {
    flex-wrap: wrap;
  }

  .dashboard-copy h1 {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 340px) {

  .library-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Pilvipee 0.2.2 - fullscreen media */

.preview-panel {
  position: relative;
}

.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.preview-footer p {
  flex: 1;
  margin: 0;
  font-size: 12px;
  text-align: center;
}

.preview-fullscreen {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #0f172a;
  color: #f1f5f9;
  cursor: pointer;
}

.preview-fullscreen[hidden] {
  display: none !important;
}

.fullscreen-exit {
  display: none;
}

dialog.preview-modal[data-immersive] {
  width: 100%;
  height: 100dvh;
  margin: 0;
  border: 0;
  border-radius: 0;
}

dialog[data-immersive] .preview-panel,
.preview-panel:fullscreen {
  width: 100%;
  height: 100%;
  padding: 0;
  gap: 0;
  background: #000;
}

dialog[data-immersive] .preview-header,
dialog[data-immersive] #preview-status,
dialog[data-immersive] .preview-footer p {
  display: none;
}

dialog[data-immersive] .preview-content {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

dialog[data-immersive] .preview-footer {
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 2;
}

dialog[data-immersive] .fullscreen-enter {
  display: none;
}

dialog[data-immersive] .fullscreen-exit {
  display: block;
}

dialog[data-immersive][data-preview-kind="image"]
.preview-fullscreen {
  opacity: 0;
}

dialog[data-immersive][data-preview-kind="image"]
.preview-fullscreen:focus-visible,
dialog[data-immersive][data-preview-kind="image"]
.preview-fullscreen:hover {
  opacity: 1;
}

dialog[data-immersive] .preview-content img {
  cursor: zoom-out;
}
