@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* my-quotes.css (refreshed dashboard look) */
:root{
  --brand-blue: #6AB8FF;
  --bg: #f4f4f4;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --shadow: 0 10px 25px rgba(0,0,0,0.08);
}

*{ box-sizing: border-box; }

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

/* ===== Header (match Login/Quote vibe) ===== */
.app-header{
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 10px 0;
}

.app-header-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.app-left{
  display:flex;
  align-items:center;
  gap: 22px;
  flex-wrap: wrap;
}

.app-logo{
  height: 34px;
  width: auto;
  display:block;
}

.app-logo-link{
  display:inline-flex;
  align-items:center;
}

.app-nav{
  display:flex;
  align-items:center;
  gap: 18px;
  flex-wrap: wrap;
}

.app-nav a{
  color: #000;
  text-decoration:none;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.85;
}

.app-nav a:hover{
  opacity: 1;
  text-decoration: underline;
}

.app-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

.app-btn{
  border: none;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 700;
}

.app-btn.secondary{
  background: var(--brand-blue);
  color: #000; /* matches your site's button text style */
}

.app-btn.secondary:hover{
  filter: brightness(0.96);
}

.app-btn.danger{
  background: #ff5a5a;
  color: #fff;
}

.app-btn.danger:hover{
  background: #e04545;
}

/* ===== Main layout ===== */
.app-main{
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 18px;
}

