/* Deliberately plain — functionality over design. */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, Arial, sans-serif;
  font-size: 14px;
  color: #1c2421;
  background: #f4f5f3;
}
a { color: #0f5a4e; }

.wrap { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 220px;
  background: #0f5a4e;
  color: #fff;
  padding: 16px 0;
  flex-shrink: 0;
}
.sidebar .brand { font-weight: bold; font-size: 16px; padding: 0 18px 14px; }
.sidebar nav a {
  display: block;
  color: #dff0eb;
  text-decoration: none;
  padding: 9px 18px;
}
.sidebar nav a:hover { background: rgba(255,255,255,.12); }
.sidebar nav a.on { background: rgba(255,255,255,.22); color: #fff; font-weight: bold; }
.sidebar .group-label {
  margin-top: 14px;
  padding: 6px 18px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #a9cfc6;
}
.sidebar .submenu a { padding-left: 30px; }

/* Main */
.main { flex: 1; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #e7e9e5;
  padding: 12px 20px;
}
.topbar h1 { font-size: 18px; margin: 0; }
.topbar .who { display: flex; align-items: center; gap: 12px; color: #555; }
.content { padding: 20px; }

/* Flash */
.flash { padding: 10px 20px; margin: 0; }
.flash-success { background: #e3efec; color: #0f5a4e; }
.flash-error { background: #fbe6e4; color: #c0453b; }
.flash-info { background: #e7effa; color: #1c4e80; }

/* Buttons */
.btn {
  display: inline-block;
  background: #0f5a4e;
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 8px 14px;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
}
.btn:hover { opacity: .92; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-secondary { background: #6b7772; }
.btn-danger { background: #c0453b; }
.btn-accent { background: #e8853a; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eef0ed; vertical-align: top; }
th { background: #f0f3f1; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #55605b; }
tr:hover td { background: #fafbfa; }
.table-actions { white-space: nowrap; }
.table-actions a { margin-right: 8px; }

/* Cards / forms */
.card {
  background: #fff;
  border: 1px solid #e7e9e5;
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 18px;
}
.card h2 { margin-top: 0; font-size: 15px; }
.form-row { margin-bottom: 14px; max-width: 520px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 4px; }
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=password],
.form-row input[type=number],
.form-row input[type=datetime-local],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #cdd3cf;
  border-radius: 4px;
  font-size: 14px;
}
.form-row .hint { display: block; color: #7c8884; font-size: 12px; margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; max-width: 520px; }
.checkbox-row input { width: auto; }
.actions { margin-top: 16px; display: flex; gap: 10px; }

/* Toolbar above tables */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.toolbar form { display: flex; gap: 8px; }
.toolbar input[type=text] { padding: 7px; border: 1px solid #cdd3cf; border-radius: 4px; }

.muted { color: #7c8884; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #eef0ed; }
.pill-on { background: #e3efec; color: #0f5a4e; }
.pill-off { background: #fbe6e4; color: #c0453b; }
.pill-warn { background: #fdf0dd; color: #8a5a12; }
.pill-info { background: #e5edf6; color: #274b6d; }
.right { text-align: right; }

/* Map (areas page) */
#map { width: 100%; height: 460px; border: 1px solid #cdd3cf; border-radius: 6px; }

/* Simple bar chart for discount analytics */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 80px; }
.bars .bar { width: 10px; background: #0f5a4e; }

/* Landing (public index) */
.landing { max-width: 640px; margin: 80px auto; text-align: center; padding: 0 20px; }
.landing h1 { font-size: 30px; }
