/* FIC 369 — Control Panel auth pages (Login & Sign Up) */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&family=Raleway:wght@700;800&display=swap');

:root {
  --cp-navy: #1a365d;
  --cp-teal: #1a8a7d;
  --cp-teal-dark: #157a6e;
  --cp-gold: #c59b27;
  --cp-bg: #f3f6fa;
  --cp-card: #ffffff;
  --cp-text: #334155;
  --cp-muted: #64748b;
  --cp-border: rgba(26, 54, 93, 0.12);
  --cp-shadow: 0 18px 50px rgba(26, 54, 93, 0.12);
  --cp-radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.cp-auth {
  font-family: 'Open Sans', 'Segoe UI', sans-serif;
  color: var(--cp-text);
  background:
    radial-gradient(circle at 10% 20%, rgba(26, 138, 125, 0.12), transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(197, 155, 39, 0.14), transparent 36%),
    linear-gradient(180deg, #faf9f6 0%, var(--cp-bg) 100%);
}

.cp-auth a {
  color: var(--cp-teal);
  text-decoration: none;
  font-weight: 600;
}

.cp-auth a:hover {
  color: var(--cp-teal-dark);
  text-decoration: underline;
}

/* Layout — login split screen */

.cp-auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  min-height: 100vh;
}

.cp-auth-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.cp-auth-card__inner {
  width: 100%;
  max-width: 400px;
  background: var(--cp-card);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  box-shadow: var(--cp-shadow);
  padding: 34px 32px 30px;
}

.cp-auth-aside {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background:
    linear-gradient(145deg, rgba(26, 54, 93, 0.94) 0%, rgba(26, 138, 125, 0.88) 100%),
    url('../img/top_bar_bg-1.jpg') center / cover no-repeat;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cp-auth-aside::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(26, 54, 93, 0.35), rgba(26, 138, 125, 0.25));
}

.cp-auth-aside__content {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.cp-auth-aside__kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cp-auth-aside h2 {
  margin: 0 0 12px;
  font-family: Raleway, 'Open Sans', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.2;
  font-weight: 800;
}

.cp-auth-aside p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

.cp-auth-aside ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-auth-aside li {
  position: relative;
  padding-left: 22px;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.cp-auth-aside li::before {
  content: '\f00c';
  font-family: FontAwesome;
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--cp-gold);
  font-size: 13px;
}

/* Sign up centered layout */

.cp-auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 40px;
}

.cp-auth-home {
  align-self: flex-start;
  margin: 0 auto 18px;
  max-width: 520px;
  width: 100%;
  font-size: 14px;
}

.cp-auth-card--signup {
  width: 100%;
  max-width: 520px;
  padding: 0;
}

.cp-auth-card--signup .cp-auth-card__inner {
  max-width: none;
}

.cp-auth-foot {
  margin-top: 18px;
  text-align: center;
  color: var(--cp-muted);
  font-size: 14px;
}

/* Brand block */

.cp-auth-brand {
  text-align: center;
  margin-bottom: 22px;
}

.cp-auth-brand img {
  max-width: 148px;
  height: auto;
  margin-bottom: 14px;
}

.cp-auth-brand h1 {
  margin: 0;
  font-family: Raleway, 'Open Sans', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--cp-navy);
}

.cp-auth-brand p {
  margin: 8px 0 0;
  color: var(--cp-muted);
  font-size: 14px;
}

.cp-auth-divider {
  height: 1px;
  background: var(--cp-border);
  margin: 0 0 22px;
  border: 0;
}

/* Form elements */

.cp-form-group {
  margin-bottom: 18px;
}

.cp-form-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cp-navy);
}

.cp-input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--cp-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.cp-input-group:focus-within {
  border-color: rgba(26, 138, 125, 0.55);
  box-shadow: 0 0 0 3px rgba(26, 138, 125, 0.12);
}

.cp-input-group__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--cp-teal), var(--cp-teal-dark));
  color: #fff;
  font-size: 15px;
}

.cp-input-group .form-control,
.cp-input-group select.form-control {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 10px 14px;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 14px;
  color: var(--cp-text);
  background: transparent;
}

.cp-input-group select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}

.cp-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 20px;
  font-size: 13px;
  color: var(--cp-muted);
}

.cp-form-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 500;
  cursor: pointer;
}

.cp-form-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.cp-btn--primary {
  background: linear-gradient(180deg, var(--cp-teal) 0%, var(--cp-teal-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(26, 138, 125, 0.28);
}

.cp-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(26, 138, 125, 0.34);
}

.cp-message {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.cp-message--error {
  color: #c0392b;
}

.cp-message--info {
  color: #1a6fb0;
}

.cp-message--success {
  color: #1a7f5a;
}

.cp-validation,
.cp-auth .text-danger {
  display: block;
  margin-top: 8px;
  color: #c0392b !important;
  font-size: 13px;
  line-height: 1.45;
}

.cp-auth .alert-danger {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(192, 57, 43, 0.25);
  background: rgba(192, 57, 43, 0.08);
  color: #a93226;
  font-size: 13px;
}

/* Responsive */

@media (max-width: 991px) {
  .cp-auth-layout {
    grid-template-columns: 1fr;
  }

  .cp-auth-aside {
    order: -1;
    min-height: 240px;
    padding: 36px 28px;
  }

  .cp-auth-card {
    padding-top: 0;
  }
}

@media (max-width: 480px) {
  .cp-auth-card__inner {
    padding: 26px 20px 22px;
  }

  .cp-auth-brand h1 {
    font-size: 1.45rem;
  }
}
