:root {
  --navy: #1e3a5f;
  --navy-light: #2c5a8f;
  --orange: #e8912f;
  --bg: #f4f6f9;
  --border: #e2e6ec;
  --text: #1e2b3a;
  --text-secondary: #5a6b7d;
  --success-bg: #eaf3ee;
  --success-text: #2f8f5f;
  --info-bg: #eaf0fb;
  --info-text: #3562c9;
  --error-bg: #fbeaea;
  --error-text: #b3352c;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 32px;
}

/* Nav */

.nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.nav-logo { height: 30px; display: block; }

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-links a {
  color: inherit;
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}

.nav-links a.active {
  color: var(--navy);
  font-weight: 700;
  border-bottom-color: var(--orange);
}

.nav-logout button {
  background: none;
  border: none;
  color: #9aa7b5;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.nav-logout button:hover { color: var(--text); }

/* Login */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.login-card {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(20, 40, 70, 0.08);
  padding: 32px 28px;
}

.login-logo {
  width: 100%;
  max-width: 200px;
  display: block;
  margin: 0 auto 24px;
}

/* Cards, headings, alerts */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(20, 40, 70, 0.07);
  padding: 20px 24px;
}

h1 { font-size: 19px; color: var(--navy); margin: 0 0 16px; }

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

.live-indicator {
  font-size: 11px;
  color: #9aa7b5;
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3fb37f;
  display: inline-block;
}

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-error { background: var(--error-bg); color: var(--error-text); }
.alert-success { background: var(--success-bg); color: var(--success-text); }

/* Forms */

form label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

form input,
form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: #f8f9fb;
}

form textarea { min-height: 90px; resize: vertical; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-light); }

.btn-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  text-decoration: underline;
  padding: 0;
  font-weight: 500;
  cursor: pointer;
  font-size: inherit;
}

/* Tables */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(20, 40, 70, 0.07);
}

thead tr { background: #f8f9fb; color: var(--text-secondary); text-align: left; }

th {
  padding: 11px 16px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

td { padding: 12px 16px; border-top: 1px solid #eef1f4; }

tbody tr:nth-child(even) { background: #fafbfc; }

.badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-inbound { background: var(--success-bg); color: var(--success-text); }
.badge-outbound { background: var(--info-bg); color: var(--info-text); }