.panel{
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel-title{
  margin: 0;
  font-size: 28px;
  text-align: center;
  font-weight: 800;
}

.panel-sub{
  margin: 8px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.panel-meta{
  margin-top: 14px;
  text-align: center;
}

.muted{ color: var(--muted); word-break: break-word; overflow-wrap: break-word; }

/* ===== Quote cards ===== */
.quote-list{
  margin-top: 18px;
  display:grid;
  gap: 12px;
}

.quote-card{
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 16px 16px 56px 16px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
  background: #fff;
  position: relative;
}

.quote-card-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-title{
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.quote-badges{
  display:flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 480px) {
  .quote-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .quote-badges {
    justify-content: flex-start;
  }
}

.badge{
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(106,184,255,0.25);
}

.badge.gray{
  background: rgba(0,0,0,0.06);
  color: #111;
}

.quote-meta{
  display:flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
}

.quote-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.quote-meta strong{
  font-weight: 800;
}

details summary{
  cursor:pointer;
  font-weight: 800;
  margin-top: 10px;
}

pre{
  margin-top: 10px;
  background: #f6f6f6;
  padding: 12px;
  border-radius: 10px;
  overflow:auto;
  max-height: 320px;
  font-size: 12px;
}

/* Center nav links in header */
.app-nav-center {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.app-nav-center a {
  font-weight: 700;
}

/* Quote status badge */
.badge.status{
  background: rgba(0,0,0,0.06);
  color:#111;
}

/* Quote-style details */
.details-grid{
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.detail-row{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
}

.detail-q{
  font-weight: 800;
  color: #111827;
}

.detail-a{
  color: #111827;
  opacity: 0.9;
  word-break: break-word;
}

.details-section-title{
  margin: 14px 0 6px;
  font-size: 14px;
  font-weight: 900;
  color: #111827;
  opacity: 0.9;
}

@media (max-width: 650px){
  .detail-row{
    grid-template-columns: 1fr;
  }
}

/* Registration number plate style */
.badge.registration {
  background: #ffd400;        /* UK rear plate yellow */
  color: #000;
  border: 1px solid #000;
  font-weight: 900;
  letter-spacing: 1px;
  border-radius: 6px;
  padding: 6px 10px;
  font-family: 'Montserrat', system-ui, sans-serif;
  text-transform: uppercase; /* 👈 THIS */
}


/* Status badge colours */
.badge.status-submitted { background: rgba(0,0,0,0.06); color:#111; }
.badge.status-in-review { background: rgba(13,110,253,0.15); color:#0b5ed7; }
.badge.status-quoted { background: rgba(11,107,47,0.15); color:#0b6b2f; }
.badge.status-declined { background: rgba(176,0,32,0.12); color:#b00020; }
.badge.status-completed { background: rgba(106,184,255,0.25); color:#111; }


/* Admin status dropdown */
.status-admin{
  display:inline-flex;
  align-items:center;
  margin-left: 10px;
}

.status-select{
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.status-select:focus{
  outline: 2px solid rgba(106,184,255,0.6);
  outline-offset: 2px;
}

/* Base status badge */
.badge.status {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  background: #e5e7eb; /* default grey */
  color: #374151;
}

/* ✅ QUOTED = green */
.badge.status-quoted {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #34d399;
}

/* 🟠 IN REVIEW = orange */
.badge.status-in-review {
  background: #ffedd5;        /* soft orange */
  color: #9a3412;             /* dark orange text */
  border: 1px solid #fb923c;  /* orange border */
}

/* ⏳ SUBMITTED = blue */
.badge.status-submitted {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #60a5fa;
}

/* ❌ DECLINED = red */
.badge.status-declined {
  background: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #f87171;
}


/* Status Legend */
.status-legend {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.status-legend h3 {
  margin: 0 0 16px 0;
  font-size: 1.2em;
  color: #333;
  font-weight: 600;
}

.status-legend-grid {
  display: grid;
  gap: 12px;
}

.status-legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 8px;
}

.status-legend-item .badge {
  flex-shrink: 0;
  min-width: 100px;
  text-align: center;
}

.status-description {
  font-size: 0.9em;
  color: #666;
  line-height: 1.4;
}

/* Delete Button */
.delete-quote-btn {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  position: absolute;
  bottom: 16px;
  right: 16px;
}

.delete-quote-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Mobile responsive for legend */
@media (max-width: 768px) {
  .status-legend-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .status-legend-item .badge {
    min-width: auto;
  }
}

/* Status Legend Toggle */
.status-legend {
  cursor: pointer;
}

.status-legend-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.status-legend-toggle::-webkit-details-marker {
  display: none;
}

.status-legend-toggle h3 {
  margin: 0;
}

.toggle-icon {
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.status-legend[open] .toggle-icon {
  transform: rotate(180deg);
}

.status-legend-grid {
  margin-top: 16px;
}

/* Mobile Header Fix */
@media (max-width: 768px) {
  .app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .app-left {
    flex-shrink: 0;
    gap: 10px;
  }

  .app-nav a {
    white-space: nowrap;
  }

  .app-right {
    flex-shrink: 0;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .app-btn {
    white-space: nowrap;
  }
}

/* Only shrink elements on genuinely small screens */
@media (max-width: 420px) {
  .app-logo {
    height: 22px;
  }
  .app-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
  .app-nav a {
    font-size: 12px;
  }
  .app-header-inner {
    padding: 8px 10px;
  }
}

@media (max-width: 370px) {
  .app-logo {
    height: 18px;
  }
  .app-btn {
    padding: 5px 8px;
    font-size: 10px;
  }
  .app-nav a {
    font-size: 11px;
  }
}

/* Mobile Delete Button Positioning */
@media (max-width: 768px) {
  .quote-meta {
    position: relative;
  }
  
  .delete-quote-btn {
    font-size: 0.85em;
    padding: 6px 12px;
  }
}

/* Footer Styling */
.app-footer {
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 20px 0;
  margin-top: 60px;
}

.app-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.app-footer a {
  color: #000;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.app-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-divider {
  color: #ccc;
  font-weight: 300;
}

/* Mobile footer */
@media (max-width: 768px) {
  .app-footer {
    padding: 16px 0;
    margin-top: 40px;
  }
  
  .app-footer-inner {
    font-size: 13px;
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-title {
  font-size: 22px;
  font-weight: 800;
  color: #111;
  margin: 0 0 12px;
}

.empty-text {
  font-size: 15px;
  color: #777;
  line-height: 1.6;
  margin: 0 0 28px;
}

.empty-btn {
  display: inline-block;
  background: #6AB8FF;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 32px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.empty-btn:hover {
  background: #4da8f5;
  transform: translateY(-2px);
}
