/* TrackAxis / iOS-inspired File Browser theme */

:root,
:root.dark {
  color-scheme: light;

  --blue: #007AFF;
  --dark-blue: #0056CC;

  --background: #F2F2F7;
  --surfacePrimary: rgba(255, 255, 255, 0.88);
  --surfaceSecondary: rgba(255, 255, 255, 0.72);
  --divider: rgba(60, 60, 67, 0.12);
  --borderPrimary: rgba(60, 60, 67, 0.10);
  --borderSecondary: rgba(60, 60, 67, 0.16);

  --textPrimary: #636366;
  --textSecondary: #1C1C1E;
  --action: #3A3A3C;

  --iconPrimary: #007AFF;
  --iconSecondary: #FFFFFF;
  --iconTertiary: #AEAEB2;
  --icon-blue: #007AFF;
  --icon-green: #34C759;
  --icon-orange: #FF9500;
  --icon-violet: #AF52DE;
  --icon-red: #FF3B30;
  --icon-yellow: #FFCC00;

  --hover: rgba(120, 120, 128, 0.10);
  --item-selected: #E8F4FD;
  --moon-grey: #F2F2F7;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

body {
  background: #F2F2F7 !important;
  color: #1C1C1E !important;
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */
header {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.12) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

header title {
  color: #1C1C1E !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
}

header .action i {
  color: #636366 !important;
}

header .action:hover {
  background: rgba(120, 120, 128, 0.10) !important;
}

#search #input {
  background: rgba(120, 120, 128, 0.12) !important;
  border-radius: 10px !important;
  border: none !important;
}

#search #input input {
  color: #1C1C1E !important;
}

#search #input input::placeholder {
  color: #8E8E93 !important;
}

/* ── Sidebar (TrackAxis-style) ───────────────────────────────────────────── */
nav {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(28px) saturate(185%);
  -webkit-backdrop-filter: blur(28px) saturate(185%);
  border-right: 0.5px solid rgba(60, 60, 67, 0.12) !important;
  padding: 10px 8px 16px !important;
  width: 15.5em !important;
}

nav > div {
  border-top: 0.5px solid rgba(60, 60, 67, 0.10) !important;
  padding-top: 8px !important;
  margin-top: 8px !important;
}

nav .action {
  border-radius: 12px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #636366 !important;
  padding: 10px 12px !important;
  margin: 2px 0 !important;
  width: calc(100% - 4px) !important;
  margin-left: 2px !important;
}

nav .action:hover {
  background: rgba(120, 120, 128, 0.08) !important;
  color: #1C1C1E !important;
}

nav a.router-link-active .action,
nav .action.router-link-active {
  background: #E8F4FD !important;
  color: #007AFF !important;
  font-weight: 600 !important;
}

nav .action i {
  color: #007AFF !important;
  opacity: 0.9;
}

.credits {
  color: #8E8E93 !important;
  font-size: 11px !important;
}

/* ── Main content ────────────────────────────────────────────────────────── */
main {
  background: transparent !important;
}

.breadcrumbs {
  background: transparent !important;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.10) !important;
}

.breadcrumbs span,
.breadcrumbs a {
  color: #636366 !important;
  font-weight: 500;
}

.breadcrumbs a:hover {
  background: rgba(120, 120, 128, 0.08) !important;
  color: #007AFF !important;
}

/* ── File / folder cards ─────────────────────────────────────────────────── */
#listing .item {
  background: #FFFFFF !important;
  border-radius: 14px !important;
  border: 0.5px solid rgba(60, 60, 67, 0.10) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease !important;
}

#listing .item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.12) !important;
}

#listing .item[aria-selected="true"] {
  background: #E8F4FD !important;
  border-color: rgba(0, 122, 255, 0.22) !important;
}

#listing .item header {
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border: none !important;
  position: static !important;
  height: auto !important;
  padding: 0 !important;
}

#listing .item .name {
  color: #1C1C1E !important;
  font-weight: 500 !important;
}

#listing .item .size,
#listing .item .modified {
  color: #8E8E93 !important;
}

#listing .item[data-dir="true"] div i,
#listing .item[data-dir=true] div i {
  color: #007AFF !important;
}

#listing .item div i {
  color: #8E8E93 !important;
}

#listing .item[data-type="image"] div i { color: #34C759 !important; }
#listing .item[data-type="audio"] div i { color: #FF9500 !important; }
#listing .item[data-type="video"] div i { color: #AF52DE !important; }

#listing h2 {
  color: #8E8E93 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

/* ── Buttons & inputs ────────────────────────────────────────────────────── */
.button {
  border-radius: 12px !important;
  font-weight: 600 !important;
}

.button--flat {
  color: #007AFF !important;
}

.button--flat:hover {
  background: #E8F4FD !important;
}

input, textarea, select, .input {
  border-radius: 12px !important;
  background: rgba(120, 120, 128, 0.12) !important;
  border: none !important;
  color: #1C1C1E !important;
}

.card {
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border: 0.5px solid rgba(60, 60, 67, 0.12) !important;
  box-shadow: 0 8px 28px -6px rgba(0, 0, 0, 0.12) !important;
}

.card .card-title {
  color: #1C1C1E !important;
  font-weight: 700 !important;
}

/* ── Login page ──────────────────────────────────────────────────────────── */
#login {
  background: linear-gradient(160deg, #E8F4FD 0%, #F2F2F7 45%, #FFFFFF 100%) !important;
}

#login .card {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#login img {
  border-radius: 16px;
}

/* ── Progress bar ────────────────────────────────────────────────────────── */
.progress div {
  background-color: #007AFF !important;
}
