:root {
  --navy-950: #050d24;
  --navy-900: #0a1636;
  --navy-800: #0f1f45;
  --navy-700: #152a5c;
  --orange-600: #d8500a;
  --orange-500: #f5610a;
  --orange-400: #ff7d2e;
  --orange-100: #ffe7d6;
  --bg: #f5f6fa;
  --border: rgba(10, 22, 54, 0.1);
  --text: #0a1636;
  --text-muted: rgba(10, 22, 54, 0.65);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.brand span { color: var(--orange-500); }
.signed-in { font-size: 14px; color: var(--text-muted); }

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-orange { background: var(--orange-500); color: #fff; }
.btn-orange:hover { background: var(--orange-400); }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: rgba(10,22,54,0.05); }
.btn-link { background: none; border: none; padding: 0; color: var(--orange-600); cursor: pointer; font-size: 14px; text-decoration: none; }
.btn-danger { color: #dc2626; background: none; border: none; cursor: pointer; padding: 0; font-size: 14px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 10px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.nav a {
  white-space: nowrap;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
}
.nav a.active { background: var(--orange-500); color: #fff; }
.nav a:not(.active):hover { background: rgba(10,22,54,0.05); }

.main { max-width: 1120px; margin: 0 auto; padding: 32px 20px; }

h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 0 0 12px; }
.subtitle { color: var(--text-muted); font-size: 14px; margin: 0 0 24px; }

.card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px; text-decoration: none; color: inherit; }
.stat-card.accent { background: var(--orange-100); border-color: rgba(245,97,10,0.3); }
.stat-value { font-size: 28px; font-weight: 700; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 14px; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); }
td { padding: 12px 14px; border-bottom: 1px solid rgba(10,22,54,0.05); vertical-align: middle; }
tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-gray { background: rgba(10,22,54,0.08); color: var(--text); }
.badge-orange { background: var(--orange-100); color: var(--orange-600); }
.badge-blue { background: #dbeafe; color: #1d4ed8; }

label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="file"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange-500); box-shadow: 0 0 0 2px rgba(245,97,10,0.2); }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.error-text { color: #dc2626; font-size: 14px; font-weight: 500; margin: 8px 0; }
.success-text { color: #16a34a; font-size: 14px; font-weight: 500; margin: 8px 0; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy-900); padding: 24px; }
.login-card { width: 100%; max-width: 360px; background: #fff; border-radius: 16px; padding: 32px; text-align: center; }
.login-card img { width: 64px; height: 64px; border-radius: 999px; border: 2px solid var(--orange-500); }
.login-card form { text-align: left; margin-top: 24px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.gallery-item { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 1; background: #eee; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item form { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.9); border-radius: 999px; padding: 4px 10px; }
.gallery-caption { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); color: #fff; font-size: 12px; padding: 6px 8px; }

.actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; }
.upload-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.thumb { height: 130px; width: auto; border-radius: 8px; border: 1px solid var(--border); margin: 8px 0; display: block; }
