@font-face {
  font-family: 'FuturaNow';
  font-weight: 200;
  src: url('https://mcdonald-plumbing-brandkit.pages.dev/fonts/FuturaNowHeadlineLight.ttf') format('truetype');
}
@font-face {
  font-family: 'FuturaNow';
  font-weight: 400;
  src: url('https://mcdonald-plumbing-brandkit.pages.dev/fonts/FuturaNowHeadlineMedium.ttf') format('truetype');
}
@font-face {
  font-family: 'FuturaNow';
  font-weight: 800;
  src: url('https://mcdonald-plumbing-brandkit.pages.dev/fonts/FuturaNowHeadlineExtraBold.ttf') format('truetype');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:          #D91B0F;
  --red-dark:     #A50E09;
  --red-light:    #E84F45;
  --navy:         #1F3B59;
  --navy-dark:    #0D1926;
  --navy-mid:     #2D5280;
  --taupe:        #9E9088;
  --bg:           #0C0D0F;
  --surface:      #14161A;
  --surface-el:   #1D2026;
  --surface-hov:  #242830;
  --text:         #F2F2F2;
  --text-muted:   rgba(242,242,242,.55);
  --text-subtle:  rgba(242,242,242,.28);
  --border:       rgba(255,255,255,.07);
  --border-hov:   rgba(255,255,255,.14);
  --radius:       10px;
  --radius-lg:    16px;
  --sidebar-w:    248px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'FuturaNow', 'Futura', 'Trebuchet MS', system-ui, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  line-height: 1.55;
}

/* ─── Sidebar ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-logo {
  padding: 24px 22px 22px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo img {
  width: 100%; max-width: 148px; height: auto;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.6));
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 16px 22px 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 14px;
  transition: all .15s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  color: var(--text);
  background: var(--surface-el);
  border-left-color: var(--border-hov);
}

.sidebar-nav a.active {
  color: var(--text);
  background: rgba(217,27,15,.11);
  border-left-color: var(--red);
}

.sidebar-nav a svg { flex-shrink: 0; opacity: .85; }

.sidebar-footer {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
}

.powered-by span {
  display: block;
  font-size: 9px;
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-subtle);
  margin-bottom: 3px;
}

.powered-by strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--taupe);
}

/* ─── Main ─────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 44px 52px;
}

.page-header { margin-bottom: 32px; }

.page-header h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 5px;
}

.page-header p {
  font-size: 14px;
  font-weight: 200;
  color: var(--text-muted);
}

/* ─── Stat Cards ────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 24px 20px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
}

.stat-card.s-navy::before { background: var(--navy-mid); }
.stat-card.s-taupe::before { background: var(--taupe); }

.stat-value {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  margin-bottom: 7px;
}

.stat-label {
  font-size: 11px;
  font-weight: 200;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .09em;
}

/* ─── Sections ──────────────────────────────────────────── */
.section { margin-bottom: 32px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
}

/* ─── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ─── Action Cards ──────────────────────────────────────── */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.action-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
  cursor: pointer;
}

.action-card:hover {
  border-color: var(--border-hov);
  background: var(--surface-hov);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.action-card.primary {
  background: var(--red);
  border-color: var(--red-dark);
}

.action-card.primary:hover {
  background: var(--red-dark);
  border-color: #8A0B07;
}

.action-card .ac-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}

.action-card.primary .ac-icon {
  background: rgba(255,255,255,.2);
}

.action-card strong {
  font-size: 14px;
  font-weight: 800;
  display: block;
}

.action-card p {
  font-size: 12.5px;
  font-weight: 200;
  color: var(--text-muted);
  line-height: 1.45;
}

.action-card.primary p { color: rgba(255,255,255,.72); }

/* ─── Table ─────────────────────────────────────────────── */
.requests-table {
  width: 100%;
  border-collapse: collapse;
}

.requests-table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-subtle);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.requests-table td {
  padding: 13px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.requests-table tbody tr:last-child td { border-bottom: none; }
.requests-table tbody tr:hover td { background: var(--surface-el); }

/* ─── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

.badge-pending   { background: rgba(158,144,136,.14); color: var(--taupe); }
.badge-progress  { background: rgba(45,82,128,.35);   color: #7BAFD4; }
.badge-review    { background: rgba(251,191,36,.1);   color: #FBBF24; }
.badge-completed { background: rgba(52,211,153,.1);   color: #34D399; }
.badge-cancelled { background: rgba(100,100,100,.15); color: rgba(242,242,242,.4); }

/* ─── Type Pills ────────────────────────────────────────── */
.type-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.type-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface-el);
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  transition: all .15s;
  user-select: none;
}

.type-pill:hover { border-color: var(--border-hov); color: var(--text); }

.type-pill.selected {
  background: var(--red);
  border-color: var(--red-dark);
  color: white;
}

/* ─── Priority Pills ────────────────────────────────────── */
.priority-pills { display: flex; gap: 8px; }

.priority-pill {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-el);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  transition: all .15s;
  user-select: none;
}

.priority-pill:hover { border-color: var(--border-hov); color: var(--text); }

.priority-pill.sel-low      { background: rgba(52,211,153,.12);  border-color: rgba(52,211,153,.3);  color: #34D399; }
.priority-pill.sel-medium   { background: rgba(251,191,36,.12);  border-color: rgba(251,191,36,.3);  color: #FBBF24; }
.priority-pill.sel-high     { background: rgba(251,146,60,.12);  border-color: rgba(251,146,60,.3);  color: #FB923C; }
.priority-pill.sel-urgent   { background: rgba(217,27,15,.14);   border-color: rgba(217,27,15,.35);  color: var(--red-light); }

/* ─── Form ──────────────────────────────────────────────── */
.form-grid { display: grid; gap: 22px; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-muted);
}

.form-label .req { color: var(--red-light); margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  background: var(--surface-el);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: 'FuturaNow', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-subtle); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(217,27,15,.12);
}

.form-textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239E9088' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.form-hint {
  font-size: 11.5px;
  font-weight: 200;
  color: var(--text-subtle);
  margin-top: -4px;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-family: 'FuturaNow', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  border: none;
  letter-spacing: .02em;
  white-space: nowrap;
}

.btn-primary { background: var(--red); color: white; }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-secondary {
  background: var(--surface-el);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hov); background: var(--surface-hov); }

.btn-lg { padding: 14px 32px; font-size: 15px; }

/* ─── Empty State ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 52px 24px;
  color: var(--text-muted);
}

.empty-state .ei {
  font-size: 44px;
  margin-bottom: 14px;
  opacity: .35;
  display: block;
}

.empty-state h3 {
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
}

.empty-state p {
  font-size: 14px;
  font-weight: 200;
}

/* ─── Success Page ──────────────────────────────────────── */
.success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 40px;
}

.success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(52,211,153,.12);
  border: 2px solid rgba(52,211,153,.3);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  font-size: 32px;
}

/* ─── Spinner ───────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Filter Bar ────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-bar .form-select {
  width: auto;
  min-width: 140px;
  padding: 9px 36px 9px 14px;
  font-size: 13px;
}

.filter-bar .form-input {
  width: auto;
  flex: 1;
  min-width: 180px;
  padding: 9px 14px;
  font-size: 13px;
}

/* ─── Divider ───────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .main { padding: 28px 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 20px 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .priority-pills { flex-wrap: wrap; }
  .priority-pill { min-width: calc(50% - 4px); flex: none; }
}
