/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --bg: #0B0E11;
  --bg-elevated: #13171C;
  --bg-elevated-hover: #181D24;
  --border: #232932;
  --border-bright: #313A47;

  --text: #E4E7EB;
  --text-muted: #7A8290;
  --text-dim: #4D5560;

  --accent: #7CF5C4;
  --accent-dim: #4FA98A;
  --accent-bg: rgba(124, 245, 196, 0.08);

  --error: #FF6B6B;
  --error-bg: rgba(255, 107, 107, 0.08);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

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

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(124, 245, 196, 0.06), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(124, 245, 196, 0.04), transparent 35%);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 0.5em 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

code, .mono {
  font-family: var(--font-mono);
}

/* ============================================================
   Layout shell
   ============================================================ */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.content--narrow {
  max-width: 460px;
}

.content--wide {
  max-width: 1100px;
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 17, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
  flex-shrink: 0;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-bg); }
  50% { box-shadow: 0 0 0 6px var(--accent-bg); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.nav-links a {
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-user-email {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #04140D;
}
.btn-primary:hover {
  background: #93f7cf;
  color: #04140D;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-bright);
}
.btn-ghost:hover {
  background: var(--bg-elevated-hover);
  color: var(--text);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--error);
  border-color: rgba(255, 107, 107, 0.3);
}
.btn-danger-ghost:hover {
  background: var(--error-bg);
  color: var(--error);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

/* ============================================================
   Forms
   ============================================================ */
.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"] {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.field input.has-error {
  border-color: var(--error);
}

.field-error {
  color: var(--error);
  font-size: 12.5px;
  margin-top: 6px;
}

.field-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.field-checkbox input {
  accent-color: var(--accent);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.card + .card {
  margin-top: 20px;
}

.auth-card {
  margin-top: 8vh;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dim);
  margin-bottom: 10px;
}

.card-title {
  font-size: 22px;
  margin-bottom: 6px;
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.helper-text {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-top: 20px;
  text-align: center;
}

/* ============================================================
   Terminal / token block — signature component
   ============================================================ */
.terminal {
  background: #06080A;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0E1218;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-bright);
}

.terminal-label {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.terminal-prompt {
  color: var(--accent);
  flex-shrink: 0;
}

.terminal-text {
  color: var(--text);
  word-break: break-all;
  flex: 1;
}

.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--accent);
  animation: blink 1.1s step-end infinite;
  flex-shrink: 0;
}

@keyframes blink {
  50% { opacity: 0; }
}

.copy-btn {
  background: var(--bg-elevated-hover);
  border: 1px solid var(--border-bright);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.copy-btn.copied {
  color: var(--accent);
  border-color: var(--accent-dim);
}

/* ============================================================
   Status / stat grid
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.stat-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   Alerts / flash messages
   ============================================================ */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--accent-bg);
  border-color: rgba(124, 245, 196, 0.25);
  color: var(--accent);
}

.alert-error {
  background: var(--error-bg);
  border-color: rgba(255, 107, 107, 0.25);
  color: var(--error);
}

.alert-info {
  background: rgba(122, 130, 144, 0.1);
  border-color: var(--border-bright);
  color: var(--text-muted);
}

/* ============================================================
   Misc
   ============================================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

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

.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-dim);
  font-size: 12.5px;
  font-family: var(--font-mono);
}

.hero {
  text-align: center;
  padding: 14vh 24px 10vh;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  max-width: 640px;
  margin: 0 auto 18px;
}

.hero p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 36px;
  font-size: 15.5px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 600px) {
  .nav-links { gap: 14px; }
  .nav-user-email { display: none; }
  .card { padding: 22px; }
  .terminal-body { flex-wrap: wrap; }
  .hero-actions { flex-direction: column; align-items: stretch; }
}

/* ============================================================
   Verify-email step (button -> spinner -> revealed password form)
   ============================================================ */
.verify-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 1px solid rgba(124, 245, 196, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(4, 20, 13, 0.3);
  border-top-color: #04140D;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-in {
  animation: fade-in 0.25s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}



/* ============================================================
   Password rules checklist
   ============================================================ */
