/* ============================================================
   Webex Portal — main.css
   Design: refined utilitarian. DM Sans + DM Mono.
   Palette: light backgrounds, cyan accent.
   ============================================================ */

:root {
  --bg:          #f5f7fa;
  --surface:     #ffffff;
  --surface-2:   #eef1f5;
  --border:      #d0d7de;
  --text:        #1a2332;
  --text-muted:  #6e7f96;
  --accent:      #00bceb;     /* Webex blue-cyan */
  --accent-dark: #0099cc;
  --danger:      #cf222e;
  --radius:      10px;
  --radius-lg:   16px;
  --font:        'DM Sans', sans-serif;
  --mono:        'DM Mono', monospace;
  --shadow:      0 8px 32px rgba(0,0,0,0.08);
  --nav-h:       60px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   Top nav
   ============================================================ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon { width: 32px; height: 32px; flex-shrink: 0; }

.brand-name {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-user {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
}

.btn-logout {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.btn-logout:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--surface-2);
  text-decoration: none;
}

/* ============================================================
   Main content area
   ============================================================ */
.content {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* ============================================================
   Home page
   ============================================================ */
.page-home { display: flex; flex-direction: column; gap: 2rem; }

.home-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.avatar-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(0,188,235,0.2);
}

.avatar-initials {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

.greeting-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.greeting-name {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ---- Profile card ---- */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.card-title {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.profile-grid {
  display: grid;
  gap: 0;
}

.profile-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: baseline;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}
.profile-item:last-child { border-bottom: none; }

.profile-item dt {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 400;
}

.profile-item dd {
  font-size: 0.9375rem;
  color: var(--text);
  word-break: break-all;
}

.mono { font-family: var(--mono); font-size: 0.8125rem; color: var(--accent); }

/* ============================================================
   Login page
   ============================================================ */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0,188,235,0.12) 0%, transparent 70%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.login-logo {
  margin-bottom: 1.5rem;
}
.login-logo svg { width: 48px; height: 48px; }

.login-title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  text-align: center;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.btn-webex {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: var(--font);
}
.btn-webex svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-webex:hover {
  background: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-webex:active { transform: translateY(0); }

/* ---- Alert ---- */
.alert {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-error {
  background: rgba(207,34,46,0.08);
  border: 1px solid rgba(207,34,46,0.25);
  color: #a0111f;
}

/* ---- Error page ---- */
.error-code {
  font-size: 5rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
  .topnav { padding: 0 1rem; }
  .content { padding: 2rem 1rem; }
  .profile-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .home-header { flex-direction: column; align-items: flex-start; }
}
