/* ════════════════════════════════════════════════════════
   Luxe Quotation Builder · App Stylesheet
   Brand: black (#1a1a1a) + gold (#F5C200) + white
   ════════════════════════════════════════════════════════ */

:root {
  --lq-black:   #1a1a1a;
  --lq-gold:    #F5C200;
  --lq-gold-dk: #d4a900;
  --lq-white:   #ffffff;
  --lq-grey-1:  #f7f7f5;
  --lq-grey-2:  #eeede9;
  --lq-grey-3:  #c8c6bf;
  --lq-grey-4:  #888680;
  --lq-text:    #1a1a1a;
  --lq-muted:   #6b6962;
  --lq-border:  #e2e0da;
  --lq-red:     #d63031;
  --lq-green:   #00b894;
  --lq-radius:  6px;
  --lq-shadow:  0 2px 12px rgba(0,0,0,.10);
  --lq-shadow-lg: 0 8px 32px rgba(0,0,0,.16);
  --lq-font:    'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --sb-width:   220px;
}

/* ── Reset & base ───────────────────────────────────────── */
#luxe-qt-app *, #luxe-qt-app *::before, #luxe-qt-app *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#luxe-qt-app {
  font-family: var(--lq-font);
  font-size: 14px;
  color: var(--lq-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#luxe-qt-app a { text-decoration: none; }

/* ── Screens ────────────────────────────────────────────── */
.lq-screen { width: 100%; }

/* ══════════════════════════════════════════════════════════
   LOGIN
   ══════════════════════════════════════════════════════════ */
#lq-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lq-black);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(245,194,0,.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(245,194,0,.06) 0%, transparent 50%);
}

.lq-login-card {
  background: var(--lq-white);
  border-radius: 12px;
  padding: 44px 40px 40px;
  width: 380px;
  box-shadow: var(--lq-shadow-lg);
}

.lq-login-logo { text-align: center; margin-bottom: 32px; }

.lq-login-brand {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -2px;
  color: var(--lq-black);
  line-height: 1;
  font-style: italic;
  border: 3px solid var(--lq-black);
  display: inline-block;
  padding: 4px 16px;
}

.lq-login-brand span { color: var(--lq-gold); }

.lq-login-sub {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--lq-muted);
  margin-top: 10px;
}

/* ══════════════════════════════════════════════════════════
   APP SHELL
   ══════════════════════════════════════════════════════════ */
#lq-shell {
  display: flex;
  min-height: 100vh;
  background: var(--lq-grey-1);
}

/* ── Sidebar ───────────────────────────────────────────── */
#lq-sidebar {
  width: var(--sb-width);
  background: var(--lq-black);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.lq-sb-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.lq-sb-brand {
  font-size: 28px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -1px;
  color: var(--lq-white);
  border: 2px solid var(--lq-gold);
  display: inline-block;
  padding: 2px 10px;
  line-height: 1;
}

.lq-sb-brand span { color: var(--lq-gold); }

.lq-sb-sub {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-top: 8px;
}

.lq-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.lq-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,.6);
  font-size: 13.5px;
  font-weight: 500;
  transition: all .15s;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.lq-nav-item:hover {
  color: var(--lq-white);
  background: rgba(255,255,255,.05);
}

.lq-nav-item.active {
  color: var(--lq-gold);
  background: rgba(245,194,0,.08);
  border-left-color: var(--lq-gold);
}

.lq-nav-icon { font-size: 16px; }

.lq-sb-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.lq-sb-user {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  margin-bottom: 8px;
}

/* ── Main ──────────────────────────────────────────────── */
#lq-main {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.lq-view {
  padding: 28px 32px;
  max-width: 1000px;
}

.lq-view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.lq-view-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--lq-black);
}

.lq-view-sub {
  font-size: 13px;
  color: var(--lq-muted);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════
   FORM ELEMENTS
   ══════════════════════════════════════════════════════════ */
.lq-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lq-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lq-black);
  letter-spacing: .2px;
}

.lq-field .req { color: var(--lq-gold-dk); }

.lq-field input,
.lq-field select,
.lq-field textarea {
  border: 1.5px solid var(--lq-border);
  border-radius: var(--lq-radius);
  padding: 9px 11px;
  font-size: 13.5px;
  font-family: var(--lq-font);
  color: var(--lq-text);
  background: var(--lq-white);
  outline: none;
  transition: border-color .15s;
  width: 100%;
}

.lq-field input:focus,
.lq-field select:focus,
.lq-field textarea:focus {
  border-color: var(--lq-gold);
  box-shadow: 0 0 0 3px rgba(245,194,0,.15);
}

.lq-field textarea { resize: vertical; }

