/* MS Interiors — Admin Panel */
:root {
  --a-bg: #f6f7f9;
  --a-panel: #ffffff;
  --a-ink: #0e0d0b;
  --a-muted: #6b7280;
  --a-line: #e5e7eb;
  --a-line-strong: #d1d5db;
  --a-brass: #d4a253;
  --a-wood: #8a5a2b;
  --a-success: #059669;
  --a-danger: #dc2626;
  --a-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--a-bg);
  color: var(--a-ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============ LOGIN ============ */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(ellipse at top, rgba(212, 162, 83, .08), transparent 60%),
    var(--a-bg);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--a-panel);
  padding: 48px 40px;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.08);
  border: 1px solid var(--a-line);
}
.login-brand {
  text-align: center;
  margin-bottom: 36px;
}
.login-brand-mark {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  display: block;
  border-radius: 6px;
}
.login-brand h1 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}
.login-brand p {
  color: var(--a-muted);
  font-size: 13px;
  margin-top: 6px;
}
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 20px;
}
.alert-error {
  background: #fef2f2;
  color: var(--a-danger);
  border: 1px solid #fecaca;
}
.alert-success {
  background: #f0fdf4;
  color: var(--a-success);
  border: 1px solid #bbf7d0;
}

/* ============ APP SHELL ============ */
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--a-ink);
  color: rgba(255,255,255,.85);
  padding: 28px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  padding: 0 24px 28px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-brand .mark-img {
  width: 40px; height: 40px;
  border-radius: 4px;
  display: block;
  flex-shrink: 0;
}
.sidebar-brand .name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .02em;
}
.sidebar-brand .role {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--a-brass);
  margin-top: 2px;
}
.sidebar nav { padding: 24px 0; }
.nav-section {
  padding: 10px 24px 8px;
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  transition: all .2s;
  border-left: 2px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.04); color: white; }
.nav-item.active {
  background: rgba(212, 162, 83, .12);
  color: var(--a-brass);
  border-left-color: var(--a-brass);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}
.sidebar-footer a { color: rgba(255,255,255,.6); }
.sidebar-footer a:hover { color: white; }

/* ============ MAIN ============ */
.main { padding: 32px 40px; max-width: 100%; }

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.page-head h1 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.01em;
}
.page-head .sub {
  color: var(--a-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* ============ STATS ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.stat {
  background: var(--a-panel);
  padding: 24px;
  border-radius: 8px;
  border: 1px solid var(--a-line);
  box-shadow: var(--a-shadow);
}
.stat-label {
  color: var(--a-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}
.stat-value {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  color: var(--a-ink);
}
.stat-accent { color: var(--a-brass); font-size: 14px; margin-left: 8px; }

/* ============ CARDS / TABLES ============ */
.card {
  background: var(--a-panel);
  border-radius: 8px;
  border: 1px solid var(--a-line);
  box-shadow: var(--a-shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.card-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--a-line);
  display: flex; justify-content: space-between; align-items: center;
}
.card-head h2 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}
.card-body { padding: 24px; }

table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  padding: 14px 24px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--a-muted);
  background: #fafbfc;
  border-bottom: 1px solid var(--a-line);
  font-weight: 500;
}
td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--a-line);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfc; }

.thumb {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--a-line);
}
.thumb-placeholder {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, #eee, #ddd);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 12px;
  color: var(--a-muted);
  border-radius: 4px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 100px;
  font-weight: 500;
}
.badge-success { background: #d1fae5; color: var(--a-success); }
.badge-muted { background: #f3f4f6; color: var(--a-muted); }
.badge-brass { background: #fef3c7; color: #92400e; }

/* ============ FORMS / BUTTONS ============ */
.form-grid {
  display: grid;
  gap: 20px;
}
.form-grid.cols-2 {
  grid-template-columns: 1fr 1fr;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}
.field input[type=text],
.field input[type=email],
.field input[type=password],
.field input[type=number],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--a-line-strong);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--a-ink);
  background: white;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--a-brass);
  box-shadow: 0 0 0 3px rgba(212, 162, 83, .15);
}
.field textarea { resize: vertical; min-height: 90px; }
.field .help {
  font-size: 12px;
  color: var(--a-muted);
  margin-top: 4px;
}

.checkbox {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.checkbox input { width: 16px; height: 16px; cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
  transition: all .2s;
}
.btn-primary {
  background: var(--a-ink);
  color: white;
}
.btn-primary:hover { background: #2a2622; }
.btn-brass {
  background: var(--a-brass);
  color: var(--a-ink);
}
.btn-brass:hover { background: #c89243; }
.btn-ghost {
  background: white;
  color: var(--a-ink);
  border-color: var(--a-line-strong);
}
.btn-ghost:hover { background: #f9fafb; }
.btn-danger {
  background: white;
  color: var(--a-danger);
  border-color: #fecaca;
}
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.action-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.file-drop {
  border: 2px dashed var(--a-line-strong);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #fafbfc;
}
.file-drop:hover {
  border-color: var(--a-brass);
  background: #fefbf3;
}
.file-drop input { display: none; }
.file-drop .icon { font-size: 32px; margin-bottom: 8px; }
.file-drop p { color: var(--a-muted); font-size: 13px; }
.file-drop .filename {
  font-weight: 500;
  color: var(--a-ink);
  margin-top: 8px;
}

.image-preview {
  width: 200px;
  height: 150px;
  border: 1px solid var(--a-line);
  border-radius: 6px;
  object-fit: cover;
  margin-top: 12px;
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--a-muted);
}
.empty-state h3 {
  font-family: var(--serif);
  color: var(--a-ink);
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: 500;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .form-grid.cols-2 { grid-template-columns: 1fr; }
  .main { padding: 24px 20px; }
  table { font-size: 13px; }
  th, td { padding: 12px 16px; }
}
