/* Variabel warna per tema → themes.css */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--scrollbar-thumb), #2f4558);
  border-radius: 10px;
  border: 2px solid var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

.scroll-area {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.scroll-area::-webkit-scrollbar {
  width: 6px;
}

.scroll-area::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.scroll-area::-webkit-scrollbar-thumb {
  border-width: 1px;
  border-color: transparent;
  background: var(--scrollbar-thumb);
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}

body.modal-open { overflow: hidden; }

.hidden { display: none !important; }

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-gradient);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.sidebar-middle {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.65rem 0.5rem;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sidebar-menu-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-menu-item.active {
  background: var(--accent-glow);
  border-color: rgba(62, 166, 232, 0.35);
  color: var(--accent);
}

.sidebar-menu-icon {
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav,
.sidebar-folders {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.65rem;
  gap: 0.5rem;
}

.app-panel {
  flex: 1;
  min-height: 0;
}

#panel-settings.content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-width: none;
  width: 100%;
}

.settings-page {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 2rem;
}

.settings-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.settings-section .sub {
  margin-bottom: 0.75rem;
}

.sidebar-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.35rem;
  flex-shrink: 0;
}

.sidebar-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.btn-icon-sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.btn-icon-sm:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.folder-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.15rem 0.2rem;
}

.folder-item {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.folder-item:hover { background: rgba(255, 255, 255, 0.03); }

.folder-item.active {
  background: var(--accent-glow);
  border-color: rgba(62, 166, 232, 0.4);
}

.folder-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0.55rem 0.5rem 0.55rem 0.65rem;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.86rem;
}

.folder-item.active .folder-main { color: var(--accent); }

.folder-icon {
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.folder-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-del {
  flex-shrink: 0;
  width: 30px;
  margin: 0.35rem 0.35rem 0.35rem 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.folder-item:hover .folder-del,
.folder-item.active .folder-del {
  opacity: 1;
}

.folder-del:hover {
  background: rgba(240, 113, 120, 0.15);
  color: var(--danger);
}

.sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--bg-elevated);
  position: sticky;
  bottom: 0;
  z-index: 20;
}

