/* ── Variables ── */
:root {
  --brand-blue: #1B4F72;
  --brand-blue-light: #2980B9;
  --text-color: #2C3E50;
  --label-gray: #5D6D7E;
  --bg: #f8f9fa;
  --white: #ffffff;
  --border: #dee2e6;
  --green: #28a745;
  --red: #dc3545;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-color);
  background: var(--bg);
  line-height: 1.3;
}

/* ── Navigation ── */
nav {
  background: var(--brand-blue);
  color: var(--white);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav a { color: var(--white); text-decoration: none; }
nav .brand { font-size: 18px; font-weight: 700; }
nav .nav-links { display: flex; gap: 16px; align-items: center; font-size: 14px; }
nav .nav-links a:hover { text-decoration: underline; }

/* ── Layout ── */
.container {
  max-width: 960px;
  margin: 16px auto;
  padding: 0 16px;
}

.container-wide {
  max-width: 1600px;
  margin: 16px auto;
  padding: 0 16px;
}

/* ── Typography ── */
h1 { font-size: 20px; margin-bottom: 12px; color: var(--brand-blue); }
h2 { font-size: 14px; margin-bottom: 6px; color: var(--brand-blue); }

/* ── Card ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

/* ── Data Table ── */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--brand-blue);
  color: var(--white);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

table.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

table.data-table tr:hover { background: #f1f3f5; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  line-height: 1.3;
}

.btn-primary {
  background: var(--brand-blue);
  color: var(--white);
}

.btn-primary:hover { background: var(--brand-blue-light); }

.btn-secondary {
  background: var(--white);
  color: var(--text-color);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: #f1f3f5; }

.btn-google {
  background: var(--white);
  color: var(--text-color);
  border: 1px solid var(--border);
  font-size: 16px;
  padding: 12px 24px;
}

.btn-google:hover { background: #f1f3f5; }

.btn-lg {
  font-size: 16px;
  padding: 12px 32px;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Forms ── */
.form-group { margin-bottom: 8px; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--label-gray);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-blue-light);
  box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.15);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── Validation & Messages ── */
.errorlist {
  list-style: none;
  color: var(--red);
  font-size: 13px;
  margin-top: 4px;
}

.messages {
  list-style: none;
  margin-bottom: 16px;
}

.messages li {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 8px;
}

.messages .success { background: #d4edda; color: #155724; }
.messages .error { background: #f8d7da; color: #721c24; }

/* ── Page Header ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.page-header--tight {
  margin-bottom: 10px;
}

/* ── Hero Section (home, login) ── */
.hero-section {
  text-align: center;
  padding: 80px 0;
}

.hero-section--compact {
  padding: 60px 0;
}

.hero-title {
  font-size: 32px;
  margin-bottom: 8px;
}

.hero-title--compact {
  font-size: 28px;
}

.hero-subtitle {
  color: var(--label-gray);
  font-size: 16px;
  margin-bottom: 32px;
}

/* ── Links ── */
.link-primary {
  color: var(--brand-blue);
  font-weight: 500;
}

.back-link {
  color: var(--brand-blue);
  font-size: 14px;
}

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

.empty-state p {
  color: var(--label-gray);
  margin-bottom: 16px;
}

/* ── Deal Meta ── */
.deal-meta {
  color: var(--label-gray);
  font-size: 14px;
}

/* ── Iframes ── */
.preview-iframe {
  width: 100%;
  border: none;
}

.preview-iframe--detail {
  height: 800px;
}

/* ── Utilities ── */
.hidden { display: none; }
.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: 4px; }
.mt-sm { margin-top: 12px; }
