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

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f0f4f8;
  color: #1a2b3c;
  line-height: 1.6;
}

nav {
  background: #1e3a5f;
  color: #fff;
  padding: 0 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
  padding: 8px 0;
}
.brand { font-weight: 700; font-size: 1.15rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-links a {
  color: #cfe0f2;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: .95rem;
}
.nav-links a:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-links a.logout { color: #ffb4a2; }

main {
  max-width: 1000px;
  margin: 24px auto;
  padding: 0 16px;
}

h1 { font-size: 1.5rem; margin-bottom: 16px; }
h2 { font-size: 1.15rem; margin: 28px 0 12px; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.page-head h1 { margin-bottom: 0; }

.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  margin-bottom: 20px;
}
.login-card { max-width: 400px; margin: 60px auto; text-align: center; }
.login-card form { text-align: right; margin-top: 20px; }
.form-card { max-width: 640px; }
.subtitle { color: #5a7184; }

label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .95rem; }
input, textarea, select {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-top: 4px;
  border: 1px solid #c3d0dc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid #3b82c4;
  border-color: transparent;
}
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row label { flex: 1; min-width: 180px; }
.contacts-add { align-items: flex-end; margin-bottom: 20px; }
.contacts-add button { margin-bottom: 14px; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid #c3d0dc;
  border-radius: 8px;
  background: #fff;
  color: #1a2b3c;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover { filter: brightness(.96); }
.btn-primary { background: #1e6fb8; border-color: #1e6fb8; color: #fff; }
.btn-success { background: #1e8a4c; border-color: #1e8a4c; color: #fff; }
.btn-danger { background: #c23b3b; border-color: #c23b3b; color: #fff; }
.btn-small { padding: 4px 12px; font-size: .85rem; }
.btn-big { font-size: 1.1rem; padding: 14px 24px; width: 100%; }
.btn-block { width: 100%; }

.table-wrap { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { padding: 10px 14px; text-align: right; border-bottom: 1px solid #e6edf3; white-space: nowrap; }
th { background: #f6f9fc; font-size: .9rem; color: #43607c; }
tr:last-child td { border-bottom: none; }
.total-row td { background: #f6f9fc; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-awaiting { background: #ffe4c4; color: #8a4b00; }
.badge-pending { background: #fff3cd; color: #7a5c00; }
.badge-declined { background: #e2e8ee; color: #43607c; }
.badge-quoted { background: #cfe6ff; color: #0b4f8a; }
.badge-approved { background: #d3f2df; color: #135e33; }
.badge-rejected { background: #ffd9d9; color: #8a1b1b; }

.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 600;
}
.flash-success { background: #d3f2df; color: #135e33; }
.flash-error { background: #ffd9d9; color: #8a1b1b; }
.flash-warning { background: #fff3cd; color: #7a5c00; }

.empty { color: #7a90a5; padding: 24px 0; text-align: center; }
.hint { color: #5a7184; font-size: .9rem; margin-bottom: 12px; }

.details { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; margin-bottom: 16px; }
.details dt { font-weight: 700; color: #43607c; }
.price { font-size: 1.3rem; color: #135e33; }

.decision { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.reject-box summary { list-style: none; }
.reject-box summary::-webkit-details-marker { display: none; }
.reject-form { margin-top: 14px; padding: 16px; background: #fff5f5; border-radius: 8px; }

.ride-card { border-right: 5px solid #1e6fb8; }
.ride-rejected { border-right-color: #c23b3b; }
.requote-box { margin-top: 14px; }
.requote-box summary { list-style: none; display: inline-block; }
.requote-box summary::-webkit-details-marker { display: none; }
.ride-main { font-size: 1.15rem; font-weight: 700; }
.ride-sub { color: #43607c; margin: 4px 0; }
.ride-notes { color: #5a7184; font-size: .95rem; }
.quote-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e6edf3; }

.report-picker { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.report-picker label { margin-bottom: 0; min-width: 120px; }
.report-picker button { height: 44px; }

.stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-box {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.stat-num { font-size: 1.8rem; font-weight: 800; color: #1e6fb8; }
.stat-label { color: #5a7184; font-size: .9rem; }

hr { border: none; border-top: 1px solid #e6edf3; margin: 20px 0; }

@media (max-width: 600px) {
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dt { margin-top: 8px; }
}
