:root {
  --brand: #398FFC;
  --brand-dark: #2b6fd1;
  --text: #3B3D42;
  --bg: #F4F6F9;
  --card: #ffffff;
  --border: #E1E5EB;
  --ok: #2E9E5B;
  --danger: #D64545;
  --warn: #E0A22A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Montserrat', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
}
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; }

.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav .nav-link {
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.mainnav .nav-link:hover { background: #eef3fc; text-decoration: none; }
.mainnav .nav-link.active { background: var(--brand); color: #fff; }

.userbox { display: flex; align-items: center; gap: 12px; font-size: 14px; }

.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.footer {
  text-align: center;
  color: #8b93a0;
  font-size: 12px;
  padding: 20px;
}

h1 { font-size: 22px; margin: 0 0 18px; }
h2 { font-size: 17px; margin: 0 0 12px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}
.stat .label { font-size: 12px; color: #8b93a0; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat .value.brand { color: var(--brand); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; }
th { color: #8b93a0; font-weight: 600; font-size: 12px; text-transform: uppercase; }
tr:hover td { background: #fafbfd; }
.table-wrap { overflow-x: auto; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: #f2f4f7; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 5px 10px; font-size: 12px; }

form .row { margin-bottom: 14px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
textarea { resize: vertical; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge.open { background: #FFF3D6; color: #8a6300; }
.badge.confirmed { background: #DFF3E4; color: #1c7a3f; }
.badge.cancelled { background: #FBE1E1; color: #a12727; }
.badge.instock { background: #E8F0FE; color: var(--brand-dark); }
.badge.sold { background: #eee; color: #777; }

.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 14px;
}
.flash.success { background: #DFF3E4; color: #1c7a3f; }
.flash.error { background: #FBE1E1; color: #a12727; }

.muted { color: #8b93a0; font-size: 13px; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 36px 32px;
  width: 360px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.login-card img { height: 42px; margin-bottom: 14px; }
.login-card h1 { font-size: 19px; }

.actions { display: flex; gap: 10px; align-items: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.hero-banner {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
  min-height: 120px;
  display: flex;
  align-items: center;
  color: #fff;
  padding: 24px 28px;
  background: linear-gradient(rgba(20,30,50,.55), rgba(20,30,50,.55)), url('') center/cover no-repeat;
}
.hero-banner h1 { color: #fff; margin: 0 0 4px; }
.hero-banner p { margin: 0; opacity: .9; }
