/* Adam's Service Unified Design System */
:root {
  --wine: #651F39;
  --wine-dark: #491428;
  --wine-light: #fbf4f6;
  --gold: #C5A059;
  --gold-hover: #b38e47;
  --bg: #f8f6f7;
  --panel: #ffffff;
  --text: #2d2427;
  --text-muted: #7d6e74;
  --border: #ebdbe0;
  --green: #167758;
  --green-bg: #eefbf5;
  --red: #9b2747;
  --red-bg: #fdf2f4;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* App Shell Layout */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px;
  background: #2b0e19;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-family: Manrope, sans-serif;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 25px;
}
.brand img { height: 32px; }

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.08);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--wine-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
}
.user-card strong { display: block; font-size: 13px; }
.user-card small { color: #d4b8c2; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }

nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-label { font-size: 10px; text-transform: uppercase; color: #a38590; margin: 15px 8px 5px; font-weight: 700; letter-spacing: 0.8px; }
nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #e2d1d7;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 9px;
  transition: all 0.18s ease;
}
nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
nav a.active { background: var(--wine); color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: #f694ab;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  margin-top: 15px;
}
.logout:hover { background: rgba(246,148,171,0.1); }

.main { flex: 1; padding: 25px 35px; max-width: 1350px; }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}
.menu-toggle { display: none; background: 0; border: 0; font-size: 24px; cursor: pointer; color: var(--wine); }
.crumb { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.crumb span { color: #c4b5bb; margin: 0 4px; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.quiet-link { color: var(--wine); text-decoration: none; font-size: 13px; font-weight: 600; }
.top-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--wine); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }

/* Hero Panel */
.hero {
  background: linear-gradient(135deg, #491428 0%, #651f39 100%);
  color: #fff;
  padding: 30px 35px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 30px rgba(101,31,57,0.18);
  margin-bottom: 25px;
}
.eyebrow { font-size: 11px; text-transform: uppercase; color: var(--gold); font-weight: 800; letter-spacing: 1px; margin: 0 0 6px; }
.hero h1 { font-family: Manrope, sans-serif; font-size: 26px; margin: 0 0 8px; font-weight: 800; }
.hero p { color: #e8d7dc; margin: 0; font-size: 14px; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--wine);
  color: #fff;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  line-height: 1.2;
}
.button:hover { background: var(--wine-dark); transform: translateY(-1px); }
.button-gold { background: var(--gold); color: var(--wine-dark); }
.button-gold:hover { background: var(--gold-hover); }
.button-green { background: var(--green); color: #fff; }
.button-small { padding: 6px 11px; font-size: 11px; border-radius: 7px; }
.button-outline-danger { background: transparent; color: var(--red); border: 1px solid #f6b2c2; }
.button-outline-danger:hover { background: var(--red-bg); }

/* Stat Grid */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 25px; }
.stat-card {
  background: var(--panel);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.stat-icon { font-size: 20px; display: block; margin-bottom: 10px; }
.stat-card p { margin: 0 0 4px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.stat-card strong { font-family: Manrope, sans-serif; font-size: 24px; color: var(--wine); display: block; }
.stat-card small { font-size: 11px; color: #8e7f85; }

/* Panels & Cards */
.panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 25px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0,0,0,0.02);
}
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.panel-head h2 { font-family: Manrope, sans-serif; font-size: 18px; margin: 0; color: var(--wine); }
.panel-head a { color: var(--wine); text-decoration: none; font-size: 12px; font-weight: 700; }

.content-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }

/* Tables */
.table-responsive { overflow-x: auto; margin-top: 10px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.data-table th { padding: 12px 14px; background: #fbf7f8; color: #6b5a61; font-weight: 700; border-bottom: 1px solid var(--border); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid #f3e9ec; vertical-align: middle; }
.data-table tr:hover td { background: #fdfafb; }

/* Badges & Tags */
.badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.badge-gold { background: #fdf6e7; color: #8f6a22; }
.badge-wine { background: var(--wine-light); color: var(--wine); }
.badge-green { background: var(--green-bg); color: var(--green); }
.tag { display: inline-block; padding: 2px 7px; border-radius: 5px; background: #f2e9ed; color: #5e4a52; font-size: 10px; font-weight: 600; }
.tag-wine { background: var(--wine); color: #fff; }

.status { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.status-active { background: var(--green-bg); color: var(--green); }
.status-inactive { background: #f3f4f6; color: #6b7280; }

/* Banners */
.banner { padding: 12px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.banner-success { background: var(--green-bg); color: var(--green); border: 1px solid #cceee1; }
.banner-error { background: var(--red-bg); color: var(--red); border: 1px solid #f6c8d3; }

/* Forms */
.form-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
label { display: block; font-size: 12px; font-weight: 700; color: #55444a; margin-bottom: 5px; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  transition: border 0.18s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--wine); }
.check-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #443339; cursor: pointer; }
.check-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--wine); cursor: pointer; }

/* Accordion & Details */
.accordion-box { background: #fcf9fa; border: 1px solid var(--border); border-radius: 12px; padding: 15px; }
.accordion-box summary { font-weight: 700; color: var(--wine); cursor: pointer; font-size: 14px; }
.inline-details summary { font-size: 11px; font-weight: 700; color: var(--wine); cursor: pointer; }
.details-content { margin-top: 10px; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }

/* Maintenance Cards */
.card-maintenance { background: #fcf9fa; padding: 15px; border-radius: 12px; border: 1px solid var(--border); }
.card-maintenance h4 { margin: 0 0 6px; font-size: 13px; color: var(--wine); }
.card-maintenance p { font-size: 11px; color: var(--text-muted); margin: 0 0 12px; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f4ebed; }
.timeline li span { width: 10px; height: 10px; border-radius: 50%; background: var(--wine); margin-top: 4px; flex-shrink: 0; }
.timeline li strong { display: block; font-size: 13px; }
.timeline li p { margin: 2px 0; font-size: 12px; color: var(--text-muted); }
.timeline li small { font-size: 10px; color: #a19398; }

/* Responsive Media Queries */
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 999; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: block; }
  .main { padding: 18px; }
  .content-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: flex-start; gap: 15px; }
}
