/* Ferman Fleet Dr. - Mobile-first professional styles */
:root {
  --chevy-blue: #002554;
  --chevy-gold: #c4a35a;
  --accent: #005daa;
  --light-bg: #f4f7fb;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --muted: #5a6570;
  --success: #0d7a3f;
  --border: #e1e8f0;
  --shadow: 0 4px 20px rgba(0, 37, 84, 0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--light-bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--chevy-blue) 0%, #003a7a 100%);
  color: white;
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
  position: relative;
}

.header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--chevy-gold);
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.logo-sub {
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 400;
}

.dealership {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  opacity: 0.85;
}

/* Main content */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.company-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--chevy-blue);
  margin-bottom: 0.25rem;
}

.vehicle-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--muted);
}

.detail-value {
  font-weight: 600;
  text-align: right;
}

/* Appraisal value highlight */
.value-card {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
  border: 2px solid var(--accent);
  text-align: center;
  padding: 1.5rem 1rem;
}

.value-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.value-amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--chevy-blue);
  line-height: 1.1;
}

.value-disclaimer {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.75rem;
  line-height: 1.4;
}

/* Notes */
.notes {
  font-size: 0.95rem;
  color: var(--text);
  background: #fafbfc;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--chevy-gold);
}

/* Message */
.message {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

.message strong {
  color: var(--text);
}

/* CTA Button */
.cta {
  display: block;
  width: 100%;
  background: var(--chevy-blue);
  color: white;
  text-align: center;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.5rem;
}

.cta:hover, .cta:active {
  background: #001a3d;
  transform: translateY(-1px);
}

.cta-secondary {
  display: block;
  width: 100%;
  background: white;
  color: var(--chevy-blue);
  text-align: center;
  padding: 0.85rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--chevy-blue);
  margin-top: 0.75rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

/* Error / empty states */
.empty-state, .error-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-state h2, .error-state h2 {
  color: var(--chevy-blue);
  margin-bottom: 0.75rem;
}

/* Admin styles */
.admin-header {
  background: var(--chevy-blue);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-header h1 {
  font-size: 1.25rem;
}

.btn {
  background: var(--chevy-gold);
  color: var(--chevy-blue);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  border: 1px solid white;
  color: white;
}

.admin-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--chevy-blue);
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}

tr:hover {
  background: #f8fafc;
}

.actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.btn-edit {
  background: #e8f0fe;
  color: var(--accent);
}

.btn-qr {
  background: #e6f4ea;
  color: var(--success);
}

.btn-delete {
  background: #fce8e6;
  color: #c5221f;
}

.qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.qr-modal.active {
  display: flex;
}

.qr-box {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 340px;
  width: 100%;
  text-align: center;
}

.qr-box img {
  max-width: 220px;
  margin: 1rem auto;
  display: block;
}

.qr-url {
  font-size: 0.8rem;
  word-break: break-all;
  background: #f4f7fb;
  padding: 0.5rem;
  border-radius: 6px;
  margin: 0.75rem 0;
}

.hidden {
  display: none !important;
}

@media (min-width: 600px) {
  .container {
    padding-top: 1.75rem;
  }
  .logo-text {
    font-size: 1.85rem;
  }
}
