/* Login page standalone styles */
:root {
  --bg-1: #f7f9fc;
  --bg-2: #f1f5ff;
  --surface: rgba(255, 255, 255, 0.6);
  --border: rgba(221, 227, 238, 0.9);
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.6);
  --shadow: rgba(15, 23, 42, 0.14);
  --label-bg: rgba(255, 255, 255, 0.75);
  --error-bg: linear-gradient(180deg, rgba(255,110,160,0.08), rgba(255,182,217,0.08));
  --error-border: rgba(255,110,160,0.35);
  --error-text: #8b1d3b;
}
:root[data-theme="dark"] {
  --bg-1: #0b0f17;
  --bg-2: #0f131b;
  --surface: rgba(24, 28, 36, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e5e7eb;
  --muted: rgba(229, 231, 235, 0.7);
  --shadow: rgba(3, 6, 12, 0.45);
  --label-bg: rgba(28, 32, 40, 0.7);
  --error-bg: linear-gradient(180deg, rgba(255,110,160,0.06), rgba(255,182,217,0.06));
  --error-border: rgba(255,110,160,0.25);
  --error-text: #fecaca;
}
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Tajawal","Cairo",-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color: var(--text);
  background-image: linear-gradient(180deg, var(--bg-1), var(--bg-2));
}
.app { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.content { display: grid; grid-template-rows: auto 1fr; }
.navbar { backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.brand-logo { font-weight: 800; letter-spacing: .3px; }
.icon-btn { width: 36px; height: 36px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px var(--shadow); }
.page { padding: 16px; }
.section { display: grid; gap: 12px; }
.section-header { font-weight: 800; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; color: var(--text); }
.section-body { }
.card { border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: 0 12px 26px var(--shadow); }
.btn { padding: 12px 14px; border-radius: 999px; border: 1px solid rgba(255,182,217,0.6); background: linear-gradient(135deg, rgba(255,182,217,0.55), rgba(184,227,255,0.55)); color: var(--text); font-weight: 800; box-shadow: 0 12px 26px var(--shadow); cursor: pointer; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px var(--shadow); }
.btn:disabled { opacity: .7; cursor: not-allowed; }
.input-modern { appearance: none; border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,182,217,0.06), rgba(184,227,255,0.06)); border-radius: 16px; padding: 12px 14px; font-size: 15px; color: var(--text); box-shadow: 0 8px 18px var(--shadow); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; width: 100%; }
.input-modern:focus { outline: none; border-color: rgba(255,182,217,0.6); box-shadow: 0 0 0 3px rgba(255,182,217,0.25), 0 12px 24px var(--shadow); background: linear-gradient(180deg, rgba(255,182,217,0.1), rgba(184,227,255,0.1)); }
.row { display: flex; align-items: center; justify-content: space-between; }
.field { position: relative; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.forgot { color: var(--text); text-decoration: none; font-weight: 700; border-bottom: 1px dashed rgba(255,182,217,0.5); }
.forgot:hover { border-color: rgba(255,182,217,0.8); }
.footer-spacer { height: 24px; }

/* Login page layout */
.login-bg { border-radius: 18px; padding: 14px; }
.login-full { min-height: calc(100vh - 120px); display: grid; }
.login-wrap { display: flex; align-items: center; justify-content: center; width: 100%; }
.login-card { padding: 50px; border-radius: 24px; width: min(92vw, 480px); max-width: 480px; }
.login-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; padding: 10px 14px; border-radius: 18px; background: var(--label-bg); border: 1px solid var(--border); box-shadow: 0 12px 26px var(--shadow); }
.login-welcome { margin: 16px 0 24px; font-size: 22px; font-weight: 800; }
.login-error { display: none; margin-bottom: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--error-border); background: var(--error-bg); color: var(--error-text); box-shadow: 0 8px 18px var(--shadow); font-weight: 700; }
.login-form { display: grid; gap: 14px; }
.login-label { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); pointer-events: none; color: var(--text); opacity: 0.6; transition: transform 0.18s ease, color 0.18s ease, opacity 0.18s ease, font-size 0.18s ease; padding: 0 6px; background: transparent; }
.input-modern::placeholder { opacity: 0; }
.input-modern:focus + .login-label,
.input-modern:not(:placeholder-shown) + .login-label { transform: translateY(-34px) scale(0.92); color: var(--text); opacity: 0.85; font-weight: 700; background: var(--label-bg); border: 1px solid var(--border); border-radius: 10px; }
.login-pass { position: relative; }
.login-toggle { position: absolute; top: 50%; left: 10px; transform: translateY(-50%); padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: 0 6px 14px var(--shadow); font-size: 13px; cursor: pointer; }
.login-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(184,227,255,0.9); border-top-color: rgba(255,182,217,0.9); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

[data-theme="dark"] body { color: #e5e7eb; }
[data-theme="dark"] .card { background: rgba(20, 20, 25, 0.6); border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .input-modern { background: linear-gradient(180deg, rgba(255,182,217,0.04), rgba(184,227,255,0.04)); }


.helper-tip {
  position: fixed;
  z-index: 50;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 182, 217, 0.18), rgba(184, 227, 255, 0.18));
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 10px 22px var(--shadow);
  font-size: 13px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}