/* ========= Login Page – Zaha Cultural Center Theme ========= */

:root {
  /* Zaha Brand Colors */
  --color-white: #ffffff;
  --color-ivory: #f1ede5;
  --color-teal: #00899a;
  --color-coral: #f25242;
  --color-orange: #ff8a00;
  --color-gold: #ffba00;
  --color-black: #000000;
  --color-navy: #184682;
  --color-purple: #8062c6;
  --color-emerald: #00a240;

  /* Theme Tokens */
  --bg: var(--color-ivory);
  --card: var(--color-white);
  --ink: var(--color-black);
  --muted: #6b7280;
  --primary: var(--color-teal);
  --primary-dark: var(--color-navy);
  --danger: var(--color-coral);
  --warning: var(--color-orange);
  --success: var(--color-emerald);
  --info: var(--color-purple);
  --border: rgba(24,70,130,0.18);
  --ring: rgba(0,137,154,0.25);
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,.06);
  --transition: all .2s ease;
}

/* ======== Base ======== */
body {
  background: var(--bg);
  font-family: 'Inter', 'Cairo', sans-serif;
  color: var(--ink);
}

/* ======== Card ======== */
.login-card.card {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .25s ease;
}
.login-card.card:hover { transform: translateY(-3px); }

.card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.card-header h4 { font-weight: 700; margin: 0; }

/* ======== Inputs ======== */
.form-label {
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--ink);
}
.form-control,
.form-select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .7rem .9rem;
  transition: var(--transition);
  background: var(--color-white);
}
.form-control::placeholder { color: #9ca3af; }
.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
  outline: none;
}

/* ======== Alerts ======== */
.alert-danger {
  background: rgba(242,82,66,0.1);
  border: 1px solid rgba(242,82,66,0.3);
  color: var(--danger);
  border-radius: 10px;
}
.alert-success {
  background: rgba(0,162,64,0.1);
  border: 1px solid rgba(0,162,64,0.3);
  color: var(--success);
  border-radius: 10px;
}

/* ======== Buttons ======== */
.btn {
  border-radius: 10px;
  font-weight: 600;
  padding: .65rem 1rem;
  transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  box-shadow: 0 4px 14px rgba(0,137,154,.3);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,137,154,.35);
}
.btn-outline-secondary {
  border-color: var(--border);
  color: var(--muted);
}
.btn-outline-secondary:hover { background: var(--border); }

/* ======== Input group (show/hide password) ======== */
.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* ======== Country selector ======== */
.country-select {
  position: relative;
}
.country-select-trigger {
  text-align: start;
}
.country-select-list {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  margin-top: .35rem;
  max-height: 240px;
  overflow-y: auto;
  z-index: 1050;
}
.country-select-search-wrapper {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.country-select-search {
  font-size: .85rem;
}
.country-select-option {
  border: none;
  background: transparent;
  padding: .5rem .75rem;
}
.country-select-option[aria-selected="true"],
.country-select-option:focus {
  background: var(--ring);
  outline: none;
}
.country-select-flag {
  font-size: 1.2rem;
  line-height: 1;
}
.country-select-flag img {
  width: 1.2rem;
  height: 1.2rem;
  object-fit: cover;
  border-radius: 50%;
}
.iti {
  width: 100%;
}
.iti__custom-flag .iti__flag {
  background-image: none !important;
}
.iti__custom-flag .iti__flag::before {
  content: attr(data-custom-flag);
  font-size: 1rem;
}
.iti__selected-flag.iti__custom-flag::before {
  content: attr(data-custom-flag);
  font-size: 1rem;
}
.iti__selected-flag.iti__custom-flag .iti__flag {
  display: none;
}
.iti__custom-flag-image {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  object-fit: cover;
}
.input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* ======== Links ======== */
.link-muted {
  color: var(--muted);
  font-weight: 600;
  transition: var(--transition);
}
.link-muted:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ======== Remember me (RTL) ======== */
.form-check {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.4;
}
.form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: .45rem;
  accent-color: var(--primary);
}
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem var(--ring);
}
html[dir="rtl"] .form-check { flex-direction: row-reverse; }
html[dir="rtl"] .form-check .form-check-input { margin-left: .35rem; }
html[dir="ltr"] .form-check .form-check-input { margin-right: .35rem; }

/* ======== Spacing ======== */
.card-body { padding: 1.5rem; }
.login-actions { margin-top: .5rem; }

/* ======== Responsive ======== */
@media (max-width: 576px) {
  .card-body { padding: 1rem; }
  .btn { width: auto; }
}

/* ======== Dark Mode (Optional) ======== */
html[data-bs-theme='dark'] {
  --bg: #0d1117;
  --card: #1e293b;
  --ink: var(--color-ivory);
  --muted: rgba(241, 237, 229, 0.65);
  --border: rgba(255,255,255,0.1);
  --shadow: 0 8px 24px rgba(0,0,0,.6);
}
