* { box-sizing: border-box; }

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2128;
  --border: #2d333b;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --accent: #f0a32b;
  --accent-hover: #f7b955;
  --danger: #e5534b;
  --secondary: #316dca;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
header h1::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  margin-right: 10px;
}

main { max-width: 960px; margin: 40px auto; padding: 0 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.card h2 { margin-top: 0; font-weight: 600; }

.hidden { display: none !important; }
.muted { color: var(--text-dim); }
.error { color: var(--danger); margin-top: 12px; }

input[type="email"], input[type="text"] {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  width: 280px;
  margin-right: 8px;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240, 163, 43, 0.15);
}
input::placeholder { color: var(--text-dim); }

button {
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #141414;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, transform 0.05s;
}
button:hover:not(:disabled) { background: var(--accent-hover); }
button:active:not(:disabled) { transform: translateY(1px); }
button.secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
button.secondary:hover:not(:disabled) { background: #242b33; }
button.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
  padding: 5px 12px;
  font-weight: 500;
}
button.danger:hover:not(:disabled) { background: rgba(229, 83, 75, 0.12); }
button.link-btn {
  background: none;
  border: none;
  color: var(--text);
  text-decoration: underline;
  padding: 0 4px;
  font-weight: 400;
}
#login-view button.link-btn { color: var(--secondary); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.browser-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
#breadcrumb { font-size: 14px; color: var(--text-dim); }
#breadcrumb a {
  color: var(--secondary);
  cursor: pointer;
  text-decoration: none;
}
#breadcrumb a:hover { text-decoration: underline; }

#file-table { width: 100%; border-collapse: collapse; }
#file-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
#file-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
#file-table tbody tr:hover td { background: var(--surface-2); }
#file-table tbody tr:last-child td { border-bottom: none; }

.folder-row td:first-child { font-weight: 600; }
.folder-name { cursor: pointer; }
.folder-name.locked { color: var(--text-dim); cursor: not-allowed; }
.lock { margin-left: 8px; font-weight: 400; font-size: 12px; }

#upload-progress { margin: 14px 0; }
.progress-track {
  background: var(--surface-2);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}
.progress-fill {
  background: var(--accent);
  height: 100%;
  width: 0%;
  transition: width 0.2s;
}
#progress-label { font-size: 13px; color: var(--text-dim); }

/* drag & drop */
.card.drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
}
tr.row-drop td { background: rgba(240, 163, 43, 0.15) !important; }
.drop-hint { font-size: 13px; margin-bottom: 0; }
