/* =========================
   THEME VARIABLES
========================= */
:root {
  --bg: #0b0f19;
  --panel: #111827;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --danger: #ef4444;
}

/* =========================
   BASE RESET
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #0f172a, var(--bg));
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

h1, h2 {
  margin: 0;
}

/* =========================
   LAYOUT
========================= */
.app {
  max-width: 900px;
  margin: auto;
  padding: 2rem 1.5rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}

/* =========================
   FORMS
========================= */
.add-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
}

input {
  background: #020617;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 700px) {
  .add-form {
    grid-template-columns: 1fr;
  }
}

/* =========================
   BUTTONS
========================= */
.btn {
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn.primary {
  background: var(--accent);
  color: #020617;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
}

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

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

button:hover {
  color: var(--text);
  border-color: var(--accent);
}

button.danger {
  border-color: var(--danger);
  color: var(--danger);
}

/* =========================
   MENU LIST (PUBLIC + ADMIN)
========================= */
.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: #1e1e1e;
  border-radius: 8px;
  user-select: none;
}

.menu-list li[draggable="true"] {
  cursor: grab;
}

.menu-list li:hover {
  background: #262626;
}

/* Public links */
.menu-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* Admin title */
.menu-list .title {
  flex: 1;
  cursor: pointer;
}

/* URL */
.menu-list small {
  color: var(--muted);
  margin-left: 6px;
}

/* =========================
   DRAG & DROP
========================= */
.drag-handle {
  cursor: grab;
  user-select: none;
  opacity: 0.6;
  padding: 4px 6px;
}

.drag-handle:active {
  cursor: grabbing;
}

.dragging {
  opacity: 0.4;
}

.dragging * {
  pointer-events: none;
}

.drag-placeholder {
  border: 2px dashed rgba(255,255,255,0.25);
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  margin: 4px 0;
  min-height: 44px;
}

/* =========================
   STATS / CLOCK
========================= */
.stats p {
  margin: 0.4rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}


/* =========================
   TOASTS
========================= */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #222;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.3s;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #a33;
}

input {
  background: #020617 !important;
  color: var(--text) !important;
  border: 1px solid var(--border);
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
}

/* Prevent autofill from changing colors */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-internal-autofill-selected {
    background-color: #020617 !important;
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text) !important;
    box-shadow: 0 0 0px 1000px #020617 inset;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.topbar-links {
  display: flex;
  gap: 0rem; /* space between the links */
}

.topbar-links a:last-child {
  margin-left: 0rem; /* optional: separate logout slightly */
}
