/* Island Living Channel — Admin design system (dark navy + gold) */
:root {
  --navy-900: #061325;
  --navy-800: #0a1d36;
  --navy-700: #0e2747;
  --navy-600: #143257;
  --line: rgba(255, 255, 255, 0.08);
  --gold: #f5b50a;
  --gold-soft: #ffce4d;
  --teal: #18b9c9;
  --green: #2bd07a;
  --red: #ff6b5e;
  --amber: #ffb020;
  --text: #eaf2fb;
  --muted: #8fa6c2;
  --card: #0e2340;
  --card-2: #12294a;
  --radius: 16px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(120% 90% at 100% 0%, #0c2c4d 0%, transparent 60%), var(--navy-900);
  background-color: var(--navy-900);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
img { display: block; max-width: 100%; }
input, select, textarea { font-family: inherit; }

/* ---------- Brand / logo ---------- */
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  background: linear-gradient(150deg, #ffd24d, #f5840a 55%, #0e6fb0);
  display: grid; place-items: center; font-size: 1.25rem;
  box-shadow: 0 6px 16px rgba(245, 132, 10, 0.35);
}
.brand b { font-weight: 800; letter-spacing: 0.02em; font-size: 0.98rem; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: 0.62rem; letter-spacing: 0.22em; font-weight: 700; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 6px 8px 16px; }
.nav-section { color: var(--muted); font-size: 0.66rem; letter-spacing: 0.16em; font-weight: 800; margin: 16px 10px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 11px;
  color: var(--muted); font-weight: 600; font-size: 0.92rem; transition: all 0.15s; cursor: pointer;
}
.nav-item .ico { width: 20px; text-align: center; font-size: 1.05rem; }
.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.nav-item.active { background: linear-gradient(135deg, rgba(245, 181, 10, 0.16), rgba(245, 181, 10, 0.04)); color: var(--gold-soft); }
.nav-item.active .ico { filter: drop-shadow(0 0 6px rgba(245, 181, 10, 0.5)); }
.nav-badge { margin-left: auto; background: var(--gold); color: #2a1a00; font-weight: 800; font-size: 0.7rem; padding: 1px 8px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }

.main { display: flex; flex-direction: column; min-width: 0; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 16px 26px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  background: rgba(6, 19, 37, 0.8); backdrop-filter: blur(10px);
}
.topbar h1 { font-size: 1.25rem; font-weight: 800; }
.topbar .sub { color: var(--muted); font-size: 0.82rem; margin-top: 1px; }
.search-mini {
  margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--card);
  border: 1px solid var(--line); border-radius: 11px; padding: 9px 13px; color: var(--muted); width: 260px;
}
.search-mini input { background: transparent; border: none; outline: none; color: var(--text); width: 100%; font-size: 0.9rem; }
.topbar .avatar {
  width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), #0e6fb0);
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 0.85rem;
}
.icon-btn { width: 38px; height: 38px; border-radius: 11px; background: var(--card); border: 1px solid var(--line); color: var(--text); display: grid; place-items: center; position: relative; }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

.content { padding: 24px 26px 60px; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(245,181,10,0.16), transparent 70%); }
.stat .label { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.stat .value { font-size: 1.9rem; font-weight: 800; margin-top: 8px; letter-spacing: -0.01em; }
.stat .delta { font-size: 0.78rem; font-weight: 700; margin-top: 6px; }
.stat .delta.up { color: var(--green); }
.stat .delta.down { color: var(--red); }
.stat .ico-badge { position: absolute; top: 16px; right: 16px; font-size: 1.3rem; opacity: 0.9; }

/* ---------- Panels / cards ---------- */
.card-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-box .head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-box .head h2 { font-size: 1.02rem; font-weight: 800; }
.card-box .head .link { margin-left: auto; color: var(--gold-soft); font-size: 0.84rem; font-weight: 700; cursor: pointer; }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; padding: 12px 18px; border-bottom: 1px solid var(--line); }
tbody td { padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 0.9rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.cell-main { font-weight: 700; }
.cell-sub { color: var(--muted); font-size: 0.8rem; }
.cell-flex { display: flex; align-items: center; gap: 11px; }
.thumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: none; background: var(--card-2); }

/* ---------- Badges / pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; }
.pill.green { background: rgba(43, 208, 122, 0.14); color: var(--green); }
.pill.amber { background: rgba(255, 176, 32, 0.16); color: var(--amber); }
.pill.red { background: rgba(255, 107, 94, 0.14); color: var(--red); }
.pill.blue { background: rgba(24, 185, 201, 0.14); color: var(--teal); }
.pill.gray { background: rgba(143, 166, 194, 0.14); color: var(--muted); }
.pill .dotpill { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 11px; font-weight: 700; font-size: 0.88rem; transition: all 0.15s; }
.btn.gold { background: linear-gradient(135deg, var(--gold), #f5840a); color: #2a1a00; box-shadow: 0 8px 18px rgba(245, 132, 10, 0.28); }
.btn.gold:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--card); border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: rgba(255,255,255,0.2); }
.btn.green { background: rgba(43, 208, 122, 0.16); color: var(--green); border: 1px solid rgba(43,208,122,0.3); }
.btn.green:hover { background: rgba(43,208,122,0.26); }
.btn.red { background: rgba(255, 107, 94, 0.14); color: var(--red); border: 1px solid rgba(255,107,94,0.3); }
.btn.red:hover { background: rgba(255,107,94,0.24); }
.btn.sm { padding: 7px 12px; font-size: 0.8rem; border-radius: 9px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.fld label { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.fld input, .fld select, .fld textarea {
  width: 100%; background: var(--navy-900); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 13px; color: var(--text); font-size: 0.92rem; outline: none;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--gold); }
.fld textarea { resize: vertical; min-height: 90px; }

/* ---------- Toggle ---------- */
.switch { position: relative; width: 44px; height: 25px; border-radius: 999px; background: rgba(255,255,255,0.14); cursor: pointer; transition: background 0.18s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform 0.18s; }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(19px); }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(3, 10, 20, 0.7); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.overlay.open { display: flex; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 20px; width: min(620px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); animation: pop 0.2s ease; }
@keyframes pop { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal .mhead { display: flex; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal .mhead h3 { font-size: 1.1rem; font-weight: 800; }
.modal .mhead .x { margin-left: auto; width: 34px; height: 34px; border-radius: 9px; background: var(--navy-900); display: grid; place-items: center; color: var(--muted); }
.modal .mbody { padding: 20px; }
.modal .mfoot { padding: 16px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Misc ---------- */
.rating-stars { color: var(--gold); letter-spacing: 1px; }
.muted { color: var(--muted); }
.section-gap { margin-top: 22px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.tag-input { display: flex; gap: 8px; flex-wrap: wrap; }
.progress { height: 7px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #f5840a); }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }

/* hide views by default; .view.active shown */
.view { display: none; }
.view.active { display: block; animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Mobile ---------- */
.hamburger { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; width: 256px; transform: translateX(-100%); transition: transform 0.2s; }
  .sidebar.show { transform: none; }
  .hamburger { display: grid; }
  .search-mini { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}