.lq-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 16px;
}

.lq-field-wide { grid-column: 1 / -1; }

.lq-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.lq-btn-primary {
  background: var(--lq-gold);
  color: var(--lq-black);
  border: none;
  border-radius: var(--lq-radius);
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .3px;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}

.lq-btn-primary:hover  { background: var(--lq-gold-dk); }
.lq-btn-primary:active { transform: scale(.98); }

.lq-btn-ghost {
  background: transparent;
  color: var(--lq-black);
  border: 1.5px solid var(--lq-border);
  border-radius: var(--lq-radius);
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}

.lq-btn-ghost:hover { background: var(--lq-grey-2); border-color: var(--lq-grey-3); }

.lq-btn-danger {
  background: var(--lq-red);
  color: #fff;
  border: none;
  border-radius: var(--lq-radius);
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}

.lq-btn-danger:hover { opacity: .88; }

.lq-btn-sm  { padding: 6px 13px; font-size: 12.5px; }
.lq-btn-full { width: 100%; }

/* ── Login form button ── */
#lq-login-form .lq-btn-primary {
  padding: 12px;
  font-size: 14px;
  margin-top: 8px;
}

/* ══════════════════════════════════════════════════════════
   TOOLBAR / SEARCH
   ══════════════════════════════════════════════════════════ */
.lq-toolbar { margin-bottom: 16px; }

.lq-search-input {
  border: 1.5px solid var(--lq-border);
  border-radius: var(--lq-radius);
  padding: 9px 14px;
  font-size: 13.5px;
  font-family: var(--lq-font);
  color: var(--lq-text);
  width: 100%;
  max-width: 420px;
  outline: none;
  transition: border-color .15s;
}

.lq-search-input:focus {
  border-color: var(--lq-gold);
  box-shadow: 0 0 0 3px rgba(245,194,0,.12);
}

/* ══════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════ */
.lq-table-wrap {
  background: var(--lq-white);
  border: 1px solid var(--lq-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--lq-shadow);
}

.lq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.lq-table thead tr {
  background: var(--lq-black);
  color: var(--lq-gold);
}

.lq-table thead th {
  padding: 11px 14px;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .6px;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.lq-table thead th.num { text-align: right; }

.lq-table tbody tr {
  border-bottom: 1px solid var(--lq-border);
  transition: background .12s;
}

.lq-table tbody tr:last-child { border-bottom: none; }

.lq-table tbody tr:hover { background: var(--lq-grey-1); }

.lq-table td {
  padding: 11px 14px;
  vertical-align: middle;
  color: var(--lq-text);
}

.lq-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lq-table td.muted { color: var(--lq-muted); font-size: 12.5px; }
.lq-table td.bold { font-weight: 600; }

/* Action buttons in table */
.lq-tbl-actions { display: flex; gap: 6px; justify-content: flex-end; }

.lq-tbl-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background .12s;
}

.lq-tbl-btn.edit { color: #0984e3; }
.lq-tbl-btn.edit:hover { background: rgba(9,132,227,.1); }
.lq-tbl-btn.del  { color: var(--lq-red); }
.lq-tbl-btn.del:hover  { background: rgba(214,48,49,.08); }
.lq-tbl-btn.pdf  { color: var(--lq-black); font-size: 15px; }
.lq-tbl-btn.pdf:hover  { background: rgba(245,194,0,.2); }

/* Status badges */
.lq-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: .3px;
}

.lq-badge-draft    { background: #f0f0ee; color: #666; }
.lq-badge-sent     { background: #e8f4fd; color: #0984e3; }
.lq-badge-accepted { background: #e6f7f2; color: #00b894; }
.lq-badge-rejected { background: #fdecea; color: #d63031; }

/* Empty state */
.lq-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--lq-muted);
}

.lq-empty-icon { font-size: 36px; margin-bottom: 12px; }
.lq-empty p { font-size: 14px; }

/* Loading */
.lq-loading {
  padding: 32px;
  text-align: center;
  color: var(--lq-muted);
  font-size: 13.5px;
}

/* ══════════════════════════════════════════════════════════
   QUOTATION FORM — LINE ITEMS
   ══════════════════════════════════════════════════════════ */
.lq-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--lq-muted);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--lq-border);
}

.lq-items-header {
  display: grid;
  grid-template-columns: 1fr 120px 80px 110px 36px;
  gap: 8px;
  padding: 7px 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--lq-muted);
  background: var(--lq-grey-1);
  border-radius: var(--lq-radius);
  margin-bottom: 4px;
}

.lq-col-rate, .lq-col-qty, .lq-col-sub { text-align: right; padding-right: 4px; }

