/* Ourel — Shared Design System */
/* Imported by both admin and parent portals. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #0F172A;
  --navy-mid:    #1E293B;
  --gold:        #C9A84C;
  --gold-light:  rgba(201,168,76,0.12);
  --white:       #FFFFFF;
  --bg:          #F8FAFC;
  --gray-50:     #F8FAFC;
  --gray-100:    #F1F5F9;
  --gray-200:    #E2E8F0;
  --gray-400:    #94A3B8;
  --gray-600:    #64748B;
  --gray-800:    #0F172A;
  --success:     #16A34A;
  --success-bg:  #F0FDF4;
  --red:         #DC2626;
  --red-bg:      #FEF2F2;
  --amber:       #D97706;
  --amber-bg:    #FFFBEB;
  --radius:      14px;
  --radius-sm:   10px;
  --shadow-card: 0 2px 12px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.04);
  --shadow-hover:0 12px 32px rgba(15,23,42,0.10), 0 2px 8px rgba(15,23,42,0.04);
  --shadow-modal:0 24px 64px rgba(15,23,42,0.14), 0 4px 16px rgba(15,23,42,0.06);
  --shadow-gold: 0 4px 20px rgba(201,168,76,0.28);
  --glass-bg:    rgba(255,255,255,0.68);
  --glass-border:rgba(255,255,255,0.82);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #dde8ff 0%, #edf2ff 25%, #e8f5fe 50%, #eaf9f2 75%, #f0ecff 100%);
  background-attachment: fixed;
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(139,160,255,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(120,220,180,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(201,168,76,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.page-content { animation: fadeIn 0.35s cubic-bezier(0.16,1,0.3,1) forwards; }

/* ══ SPLIT AUTH LAYOUT ══════════════════════════════════════════════ */
.auth-split { min-height: 100vh; display: flex; }

.auth-left {
  width: 42%;
  background: var(--navy);
  background-image: linear-gradient(155deg, #080f1e 0%, #1a2744 55%, #0F172A 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(201,168,76,0.10) 0%, transparent 60%);
  pointer-events: none;
}

.auth-left::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.auth-left-inner { text-align: center; position: relative; z-index: 1; max-width: 320px; }
.auth-left-logo { margin-bottom: 28px; }

.auth-tagline {
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.9;
}

.auth-oneliner { color: rgba(255,255,255,0.36); font-size: 14.5px; line-height: 1.85; }

.auth-right {
  flex: 1;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 44px;
  overflow-y: auto;
  position: relative;
}

.auth-form-wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.76);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.10), 0 4px 16px rgba(15,23,42,0.05);
}

.auth-form-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.04em;
}

.auth-form-subtitle { color: var(--gray-600); font-size: 13.5px; line-height: 1.55; margin-bottom: 32px; }

/* ── Legacy centered auth ── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { background: var(--glass-bg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--glass-border); border-radius: 16px; padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-modal); }

/* ── Auth form wrap mobile ── */
@media (max-width: 640px) {
  .auth-form-wrap { padding: 32px 24px; }
}
.auth-logo { text-align: center; display: flex; flex-direction: column; align-items: center; }
.auth-logo p { color: var(--gray-600); font-size: 14px; margin-top: 8px; }

/* ── Auth Tabs ── */
.auth-tabs { display: flex; border-bottom: 1px solid rgba(0,0,0,0.07); margin-bottom: 28px; }

.auth-tab {
  flex: 1;
  padding: 10px 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-400);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .18s ease;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.auth-tab.active { color: var(--navy); border-bottom-color: var(--navy); }

/* ══ FORMS ═══════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }

label { display: block; font-size: 12.5px; font-weight: 600; color: var(--gray-600); margin-bottom: 5px; letter-spacing: 0.02em; }

input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--navy);
  background: rgba(255,255,255,0.80);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.10);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ══ BUTTONS ═════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary            { background: linear-gradient(135deg, #1a2744 0%, #0F172A 100%); color: var(--white); box-shadow: 0 2px 10px rgba(15,23,42,0.22), inset 0 1px 0 rgba(255,255,255,0.08); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #d4af37 0%, #C9A84C 100%); color: var(--navy); box-shadow: 0 6px 22px rgba(201,168,76,0.38); transform: translateY(-1px); }

.btn-green              { background: linear-gradient(135deg, #1a2744 0%, #0F172A 100%); color: var(--white); box-shadow: 0 2px 10px rgba(15,23,42,0.22), inset 0 1px 0 rgba(255,255,255,0.08); }
.btn-green:hover:not(:disabled)   { background: linear-gradient(135deg, #d4af37 0%, #C9A84C 100%); color: var(--navy); box-shadow: 0 6px 22px rgba(201,168,76,0.38); transform: translateY(-1px); }

.btn-outline            { background: rgba(255,255,255,0.65); border: 1.5px solid rgba(226,232,240,0.90); color: var(--gray-600); backdrop-filter: blur(12px); box-shadow: 0 1px 4px rgba(15,23,42,0.05); }
.btn-outline:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); background: rgba(255,255,255,0.90); box-shadow: 0 2px 10px rgba(15,23,42,0.08); }

.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ══ ALERTS ══════════════════════════════════════════════════════════ */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; line-height: 1.5; }
.alert-error   { background: rgba(254,242,242,0.90); color: var(--red);    border: 1px solid #fecaca; }
.alert-success { background: rgba(240,253,244,0.90); color: var(--success); border: 1px solid #bbf7d0; }
.alert-warning { background: rgba(255,251,235,0.90); color: var(--amber);  border: 1px solid #fde68a; }
.alert-info    { background: rgba(239,246,255,0.90); color: #1d4ed8;       border: 1px solid #bfdbfe; }

/* ── Utilities ── */
.hidden { display: none !important; }

/* ══ CARDS ═══════════════════════════════════════════════════════════ */
.card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: var(--radius);
  box-shadow: 0 2px 16px rgba(15,23,42,0.07), 0 1px 3px rgba(15,23,42,0.04), inset 0 1px 0 rgba(255,255,255,0.80);
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.045);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ══ TABLES ══════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead { background: rgba(248,250,252,0.50); }

th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .09em;
  white-space: nowrap;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

td { padding: 13px 16px; border-top: 1px solid rgba(0,0,0,0.03); color: var(--navy); vertical-align: middle; }
tr:nth-child(even) td { background: rgba(248,250,252,0.40); }
tr:hover td { background: rgba(201,168,76,0.04); transition: background .12s ease; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.badge-paid    { background: rgba(220,252,231,0.90); color: #15803d; border: 1px solid rgba(134,239,172,0.55); box-shadow: 0 1px 3px rgba(22,163,74,0.10); }
.badge-unpaid  { background: rgba(254,226,226,0.90); color: #b91c1c;  border: 1px solid rgba(252,165,165,0.55); box-shadow: 0 1px 3px rgba(220,38,38,0.10); }
.badge-pending { background: rgba(254,243,199,0.90); color: #b45309;  border: 1px solid rgba(252,211,77,0.55);  box-shadow: 0 1px 3px rgba(217,119,6,0.10); }

/* ── Empty State ── */
.empty-state { padding: 56px 24px; text-align: center; }
.empty-state .icon { font-size: 40px; margin-bottom: 16px; opacity: 0.30; }
.empty-state h4 { color: var(--navy); margin-bottom: 8px; font-size: 16px; }
.empty-state p { color: var(--gray-400); font-size: 14px; }

/* ── Spinner ── */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.25); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* iOS Safari: background-attachment: fixed causes compositing issues with fixed overlays */
@supports (-webkit-touch-callout: none) {
  body { background-attachment: scroll; }
}