.password-rules {
  list-style: none;
  padding: 0;
  margin: 8px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.password-rules li {
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color 0.15s ease;
}

.password-rules li::before {
  content: '○';
  font-size: 10px;
  flex-shrink: 0;
}

.password-rules li.rule--ok {
  color: var(--accent);
}

.password-rules li.rule--ok::before {
  content: '✓';
}

.password-rules li.rule--fail {
  color: var(--error);
}

.password-rules li.rule--fail::before {
  content: '✗';
}



.terminal-text--blurred {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}



/* ============================================================
   Tools grid
   ============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.tool-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tool-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-elevated-hover);
  text-decoration: none;
}

.tool-card--active {
  border-color: rgba(124, 245, 196, 0.35);
}

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tool-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.tool-description {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.tool-link {
  font-size: 13px;
  color: var(--accent-dim);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.pagination-info {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   File manager
   ============================================================ */

:root {
  --tint-doc: #8AB4F8;
  --tint-sheet: #F6C177;
  --tint-media: #F6C177;
  --tint-archive: #C4A7E7;
  --tint-code: #7FD1D9;
  --tint-generic: var(--text-dim);
}

.fm-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.fm-toolbar-spacer {
  flex: 1;
}

.fm-search {
  position: relative;
  min-width: 200px;
}

.fm-search input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 9px 12px 9px 32px;
  border-radius: var(--radius-sm);
}

.fm-search input:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.fm-search::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--text-dim);
  border-radius: 50%;
}

.fm-search::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 60%;
  width: 6px;
  height: 1.5px;
  background: var(--text-dim);
  transform: rotate(45deg);
}

.fm-view-toggle {
  display: flex;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.fm-view-toggle button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: all 0.15s ease;
}

.fm-view-toggle button + button {
  border-left: 1px solid var(--border-bright);
}

.fm-view-toggle button.is-active {
  background: var(--accent-bg);
  color: var(--accent);
}

.fm-sort select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ── path bar (terminal-styled breadcrumb) ── */

.path-bar {
  background: #06080A;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.path-bar-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0E1218;
  border-bottom: 1px solid var(--border);
}

.path-bar-head .terminal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-bright);
}

.path-bar-label {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.path-bar-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 14px;
}

.path-prompt {
  color: var(--accent);
  margin-right: 4px;
}

.path-segment {
  color: var(--text-muted);
  padding: 3px 6px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

.path-segment:hover {
  background: var(--bg-elevated-hover);
  color: var(--text);
  text-decoration: none;
}

.path-segment.is-current {
  color: var(--text);
  font-weight: 600;
}

.path-sep {
  color: var(--text-dim);
  margin: 0 1px;
}

.path-cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--accent);
  animation: blink 1.1s step-end infinite;
  margin-left: 4px;
  flex-shrink: 0;
}

/* ── grid view ── */

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

.fs-item {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 14px 14px;
  cursor: default;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: center;
}

.fs-item:hover,
.fs-item:focus-within {
  border-color: var(--border-bright);
  background: var(--bg-elevated-hover);
}

.fs-item[data-kind="folder"] {
  cursor: pointer;
}

.fs-item[data-kind="folder"]:hover {
  border-color: rgba(124, 245, 196, 0.3);
}

.fs-item-link {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.fs-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  margin-bottom: 10px;
  pointer-events: none;
}

.fs-folder-icon {
  width: 38px;
  height: 30px;
  position: relative;
}

.fs-folder-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 6px;
  background: var(--accent-dim);
  border-radius: 3px 3px 0 0;
}

.fs-folder-icon::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  width: 38px;
  height: 26px;
  background: var(--accent-bg);
  border: 1px solid rgba(124, 245, 196, 0.35);
  border-radius: 4px;
}

.fs-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-bright);
}

.fs-chip--doc { color: var(--tint-doc); border-color: color-mix(in srgb, var(--tint-doc) 35%, transparent); }
.fs-chip--sheet { color: var(--tint-sheet); border-color: color-mix(in srgb, var(--tint-sheet) 35%, transparent); }
.fs-chip--media { color: var(--tint-media); border-color: color-mix(in srgb, var(--tint-media) 35%, transparent); }
.fs-chip--archive { color: var(--tint-archive); border-color: color-mix(in srgb, var(--tint-archive) 35%, transparent); }
.fs-chip--code { color: var(--tint-code); border-color: color-mix(in srgb, var(--tint-code) 35%, transparent); }
.fs-chip--generic { color: var(--text-dim); }

