/* rezona.css — Rezona Design System
   Precision engineering UI for acoustic compliance tools
   -------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Epilogue:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  /* Structural palette */
  --rz-navy:       #0F172A;   /* near-black slate — sidebar, dark surfaces */
  --rz-navy-dark:  #080E1A;   /* deepest dark */
  --rz-navy-mid:   #1E293B;   /* mid-dark — borders on dark bg */
  --rz-blue:       #2563EB;   /* cobalt — primary interactive */
  --rz-accent:     #2563EB;   /* cobalt — replaces old teal */
  --rz-accent-dk:  #1D4ED8;   /* darker cobalt */

  /* Surfaces */
  --rz-bg:         #F4F3EF;   /* warm off-white — page background */
  --rz-surface:    #FFFFFF;
  --rz-surface-lt: #FAFAF8;   /* slightly warm surface variant */

  /* Borders */
  --rz-border:     #E2DFD8;   /* warm gray — principal border */
  --rz-border-lt:  #EBEBEA;   /* light warm — dividers */

  /* Text */
  --rz-text:       #111827;
  --rz-muted:      #4B5563;
  --rz-subtle:     #9CA3AF;

  /* Status */
  --rz-danger:     #B91C1C;
  --rz-warning:    #B45309;
  --rz-success:    #15803D;

  /* Layout */
  --rz-sidebar-w:  248px;
  --rz-radius:     6px;
  --rz-radius-lg:  10px;
  --rz-radius-xl:  14px;

  /* Shadows */
  --rz-shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --rz-shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.025);
  --rz-shadow-md: 0 4px 12px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.04);
  --rz-shadow-lg: 0 16px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
}

/* ── Reset / Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Epilogue', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .875rem;
  line-height: 1.55;
  color: var(--rz-text);
  background: var(--rz-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Technical data values in monospace */
.rz-mono, .rz-stat-value, .rz-pack-num {
  font-family: 'IBM Plex Mono', 'Fira Code', 'Consolas', monospace;
}

/* ── Typography helpers ─────────────────────────────────── */
.rz-eyebrow {
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .11em;
  color: var(--rz-accent);
}
.rz-section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--rz-navy);
  line-height: 1.22;
  letter-spacing: -.025em;
}
.rz-section-sub {
  font-size: .875rem;
  color: var(--rz-muted);
  line-height: 1.6;
}

/* ── Auth Layout ─────────────────────────────────────────── */
.rz-auth-layout {
  min-height: 100vh;
  display: flex;
}

/* Left brand panel */
.rz-auth-left {
  width: 400px;
  flex-shrink: 0;
  background: var(--rz-navy);
  display: flex;
  flex-direction: column;
  padding: 3rem 2.75rem;
  position: relative;
  overflow: hidden;
}

/* fine grid texture */
.rz-auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* subtle left-edge accent */
.rz-auth-left::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, var(--rz-accent) 0%, transparent 60%);
  opacity: .35;
}

.rz-auth-left .auth-brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1;
}
.rz-auth-left .auth-brand-sub {
  font-size: .67rem;
  color: rgba(255,255,255,.4);
  margin-top: .4rem;
  letter-spacing: .08em;
  font-weight: 600;
  text-transform: uppercase;
}

.rz-auth-left .auth-tagline {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-top: 3.25rem;
  letter-spacing: -.02em;
}
.rz-auth-left .auth-tagline-sub {
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  margin-top: .7rem;
  line-height: 1.65;
}

.rz-auth-left .auth-features {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
}
.rz-auth-left .auth-features li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  color: rgba(255,255,255,.65);
  font-size: .8rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.rz-auth-left .auth-features li i {
  color: var(--rz-accent);
  font-size: .85rem;
  margin-top: .18rem;
  flex-shrink: 0;
}

