:root {
  --navy: #001D4E;
  --cyan: #00BDEB;
  --cyan-deep: #0099BE;
  --paper: #F4F6FA;
  --white: #FFFFFF;
  --slate: #5A6B85;
  --line: #E1E7F0;
  --danger: #C23B3B;
  --success: #0A7A4A;
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, 'Segoe UI', Inter, sans-serif;
  background: var(--paper);
  color: var(--navy);
  margin: 0;
  line-height: 1.5;
}
.admin-header {
  background: var(--navy);
  color: var(--white);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-header .brand { font-weight: 700; font-size: 16px; }
.admin-header .brand span { color: var(--cyan); }
.admin-header nav { display: flex; gap: 20px; align-items: center; }
.admin-header nav a { color: #B9C6E0; text-decoration: none; font-size: 14px; }
.admin-header nav a:hover { color: var(--white); }
.admin-wrap { max-width: 1000px; margin: 0 auto; padding: 32px 24px 80px; }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 14px; }
.sub { color: var(--slate); font-size: 14px; margin-bottom: 28px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--slate); font-weight: 600; font-size: 12.5px; text-transform: none; }
tr:last-child td { border-bottom: none; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 6px;
  font-size: 14px; font-family: inherit; color: var(--navy);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan-deep); }
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--slate); margin-top: 5px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn {
  display: inline-block; background: var(--navy); color: var(--white); border: none;
  padding: 10px 18px; border-radius: 6px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn:hover { opacity: 0.88; }
.btn.secondary { background: var(--white); color: var(--navy); border: 1.5px solid var(--navy); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: var(--danger); }
.alert { padding: 12px 16px; border-radius: 6px; font-size: 14px; margin-bottom: 20px; }
.alert.error { background: #FDEDED; color: var(--danger); }
.alert.success { background: #EAF7F0; color: var(--success); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.pill.on { background: #EAF7F0; color: var(--success); }
.pill.off { background: #F0F1F5; color: var(--slate); }
.empty { color: var(--slate); font-size: 14px; padding: 20px 0; }
.portal-page {
  min-height: 100vh;
  background-color: var(--navy);
  background-image:
    linear-gradient(135deg, rgba(0, 18, 55, 0.90), rgba(0, 29, 78, 0.64)),
    var(--portal-background);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.portal-organizations { --portal-background: url('/assets/myfrontdeskai-login-hero.png'); }
.portal-agent { --portal-background: url('/assets/hero-capabilities.webp'); }
.portal-extensions { --portal-background: url('/assets/hero-industries.webp'); }
.portal-numbers { --portal-background: url('/assets/hero-talk-to-us.webp'); }
.portal-calendar { --portal-background: url('/assets/hero-how-it-works.webp'); }
.portal-page .admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 18, 55, 0.92);
  border-bottom: 1px solid rgba(97, 220, 245, 0.24);
  box-shadow: 0 8px 28px rgba(0, 8, 28, 0.28);
  backdrop-filter: blur(12px);
}
.portal-page .admin-wrap > h1 {
  color: var(--white);
  font-size: 28px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.portal-page .admin-wrap > .sub {
  color: #C8EDF5;
  max-width: 820px;
}
.portal-page .card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.48);
  border-radius: 16px;
  box-shadow: 0 20px 55px rgba(0, 10, 35, 0.30);
  backdrop-filter: blur(12px);
}
.portal-page .alert { box-shadow: 0 10px 30px rgba(0, 10, 35, 0.20); }
.login-page {
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: start;
  padding: 32px clamp(24px, 8vw, 140px);
  background:
    linear-gradient(135deg, rgba(0, 18, 55, 0.88), rgba(0, 29, 78, 0.62)),
    url('/assets/myfrontdeskai-login-hero.png') center center / cover no-repeat fixed;
}
.login-page .login-wrap {
  width: min(100%, 420px);
  margin: 0;
}
.login-page .login-wrap > h1 {
  color: var(--white);
  font-size: 30px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.32);
}
.login-page .login-wrap > .sub {
  color: #BDEFFA;
  margin: 4px 0 20px;
}
.login-page .card {
  padding: 30px;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(0, 10, 35, 0.38);
  backdrop-filter: blur(12px);
}
.login-page .btn {
  background: var(--cyan-deep);
}
@media (max-width: 520px) {
  .portal-page { background-attachment: scroll; }
  .portal-page .admin-wrap { padding: 24px 16px 60px; }
  .portal-page .admin-header { padding: 14px 16px; }
  .portal-page .admin-header nav { gap: 12px; }
  .login-page {
    justify-items: center;
    padding: 24px 18px;
    background-attachment: scroll;
  }
  .login-page .card {
    padding: 24px;
  }
}
