/* ===========================================================================
   third house - Client Portal — design system
   Colors, fonts and components extracted from the Base campaign-planner mockup.
   See DESIGN.md for documentation.
   =========================================================================== */

:root {
  --blue:        #3b90e4;
  --pink:        #e8cac4;
  --white:       #fefff2;
  --blue-dark:   #2a72c0;
  --blue-light:  #d0e8ff;
  --pink-dark:   #c9a49d;
  --text-body:   #1a3a5c;
  --border:      #c0d8f0;
  --danger:      #e05555;
  --success:     #2db87a;
  --warning:     #e8a030;
}

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

body {
  background: var(--white);
  font-family: 'Space Mono', monospace;
  color: var(--text-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue); }

/* --- Topbar -------------------------------------------------------------- */
.topbar {
  background: var(--pink);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--pink-dark);
  flex-wrap: wrap;
  gap: 10px;
}
.topbar-brand { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.topbar-logo-img { height: 24px; width: auto; display: block; }
.topbar-logo-text { font-family: 'Anton', sans-serif; font-size: 22px; color: var(--blue); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-user { font-size: 11px; color: var(--blue); opacity: 0.8; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: all 0.15s;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-print { background: var(--pink); color: var(--blue); border: 1.5px solid var(--blue); }
.btn-print:hover { background: var(--blue); color: var(--white); }
.btn-danger { background: transparent; border: 1.5px solid var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-small { font-size: 10px; padding: 5px 10px; }
.btn-block { width: 100%; text-align: center; margin-top: 6px; }

/* --- Layout -------------------------------------------------------------- */
.main {
  padding: 28px 32px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}
.section-title {
  font-family: 'Anton', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
  opacity: 0.6;
}
.page-title { font-family: 'Anton', sans-serif; font-size: 26px; color: var(--blue); margin-bottom: 10px; }
.muted { font-size: 13px; opacity: 0.75; margin-bottom: 12px; line-height: 1.6; }
.hint { font-size: 11px; opacity: 0.6; margin-top: 5px; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

/* Admin sub-navigation (Brugere | Virksomheder) */
.subnav { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1.5px solid var(--border); }
.subnav-link {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--blue);
  opacity: 0.5;
  text-decoration: none;
  padding: 8px 14px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1.5px;
}
.subnav-link:hover { opacity: 0.8; }
.subnav-link.active { opacity: 1; border-bottom-color: var(--blue); }

/* --- Cards --------------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.form-card { max-width: 520px; }

/* --- Flash / status banners (styled like Base budget-status) ------------- */
.flash {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}
.flash-ok      { background: #e6f7ef; color: var(--success); border: 1.5px solid #a8e6c8; }
.flash-error   { background: #fdeaea; color: var(--danger);  border: 1.5px solid #f5b5b5; }
.flash-warning { background: #fff8e6; color: var(--warning); border: 1.5px solid #f5d898; }

/* --- Forms --------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.7;
}
.field input,
.input-row input {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: var(--white);
  color: var(--text-body);
  outline: none;
  transition: border 0.15s;
  width: 100%;
}
.field input:focus,
.input-row input:focus { border-color: var(--blue); }

.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row .btn { white-space: nowrap; }

.field-checks { display: flex; flex-direction: column; gap: 8px; }
.check { font-size: 12px; display: flex; align-items: center; gap: 8px; opacity: 0.9; }
.check input { width: auto; }

/* --- Data table ---------------------------------------------------------- */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.data-table th {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.5;
  padding: 4px 12px;
  text-align: left;
}
.data-table td { background: #e8f3fc; padding: 12px; vertical-align: middle; font-size: 12px; }
.data-table td:first-child { border-radius: 8px 0 0 8px; font-weight: 700; color: var(--blue); }
.data-table td:last-child  { border-radius: 0 8px 8px 0; }
.col-actions { text-align: right; white-space: nowrap; }
.col-actions .btn { margin-left: 6px; }
.inline-form { display: inline; }

/* --- Badges -------------------------------------------------------------- */
.badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #e3e8f0;
  color: var(--text-body);
  margin-left: 4px;
}
.badge-staff    { background: #c8e6ff; color: #1a5fa0; }
.badge-active   { background: #d4edda; color: #1a6b3a; }
.badge-inactive { background: #f5d5d5; color: #9a2a2a; }
.badge-self     { background: var(--pink); color: var(--blue); }

/* --- Auth (login) -------------------------------------------------------- */
.auth-wrap { display: flex; justify-content: center; padding-top: 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-title { font-family: 'Anton', sans-serif; font-size: 24px; color: var(--blue); margin-bottom: 20px; }
.auth-sub { font-size: 12px; opacity: 0.7; margin-bottom: 18px; }

/* --- Footer -------------------------------------------------------------- */
.footer {
  background: var(--pink);
  padding: 16px 32px;
  text-align: center;
  font-size: 10px;
  color: var(--blue);
  opacity: 0.8;
  border-top: 1.5px solid var(--pink-dark);
}
.footer-credit a { color: var(--blue); text-decoration: underline; }

/* --- Responsive ---------------------------------------------------------- */
/* Add the .hide-sm class to any table column header/cell that should be
   dropped on small screens. The table keeps its normal layout — the columns
   just disappear, leaving the most important ones (e.g. Email + Actions). */
@media (max-width: 700px) {
  .main { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .hide-sm { display: none !important; }
}
