/* ============================================================
   Engage fi — Meeting Light Portal
   Design system matched to efi-renewal-tracker
   ============================================================ */

/* Google Fonts: Poppins (headings/nav) + Public Sans (body) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Public+Sans:wght@400;500;600;700&display=swap');

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Public Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #0a2239;
  background-color: #f8fafc;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #0a2239;
  line-height: 1.25;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }

a {
  color: #00539c;
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---- Layout ---- */
.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout__main {
  flex: 1;
  padding: 1.25rem 1.5rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.layout__main:has(.login-page) {
  max-width: 1120px;
}

/* ---- Header ---- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 1.5rem;
  background-color: #0a2239;
  color: #ffffff;
}

.header__brand {
  display: flex;
  align-items: center;
}

.header__logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
}
.header__logo-link:hover { opacity: 0.9; text-decoration: none; }

.header__logo {
  height: 85px;
  width: auto;
  margin-top: 10px;
}

.header__app-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
}

.header__nav {
  margin-left: 1.5rem;
  display: flex;
  gap: 0.25rem;
}

.header__nav-link {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.2s ease;
}
.header__nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
}
.header__nav-link--active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.header__actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 1rem;
}

.header__user-name {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
}

.header__signout {
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.2s ease;
}
.header__signout:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
}

/* ---- Footer ---- */
.footer {
  padding: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
}

/* ---- Cards ---- */
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(10, 34, 57, 0.05);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.card__header {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.card__header h3 {
  margin: 0;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card__body {
  padding: 1rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.5;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background-color: #60dd4a;
  color: #0a2239;
}
.btn--primary:hover {
  background-color: #4fc93a;
  transform: translateY(-1px);
}

.btn--secondary {
  background-color: #00539c;
  color: #ffffff;
}
.btn--secondary:hover {
  background-color: #004080;
  transform: translateY(-1px);
}

.btn--outline {
  background-color: transparent;
  color: #0a2239;
  border: 1px solid #d1d5db;
}
.btn--outline:hover {
  background-color: #f3f4f6;
}

.btn--danger {
  background-color: transparent;
  color: #ef4444;
  border: 1px solid #ef4444;
}
.btn--danger:hover {
  background-color: #fef2f2;
}

.btn--block { width: 100%; }

.btn--sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn--lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

/* Microsoft sign-in button */
.btn--microsoft {
  background-color: #ffffff;
  color: #0a2239;
  border: 1px solid #d1d5db;
  padding: 0.75rem 2rem;
  font-size: 1rem;
}
.btn--microsoft:hover {
  background-color: #f3f4f6;
  transform: translateY(-1px);
}
.btn--microsoft img {
  height: 20px;
  width: 20px;
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.875rem;
  color: #0a2239;
  background: #ffffff;
  transition: border-color 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: #00539c;
  box-shadow: 0 0 0 3px rgba(0, 83, 156, 0.15);
}

select.form-input {
  appearance: auto;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 400;
}
.checkbox-label input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: #60dd4a;
}

/* ---- Status indicator ---- */
.status-indicator {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 1.5rem auto;
  transition: background-color 1s ease;
}

.status-free {
  background-color: #60dd4a;
  box-shadow: 0 0 24px rgba(96, 221, 74, 0.45);
}

.status-warning {
  background-color: #eab308;
  box-shadow: 0 0 24px rgba(234, 179, 8, 0.45);
}

.status-meeting {
  background-color: #ef4444;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.45);
}

.status-off_hours, .status-off {
  background-color: #6b7280;
  box-shadow: 0 0 16px rgba(107, 114, 128, 0.25);
}

.status-connecting, .status-unknown {
  background-color: #9ca3af;
  box-shadow: 0 0 16px rgba(156, 163, 175, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-label {
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-label--free { color: #60dd4a; }
.status-label--warning { color: #eab308; }
.status-label--meeting { color: #ef4444; }
.status-label--off_hours, .status-label--off { color: #6b7280; }
.status-label--connecting, .status-label--unknown { color: #9ca3af; }

/* ---- Grid ---- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---- Login page ---- */
.login-page {
  padding: 0;
}

.login-page__title {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.login-page__subtitle {
  text-align: center;
  color: #4b5563;
  font-size: 0.9375rem;
  max-width: 600px;
  margin: 0 auto 1rem;
  line-height: 1.5;
}

.login-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 1rem;
  align-items: start;
}

.login-grid .card {
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .login-grid {
    grid-template-columns: 1fr;
    max-width: 540px;
    margin: 0 auto;
  }
}

.login-card__colors {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 1.25rem;
}

.login-card__color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.login-card__color-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}
.login-card__color-dot--green { background-color: #60dd4a; }
.login-card__color-dot--yellow { background-color: #eab308; }
.login-card__color-dot--red { background-color: #ef4444; }

/* ---- Setup steps ---- */
.step-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background-color: #60dd4a;
  color: #0a2239;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background-color: #00539c;
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
}

.step-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Setup numbered list */
.setup-steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}
.setup-steps li {
  padding: 0.375rem 0;
  padding-left: 2rem;
  position: relative;
  font-size: 0.8125rem;
}
.setup-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.375rem;
  width: 20px;
  height: 20px;
  background-color: #e5e7eb;
  color: #374151;
  border-radius: 50%;
  font-size: 0.6875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bulb radio cards */
.bulb-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bulb-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.bulb-option:hover {
  border-color: #00539c;
  background-color: #f8fafc;
}
.bulb-option input[type="radio"] {
  accent-color: #00539c;
}
.bulb-option__name {
  font-weight: 500;
}
.bulb-option__meta {
  font-size: 0.8125rem;
  color: #6b7280;
}
.bulb-option__status {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-weight: 500;
}
.bulb-option__status--online {
  background-color: rgba(96, 221, 74, 0.15);
  color: #16a34a;
}
.bulb-option__status--offline {
  background-color: #f3f4f6;
  color: #9ca3af;
}

/* ---- Pause banner ---- */
.pause-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background-color: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #92400e;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ---- Error message ---- */
.error-msg {
  padding: 0.75rem 1rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ---- Details/accordion ---- */
details {
  margin-top: 1rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}
details summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #00539c;
}
details summary:hover { text-decoration: underline; }

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}
.badge--active {
  background-color: rgba(96, 221, 74, 0.15);
  color: #16a34a;
}
.badge--paused {
  background-color: #fef3c7;
  color: #92400e;
}

/* ---- Callout ---- */
.callout {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1.4;
  margin-top: 0.75rem;
}

.callout--warning {
  background-color: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.callout--info {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* ---- Product recommendation ---- */
.product-rec {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.product-rec__badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background-color: rgba(96, 221, 74, 0.15);
  color: #16a34a;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.product-rec__name {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: #0a2239;
  margin-bottom: 0.375rem;
}

.product-rec__desc {
  font-size: 0.8125rem;
  color: #4b5563;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.product-rec__links {
  display: flex;
  gap: 0.5rem;
}

/* ============================================================
   Logo Loader — 18-segment chase animation
   Port of Angular LogoLoaderComponent to pure CSS/JS
   ============================================================ */
.logo-loader {
  position: relative;
  display: inline-block;
}

.logo-loader__base {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.25;
}

.logo-loader__segments {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.logo-loader__segment {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.logo-loader__segment img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Speed variants */
.logo-loader--slow .logo-loader__segment {
  animation: segment-light 2s ease-in-out infinite;
}
.logo-loader--normal .logo-loader__segment {
  animation: segment-light 1.2s ease-in-out infinite;
}
.logo-loader--fast .logo-loader__segment {
  animation: segment-light 0.8s ease-in-out infinite;
}

@keyframes segment-light {
  0%    { opacity: 0; }
  5.5%  { opacity: 1; }
  11%   { opacity: 1; }
  16.5% { opacity: 0; }
  100%  { opacity: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .logo-loader__segment {
    animation: segment-light-subtle 3s ease-in-out infinite !important;
  }
  .logo-loader__base { opacity: 0.5; }

  @keyframes segment-light-subtle {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 0.7; }
  }
}

/* ---- Admin dashboard ---- */
.admin__stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #0a2239;
  line-height: 1.2;
}
.admin__stat-number--active { color: #16a34a; }
.admin__stat-number--paused { color: #92400e; }

.admin__stat-label {
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: 500;
}

.admin__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin__table thead {
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.admin__table th {
  padding: 0.625rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  color: #374151;
}

.admin__table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.admin__table tbody tr:last-child td { border-bottom: none; }
.admin__table tbody tr:hover { background-color: #f9fafb; }

.admin__user-name {
  font-weight: 500;
  color: #0a2239;
}

.admin__user-email {
  font-size: 0.75rem;
  color: #6b7280;
}

.admin__status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.375rem;
  vertical-align: middle;
}

.admin__status-text {
  vertical-align: middle;
}

.admin__actions {
  white-space: nowrap;
}

/* ---- Color picker (settings) ---- */
.color-picker-grid {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.color-picker-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.color-picker-item label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.color-input {
  width: 48px;
  height: 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  padding: 2px;
  background: #ffffff;
}
.color-input::-webkit-color-swatch-wrapper { padding: 2px; }
.color-input::-webkit-color-swatch { border-radius: 4px; border: none; }
.color-input::-moz-color-swatch { border-radius: 4px; border: none; }

.color-preview {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .admin__table { font-size: 0.8125rem; }
  .admin__table th,
  .admin__table td { padding: 0.5rem 0.75rem; }
  .color-picker-grid { flex-direction: column; gap: 1rem; }
}

@media (max-width: 640px) {
  .header__nav { display: none; }
  .header__app-name { font-size: 1rem; }
  .layout__main { padding: 1rem; }
  .login-card { padding: 2rem 1.5rem; }
}
