/* ══════════════════════════════════════════════════════════════
   Logismos — Invoice Processing
   styles.css
   ══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --colour-brand:            #1a3c5e;
  --colour-brand-rgb:        26, 60, 94;
  --colour-brand-dark:       #142d47;
  --colour-brand-tint:       #e8f0f7;
  --colour-brand-tint-subtle:#f0f5fa;
  --colour-accent:           #0d6efd;
  --colour-success:          #28a745;
  --colour-failure:          #dc3545;
  --colour-text-muted:       #6c757d;
  --navbar-height:           60px;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
  padding-top: var(--navbar-height);
  background-color: #f8f9fa;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background-color: var(--colour-brand);
  min-height: var(--navbar-height);
  box-shadow: 0 2px 8px rgba(var(--colour-brand-rgb), 0.3);
}

.navbar-brand {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff !important;
}

.navbar-brand i {
  color: #7fb3d3;
}

.offcanvas {
  background-color: var(--colour-brand-dark);
}

.offcanvas-title {
  color: #fff;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  transition: background-color 0.15s, color 0.15s;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

/* ── Page Hero ──────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--colour-brand) 0%, #2c5f8a 100%);
  color: #fff;
  padding: 2.5rem 0;
  margin-bottom: 0.5rem;
}

.hero-icon {
  font-size: 3rem;
  color: #7fb3d3;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
  max-width: 520px;
}

/* ── Drop Zone ──────────────────────────────────────────────── */
.drop-zone {
  border: 2.5px dashed #adb5bd;
  border-radius: 12px;
  background-color: #fff;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.drop-zone:hover,
.drop-zone:focus,
.drop-zone.drag-over {
  border-color: var(--colour-accent);
  background-color: var(--colour-brand-tint-subtle, #f0f5fa);
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

.drop-zone.drag-over {
  border-style: solid;
}

.drop-zone-icon {
  font-size: 3.5rem;
  color: #adb5bd;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.drop-zone:hover .drop-zone-icon,
.drop-zone.drag-over .drop-zone-icon {
  color: var(--colour-accent);
}

.drop-zone-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 0.25rem;
}

.drop-zone-subtext {
  color: var(--colour-text-muted);
  margin-bottom: 0.75rem;
}

.drop-zone-link {
  color: var(--colour-accent);
  text-decoration: underline;
  cursor: pointer;
}

.drop-zone-hint {
  font-size: 0.8rem;
  color: #adb5bd;
  margin-bottom: 0;
}

/* ── Processing ─────────────────────────────────────────────── */
.processing-text {
  font-size: 1rem;
  color: var(--colour-text-muted);
}

/* ── Results Card ───────────────────────────────────────────── */
.results-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.results-card-header {
  background-color: var(--colour-brand-tint);
  border-bottom: 1px solid #d0e0ee;
  padding: 0.9rem 1.25rem;
}

.invoice-type-badge {
  background-color: var(--colour-brand);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.3em 0.75em;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* ── Field Cards ────────────────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--colour-text-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.field-card {
  background-color: var(--colour-brand-tint-subtle, #f0f5fa);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  height: 100%;
}

.field-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--colour-text-muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.field-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.field-card-header .field-label {
  margin-bottom: 0;
}

.field-copy-btn {
  padding: 0;
  line-height: 1;
  color: #adb5bd;
  font-size: 0.75rem;
  border: none;
  background: none;
  transition: color 0.15s;
}

.field-copy-btn:hover {
  color: var(--colour-accent);
}

.field-value {
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
  word-break: break-word;
}

/* ── Rename Panel ───────────────────────────────────────────── */
.rename-panel {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.filename-new {
  color: var(--colour-brand);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
}

/* ── GBP / QuickBooks Input ─────────────────────────────────── */
.gbp-panel {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

/* ── QuickBooks Panel ───────────────────────────────────────── */
.qb-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.qb-card-header {
  background-color: #d4edda;
  border-bottom: 1px solid #c3e6cb;
  padding: 0.9rem 1.25rem;
  color: #155724;
}

.qb-table {
  margin-bottom: 0;
}

.qb-table td {
  padding: 0.65rem 1.25rem;
  vertical-align: middle;
}

.qb-table tr:not(:last-child) td {
  border-bottom: 1px solid #f0f0f0;
}

.qb-field-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--colour-text-muted);
  font-weight: 600;
  width: 110px;
  white-space: nowrap;
}

.qb-field-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: #212529;
  font-family: 'Courier New', Courier, monospace;
  word-break: break-word;
}

.qb-notes {
  line-height: 1.6;
}

.qb-copy-cell {
  width: 48px;
  text-align: right;
}

/* ── Domain Status ──────────────────────────────────────────── */
.domain-table td {
  padding: 0.6rem 1rem;
  vertical-align: middle;
}

.domain-table tr:not(:last-child) td {
  border-bottom: 1px solid #f0f0f0;
}

.domain-name-cell {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--colour-brand);
  white-space: nowrap;
  width: 1%;
}

.domain-expiry-cell {
  font-size: 0.88rem;
}

.domain-expiry-warn {
  color: #856404;
}

.domain-days-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

.domain-cost-cell {
  font-size: 0.88rem;
  font-weight: 600;
  color: #212529;
  white-space: nowrap;
  width: 1%;
}

.domain-badges-cell {
  text-align: right;
  white-space: nowrap;
}

.domain-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2em 0.65em;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.domain-badge-on {
  background-color: rgba(40, 167, 69, 0.12);
  color: var(--colour-success);
}

.domain-badge-off {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--colour-failure);
}

.domain-badge-neutral {
  background-color: #e9ecef;
  color: #6c757d;
}

/* ── Login Page ─────────────────────────────────────────────── */
body.login-page .navbar-toggler { display: none; }

.login-body {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--colour-brand-tint-subtle);
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.login-card {
  border: none;
  border-radius: 12px;
}

.login-brand-icon {
  display: inline-block;
  font-size: 3rem;
  color: var(--colour-brand);
  margin-bottom: 1rem;
}

.btn-google {
  background-color: #4285f4;
  border-color: #4285f4;
  color: #fff;
}

.btn-google:hover,
.btn-google:focus {
  background-color: #3367d6;
  border-color: #3367d6;
  color: #fff;
}

/* ── Offcanvas User ──────────────────────────────────────────── */
.offcanvas-user {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.offcanvas-user-email {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background-color: var(--colour-brand-dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 1.25rem 0;
}

.footer-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.footer-link:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* ── Utilities ──────────────────────────────────────────────── */
.text-success { color: var(--colour-success) !important; }
.text-danger  { color: var(--colour-failure) !important; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 576px) {
  .hero-title { font-size: 1.5rem; }
  .drop-zone  { padding: 2rem 1rem; }
  .filename-new { font-size: 0.78rem; }
}