.rz-auth-left .auth-compliance {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.rz-auth-left .auth-compliance .badge-comp {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.55);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .07em;
  padding: .22rem .6rem;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Right form panel */
.rz-auth-right {
  flex: 1;
  background: var(--rz-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.rz-auth-form-wrap {
  width: 100%;
  max-width: 400px;
}

.rz-auth-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--rz-navy);
  margin-bottom: .25rem;
  letter-spacing: -.025em;
}
.rz-auth-subtitle {
  font-size: .82rem;
  color: var(--rz-muted);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* Mobile: hide left pane, full-width right */
@media (max-width: 767px) {
  .rz-auth-left { display: none; }
  .rz-auth-right { background: var(--rz-bg); }
  .rz-auth-form-wrap {
    background: var(--rz-surface);
    border-radius: var(--rz-radius-xl);
    box-shadow: var(--rz-shadow-lg);
    padding: 2rem 1.75rem;
  }
  .rz-auth-mobile-brand { display: flex !important; }
}

.rz-auth-mobile-brand {
  display: none;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.rz-auth-mobile-brand .brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--rz-navy);
  letter-spacing: -.02em;
}
.rz-auth-mobile-brand .brand-sub {
  font-size: .68rem;
  color: var(--rz-muted);
}

/* ── Form helper elements ────────────────────────────────── */
.rz-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--rz-subtle);
  font-size: .76rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 1.25rem 0;
}
.rz-divider::before, .rz-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rz-border);
}

.btn-google {
  background: var(--rz-surface);
  border: 1.5px solid var(--rz-border);
  color: var(--rz-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  font-weight: 600;
  font-size: .85rem;
  transition: border-color .15s, box-shadow .15s;
  padding: .6rem 1rem;
  border-radius: var(--rz-radius);
}
.btn-google:hover {
  border-color: var(--rz-blue);
  box-shadow: 0 2px 8px rgba(37,99,235,.1);
  color: var(--rz-text);
}

.pw-toggle {
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--rz-muted);
  padding: 0 .75rem;
  transition: color .15s;
}
.pw-toggle:hover { color: var(--rz-navy); }

/* ── Bootstrap overrides ─────────────────────────────────── */
.btn-primary {
  --bs-btn-bg:               var(--rz-blue);
  --bs-btn-border-color:     var(--rz-blue);
  --bs-btn-hover-bg:         var(--rz-accent-dk);
  --bs-btn-hover-border-color: var(--rz-accent-dk);
  --bs-btn-active-bg:        var(--rz-accent-dk);
  font-weight: 600;
  letter-spacing: -.01em;
}

.form-control:focus, .form-select:focus {
  border-color: var(--rz-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.form-control, .form-select {
  font-size: .855rem;
  border-color: var(--rz-border);
  border-radius: var(--rz-radius);
  background: var(--rz-surface);
  font-family: 'Epilogue', sans-serif;
}
.form-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--rz-text);
  margin-bottom: .3rem;
  letter-spacing: -.005em;
}
.form-text {
  font-size: .75rem;
  color: var(--rz-muted);
}
.input-group-text {
  background: var(--rz-surface-lt);
  border-color: var(--rz-border);
  color: var(--rz-muted);
  font-size: .82rem;
}

/* ── Sidebar Layout ──────────────────────────────────────── */
.rz-sidebar {
  width: var(--rz-sidebar-w);
  min-height: 100vh;
  background: var(--rz-navy);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

/* fine cross-hatch texture on sidebar */
.rz-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.rz-sidebar-brand {
  padding: 1.5rem 1.25rem 1.15rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative;
}
.rz-sidebar-brand .brand-name {
  font-size: .92rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.rz-sidebar-brand .brand-sub {
  font-size: .62rem;
  color: rgba(255,255,255,.32);
  margin-top: .3rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}

.rz-sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
  position: relative;
}

.rz-sidebar-section {
  padding: .9rem 1.25rem .3rem;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.2);
}

.rz-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .5rem 1.25rem;
  color: rgba(255,255,255,.52);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  transition: color .12s, background .12s;
  border-left: 2px solid transparent;
  position: relative;
  letter-spacing: -.005em;
}
.rz-nav-link i {
  width: 16px;
  text-align: center;
  font-size: .85rem;
  flex-shrink: 0;
  opacity: .75;
}
.rz-nav-link:hover {
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.05);
}
.rz-nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-left-color: var(--rz-accent);
}
.rz-nav-link.active i { opacity: 1; }

