/* =====================================================
 * AUTH STYLESHEET — Register & Login
 * Holiday Home Management System
 * ===================================================== */

/* ─── Page Wrapper ────────────────────────────────── */
.auth-page {
  background: #f4f6f5;
  min-height: calc(100vh - var(--navbar-height));
  padding: 60px 0 80px;
  margin-top: var(--navbar-height);
}

/* ─── Form Card ───────────────────────────────────── */
.reg-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 780px;
  margin: 0 auto;
  padding: 44px 52px 52px;
}

.reg-card-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 2px solid #e6eeec;
}

/* ─── Section Dividers ────────────────────────────── */
.form-section {
  margin-bottom: 32px;
}

.form-section-title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
  background: #edf4f3;
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 20px;
  border-left: 3px solid var(--color-primary);
}

/* ─── Form Base ───────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.form-group label .req {
  color: var(--color-danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #d5dede;
  border-radius: var(--border-radius-md);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--color-text);
  background: #fafcfc;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-control::placeholder {
  color: #bcc8c6;
  font-size: 0.88rem;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 69, 64, 0.09);
  background: var(--color-white);
}

.form-control.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.09);
}

.form-control.is-valid {
  border-color: var(--color-success);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.field-error {
  display: none;
  font-size: 0.78rem;
  color: var(--color-danger);
  margin-top: 4px;
}

.field-error.visible {
  display: block;
}

/* ─── Grid Helpers ────────────────────────────────── */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

/* ─── Password Eye Toggle ─────────────────────────── */
.input-group {
  position: relative;
}

.input-group .form-control {
  padding-right: 44px;
}

.pw-toggle {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9aadab;
  font-size: 1rem;
  padding: 0;
  transition: color var(--transition-fast);
}

.pw-toggle:hover {
  color: var(--color-primary);
}

/* ─── Officers Table ──────────────────────────────── */
.officers-table-wrap {
  overflow-x: auto;
  border-radius: var(--border-radius-md);
  border: 1.5px solid #dce8e6;
  margin-top: 6px;
}

.officers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.officers-table thead th {
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

.officers-table thead th:first-child {
  width: 44px;
  text-align: center;
}

.officers-table tbody tr {
  border-bottom: 1px solid #e8f0ee;
}

.officers-table tbody tr:last-child {
  border-bottom: none;
}

.officers-table tbody td {
  padding: 8px 10px;
  vertical-align: middle;
}

.officers-table tbody td:first-child {
  text-align: center;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.officers-table .form-control {
  padding: 7px 10px;
  font-size: 0.85rem;
  margin: 0;
}

/* ─── Declaration ─────────────────────────────────── */
.declaration-box {
  background: #f7f9f8;
  border: 1px solid #dce8e6;
  border-radius: var(--border-radius-md);
  padding: 18px 20px;
  margin-bottom: 28px;
}

.declaration-box p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin: 0;
}

.declaration-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
}

.declaration-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.declaration-check label {
  font-size: 0.85rem;
  color: var(--color-text);
  cursor: pointer;
  line-height: 1.5;
}

/* ─── Alert Messages ──────────────────────────────── */
.alert {
  padding: 13px 18px;
  border-radius: var(--border-radius-md);
  margin-bottom: 22px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert i {
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ─── Submit Button ───────────────────────────────── */
.btn-register {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 40px;
  background: var(--color-accent);
  color: var(--color-text);
  border: none;
  border-radius: var(--border-radius-md);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-base), transform var(--transition-fast);
}

.btn-register:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-register:active {
  transform: translateY(0);
}

/* ─── Login Link ──────────────────────────────────── */
.auth-footer-text {
  text-align: center;
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.auth-footer-text a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-text a:hover {
  text-decoration: underline;
}

/* ─── Password Strength ───────────────────────────── */
.pw-strength-bar {
  height: 4px;
  border-radius: 2px;
  margin-top: 6px;
  background: #dde8e6;
  overflow: hidden;
}

.pw-strength-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}

.pw-strength-text {
  font-size: 0.75rem;
  margin-top: 4px;
  color: var(--color-text-muted);
}

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 860px) {
  .reg-card {
    padding: 32px 24px 40px;
    margin: 0 12px;
  }
}

@media (max-width: 620px) {

  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* =====================================================
 * LOGIN PAGE — specific overrides & additions
 * ===================================================== */

/* ─── Page Banner ─────────────────────────────────── */
.auth-page-banner {
  background: var(--color-primary-dark);
  padding: 28px 0;
  margin-top: var(--navbar-height);
}

.auth-banner-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.auth-banner-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.auth-page-banner .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
}

.auth-page-banner .breadcrumb-item {
  color: rgba(255, 255, 255, 0.6);
}

.auth-page-banner .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.auth-page-banner .breadcrumb-item a:hover {
  color: var(--color-accent);
}

.auth-page-banner .breadcrumb-item+.breadcrumb-item::before {
  content: '/';
  margin-right: 6px;
  color: rgba(255, 255, 255, 0.35);
}

.auth-page-banner .breadcrumb-item.active {
  color: var(--color-accent);
}

/* ─── Login Card ──────────────────────────────────── */
.login-card {
  max-width: 480px;
}

.login-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-icon-wrap {
  width: 62px;
  height: 62px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 22px rgba(0, 69, 64, 0.25);
}

.login-icon-wrap i {
  font-size: 1.5rem;
  color: #ffffff;
}

.login-card-title {
  font-size: 1.3rem;
  margin-bottom: 8px !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.login-card-sub {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ─── Auth Alert (error / success) ───────────────── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--border-radius-md);
  margin-bottom: 22px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-alert i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 1rem;
}

.auth-alert-error {
  background: #fff1f0;
  border: 1px solid #fcc;
  color: #8b1a1a;
}

.auth-alert-error i {
  color: #dc3545;
}

.auth-alert-success {
  background: #edf7ed;
  border: 1px solid #b2dfb2;
  color: #1a5c1a;
}

.auth-alert-success i {
  color: #28a745;
}

.auth-error-list {
  margin: 4px 0 0 0;
  padding-left: 18px;
}

.auth-error-list li+li {
  margin-top: 4px;
}

/* ─── Remember me + Forgot password row ──────────── */
.login-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 17px;
  height: 17px;
  border: 2px solid #c0cecc;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  background: #fff;
}

.checkbox-label input[type="checkbox"]:checked+.checkbox-custom {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox-label input[type="checkbox"]:checked+.checkbox-custom::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}

.login-forgot-link {
  font-size: 0.85rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.login-forgot-link:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* ─── Auth Submit Button ──────────────────────────── */
.btn-auth-submit {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--border-radius-md);
  margin-bottom: 0;
  transition: background var(--transition-base), transform var(--transition-fast), opacity var(--transition-fast);
}

.btn-auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ─── Divider ─────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #dce8e6;
}

/* ─── Register/secondary button ──────────────────── */
.btn-auth-register {
  width: 100%;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--border-radius-md);
  text-decoration: none;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-auth-register:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ─── Login page responsive ───────────────────────── */
@media (max-width: 540px) {
  .login-card {
    margin: 0 12px;
  }

  .auth-page-banner {
    padding: 20px 0;
  }

  .auth-banner-title {
    font-size: 1.2rem;
  }
}