.user-box {
  padding: 0.75rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.user-box .user-display-name {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

.user-box .user-line {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.user-box .user-handle {
  color: var(--accent);
}

.user-box .user-account {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}

.btn-logout {
  width: 100%;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(240, 113, 120, 0.45);
  background: transparent;
  color: var(--danger);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.btn-logout:hover {
  background: rgba(240, 113, 120, 0.12);
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1;
  background: var(--bg);
}

.main > .app-panel.content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title { flex: 1; min-width: 0; }
.topbar-title strong { font-size: 1.15rem; display: block; }
.topbar-title .hint { margin: 0; font-size: 0.82rem; }

.content {
  padding: 1.25rem 1.35rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1100px;
  width: 100%;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; }

.upload-target { margin-bottom: 0.75rem; }
.upload-target span { color: var(--accent); font-weight: 500; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 0;
  position: relative;
  margin: 0.75rem 0 1rem;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.dropzone-inner {
  padding: 2rem 1rem;
  text-align: center;
  pointer-events: none;
}

.dropzone-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.65rem;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.upload-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.ingest-tabs {
  display: flex;
  gap: 0.4rem;
  margin: 0.85rem 0 1rem;
  padding: 0.25rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.ingest-tab {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.ingest-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.ingest-tab.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.ingest-panel {
  padding: 0.15rem 0 0.25rem;
}

#ingest-panel-url {
  padding: 1rem 1.1rem 1.15rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

#ingest-panel-url > .hint:first-child {
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.ingest-panel label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  margin-top: 0.75rem;
}

.ingest-panel label:first-of-type {
  margin-top: 0;
}

.ingest-panel label .hint {
  font-weight: 400;
  font-size: 0.72rem;
}

.ingest-panel input[type="url"],
.ingest-panel input[type="text"] {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

.ingest-panel input[type="url"]:focus,
.ingest-panel input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.ingest-panel input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.ingest-panel .hint code {
  font-size: 0.75rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--surface2);
}

#ingest-panel-url #import-url-error,
#ingest-panel-url #import-url-status {
  margin-top: 0.75rem;
}

#ingest-panel-url #btn-import-url {
  margin-top: 1rem;
  width: 100%;
}

@media (min-width: 520px) {
  #ingest-panel-url #btn-import-url {
    width: auto;
    min-width: 220px;
  }
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.file-card {
  display: grid;
  grid-template-columns: 28px 72px 1fr;
  grid-template-rows: auto auto;
  gap: 0.5rem 0.75rem;
  padding: 0.85rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.file-card:hover { border-color: rgba(62, 166, 232, 0.4); }
.file-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(62, 166, 232, 0.35);
}

.file-check {
  grid-row: 1 / 3;
  display: flex;
  align-items: flex-start;
  padding-top: 0.35rem;
}

.file-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.75rem 0 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--accent-glow);
  border: 1px solid rgba(62, 166, 232, 0.35);
  border-radius: 10px;
}

.bulk-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.select-all-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.select-all-label input { accent-color: var(--accent); }

.files-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.upload-preview-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
}

.file-thumb {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.file-thumb img,
.file-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-thumb-video { position: relative; cursor: pointer; }
.file-thumb-video .play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.file-thumb-icon { cursor: default; }

.ftype {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}

.ftype-pdf { background: #e74c3c; }
.ftype-word { background: #2b579a; }
.ftype-excel { background: #217346; }
.ftype-ppt { background: #d24726; }
.ftype-text { background: #5c6bc0; }
.ftype-code { background: #455a64; }
.ftype-archive { background: #8d6e63; }
.ftype-app { background: #6a1b9a; }
.ftype-audio { background: #00897b; }
.ftype-video { background: #6a1b9a; }
.ftype-image { background: #0277bd; }
.ftype-default { background: #546e7a; }

.upload-preview {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.upload-preview-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  text-align: left;
}

.upload-preview-media {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-preview-img,
.upload-preview-vid {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-name {
  font-weight: 600;
  font-size: 0.92rem;
  word-break: break-all;
}

.confirm-message { margin-bottom: 0.75rem; line-height: 1.5; color: var(--text); }
.confirm-extra { margin-bottom: 0.75rem; }
.confirm-file-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem;
  background: var(--bg);
  border-radius: 10px;
}

.modal-preview-wrap.modal-behind .modal-preview-body {
  opacity: 0.45;
}

.modal-preview-wrap .modal-preview-body {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 900px);
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  overflow: auto;
}

.modal-preview-body img,
.modal-preview-body video {
  max-width: 100%;
  max-height: 75vh;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 3;
}

#confirm-ok.btn.danger {
  background: var(--danger);
  border: none;
  color: #fff;
}
#confirm-ok.btn.danger:hover {
  background: #e85a62;
  color: #fff;
  filter: none;
}

.file-card-name {
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.file-card-body {
  grid-column: 3;
  min-width: 0;
}

.file-card-actions {
  grid-column: 3;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 2.5rem 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: radial-gradient(ellipse at top, #152535 0%, var(--bg) 55%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.auth-card h2 { color: var(--accent); margin-bottom: 0.35rem; }
.auth-card .sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.25rem; }
.auth-card .btn { width: 100%; margin-top: 1rem; }

label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  margin-top: 0.75rem;
}

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="url"] {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

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

.btn {
  padding: 0.72rem 1.1rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.92rem;
}

.btn:hover { background: var(--accent-dim); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.btn.ghost:hover { color: var(--text); border-color: var(--accent); }

.btn.sm { padding: 0.4rem 0.65rem; font-size: 0.78rem; font-weight: 500; }

.btn.danger {
  background: transparent;
  border: 1px solid rgba(240, 113, 120, 0.5);
  color: var(--danger);
}

.btn-icon {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
}

.error {
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: rgba(240, 113, 120, 0.12);
  color: var(--danger);
  font-size: 0.85rem;
}

.status-msg {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--ok);
  padding: 0.5rem 0.65rem;
  background: rgba(79, 209, 165, 0.08);
  border-radius: 8px;
}

.steps { display: flex; gap: 0.35rem; margin-bottom: 1rem; }
.step-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}
.step-dot.done { background: var(--accent); }
.step-dot.active { background: var(--ok); }

.hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.35rem; }
.hint a { color: var(--accent); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal.modal-top {
  pointer-events: auto;
}

.modal.modal-behind {
  pointer-events: none;
}

.modal.modal-behind .modal-backdrop {
  opacity: 0;
}

.modal.modal-behind .modal-card {
  opacity: 0.45;
  transform: scale(0.97);
  filter: blur(1px);
}

.modal.modal-suppressed {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal-top .modal-backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.modal-card h3 { margin-bottom: 0.25rem; }
.modal-card-wide { max-width: 480px; }
.modal-card-warn { border-color: rgba(240, 180, 41, 0.45); }
.modal-actions { display: flex; gap: 0.5rem; margin-top: 1rem; justify-content: flex-end; }

.topbar-actions { display: flex; gap: 0.45rem; align-items: center; }
.settings-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.75rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.settings-hint { margin-top: 0.75rem; }

.settings-label-spaced { margin-top: 1.25rem; }

.settings-telegram-status {
  margin-bottom: 0.65rem;
  line-height: 1.45;
}

.settings-telegram-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.settings-account-user {
  margin-bottom: 0.65rem;
}

.settings-password-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0.5rem;
}

.settings-password-form label {
  margin-top: 0.55rem;
}

.settings-password-form .btn {
  margin-top: 0.85rem;
  align-self: flex-start;
}

.account-switch { text-align: center; margin-top: 1rem; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
}

#modal-change-password .modal-actions {
  margin-top: 0.5rem;
}

.theme-picker {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.theme-option:hover { border-color: var(--accent); }
.theme-option.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.theme-option-text strong {
  display: block;
  color: inherit;
  font-weight: 600;
}

.theme-option-text .hint {
  display: block;
  color: var(--muted);
}

/* Picker tetap terbaca di tema terang (retro / light) */
[data-theme="retro"] .theme-picker .theme-option,
[data-theme="light"] .theme-picker .theme-option {
  background: #fff;
  color: #2e2e2e;
  border: 2px solid #2e2e2e;
  box-shadow: 2px 2px 0 #2e2e2e;
}

[data-theme="retro"] .theme-picker .theme-option-text .hint,
[data-theme="light"] .theme-picker .theme-option-text .hint {
  color: #4a4a4a;
}

[data-theme="retro"] .theme-picker .theme-option:hover {
  border-color: #2e2e2e;
  background: #f5f0e4;
}

[data-theme="light"] .theme-picker .theme-option:hover {
  border-color: #2563eb;
  background: #f8fafc;
}

[data-theme="retro"] .theme-picker .theme-option.active {
  background: #b5a642;
  color: #2e2e2e;
  outline: none;
  box-shadow: 3px 3px 0 #2e2e2e;
}

[data-theme="retro"] .theme-picker .theme-option.active .theme-option-text .hint {
  color: #3d3d3d;
}

[data-theme="light"] .theme-picker .theme-option.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: #2563eb;
  color: #0f172a;
  box-shadow: none;
}

[data-theme="retro"] .theme-picker .theme-swatch-glass,
[data-theme="light"] .theme-picker .theme-swatch-glass {
  border: 2px solid #2e2e2e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.theme-swatch {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.theme-swatch-default { background: linear-gradient(135deg, #0b1117 40%, #3ea6e8 100%); }
.theme-swatch-ocean { background: linear-gradient(135deg, #071018 40%, #2dd4bf 100%); }
.theme-swatch-dusk { background: linear-gradient(135deg, #12101a 40%, #a78bfa 100%); }
.theme-swatch-light { background: linear-gradient(135deg, #f8fafc 40%, #2563eb 100%); }
.theme-swatch-retro {
  background: linear-gradient(135deg, #e9e1d4 35%, #b5a642 55%, #8c2727 100%);
  border: 2px solid #2e2e2e;
  border-radius: 2px;
}
.theme-swatch-glass {
  background: linear-gradient(160deg, #1a2028 0%, #0f1318 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.theme-option-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.theme-option-text strong { font-size: 0.9rem; }

.flood-wait-box {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(240, 180, 41, 0.1);
  border: 1px solid rgba(240, 180, 41, 0.35);
  text-align: center;
}

.flood-wait-box strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.15rem;
  color: var(--warn);
}

.mobile-only { display: none; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(300px, 88vw);
    box-shadow: var(--shadow);
    height: 100vh;
  }
  .sidebar.mobile-open { display: flex; }
  .folder-del { opacity: 1; }
  .mobile-only { display: inline-flex; align-items: center; justify-content: center; }
  .file-grid { grid-template-columns: 1fr; }
  .file-card { grid-template-columns: 28px 64px 1fr; }
  .file-thumb { width: 64px; height: 64px; }
}

.upload-limit-hint {
  margin-top: 0.5rem;
  color: var(--muted);
}

.upload-size-warn {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
}

.upload-preview-over {
  outline: 1px solid var(--danger);
  border-radius: var(--radius);
}

.transfer-modal {
  z-index: 520;
}

.transfer-card {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  text-align: center;
  padding: 1.5rem 1.25rem 1.25rem;
}

.transfer-spinner {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 1rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: transfer-spin 0.85s linear infinite;
}

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

.transfer-progress-wrap {
  height: 0.5rem;
  margin: 1rem 0 0.45rem;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.transfer-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  border-radius: 999px;
  transition: width 0.2s ease;
}

.transfer-progress-wrap.indeterminate .transfer-progress-bar {
  width: 35%;
  animation: transfer-indeterminate 1.2s ease-in-out infinite;
}

@keyframes transfer-indeterminate {
  0% { transform: translateX(-120%); }
  50% { transform: translateX(80%); }
  100% { transform: translateX(220%); }
}

.transfer-percent {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}