/* ── easyRTC – shared styles ──────────────────────────────────────────────── */

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

:root {
  --blue:    #2563eb;
  --blue-dk: #1d4ed8;
  --green:   #16a34a;
  --red:     #dc2626;
  --amber:   #d97706;
  --gray-50: #f9fafb;
  --gray-100:#f3f4f6;
  --gray-200:#e5e7eb;
  --gray-400:#9ca3af;
  --gray-600:#4b5563;
  --gray-800:#1f2937;
  --radius:  8px;
  --shadow:  0 1px 4px rgba(0,0,0,.12);
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  font-size: 15px;
  line-height: 1.5;
}

/* ── Auth page ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.5rem;
}
.brand h1 { font-size: 1.2rem; font-weight: 700; }

/* ── Forms ── */
label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: .3rem;
  margin-top: 1rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: .6rem .8rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .95rem;
  transition: border-color .15s;
}
input:focus { outline: none; border-color: var(--blue); }

.inline-form {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.inline-form input { flex: 1; min-width: 220px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary  { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dk); }
.btn-danger   { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: .85; }
.btn-outline  { background: transparent; color: var(--gray-800); border: 1px solid var(--gray-200); }
.btn-outline:hover { background: var(--gray-100); }
.btn-sm { padding: .35rem .8rem; font-size: .82rem; }
.btn-lg { padding: .75rem 1.6rem; font-size: 1rem; }

/* ── Alerts ── */
.alert {
  padding: .7rem 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-size: .9rem;
}
.alert-error   { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--green); border: 1px solid #bbf7d0; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-success { background: #dcfce7; color: var(--green); }
.badge-warning { background: #fef9c3; color: var(--amber); }
.badge-danger  { background: #fee2e2; color: var(--red); }
.badge-neutral { background: var(--gray-200); color: var(--gray-600); }

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem 1.2rem;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-brand { font-weight: 700; font-size: 1rem; margin-right: auto; }
.topbar-user  { font-size: .85rem; color: var(--gray-600); }

/* ── Cards / container ── */
.container { max-width: 900px; margin: 2rem auto; padding: 0 1rem; }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.card h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--gray-100); }
th { font-weight: 600; color: var(--gray-600); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }

.muted { color: var(--gray-400); font-size: .9rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .container { padding: 0 .5rem; }
  .card { padding: 1rem; }
}
