/* ============ Reset / base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: #070b14; color: #e2e8f0; }
a { color: #22d3ee; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; }
hr { border: 0; border-top: 1px solid rgba(255,255,255,.08); margin: .75rem 0; }
.muted { color: #94a3b8; }

/* ============ Auth pages ============ */
.auth-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at top left, rgba(34,211,238,.18), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(99,102,241,.15), transparent 60%),
    #070b14;
}
.auth-card {
  width: 100%; max-width: 440px;
  background: rgba(11,18,32,.85); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
}
.auth-logo { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.5rem; }
.auth-logo h1 { font-size: 1.35rem; font-weight: 700; }
.auth-logo h1 span { color: #22d3ee; }
.auth-logo p { margin: .15rem 0 0; font-size: .85rem; color: #94a3b8; }
.logo-badge {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #22d3ee, #0e7490);
  color: #070b14;
  box-shadow: 0 8px 24px -8px rgba(34,211,238,.6);
}
.auth-card label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .35rem; color: #cbd5e1; letter-spacing: .02em; }
.auth-card input {
  width: 100%; padding: .85rem 1rem; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  color: #fff; font-size: .95rem; outline: none; transition: .2s;
}
.auth-card input:focus { border-color: #22d3ee; background: rgba(34,211,238,.06); box-shadow: 0 0 0 4px rgba(34,211,238,.15); }
.otp-input { text-align: center; letter-spacing: .85rem; font-size: 1.5rem; font-weight: 700; font-family: 'Courier New', monospace; }
.auth-card button[type=submit] {
  margin-top: 1rem; width: 100%; padding: .9rem 1.1rem; border: 0;
  background: #22d3ee; color: #070b14; border-radius: 999px;
  font-weight: 700; font-size: .95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  box-shadow: 0 12px 24px -10px rgba(34,211,238,.6);
  transition: .2s;
}
.auth-card button[type=submit]:hover { background: #67e8f9; }
.auth-card button[type=submit]:disabled { opacity: .65; cursor: not-allowed; }
.msg { margin: .85rem 0 0; font-size: .85rem; }
.msg.ok  { color: #34d399; }
.msg.err { color: #f87171; }
.auth-info {
  margin-top: 1.5rem; padding: 1rem 1.2rem; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  font-size: .85rem; color: #cbd5e1;
}
.auth-info ol { margin: .5rem 0 .5rem 1.1rem; padding: 0; }
.auth-info li { margin: .25rem 0; }
.auth-info .muted { font-size: .75rem; margin: .5rem 0 0; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.25rem; font-size: .85rem; color: #94a3b8; }
.back-link:hover { color: #22d3ee; }

/* ============ Dashboard layout ============ */
.dash-body { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: #0b1220; border-right: 1px solid rgba(255,255,255,.06);
  padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: .25rem; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { display: flex; align-items: center; gap: .75rem; padding: .25rem .5rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.06); margin-bottom: 1rem; }
.sidebar .brand strong { display: block; color: #fff; font-size: 1.05rem; }
.sidebar .brand span { font-size: .7rem; color: #67e8f9; letter-spacing: .15em; text-transform: uppercase; }
.sidebar nav { display: flex; flex-direction: column; gap: .15rem; overflow-y: auto; flex: 1; }
.nav-tab {
  text-align: left; padding: .65rem .85rem; border-radius: 10px; border: 0;
  background: transparent; color: #cbd5e1; display: flex; align-items: center; gap: .65rem; font-size: .9rem;
  transition: .15s;
}
.nav-tab:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-tab.active { background: rgba(34,211,238,.12); color: #22d3ee; }
.nav-tab i { width: 18px; text-align: center; }
.sidebar-foot { padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; gap: .35rem; }
.ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .55rem .85rem; border-radius: 10px;
  background: rgba(255,255,255,.04); color: #cbd5e1; border: 1px solid rgba(255,255,255,.08); font-size: .85rem;
  text-decoration: none;
}
.ghost-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.ghost-btn.danger { color: #fca5a5; }
.ghost-btn.danger:hover { background: rgba(248,113,113,.1); color: #fca5a5; }

.dash-main { padding: 2rem 2.5rem; max-width: 100%; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.topbar h1 { font-size: 1.7rem; font-weight: 700; color: #fff; }
.topbar p { margin: .25rem 0 0; }
.topbar-right { display: flex; align-items: center; gap: .65rem; }
.user-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .8rem; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  font-size: .8rem; color: #cbd5e1;
}
.save-status { font-size: .8rem; color: #94a3b8; min-width: 90px; text-align: right; }
.save-status.saving { color: #fbbf24; }
.save-status.saved { color: #34d399; }
.save-status.err   { color: #f87171; }

/* ============ Generic UI ============ */
.view { display: grid; gap: 1.25rem; }
.card {
  background: #0b1220; border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 1.5rem;
}
.card h2 { font-size: 1.05rem; margin-bottom: .25rem; color: #fff; }
.card .sub { margin: 0 0 1.25rem; font-size: .85rem; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .78rem; font-weight: 600; color: #cbd5e1; margin-bottom: .35rem; letter-spacing: .02em; }
.field input, .field textarea, .field select {
  width: 100%; padding: .65rem .85rem; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
  color: #fff; font-size: .9rem; outline: none; transition: .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,.15); }
.field textarea { resize: vertical; min-height: 90px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } .dash-body { grid-template-columns: 1fr; } .sidebar { position: relative; height: auto; } .dash-main { padding: 1.25rem; } }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem; border-radius: 10px; border: 0; font-weight: 600; font-size: .85rem; cursor: pointer;
  background: #22d3ee; color: #070b14; transition: .15s;
}
.btn:hover { background: #67e8f9; }
.btn.secondary { background: rgba(255,255,255,.06); color: #e2e8f0; }
.btn.secondary:hover { background: rgba(255,255,255,.12); }
.btn.danger { background: rgba(248,113,113,.15); color: #fca5a5; }
.btn.danger:hover { background: rgba(248,113,113,.25); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Items list (services, projects, team, gallery) */
.items { display: grid; gap: .75rem; }
.item {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; padding: 1rem;
  display: grid; grid-template-columns: 1fr auto; gap: .75rem;
  align-items: center;
}
.item .meta { font-size: .85rem; color: #cbd5e1; }
.item .meta strong { color: #fff; display: block; margin-bottom: .15rem; }
.item .meta .badge {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px;
  background: rgba(34,211,238,.12); color: #67e8f9; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
}
.item-edit { display: grid; gap: .65rem; padding-top: .5rem; margin-top: .5rem; border-top: 1px dashed rgba(255,255,255,.08); }
.item-edit.hidden { display: none; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 1rem 1.25rem;
}
.stat .label { font-size: .7rem; color: #67e8f9; letter-spacing: .15em; text-transform: uppercase; }
.stat .value { font-size: 1.5rem; font-weight: 700; color: #fff; margin-top: .25rem; }

.table {
  width: 100%; border-collapse: collapse; font-size: .85rem;
}
.table th, .table td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,.06); }
.table th { color: #94a3b8; font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }

.toast {
  position: fixed; bottom: 1.25rem; right: 1.25rem;
  background: #0f172a; color: #fff; padding: .75rem 1.1rem; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  font-size: .85rem; box-shadow: 0 12px 30px -10px rgba(0,0,0,.6);
  transform: translateY(20px); opacity: 0; transition: .25s; pointer-events: none;
  z-index: 100;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.err { border-color: rgba(248,113,113,.4); }
.toast.ok  { border-color: rgba(52,211,153,.4); }

/* Tag pill for icon/category */
.tag {
  display: inline-block; padding: .15rem .5rem; background: rgba(255,255,255,.06);
  border-radius: 6px; font-size: .72rem; color: #cbd5e1; margin-right: .35rem;
}

/* Color swatch */
.swatch {
  display: inline-block; width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15); vertical-align: middle;
}