.lq-item-row {
  display: grid;
  grid-template-columns: 1fr 120px 80px 110px 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  background: var(--lq-white);
  border: 1px solid var(--lq-border);
  border-radius: var(--lq-radius);
  padding: 6px 8px;
  transition: border-color .12s;
}

.lq-item-row:hover { border-color: var(--lq-gold); }

.lq-item-row input {
  border: none;
  border-radius: 4px;
  padding: 5px 6px;
  font-size: 13px;
  font-family: var(--lq-font);
  color: var(--lq-text);
  background: transparent;
  outline: none;
  width: 100%;
}

.lq-item-row input:focus { background: var(--lq-grey-1); }

.lq-item-row .item-sub {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  color: var(--lq-black);
  font-variant-numeric: tabular-nums;
}

.lq-item-row .item-del {
  background: none;
  border: none;
  color: var(--lq-red);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px;
  transition: opacity .12s;
}

.lq-item-row .item-del:hover { opacity: .7; }

.lq-items-actions {
  display: flex;
  gap: 10px;
  margin: 10px 0 0;
  align-items: center;
}

.lq-service-picker {
  border: 1.5px solid var(--lq-border);
  border-radius: var(--lq-radius);
  padding: 6px 10px;
  font-size: 13px;
  font-family: var(--lq-font);
  color: var(--lq-text);
  background: var(--lq-white);
  cursor: pointer;
  outline: none;
  min-width: 200px;
}

.lq-service-picker:focus { border-color: var(--lq-gold); }

/* ── Totals block ────────────────────────────────────────── */
.lq-totals-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: 16px;
  gap: 10px;
}

.lq-total-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
}

.lq-total-row label { font-weight: 600; color: var(--lq-muted); min-width: 90px; text-align: right; }

.lq-total-input {
  border: 1.5px solid var(--lq-border);
  border-radius: var(--lq-radius);
  padding: 7px 10px;
  font-size: 13.5px;
  font-family: var(--lq-font);
  color: var(--lq-text);
  width: 130px;
  text-align: right;
  outline: none;
}

.lq-total-input:focus { border-color: var(--lq-gold); }

.lq-summary {
  background: var(--lq-white);
  border: 1px solid var(--lq-border);
  border-radius: var(--lq-radius);
  overflow: hidden;
  min-width: 260px;
}

.lq-sum-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--lq-border);
}

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

.lq-sum-total {
  background: var(--lq-gold);
  font-weight: 700;
  font-size: 15px;
  color: var(--lq-black);
}

.lq-sum-discount { color: var(--lq-red); }

/* ── Customer select wrapper ─────────────────────────────── */
.lq-customer-select-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lq-customer-select-wrap select { flex: 1; }

/* ══════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════ */
.lq-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.lq-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.lq-modal[style*="display: flex"] { pointer-events: auto; }

.lq-modal-box {
  background: var(--lq-white);
  border-radius: 10px;
  width: 560px;
  max-width: 96vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--lq-shadow-lg);
  animation: lq-modal-in .18s ease;
}

.lq-modal-sm { width: 420px; }

@keyframes lq-modal-in {
  from { opacity: 0; transform: scale(.96) translateY(-8px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

.lq-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--lq-border);
}

.lq-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.lq-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--lq-muted);
  padding: 2px 6px;
  border-radius: 4px;
  transition: background .12s;
  line-height: 1;
}

.lq-modal-close:hover { background: var(--lq-grey-2); color: var(--lq-black); }

.lq-modal-body { padding: 18px 22px; }
.lq-modal-body p { font-size: 14px; color: var(--lq-muted); }

.lq-modal-box form { padding: 18px 22px 6px; }
.lq-modal-box .lq-form-actions { padding-bottom: 18px; }

/* ══════════════════════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════════════════════ */
.lq-error {
  background: #fdecea;
  color: var(--lq-red);
  border-radius: var(--lq-radius);
  padding: 8px 12px;
  font-size: 13px;
  flex: 1;
}

.lq-success-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--lq-black);
  color: var(--lq-gold);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--lq-shadow-lg);
  z-index: 2000;
  animation: lq-toast-in .2s ease;
}

@keyframes lq-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 700px) {
  :root { --sb-width: 60px; }

  .lq-sb-brand, .lq-sb-sub, .lq-sb-user, .lq-nav-item span:not(.lq-nav-icon) { display: none; }
  .lq-nav-item { justify-content: center; padding: 14px; }
  .lq-view { padding: 16px; }
  .lq-form-grid { grid-template-columns: 1fr; }
  .lq-field-wide { grid-column: auto; }
  .lq-items-header, .lq-item-row {
    grid-template-columns: 1fr 80px 60px 80px 30px;
    gap: 4px;
  }
}
