:root{
  --brown:#5C3A21; --brown-2:#4b2f1a; --tan:#C29B77; --bg:#F8F4F0; --text:#1a1a1a;
  --muted:#6b5a4a; --accent:#A16B43; --card-radius:14px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:"Poppins",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial;
  background:var(--bg);
  color:var(--text);
}
.admin-layout { display: flex; min-height: 100vh; background: var(--bg); }

/* ─── Sidebar ───────────────────────────────────────── */
.sidebar {
  width: 260px; background: linear-gradient(180deg, #2b1a0e 0%, #1f1309 100%);
  color: #fff; padding: 24px;
  display: flex; flex-direction: column; gap: 30px;
  position: sticky; top: 0; height: 100vh;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15); z-index: 100;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }
.sidebar-nav hr { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 12px 0; }
.sidebar-footer { padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 12px; }
.sidebar-footer #admin-email { font-size: 13px; opacity: 0.7; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }

.brand{display:flex;gap:12px;align-items:center;font-weight:700}
.brand .logo{
  width:42px;height:42px;border-radius:12px;
  background:linear-gradient(135deg, var(--tan) 0%, var(--accent) 100%);
  display:flex;align-items:center;justify-content:center;color:#fff;font-family:"Rye";font-size:22px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tab-btn {
  background: transparent; border: 1.5px solid transparent; color: rgba(255,255,255,0.55);
  padding: 11px 16px; border-radius: 10px; cursor: pointer; font-weight: 600; text-align: left;
  transition: all 0.25s ease; font-size: 13.5px; letter-spacing: 0.2px;
}
.tab-btn:hover { background: rgba(255, 255, 255, 0.07); color: rgba(255,255,255,0.9); }
.tab-btn.active {
  background: linear-gradient(135deg, var(--accent) 0%, #8a5a33 100%);
  color: #fff; border-color: rgba(255,255,255,0.15);
  box-shadow: 0 4px 14px rgba(161,107,67,0.4);
}

/* ─── Main Content ──────────────────────────────────── */
.main-content { flex-grow: 1; overflow-y: auto; padding: 28px 32px; }
.container { max-width: 1400px; margin: 0 auto; }

/* ─── Buttons ───────────────────────────────────────── */
.btn,.icon-btn{
  border-radius: 10px; padding: 10px 18px; border: 1.5px solid #e0d2c4;
  background: #fff; cursor: pointer; font-weight: 600; font-size: 13px;
  transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 8px;
}
.btn{
  background: linear-gradient(135deg, var(--accent) 0%, #8a5a33 100%);
  color: #fff; border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(161,107,67,0.25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(161,107,67,0.35); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }

.icon-btn:hover { background: #faf6f1; border-color: var(--tan); }

.logout-link { background: rgba(255,255,255,0.04); color: #ff8a8a; border-color: rgba(255,138,138,0.15); width: 100%; justify-content: center; font-size: 12px; }
.logout-link:hover { background: #8b0000; color: #fff; border-color: #8b0000; }

/* ─── Cards ─────────────────────────────────────────── */
.card {
  background: #fff; border-radius: 18px; border: 1px solid #eae3db;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04); padding: 28px; margin-bottom: 24px;
}
h2,h3,h4 { font-family: "Roboto Slab"; margin: 0 0 16px; color: var(--brown); }
h3 { font-size: 20px; padding-bottom: 12px; border-bottom: 2px solid #f0e8df; margin-bottom: 20px; }
h4 { font-size: 15px; color: var(--accent); margin-bottom: 14px; }

/* ─── Forms ─────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
label { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; }
input,textarea,select {
  border-radius: 10px; border: 1.5px solid #e4d9cc; padding: 10px 14px;
  font-family: inherit; font-size: 14px; background: #fdfcfa;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(161,107,67,0.1);
  background: #fff;
}
textarea { min-height: 90px; resize: vertical; }

.grid-2{ display: grid; grid-template-columns: 360px 1fr; gap: 32px; }
@media (max-width:1100px){ .grid-2{ grid-template-columns: 1fr; } }

/* ─── Tables ────────────────────────────────────────── */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; margin-top: 8px; border-radius: 12px; overflow: hidden; border: 1px solid #eee; }
th,td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #f0ebe5; }
th { background: #f9f5f0; font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: 10.5px; letter-spacing: 1px; }
tr:nth-child(even) td { background: #fdfcfa; }
tr:hover td { background: #faf5ef; }
td:first-child { font-weight: 600; }

/* ─── Status Pills ──────────────────────────────────── */
.status-pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.3px; }
.status-placed, .status-pending { background: #fef3c7; color: #92400e; }
.status-shipped { background: #d1fae5; color: #065f46; }
.status-delivered { background: #dbeafe; color: #1e40af; }
.status-cancelled, .status-returned { background: #fee2e2; color: #b91c1c; }

/* ─── Pagination ────────────────────────────────────── */
.pagination-bar {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 12px 0; margin: 8px 0;
}
.page-btn {
  border-radius: 8px; padding: 7px 16px; border: 1.5px solid #e0d2c4;
  background: #fff; cursor: pointer; font-weight: 600; font-size: 12px;
  transition: all 0.2s;
}
.page-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-info { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ─── Utility ───────────────────────────────────────── */
.muted{font-size:13px;color:var(--muted)}
.tag{display:inline-block;padding:2px 8px;border-radius:999px;background:#f3ede6;font-size:11px;margin-right:4px;color:var(--muted)}
.icon-btn.danger { color: #dc2626; border-color: #fecaca; }
.icon-btn.danger:hover { background: #fef2f2; color: #b91c1c; }
.danger{color:#b22}

/* ─── Login ─────────────────────────────────────────── */
#login-view {
  margin-top: 10vh !important;
}
#login-view h2 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 24px;
}
#login-view .btn {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 14px;
  margin-top: 8px;
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 800px) {
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; padding: 16px; gap: 16px; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .tab-btn { padding: 8px 12px; font-size: 12px; }
  .main-content { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; gap: 20px; }
  table { font-size: 11px; }
  th,td { padding: 8px 6px; }
}
