@font-face {
  font-family: "Onest";
  src: url("/assets/onest-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Onest";
  src: url("/assets/onest-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --canvas: #f5f5f3;
  --surface: #ffffff;
  --surface-soft: #f0f0ed;
  --ink: #171815;
  --muted: #777a73;
  --line: #e1e2dd;
  --orange: #ed5b26;
  --orange-soft: #fff0e9;
  --green: #2f7b5b;
  --green-soft: #e9f5ef;
  --sidebar: #171815;
  --sidebar-surface: #232420;
  --sidebar-muted: #93958d;
  --shadow: 0 16px 38px rgba(32, 30, 24, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Onest", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow: hidden;
}

[data-preview] {
  display: none !important;
}

body.view-desktop .dashboard-app,
body.view-mobile .mobile-app {
  display: flex !important;
}

.preview-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.035em;
}

.preview-symbol {
  position: relative;
  width: 22px;
  height: 22px;
  border: 4px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.preview-symbol::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -5px;
  width: 6px;
  height: 6px;
  background: var(--orange);
  transform: translateY(-50%);
}

/* Personal cabinet */
.dashboard-app {
  width: 100vw;
  min-width: 960px;
  min-height: 690px;
  background: var(--canvas);
}

.dash-sidebar {
  width: 238px;
  min-height: 690px;
  display: flex;
  flex-direction: column;
  padding: 27px 18px 18px;
  background: var(--sidebar);
  color: #f6f5f0;
}

.dash-sidebar > .preview-brand {
  padding-inline: 8px;
  font-size: 14px;
}

.workspace-switcher {
  display: grid;
  grid-template-columns: 34px 1fr 16px;
  gap: 10px;
  align-items: center;
  margin-top: 30px;
  padding: 11px;
  border: 1px solid #353630;
  border-radius: 10px;
  background: var(--sidebar-surface);
}

.workspace-avatar,
.account-chip > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--orange);
  color: #21120c;
  font-size: 9px;
  font-weight: 850;
}

.workspace-switcher small,
.workspace-switcher strong {
  display: block;
}

.workspace-switcher small {
  margin-bottom: 2px;
  color: var(--sidebar-muted);
  font-size: 7px;
}

.workspace-switcher strong {
  font-size: 10px;
}

.workspace-switcher > i {
  color: var(--sidebar-muted);
  font-size: 12px;
}

.dash-sidebar nav {
  display: grid;
  gap: 3px;
  margin-top: 29px;
}

.nav-caption {
  padding: 0 10px 7px;
  color: #676960;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav-caption-spaced {
  margin-top: 16px;
}

.dash-sidebar nav a {
  min-height: 36px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--sidebar-muted);
  font-size: 10px;
  font-weight: 610;
}

.dash-sidebar nav a i {
  font-size: 16px;
  text-align: center;
}

.dash-sidebar nav a.active {
  background: var(--sidebar-surface);
  color: #fbfaf6;
}

.dash-sidebar nav a.active i {
  color: var(--orange);
}

.sidebar-status {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: center;
  margin-top: auto;
  padding: 12px;
  border: 1px solid #2d493d;
  border-radius: 10px;
  background: #1c2923;
}

.sidebar-status > i {
  color: #70c99f;
  font-size: 20px;
}

.sidebar-status strong,
.sidebar-status small,
.account-chip strong,
.account-chip small {
  display: block;
}

.sidebar-status strong,
.account-chip strong {
  font-size: 9px;
}

.sidebar-status small,
.account-chip small {
  margin-top: 2px;
  color: var(--sidebar-muted);
  font-size: 7px;
}

.account-chip {
  display: grid;
  grid-template-columns: 34px 1fr 17px;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 13px 8px 0;
  border-top: 1px solid #33342f;
}

.account-chip > span {
  background: #393a35;
  color: #f4f3ed;
}

.account-chip > i {
  color: var(--sidebar-muted);
  font-size: 16px;
}

.dash-main {
  flex: 1;
  min-width: 0;
  height: 690px;
  overflow: hidden;
  padding: 29px clamp(26px, 3vw, 42px);
}