.rz-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.06);
  position: relative;
}

.rz-user-chip {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: .75rem;
}
.rz-user-chip .avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(37,99,235,.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.rz-user-chip .avatar img { width: 100%; height: 100%; object-fit: cover; }
.rz-user-chip .name {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.rz-user-chip .email {
  font-size: .65rem;
  color: rgba(255,255,255,.32);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.rz-sidebar-btn {
  display: block;
  width: 100%;
  padding: .35rem .75rem;
  border-radius: 5px;
  font-size: .76rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .12s, color .12s;
  margin-bottom: .3rem;
  letter-spacing: -.005em;
}
.rz-sidebar-btn-admin {
  background: rgba(185,28,28,.22);
  color: #FCA5A5;
}
.rz-sidebar-btn-admin:hover {
  background: rgba(185,28,28,.35);
  color: #FECACA;
}
.rz-sidebar-btn-logout {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.48);
}
.rz-sidebar-btn-logout:hover {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
}

/* Main content offset */
.rz-main {
  margin-left: var(--rz-sidebar-w);
  min-height: 100vh;
  background: var(--rz-bg);
}

@media (max-width: 768px) {
  .rz-sidebar { position: relative; width: 100%; min-height: auto; bottom: auto; }
  .rz-main    { margin-left: 0; }
}

/* ── Page Header ─────────────────────────────────────────── */
.rz-page-header {
  padding: 1.75rem 2rem 0;
  margin-bottom: 1.5rem;
}
.rz-page-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--rz-navy);
  margin: 0;
  letter-spacing: -.025em;
}
.rz-page-sub {
  font-size: .76rem;
  color: var(--rz-muted);
  margin-top: .2rem;
}

/* ── Cards ───────────────────────────────────────────────── */
.rz-card {
  background: var(--rz-surface);
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-lg);
  box-shadow: var(--rz-shadow-sm);
}
.rz-card-header {
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--rz-border-lt);
  font-size: .8rem;
  font-weight: 700;
  color: var(--rz-navy);
  display: flex;
  align-items: center;
  gap: .5rem;
  letter-spacing: -.01em;
}

/* Stat cards */
.rz-stat-card {
  background: var(--rz-surface);
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-lg);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--rz-shadow-sm);
}
.rz-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.rz-stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--rz-navy);
  line-height: 1;
  letter-spacing: -.04em;
  font-family: 'IBM Plex Mono', monospace;
}
.rz-stat-label {
  font-size: .69rem;
  font-weight: 700;
  color: var(--rz-subtle);
  margin-top: .2rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Section label ───────────────────────────────────────── */
.rz-section-label {
  font-size: .64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--rz-subtle);
  margin-bottom: .5rem;
}

/* ── Tables ──────────────────────────────────────────────── */
.rz-table { font-size: .82rem; }
.rz-table th {
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--rz-muted);
  background: var(--rz-surface-lt);
  border-bottom: 1px solid var(--rz-border);
  padding: .6rem .9rem;
  white-space: nowrap;
}
.rz-table td {
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--rz-border-lt);
  vertical-align: middle;
  color: var(--rz-text);
}
.rz-table tbody tr:last-child td { border-bottom: none; }
.rz-table tbody tr:hover td { background: var(--rz-surface-lt); }

/* ── Plan cards ──────────────────────────────────────────── */
.rz-plan-card {
  background: var(--rz-surface);
  border: 1.5px solid var(--rz-border);
  border-radius: var(--rz-radius-lg);
  padding: 1.35rem;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
}
.rz-plan-card.active-plan {
  border-color: var(--rz-accent);
  box-shadow: 0 2px 16px rgba(37,99,235,.12);
}
.rz-plan-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rz-blue);
  line-height: 1;
  font-family: 'IBM Plex Mono', monospace;
}
.rz-plan-price-annual {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rz-accent);
  line-height: 1;
  font-family: 'IBM Plex Mono', monospace;
}
.rz-plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .8rem;
  color: var(--rz-text);
}
.rz-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  padding: .25rem 0;
}
.rz-plan-features li i { color: var(--rz-accent); margin-top: .1rem; flex-shrink: 0; }

