:root {
  --ui-accent: #087b48;
  --ui-focus: #1670cb;
  --ui-border: #dce3e5;
}

body:has(.admin-shell) { background: #f3f5f6; }
.admin-shell input:not([type="checkbox"]):not([type="radio"]),
.admin-shell select,
.admin-shell textarea { font-weight: 500; letter-spacing: 0; }
.admin-shell label > span { letter-spacing: 0; }

.button,
.admin-shell .button {
  min-height: 40px;
  gap: 8px;
  border-radius: 7px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.button--primary,
.admin-shell .button--primary {
  color: #fff;
  background: var(--ui-accent);
  border: 1px solid var(--ui-accent);
  box-shadow: 0 2px 3px #12322512;
}

.button--light,
.admin-shell .button--light {
  color: #33463e;
  background: #fff;
  border: 1px solid #d3ddda;
  box-shadow: 0 1px 2px #142b1f06;
}

.admin-shell .button--danger {
  color: #ab3543;
  background: #fff;
  border: 1px solid #e8cdd2;
  box-shadow: none;
}

.button:disabled,
.admin-shell .button:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}

.button[data-ui-icon]::before,
.site-nav a[data-ui-icon]::before,
.file-view-switch button[data-ui-icon]::before {
  content: "";
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: var(--ui-icon) center / contain no-repeat;
  mask: var(--ui-icon) center / contain no-repeat;
}
.file-view-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

.button[aria-busy="true"] {
  cursor: progress;
}

.button[aria-busy="true"]::before {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  background: transparent;
  -webkit-mask: none;
  mask: none;
  animation: ui-spin .75s linear infinite;
}

.ui-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: min(260px, calc(100vw - 24px));
  padding: 8px 11px;
  color: #fff;
  background: #202b29;
  border: 1px solid #42504c;
  border-radius: 6px;
  box-shadow: 0 4px 12px #10271b20;
  font: 500 12px/1.45 "Segoe UI", Arial, sans-serif;
  pointer-events: none;
}

.ui-tooltip[hidden] { display: none; }