.dash-topbar {
  max-width: 1160px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-inline: auto;
}

.dash-topbar > div:first-child > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
}

.dash-topbar h1 {
  margin: 4px 0 0;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.search-box {
  min-width: 205px;
  height: 36px;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 7px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 8px;
}

.search-box i {
  font-size: 14px;
}

.search-box kbd {
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: #9a9c95;
  font-family: inherit;
  font-size: 6px;
}

.icon-button,
.primary-action {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
}

.icon-button {
  width: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 15px;
}

.primary-action {
  gap: 7px;
  padding: 0 14px;
  background: var(--ink);
  color: #f8f7f2;
  font-size: 8px;
  font-weight: 720;
}

.primary-action i {
  font-size: 13px;
}

.summary-grid {
  max-width: 1160px;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 11px;
  margin: 24px auto 0;
}

.summary-card {
  min-height: 142px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 19px;
}

.summary-card > div:nth-child(2) > span,
.summary-card > div:nth-child(2) > strong,
.summary-card > div:nth-child(2) > small {
  display: block;
}

.summary-card > div:nth-child(2) > span {
  color: var(--muted);
  font-size: 8px;
}

.summary-card > div:nth-child(2) > strong {
  margin-top: 5px;
  font-size: 19px;
  font-weight: 670;
  letter-spacing: -0.035em;
}

.storage-summary > div:nth-child(2) > strong {
  font-size: 24px;
}

.summary-card > div:nth-child(2) > small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.storage-progress {
  grid-column: 1 / -1;
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface-soft);
}

.storage-progress i {
  width: 70%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--orange);
}

.storage-summary > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 7px;
}

.dashboard-grid {
  max-width: 1160px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.7fr);
  gap: 11px;
  margin: 11px auto 0;
}

.files-panel,
.activity-panel {
  min-height: 386px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 41px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.panel-head h2,
.panel-head p {
  margin: 0;
}

.panel-head h2 {
  font-size: 12px;
}

.panel-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.panel-head > span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--orange);
  font-size: 7px;
  font-weight: 690;
}

.panel-head > i {
  color: var(--muted);
  font-size: 16px;
}

.table-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 95px 60px 44px;
  gap: 11px;
  padding: 10px 28px 8px 0;
  border-bottom: 1px solid var(--line);
  color: #9b9d96;
  font-size: 6px;
  font-weight: 650;
}

.file-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-list li {
  min-height: 61px;
  display: grid;
  grid-template-columns: 34px minmax(175px, 1fr) 95px 60px 44px 17px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.file-list li:last-child {
  border-bottom: 0;
}

.file-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 17px;
}

.file-icon.pdf {
  background: #fff0ed;
  color: #c95647;
}

.file-icon.zip {
  background: #f1edff;
  color: #6855b7;
}

.file-icon.sheet {
  background: #eaf6ef;
  color: #3f8663;
}

.file-icon.image {
  background: #edf3fb;
  color: #4a73a8;
}

.file-list strong,
.file-list small {
  display: block;
}

.file-list strong {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 6px;
}

.file-list > li > span,
.file-list time {
  color: var(--muted);
  font-size: 7px;
}

.owner {
  display: flex;
  align-items: center;
  gap: 5px;
}

.owner b {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 5px;
}

.file-list li > i {
  color: var(--muted);
  font-size: 14px;
}

.activity-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-panel li {
  position: relative;
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 10px;
  padding: 11px 0;
}

.activity-panel li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 42px;
  bottom: -1px;
  left: 15px;
  width: 1px;
  background: var(--line);
}

.activity-icon {
  position: relative;
  z-index: 1;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--orange);
  font-size: 14px;
}

.activity-panel strong,
.activity-panel p,
.activity-panel time {
  display: block;
  margin: 0;
}

.activity-panel strong {
  font-size: 8px;
}

.activity-panel p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 6px;
}

.activity-panel time {
  margin-top: 3px;
  color: #a5a7a0;
  font-size: 6px;
}

.backup-status {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--green-soft);
}

.backup-status > i {
  color: var(--green);
  font-size: 20px;
}

