* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a2e;
  background: #f4f5f7;
}

#status {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 6px;
  background: #e8f0fe;
  color: #1a4d8f;
}

#status.error {
  background: #fdecea;
  color: #b3261e;
}

/* Login page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 10px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-card .login-logo {
  height: 36px;
  display: block;
}

.login-card p {
  margin: 0 0 20px;
  color: #55596b;
  font-size: 0.95rem;
}

.login-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.login-card input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid #c9cdd6;
  border-radius: 6px;
  font-size: 1rem;
}

.login-card button {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 6px;
  background: #1a4d8f;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.login-card button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Dashboard page */
.dashboard-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #e2e4ea;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.topbar .brand img {
  height: 32px;
  display: block;
}

.topbar .user {
  font-size: 0.9rem;
  color: #55596b;
}

.topbar a {
  margin-left: 12px;
  color: #1a4d8f;
}

.dashboard-page #status {
  margin: 12px 20px;
}

#dashboard-content {
  flex: 1;
  min-height: 600px;
  position: relative;
}

/* The aibi-client iframe carries inline width/height 100%, but the percentage
   height collapses to the 150px default inside the flex container. Absolute
   positioning pins it to the container reliably. */
#dashboard-content iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