.admin-shell .form-message:not(:empty),
.login-card .form-message:not(:empty) {
  display: block;
  padding: 10px 12px;
  color: #245b42;
  background: #edf8f1;
  border-left: 3px solid #16814c;
  border-radius: 4px;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.admin-shell .form-message.is-error:not(:empty),
.login-card .form-message.is-error:not(:empty) {
  color: #943242;
  background: #fff2f2;
  border-color: #c94b5b;
}

.admin-shell .admin-workspace-head {
  min-height: 90px;
  align-items: center;
  padding: 18px 0;
  color: #26382f;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--ui-border);
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.admin-workspace-head::before,
.admin-workspace-head::after { content: none; }
.admin-workspace-heading { min-width: 0; }
.admin-workspace-head p {
  color: #667770;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.admin-workspace-head p i { display: none; }
.admin-shell .admin-workspace-head h1 {
  margin-top: 6px;
  color: #1b3025;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}
.admin-workspace-title-row > span { display: none; }
.admin-workspace-actions .workspace-live { display: none; }
.admin-sidebar .admin-sidebar__command { display: none; }
.admin-sidebar .nav-group__title { letter-spacing: 0; }
.admin-shell .tab-button__copy strong { font-weight: 600; letter-spacing: 0; }
.admin-shell .tab-button__copy small { line-height: 1.5; }
.admin-shell .tab-button.is-active { box-shadow: none; }
.admin-shell .tab-button.is-active::after { box-shadow: none; }
.admin-shell .tab-button .tab-button__icon {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  color: inherit;
  background: currentColor;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-mask: var(--ui-icon) center / contain no-repeat;
  mask: var(--ui-icon) center / contain no-repeat;
}
.admin-shell .tab-button__icon::before,
.admin-shell .tab-button__icon::after { content: none; }
.admin-shell .sidebar-toggle {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  color: #456353;
  background: #fff;
  border: 1px solid #dce5df;
  border-radius: 7px;
}
.admin-shell .sidebar-toggle span {
  width: 19px;
  height: 19px;
  background: currentColor;
  border: 0;
  transform: none;
  -webkit-mask: url('/assets/ui-panel-left.svg') center / contain no-repeat;
  mask: url('/assets/ui-panel-left.svg') center / contain no-repeat;
}
.admin-shell.is-sidebar-collapsed .sidebar-toggle span { transform: none; }
.admin-sidebar .storage-monitor strong { color: #315642; }
.admin-sidebar .storage-monitor__refresh { color: #286744; }
.file-vault__head h2 { font-size: 1.45rem; line-height: 1.3; text-transform: none; }
.file-vault__head p { font-weight: 600; letter-spacing: 0; text-transform: none; }
.file-vault__head p i { display: none; }
.admin-shell .sidebar-logout__icon {
  width: 19px;
  height: 19px;
  background: currentColor;
  border: 0;
  -webkit-mask: url('/assets/ui-log-out.svg') center / contain no-repeat;
  mask: url('/assets/ui-log-out.svg') center / contain no-repeat;
}
.sidebar-logout__icon::before,
.sidebar-logout__icon::after { content: none; }

.site-nav {
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: #c7d5cc transparent;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 6px;
  letter-spacing: 0;
  font-weight: 600;
  font-size: .875rem;
  transition: background-color .16s ease, color .16s ease;
}
.site-nav a[aria-current="page"] {
  color: #086638;
  background: #eaf7ed;
  box-shadow: inset 0 -2px #0a8b4d;
}
.filter-button { line-height: 1.4; letter-spacing: 0; }
.product-rating { color: #53685c; font-size: .8rem; }

@media (hover: hover) and (pointer: fine) {
  .button:hover:not(:disabled),
  .admin-shell .button:hover:not(:disabled) { transform: none; }
  .button--primary:hover:not(:disabled),
  .admin-shell .button--primary:hover:not(:disabled) {
    background: #056339;
    border-color: #056339;
    box-shadow: 0 3px 8px #1232251a;
  }
  .button--light:hover:not(:disabled),
  .admin-shell .button--light:hover:not(:disabled) {
    color: #155333;
    background: #f0f6f2;
    border-color: #b6cec0;
  }
  .admin-shell .button--danger:hover:not(:disabled) { background: #fff1f3; border-color: #dca9b1; }
  .site-nav a:hover { background: #f0f5f2; color: #086638; }
}

@media (min-width: 981px) {
  .admin-shell .admin-sidebar {
    height: 100dvh;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .admin-shell.is-sidebar-collapsed .tab-button .tab-button__icon { margin: 0; }
}

@media (max-width: 1280px) {
  .file-vault-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .admin-shell .admin-sidebar {
    display: block;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid var(--ui-border);
    box-shadow: none;
  }
  .admin-sidebar::before { content: none; }
  .admin-shell .admin-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
  }
  .admin-sidebar .brand { padding: 0; min-width: 0; }
  .admin-sidebar .brand img { width: 36px; height: 36px; }
  .admin-sidebar .brand strong { color: #213f2e; font-size: .9rem; }
  .admin-sidebar .brand small { color: #65786d; font-size: .68rem; }
  .admin-sidebar__signal { display: none; }
  .admin-shell .sidebar-toggle span {
    -webkit-mask-image: url('/assets/ui-menu.svg');
    mask-image: url('/assets/ui-menu.svg');
  }
  .admin-shell.is-mobile-menu-open .sidebar-toggle span {
    -webkit-mask-image: url('/assets/ui-x.svg');
    mask-image: url('/assets/ui-x.svg');
  }
  .admin-shell .admin-actions,
  .admin-shell .admin-sidebar__footer { display: none; }
  .admin-shell.is-mobile-menu-open .admin-actions {
    display: block;
    max-height: 58dvh;
    margin-top: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .admin-shell .admin-tabs { display: grid; gap: 10px; overflow: visible; padding: 0; }
  .admin-shell .nav-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 0 0 10px;
    background: none;
    border: 0;
    border-bottom: 1px solid #e7ede9;
    border-radius: 0;
  }
  .admin-shell .nav-group__title {
    display: block;
    grid-column: 1 / -1;
    margin: 5px 8px;
    color: #6c7e73;
    font-size: .75rem;
  }
  .admin-shell .tab-button {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 48px;
    padding: 8px;
    color: #53695e;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 6px;
  }
  .admin-shell .tab-button .tab-button__icon { width: 18px; height: 18px; flex-basis: 18px; margin-right: 8px; }
  .admin-shell .tab-button__copy { display: block; min-width: 0; }
  .admin-shell .tab-button__copy strong { color: inherit; font-size: .875rem; white-space: normal; }
  .admin-shell .tab-button__copy small { display: none; }
  .admin-shell .tab-button.is-active { color: #086c3c; background: #eaf7ef; border-color: #c4e3d0; }
  .admin-shell .tab-button.is-active::after { display: none; }
  .admin-shell.is-mobile-menu-open .admin-sidebar__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px solid var(--ui-border);
  }
  .admin-sidebar__footer .storage-monitor { margin: 0; color: #315642; background: #f0f8f2; border-color: #d1e6d7; }
  .admin-sidebar__footer .storage-monitor__head { flex-wrap: wrap; gap: 6px; }
  .admin-sidebar__footer .storage-monitor__head span,
  .admin-sidebar__footer .storage-monitor small { color: #546e5f; }
  .admin-sidebar__footer .sidebar-logout { width: auto; color: #4f6459; background: #fff; border-color: #dce5df; }
  .admin-shell .admin-workspace-head { margin-top: 0; }
}

@media (max-width: 620px) {
  .button,
  .admin-shell .button,
  .site-nav a,
  .filter-button { min-height: 44px; }
  .admin-shell .admin-workspace-head { gap: 12px; align-items: stretch; padding: 16px 0; }
  .admin-shell .admin-workspace-head h1 { font-size: 1.3rem; }
  .admin-workspace-actions { display: flex; flex-wrap: wrap; }
  .admin-workspace-actions .button { width: auto; flex: 1 1 auto; padding: 10px 12px; font-size: .78rem; }
  .admin-sidebar__footer .sidebar-logout { width: 44px; padding: 0; }
  .admin-sidebar__footer .sidebar-logout__copy { display: none; }
  .file-vault-toolbar { grid-template-columns: minmax(0, 1fr); }
  .file-vault__head { padding: 16px; gap: 14px; }
  .file-vault__head h2 { font-size: 1.3rem; }
  .file-vault-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .file-vault-stats article { padding: 12px; }
  .file-vault-stats article > span { font-size: .75rem; }
  .file-vault-stats article > strong { font-size: 1.35rem; }
  .site-nav a { padding: 8px 10px; font-size: .8rem; }
  .site-nav a[data-ui-icon]::before { width: 15px; height: 15px; flex-basis: 15px; }
}

@keyframes ui-spin { to { transform: rotate(360deg); } }
.ui-back-to-top {
  position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(var(--back-top-bottom, 18px), env(safe-area-inset-bottom));
  z-index: 45; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  color: #13794b; background: #fff; border: 1px solid #cbded2; border-radius: 50%;
  box-shadow: 0 3px 14px #123e2924; cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.ui-back-to-top::before {
  content: ''; width: 21px; height: 21px; background: currentColor;
  -webkit-mask: url('/assets/ui-arrow-up.svg') center / contain no-repeat;
  mask: url('/assets/ui-arrow-up.svg') center / contain no-repeat;
}
.ui-back-to-top[hidden] { display: none !important; }
.ui-back-to-top:focus-visible { outline: 3px solid #239b64; outline-offset: 4px; }
@media (hover: hover) { .ui-back-to-top:hover { background: #e9f7ef; box-shadow: 0 4px 18px #123e2938; } }
@media (prefers-reduced-motion: reduce) {
  .button, .tab-button, .site-nav a, .ui-back-to-top { transition: none !important; }
  .button[aria-busy="true"]::before { animation: none; border-style: dotted; }
}