.backup-status strong,
.backup-status small {
  display: block;
}

.backup-status strong {
  color: #245c46;
  font-size: 8px;
}

.backup-status small {
  margin-top: 2px;
  color: #5d7c6d;
  font-size: 6px;
}

/* Android app */
.mobile-app {
  width: 100vw;
  min-height: 100vh;
  flex-direction: column;
  background: var(--canvas);
}

.android-status {
  min-height: 28px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 0 20px 3px;
  color: var(--ink);
  font-size: 8px;
  font-weight: 720;
}

.android-status > div {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.mobile-head {
  min-height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 20px 9px;
}

.mobile-head .preview-brand {
  font-size: 12px;
}

.mobile-head .preview-symbol {
  width: 20px;
  height: 20px;
  border-width: 3px;
}

.mobile-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mobile-actions > span,
.mobile-actions > b {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.mobile-actions > span {
  font-size: 14px;
}

.mobile-actions > b {
  border-color: var(--ink);
  background: var(--ink);
  color: #f6f5f0;
  font-size: 8px;
}

.mobile-app main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 18px 20px 82px;
}

.mobile-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 9px;
}

.mobile-app main > h1 {
  margin: 0 0 21px;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.05em;
}

.mobile-storage {
  padding: 17px;
  border-radius: 16px;
  background: var(--sidebar);
  color: #f7f6f1;
  box-shadow: 0 18px 36px rgba(24, 24, 20, 0.14);
}

.mobile-storage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #a6a8a0;
  font-size: 8px;
}

.mobile-storage-head span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-storage-head span i {
  color: var(--orange);
  font-size: 13px;
}

.mobile-storage-head > i {
  font-size: 15px;
}

.mobile-storage > strong {
  display: block;
  margin-top: 17px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.mobile-storage > strong small {
  color: #9d9f97;
  font-size: 9px;
  font-weight: 520;
}

.mobile-progress {
  height: 4px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 10px;
  background: #393a35;
}

.mobile-progress i {
  width: 70%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--orange);
}

.mobile-storage > p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 10px 0 0;
  color: #a9aba3;
  font-size: 7px;
}

.mobile-storage > p i {
  color: #67c092;
  font-size: 11px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 19px;
}

.quick-actions > div {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.quick-actions span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 18px;
}

.quick-actions > div:first-child span {
  border-color: var(--orange);
  background: var(--orange);
  color: #23130d;
}

.quick-actions small {
  color: var(--muted);
  font-size: 7px;
}

.mobile-recent {
  margin-top: 23px;
}

.mobile-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 7px;
}

.mobile-section-head h2,
.mobile-section-head p {
  margin: 0;
}

.mobile-section-head h2 {
  font-size: 15px;
}

.mobile-section-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.mobile-section-head > span {
  color: var(--orange);
  font-size: 7px;
  font-weight: 680;
}

.mobile-recent ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-recent li {
  min-height: 54px;
  display: grid;
  grid-template-columns: 36px 1fr auto 15px;
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.mobile-recent .file-icon {
  width: 36px;
  height: 36px;
}

.mobile-recent strong,
.mobile-recent small {
  display: block;
}

.mobile-recent strong {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-recent small,
.mobile-recent time {
  margin-top: 2px;
  color: var(--muted);
  font-size: 6px;
}

.mobile-recent li > i {
  color: var(--muted);
  font-size: 14px;
}

.mobile-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 67px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  padding: 7px 10px 12px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
  backdrop-filter: blur(12px);
}

.mobile-nav > span {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 6px;
  font-weight: 650;
}

.mobile-nav > span > i {
  font-size: 17px;
}

.mobile-nav > span.active {
  color: var(--orange);
}

.mobile-nav .mobile-upload {
  width: 44px;
  height: 44px;
  align-self: start;
  justify-self: center;
  place-items: center;
  margin-top: -24px;
  border: 5px solid var(--canvas);
  border-radius: 50%;
  background: var(--orange);
  color: #26140d;
}

.mobile-nav .mobile-upload > i {
  font-size: 18px;
}