.fs-item-name {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  pointer-events: none;
}

.fs-item-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  pointer-events: none;
}

.fs-item-menu-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.fs-item:hover .fs-item-menu-btn,
.fs-item:focus-within .fs-item-menu-btn,
.fs-item-menu-btn[aria-expanded="true"] {
  opacity: 1;
}

.fs-item-menu-btn:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.fs-item-menu {
  position: absolute;
  top: 34px;
  right: 8px;
  z-index: 10;
  min-width: 140px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: none;
  text-align: left;
}

.fs-item-menu.is-open {
  display: block;
}

.fs-item-menu a,
.fs-item-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 12px;
  cursor: pointer;
}

.fs-item-menu a:hover,
.fs-item-menu button:hover {
  background: var(--bg-elevated-hover);
  text-decoration: none;
}

.fs-item-menu button.danger {
  color: var(--error);
}

/* ── list view ── */

.fm-grid.is-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.fm-grid.is-list .fs-item {
  display: grid;
  grid-template-columns: 32px 1fr 90px 150px 32px;
  align-items: center;
  gap: 14px;
  text-align: left;
  border: none;
  border-radius: 0;
  background: var(--bg-elevated);
  padding: 10px 14px;
}

.fm-grid.is-list .fs-item-icon {
  height: auto;
  margin: 0;
  justify-content: flex-start;
}

.fm-grid.is-list .fs-folder-icon {
  width: 20px;
  height: 16px;
  transform: scale(0.85);
  transform-origin: left center;
}

.fm-grid.is-list .fs-item-name {
  white-space: nowrap;
}

.fm-grid.is-list .fs-item-meta {
  order: initial;
}

.fm-grid.is-list .fs-item-menu-btn {
  position: static;
  opacity: 1;
  margin-left: auto;
}

.fm-grid.is-list .fs-item-menu {
  top: 38px;
}

/* ── empty state ── */

.fm-empty {
  text-align: center;
  padding: 64px 24px;
  border: 1.5px dashed var(--border-bright);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.fm-empty-icon {
  width: 48px;
  height: 38px;
  margin: 0 auto 16px;
  position: relative;
}

.fm-empty-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 8px;
  background: var(--border-bright);
  border-radius: 3px 3px 0 0;
}

.fm-empty-icon::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 0;
  width: 48px;
  height: 33px;
  border: 1.5px dashed var(--border-bright);
  border-radius: 5px;
}

.fm-empty h3 {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 6px;
}

.fm-empty p {
  font-size: 13.5px;
  margin: 0;
}

/* ── drag & drop overlay ── */

.fm-drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 14, 17, 0.92);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.fm-drop-overlay.is-active {
  display: flex;
}

.fm-drop-card {
  border: 2px dashed var(--accent-dim);
  border-radius: var(--radius-lg);
  padding: 56px 72px;
  text-align: center;
  background: var(--accent-bg);
}

.fm-drop-card h3 {
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 6px;
}

.fm-drop-card p {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 0;
  font-family: var(--font-mono);
}

/* ── upload progress toast ── */

.fm-upload-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  width: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: none;
}

.fm-upload-toast.is-visible {
  display: block;
}

.fm-upload-toast-title {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.fm-upload-toast-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-upload-toast-pct {
  font-family: var(--font-mono);
  color: var(--accent);
  flex-shrink: 0;
}

.fm-progress-track {
  height: 4px;
  background: var(--bg);
  border-radius: 2px;
  overflow: hidden;
}

.fm-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.15s ease;
}

/* ── new folder dialog ── */

dialog.fm-dialog {
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 28px;
  width: 100%;
  max-width: 360px;
}

dialog.fm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

dialog.fm-dialog h3 {
  font-size: 16px;
  margin-bottom: 18px;
}

.fm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 600px) {
  .fm-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .fm-grid.is-list .fs-item { grid-template-columns: 24px 1fr 70px 32px; }
  .fm-grid.is-list .fs-item-meta:last-of-type { display: none; }
  .fm-toolbar { gap: 8px; }
  .fm-search { min-width: 0; flex: 1 1 100%; order: 3; }
}


