:root {
  --bg: #e6f2ff;
  --blue: #1b4fd8;
  --blue-dark: #0c2d6b;
  --red: #e31e24;
  --text: #1a1a1a;
  --text-muted: #5a6b82;
  --input-bg: #f0f5fc;
  --border: #c5d4e8;
  --card: #fff;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 8px 32px rgba(12, 45, 107, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 32px;
}

.auth-page {
  width: 100%;
  max-width: 400px;
}

/* Logo */
.cb-logo {
  text-align: center;
  margin-bottom: 22px;
}

.cb-logo-main {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.cb-connect {
  color: var(--blue);
}

.cb-bd {
  color: var(--red);
}

.cb-dot {
  color: var(--text);
}

.cb-logo-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.cb-line {
  flex: 1;
  max-width: 72px;
  height: 1px;
  background: var(--text);
}

.cb-online {
  font-family: Pacifico, cursive;
  font-size: 15px;
  color: var(--text);
  line-height: 1;
}

/* Card + tabs */
.auth-panel {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.auth-tabs {
  display: flex;
  margin: 14px 14px 0;
  border: 2px solid var(--blue-dark);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

.auth-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: none;
  transition: background 0.2s, color 0.2s;
}

.auth-tab + .auth-tab {
  border-left: 2px solid var(--blue-dark);
}

.auth-tab.is-active {
  background: var(--blue-dark);
  color: #fff;
}

.auth-tab:not(.is-active):hover {
  background: #f5f9ff;
}

.auth-tab i {
  font-size: 13px;
}

.auth-body {
  padding: 22px 20px 24px;
}

.auth-heading {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
  color: var(--text);
}

.auth-heading em {
  font-style: normal;
  color: var(--blue);
}

.auth-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.45;
}

/* Alerts */
.auth-alert {
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.auth-alert.ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.auth-alert.err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-ref-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: #e8f2ff;
  border: 1.5px solid rgba(27, 79, 216, 0.2);
  border-radius: var(--radius);
  font-size: 12px;
}

.auth-ref-banner i {
  color: var(--blue);
  font-size: 18px;
}

.auth-ref-banner strong {
  display: block;
  color: var(--text);
  font-size: 12px;
}

.auth-ref-banner span {
  color: var(--text-muted);
  font-size: 11px;
}

/* Floating label fields */
.field {
  position: relative;
  margin-bottom: 18px;
}

.field-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.field-row .field {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.field-input {
  position: relative;
}

.field-input input {
  width: 100%;
  padding: 16px 14px 10px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--input-bg);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-input input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 79, 216, 0.12);
}

.field-input input.readonly {
  background: #e8eef8;
  color: var(--text-muted);
}

.field-input input::placeholder {
  color: #9aa8bc;
}

.field-label {
  position: absolute;
  left: 38px;
  top: -8px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--input-bg);
  z-index: 1;
  pointer-events: none;
}

.field-input:focus-within .field-label,
.field-input input:not(:placeholder-shown) + .field-label {
  color: var(--blue);
}

.field-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a9bb5;
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.field-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #8a9bb5;
  cursor: pointer;
  padding: 4px;
  font-size: 15px;
  line-height: 1;
}

.field-toggle:hover {
  color: var(--blue);
}

.field.has-toggle input {
  padding-right: 40px;
}

/* Form extras */
.auth-forgot {
  text-align: right;
  margin: -6px 0 14px;
}

.auth-forgot a {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
}

.auth-forgot a:hover {
  text-decoration: underline;
}

.auth-remember {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.auth-remember input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--blue);
  flex-shrink: 0;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--blue-dark);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: #0a2555;
}

.btn-primary:active {
  transform: scale(0.99);
}

.auth-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #f0a8a8 20%, #f0a8a8 80%, transparent);
  margin: 22px 0 18px;
  border: none;
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius);
  background: #1a1a1a;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-google:hover {
  opacity: 0.92;
}

.btn-google[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-google .g-icon {
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: #1a1a1a;
  font-family: inherit;
}

.auth-foot-link {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-foot-link a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.auth-foot-link a:hover {
  text-decoration: underline;
}

.auth-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: -8px 0 14px;
}

.auth-demo {
  text-align: center;
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.auth-demo code {
  background: var(--input-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}

@media (max-width: 360px) {
  .cb-logo-main {
    font-size: 28px;
  }

  .auth-heading {
    font-size: 22px;
  }

  .field-row {
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
  }

  .field-row .field {
    margin-bottom: 18px;
  }
}
