/* WEDA Landing — shared styles for landing page + admin */
:root {
  --accent: #d4af37;
  --bg: #0b1220;
  --bg2: #0f1b33;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.10);
  --text: #eaf0fb;
  --muted: #9fb0cc;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg2), var(--bg));
  min-height: 100vh;
}

/* ---------- Landing page ---------- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  gap: 20px;
}
.card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 28px;
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.logo-wrap { margin-bottom: 14px; }
.logo { max-width: 240px; width: 70%; max-height: 130px; object-fit: contain; border-radius: 14px; background: #fff; padding: 10px 14px; }
.title { font-size: 28px; margin: 6px 0 6px; font-weight: 800; letter-spacing: -0.02em; }
.subtitle { color: var(--muted); margin: 0 0 26px; font-size: 15px; line-height: 1.5; }

.btn-grid { display: flex; flex-direction: column; gap: 12px; }
.big-btn {
  --btn: var(--accent);
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #111;
  background: linear-gradient(180deg, color-mix(in srgb, var(--btn) 92%, #fff), var(--btn));
  border: 1px solid color-mix(in srgb, var(--btn) 70%, #000);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-weight: 700;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  text-align: left;
}
.big-btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36); }
.big-btn:active { transform: translateY(0); }
button.big-btn { width: 100%; cursor: pointer; font-family: inherit; }
.btn-icon { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.btn-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.btn-name { font-size: 16px; }
.btn-desc { font-size: 12px; font-weight: 500; opacity: 0.75; }
.btn-count { font-size: 12px; font-weight: 700; background: rgba(0,0,0,0.18); padding: 3px 9px; border-radius: 999px; flex: 0 0 auto; }

/* File popup (landing) */
.sheet {
  width: 100%; max-width: 460px; background: #0f1a2e; border: 1px solid var(--border);
  border-radius: 18px; padding: 20px; max-height: 82vh; overflow: auto;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-head h3 { margin: 0; font-size: 18px; }
.sheet-head .x { background: transparent; border: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.sheet-sub { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.file-row {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; transition: background .12s;
}
.file-row:hover { background: rgba(255,255,255,0.09); }
.file-ico { font-size: 18px; }
.file-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-open { color: var(--accent); font-size: 13px; font-weight: 700; }
.empty { color: var(--muted); padding: 20px; }
.footer { color: var(--muted); font-size: 13px; }

/* ---------- Admin ---------- */
.admin-body { display: block; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2); position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 18px; margin: 0; }
.wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 80px; }
.section { margin-bottom: 34px; }
.section h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 12px; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 5px; }
input, textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text);
  font-size: 14px; font-family: inherit;
}
input[type=color] { padding: 4px; height: 42px; }
textarea { min-height: 64px; resize: vertical; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.06);
  color: var(--text); padding: 9px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: filter .12s;
}
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: var(--accent); color: #111; border-color: transparent; }
.btn.danger { background: #b23b3b; color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 10px; font-size: 13px; }

.card-list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
}
.item .drag { cursor: grab; color: var(--muted); font-size: 18px; user-select: none; }
.item .swatch { width: 26px; height: 26px; border-radius: 7px; flex: 0 0 auto; border: 1px solid var(--border); display: grid; place-items: center; font-size: 15px; }
.item .meta { flex: 1; min-width: 0; }
.item .meta .nm { font-weight: 700; }
.item .meta .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.hidden-btn { opacity: 0.5; }
.item .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.item.dragging { opacity: 0.4; }

.empty-state { text-align: center; color: var(--muted); padding: 30px; border: 1px dashed var(--border); border-radius: 12px; }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 360px; background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 30px 26px; text-align: center; }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { width: 100%; max-width: 520px; background: #0f1a2e; border: 1px solid var(--border); border-radius: 18px; padding: 22px; max-height: 90vh; overflow: auto; }
.modal h3 { margin: 0 0 16px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #16233c; border: 1px solid var(--border); color: var(--text); padding: 11px 18px; border-radius: 10px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.toast.err { background: #5a2626; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.res-list { display: flex; flex-direction: column; gap: 6px; }
.res-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.res-ico { flex: 0 0 auto; }
.res-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.upload-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
a.link { color: var(--accent); }