.fm-storage-bar {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.fm-storage-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.fm-storage-track {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}

.fm-storage-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.fm-storage-fill.is-warning { background: #F6C177; }
.fm-storage-fill.is-critical { background: var(--error); }

.fm-trash-link {
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fm-trash-link:hover { color: var(--text); text-decoration: none; }

/* checkbox v levém horním rohu dlaždice */

.fs-item-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  width: 18px;
  height: 18px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
  accent-color: var(--accent);
}

.fs-item:hover .fs-item-checkbox,
.fs-item.is-selected .fs-item-checkbox,
.fm-root.has-selection .fs-item-checkbox {
  opacity: 1;
}

.fs-item.is-selected {
  border-color: var(--accent-dim);
  background: var(--accent-bg);
}

.fm-grid.is-list .fs-item-checkbox {
  position: static;
  opacity: 1;
  margin-right: 4px;
}

/* bulk action bar - objeví se, když je něco vybráno */

.fm-bulk-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 16px;
}

.fm-bulk-bar.is-visible {
  display: flex;
}

.fm-bulk-count {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 600;
}

.fm-bulk-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.fm-bulk-clear {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
}
.fm-bulk-clear:hover { color: var(--text); }

/* move-to dialog: folder tree picker */

.fm-folder-picker {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 12px 0;
}

.fm-folder-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.fm-folder-picker-item:last-child { border-bottom: none; }
.fm-folder-picker-item:hover { background: var(--bg-elevated-hover); }
.fm-folder-picker-item.is-selected {
  background: var(--accent-bg);
  color: var(--accent);
}
.fm-folder-picker-item .depth-indent { flex-shrink: 0; }

/* trash page */

.fm-trash-notice {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.fm-trash-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.fm-trash-item:last-child { border-bottom: none; }

.fm-trash-item-name { flex: 1; font-size: 13.5px; }
.fm-trash-item-meta { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); }
.fm-trash-item-actions { display: flex; gap: 8px; }


.settings-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.settings-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.settings-dropdown-trigger:hover,
.settings-dropdown-trigger[aria-expanded="true"] {
  background: var(--bg-elevated-hover);
  color: var(--text);
}

.settings-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 190px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: none;
}

.settings-dropdown-panel.is-open {
  display: block;
}

.settings-dropdown-panel a {
  display: block;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text);
}

.settings-dropdown-panel a:hover {
  background: var(--bg-elevated-hover);
  text-decoration: none;
}


  .toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
  }
  .toggle-row + .toggle-row {
    border-top: 1px solid var(--border);
  }
  .toggle-row-label {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
  }
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
  }
  .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  .toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: var(--bg);
    border: 1px solid var(--border-bright);
    border-radius: 999px;
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  .toggle-slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 3px;
    top: 3px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: transform 0.15s ease, background 0.15s ease;
  }
  .toggle-switch input:checked + .toggle-slider {
    background: var(--accent-bg);
    border-color: var(--accent-dim);
  }
  .toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
    background: var(--accent);
  }
  .toggle-switch input:focus-visible + .toggle-slider {
    box-shadow: 0 0 0 3px var(--accent-bg);
  }

  .danger-row {
    display: flex;
    justify-content: flex-end;
  }
  .danger-link {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-dim);
    transition: color 0.15s ease;
  }
  .danger-link:hover {
    color: var(--error);
    text-decoration: none;
  }


  .brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

.nav-toggle { display: none; }
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: 0.2s;
}

@media (max-width: 820px) {
  .nav-burger { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    background: rgba(11, 14, 17, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    display: none;            /* skryté, dokud se neotevře hamburger */
  }

  .nav-toggle:checked ~ .nav-links { display: flex; }

  .nav-links a,
  .nav-links .btn {
    width: 100%;
    padding: 12px 4px;
    justify-content: flex-start;
  }
  .nav-user-email {
    display: block;
    padding: 10px 4px 6px;
  }

  /* hamburger -> křížek, když je otevřeno */
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}


.hero--logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  gap: 32px;
}
.hero-logo {
  width: 180px;
  height: auto;
  max-width: 60vw;
}
.hero--logo .hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}