/* ── Credit bar ──────────────────────────────────────────── */
.rz-credit-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--rz-border);
  overflow: hidden;
}
.rz-credit-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--rz-accent);
  transition: width .5s ease;
}

/* ── Credit pack cards ───────────────────────────────────── */
.rz-pack-card {
  background: var(--rz-surface);
  border: 1.5px solid var(--rz-border);
  border-radius: var(--rz-radius-lg);
  padding: 1.1rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.rz-pack-card:hover {
  border-color: var(--rz-accent);
  box-shadow: 0 4px 16px rgba(37,99,235,.1);
  transform: translateY(-2px);
}
.rz-pack-num {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--rz-navy);
  line-height: 1;
  letter-spacing: -.04em;
  font-family: 'IBM Plex Mono', monospace;
}
.rz-pack-price {
  font-size: .95rem;
  font-weight: 600;
  color: var(--rz-blue);
  font-family: 'IBM Plex Mono', monospace;
}

/* ── Empty state ─────────────────────────────────────────── */
.rz-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--rz-muted);
}
.rz-empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: .875rem;
  opacity: .22;
  color: var(--rz-navy);
}
.rz-empty p { font-size: .82rem; margin-bottom: .75rem; }

/* ── Toast ───────────────────────────────────────────────── */
#rz-toast { font-size: .84rem; border-radius: var(--rz-radius) !important; }

/* ── Admin page content area ─────────────────────────────── */
.rz-admin-main {
  margin-left: var(--rz-sidebar-w);
  padding: 2rem;
  min-height: 100vh;
  background: var(--rz-bg);
}

/* ── Dashboard section heading ───────────────────────────── */
.rz-dash-section {
  font-size: .77rem;
  font-weight: 700;
  color: var(--rz-navy);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .875rem;
  letter-spacing: -.01em;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--rz-muted);
}
.rz-dash-section i {
  color: var(--rz-subtle);
  font-size: .8rem;
}

/* ── Badge styles ────────────────────────────────────────── */
.rz-badge {
  display: inline-flex;
  align-items: center;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .18rem .55rem;
  border-radius: 4px;
}
.rz-badge-accent { background: rgba(37,99,235,.1);  color: var(--rz-accent-dk); }
.rz-badge-navy   { background: rgba(15,23,42,.08);  color: var(--rz-navy); }
.rz-badge-muted  { background: var(--rz-border-lt); color: var(--rz-muted); }

/* ── Alert refinements ───────────────────────────────────── */
.alert {
  border-radius: var(--rz-radius);
  font-size: .84rem;
}

/* ── Status chips for results ────────────────────────────── */
.result-uygun     {
  color: var(--rz-success);
  font-weight: 700;
  font-size: .79rem;
  font-family: 'IBM Plex Mono', monospace;
}
.result-uygun-deg {
  color: var(--rz-danger);
  font-weight: 700;
  font-size: .79rem;
  font-family: 'IBM Plex Mono', monospace;
}

/* Pool item type borders */
.pool-ic  { border-left: 3px solid #2563EB; }
.pool-dis { border-left: 3px solid #D97706; }
.pool-dos { border-left: 3px solid #16A34A; }
.pool-rev { border-left: 3px solid #7C3AED; }

/* ── Admin section separation ─────────────────────────────────────────────── */
.rz-admin-main > .d-flex:first-child {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rz-border-lt);
  margin-bottom: 1.5rem !important;
}

/* ── Dashboard section anchors ────────────────────────────────────────────── */
.rz-dash-section {
  padding-bottom: .625rem;
  border-bottom: 1px solid var(--rz-border-lt);
}

/* ── Profile page card body consistent padding ────────────────────────────── */
.rz-card > .p-3 {
  padding: 1.25rem !important;
}
