:root {
  --bg: #070814;
  --panel: rgba(17, 20, 40, 0.82);
  --border: rgba(131, 145, 230, 0.28);
  --text: #eef1ff;
  --muted: #b0b9e8;
  --ok: #56e2b1;
  --danger: #ff6f99;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(circle at top left, #20224b 0%, var(--bg) 45%);
  color: var(--text);
  min-height: 100vh;
}

.bg-aurora {
  position: fixed;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 35%, rgba(97, 137, 255, 0.24), transparent 35%),
    radial-gradient(circle at 80% 22%, rgba(88, 235, 200, 0.2), transparent 33%),
    radial-gradient(circle at 50% 88%, rgba(255, 94, 163, 0.16), transparent 32%);
  filter: blur(12px);
  animation: drift 18s linear infinite alternate;
  pointer-events: none;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 1%, 0) scale(1.05); }
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 18px 44px;
  display: grid;
  gap: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.traveload-hero {
  border-color: rgba(119, 145, 255, 0.45);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 10px;
}

.eyebrow {
  margin: 0;
  color: #95a7ff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

h1, h2 {
  margin: 0 0 10px;
}

.muted {
  margin: 0;
  color: var(--muted);
}

.service-chip {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
  color: #d5dcff;
  background: rgba(24, 32, 66, 0.6);
}

.user-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

label {
  color: var(--muted);
  font-size: 13px;
}

input[type="text"],
input[type="password"],
input[type="file"] {
  margin-top: 6px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(9, 12, 26, 0.9);
  color: var(--text);
}

select {
  margin-top: 6px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(9, 12, 26, 0.9);
  color: var(--text);
}

button {
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #5f8bff 0%, #6bb7ff 100%);
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

button.ghost {
  background: linear-gradient(135deg, #3b4063 0%, #56608f 100%);
}

button.danger {
  background: linear-gradient(135deg, #ff5f93 0%, #ff7f6c 100%);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.folder-nav {
  margin-bottom: 10px;
  justify-content: flex-start;
}

.folder-nav .toolbar-actions {
  align-items: center;
  flex-wrap: nowrap;
}

.logged-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
}

.sidebar {
  display: grid;
  gap: 12px;
  align-content: start;
}

.sidebar-links {
  display: grid;
  gap: 8px;
}

.sidebar-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(27, 34, 66, 0.56);
  border: 1px solid rgba(132, 145, 212, 0.22);
  color: #dbe4ff;
  font-size: 14px;
  cursor: pointer;
}

.sidebar-item.active {
  border-color: rgba(204, 83, 255, 0.64);
  background: linear-gradient(135deg, rgba(206, 84, 255, 0.2), rgba(99, 142, 255, 0.2));
}

.sidebar-foot {
  font-size: 12px;
}

.content-stack {
  display: grid;
  gap: 14px;
}

.pager {
  margin-top: 12px;
  justify-content: center;
}

.pager-controls {
  display: grid;
  grid-template-columns: 94px minmax(120px, auto) 94px;
  align-items: center;
  justify-items: center;
  gap: 8px;
}

.pager-controls .muted {
  margin: 0;
  text-align: center;
}

.upload-zone {
  margin: 10px 0;
  border: 1px dashed rgba(136, 161, 255, 0.6);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: rgba(11, 16, 35, 0.6);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.upload-zone.dragover {
  background: rgba(43, 74, 157, 0.3);
  transform: scale(1.01);
}

.upload-zone input[type="file"] {
  display: none;
}

.selected-files {
  margin-top: 10px;
  font-size: 12px;
  word-break: break-word;
}

.upload-result {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.upload-result a {
  color: #97c8ff;
  text-decoration: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border-bottom: 1px solid rgba(135, 146, 196, 0.28);
  padding: 10px;
  font-size: 14px;
}

th {
  color: #ccdbff;
  text-align: left;
}

td.actions {
  white-space: nowrap;
}

td.actions button {
  margin-right: 6px;
}

td.cf-link a {
  color: #95c9ff;
  text-decoration: none;
  word-break: break-all;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  color: #d9def7;
}

h3 {
  margin: 14px 0 10px;
  color: #d8e2ff;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.gallery-card {
  border: 1px solid rgba(128, 142, 212, 0.34);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(12, 17, 38, 0.74);
}

.gallery-card.clickable-card {
  display: block;
  text-decoration: none;
}

.gallery-card.clickable-card:hover {
  border-color: rgba(193, 95, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(193, 95, 255, 0.3);
}

.gallery-card img {
  display: block;
  width: 100%;
  height: 128px;
  object-fit: cover;
  background: rgba(4, 6, 14, 0.8);
}

.gallery-meta {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.gallery-name {
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

.gallery-link {
  color: #93c9ff;
  text-decoration: none;
  font-size: 12px;
}

.html-pill {
  display: inline-block;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(88, 126, 255, 0.24);
  color: #c7d8ff;
  font-size: 11px;
  font-weight: 700;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .logged-layout {
    grid-template-columns: 1fr;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
}
