/* ── Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

/* ── Variables ────────────────────────────────────────────────────── */
:root {
  --bg:         #2b2d35;
  --sidebar:    #23252c;
  --card:       #32343e;
  --card-hover: #3a3c47;
  --text:       #ffffff;
  --text-muted: rgba(255,255,255,0.4);
  --text-dim:   rgba(255,255,255,0.22);
  --border:     rgba(255,255,255,0.06);
  --teal:       #00c9a7;
  --pink:       #e91e8c;
  --purple:     #ffffff;
  --blue:       #3b82f6;
  --orange:     #f59e0b;
  --pos:        #00c9a7;
  --neg:        #ff4757;
  --success:    #00c9a7;
  --danger:     #ff4757;
  --warning:    #f59e0b;
  --radius:     14px;
  --sidebar-w:  240px;
  --transition: all .2s ease;
  /* Legacy aliases for templates that use old var names */
  --navy:       #32343e;
  --navy-light: #3a3c47;
  --navy-dim:   #3a3c47;
  --navy-card:  #32343e;
  --gold:       #ffffff;
  --gold-light: #b57aff;
  --gold-dim:   rgba(255,255,255,0.12);
  --gold-glow:  rgba(255,255,255,0.2);
  --white:      #ffffff;
  --bg2:        #2b2d35;
  --card2:      #3a3c47;
  --card3:      #42444f;
  --shadow:     none;
  --border-dim: rgba(255,255,255,0.04);
  --blend:      radial-gradient(ellipse at 0% 0%, rgba(0,0,0,0.5) 0%, transparent 70%);
}

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #2b2d35;
  color: #fff;
  min-height: 100vh;
  line-height: 1.6;
}
a { color: var(--purple); text-decoration: none; }
a:hover { color: #b57aff; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Scrollbar ────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: #2b2d35; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #ffffff; }

/* ── Layout ───────────────────────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ──────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); background: #23252c;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 100; overflow-y: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sidebar:hover {
  transform: translateX(4px);
  box-shadow: 8px 0 32px rgba(0,0,0,0.5), 4px 0 12px rgba(0,0,0,0.3);
}
.sidebar-logo { padding: 22px 16px 16px; text-align: center; }
.sidebar-logo h1 { font-size: 1.2rem; font-weight: 800; color: #fff; font-style: italic; }
.sidebar-logo .tagline { font-size: 1.2rem; color: rgba(255,255,255,0.25); margin-top: 2px; font-family: 'Amiri', serif; }
.sidebar nav { flex: 1; padding: 8px 8px; }
.nav-section { padding: 14px 20px 4px; font-size: .65rem; font-weight: 700; letter-spacing: .12em; color: rgba(255,255,255,0.2); text-transform: uppercase; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; color: rgba(255,255,255,0.45);
  font-size: .875rem; font-weight: 500; border-radius: 8px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  border-left: none; position: relative;
}
.sidebar nav a:hover { transform: translateX(6px); background: #3a3c47; color: #ffffff; }
.sidebar nav a.active { background: #3a3c47; color: #ffffff; font-weight: 600; }
.sidebar nav a .icon { font-size: 1rem; width: 18px; text-align: center; }
.sidebar-footer { padding: 14px 16px; }
.sidebar-footer a { color: rgba(255,255,255,0.25); font-size: .8rem; display: flex; align-items: center; gap: 6px; }
.sidebar-footer a:hover { color: rgba(255,255,255,0.5); }

/* ── Main content ─────────────────────────────────────────────────── */
.main-content { margin-left: var(--sidebar-w); flex: 1; min-width: 0; padding: 28px 32px; }

/* ── Page header ──────────────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 1.4rem; font-weight: 700; color: #fff; text-align: center; }
.page-header p { color: var(--text-muted); font-size: .875rem; margin-top: 4px; text-align: center; }

/* ── Card base + blend effect ─────────────────────────────────────── */
.card, .stat-card, .widget {
  background: #32343e; border-radius: 14px; border: none;
  box-shadow: none; padding: 20px 22px; margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.card::before, .stat-card::before, .widget::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 65%; height: 60%;
  background: var(--blend); pointer-events: none;
  border-radius: 14px 0 0 0; z-index: 0;
}
.card > *, .stat-card > *, .widget > * { position: relative; z-index: 1; }
.card-title {
  font-size: .7rem; font-weight: 700; color: rgba(255,255,255,0.32);
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: .08em;
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .card-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .card-grid-3 { grid-template-columns: 1fr; } }

/* ── Stat cards ───────────────────────────────────────────────────── */
.stat-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-info .label { font-size: .68rem; color: rgba(255,255,255,0.32); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.stat-info .value { font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1.2; }
.stat-info .sub { font-size: .75rem; color: var(--text-muted); }

/* ── Forms ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .06em; }
.form-group .hint { font-size: .72rem; color: var(--text-dim); margin-top: 4px; }
input[type="text"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="email"],
select, textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
  background: rgba(0,0,0,0.25); color: #fff;
  font-size: .875rem; transition: var(--transition); outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.3);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
  color: #fff;
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.22); }
textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
select { 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 d='M1 1l5 5 5-5' stroke='%239b59ff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* Range slider */
input[type="range"] { -webkit-appearance: none; width: 100%; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.08); outline: none; padding: 0; border: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #e91e8c; cursor: pointer; border: none; box-shadow: 0 0 8px rgba(255,255,255,0.4); }
.slider-value { font-size: 1.1rem; font-weight: 800; color: #ffffff; text-align: center; margin-top: 4px; }
.slider-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); color: #fbbf24; border-radius: 8px; padding: 10px 14px; font-size: .85rem; margin-top: 8px; display: none; }
.slider-warning.visible { display: block; }

/* Radio / checkbox */
.radio-group, .check-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.radio-group label, .check-group label { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; cursor: pointer; font-size: .85rem; color: var(--text-muted); transition: var(--transition); background: rgba(255,255,255,0.04); }
.radio-group input[type="radio"], .check-group input[type="checkbox"] { width: auto; padding: 0; border: none; background: none; box-shadow: none; }
.radio-group label:has(input:checked), .check-group label:has(input:checked) { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.4); color: #ffffff; font-weight: 600; }

/* Prayer */
.prayer-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.prayer-row:last-child { border-bottom: none; }
.prayer-name { width: 80px; font-weight: 600; font-size: .875rem; color: #fff; }
.prayer-btns { display: flex; gap: 8px; }
.prayer-btn { padding: 5px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); cursor: pointer; font-size: .78rem; font-weight: 500; color: var(--text-muted); transition: var(--transition); }
.prayer-btn.on_time { background: rgba(0,201,167,0.15); border-color: rgba(0,201,167,0.3); color: #00c9a7; }
.prayer-btn.late { background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.3); color: #fbbf24; }
.prayer-btn.missed { background: rgba(255,71,87,0.15); border-color: rgba(255,71,87,0.3); color: #ff4757; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 10px; border: none; cursor: pointer; font-size: .875rem; font-weight: 700; transition: transform 0.2s ease, box-shadow 0.2s ease; text-decoration: none; }
.btn:active { transform: translateY(0px) scale(0.98); }
.btn-primary { background: radial-gradient(ellipse at 50% 20%, #ff3da8 0%, #c4006e 45%, #7a0044 100%); color: #fff; border: none; box-shadow: 0 0 30px rgba(196,0,110,0.3), 0 8px 20px rgba(0,0,0,0.3); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(196,0,110,0.4), 0 8px 20px rgba(0,0,0,0.3); }
.btn-gold { background: radial-gradient(ellipse at 50% 20%, #ff3da8 0%, #c4006e 45%, #7a0044 100%); color: #fff; font-weight: 700; border: none; box-shadow: 0 0 30px rgba(196,0,110,0.3), 0 8px 20px rgba(0,0,0,0.3); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(196,0,110,0.4), 0 8px 20px rgba(0,0,0,0.3); }
.btn-outline { background: radial-gradient(ellipse at 50% 20%, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%); border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.btn-outline:hover { background: radial-gradient(ellipse at 50% 20%, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.07) 100%); transform: translateY(-2px); color: #ffffff; }
.btn-danger { background: radial-gradient(ellipse at 50% 20%, #d40000 0%, #8b0000 45%, #5a0000 100%); color: #fff; border: none; box-shadow: 0 0 30px rgba(180,0,0,0.3), 0 8px 20px rgba(0,0,0,0.3); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(180,0,0,0.4), 0 8px 20px rgba(0,0,0,0.3); }
.btn-success { background: radial-gradient(ellipse at 50% 20%, #00e5a0 0%, #007a55 45%, #004d35 100%); color: #fff; border: none; box-shadow: 0 0 30px rgba(0,150,100,0.3), 0 8px 20px rgba(0,0,0,0.3); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(0,150,100,0.4), 0 8px 20px rgba(0,0,0,0.3); }
.btn-blue { background: radial-gradient(ellipse at 50% 20%, #60a5fa 0%, #1d4ed8 45%, #1e3a8a 100%); color: #fff; border: none; box-shadow: 0 0 30px rgba(59,130,246,0.3), 0 8px 20px rgba(0,0,0,0.3); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.btn-blue:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(59,130,246,0.4), 0 8px 20px rgba(0,0,0,0.3); }
.btn-warning { background: radial-gradient(ellipse at 50% 20%, #fbbf24 0%, #d97706 45%, #92400e 100%); color: #fff; border: none; box-shadow: 0 0 30px rgba(245,158,11,0.3), 0 8px 20px rgba(0,0,0,0.3); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.btn-warning:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(245,158,11,0.4), 0 8px 20px rgba(0,0,0,0.3); }
.btn-secondary { background: radial-gradient(ellipse at 50% 20%, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%); border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.btn-secondary:hover { background: radial-gradient(ellipse at 50% 20%, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.07) 100%); transform: translateY(-2px); color: #ffffff; }
.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-xs { padding: 3px 8px; font-size: .72rem; }

/* ── Flash messages ────────────────────────────────────────────────── */
.flash-messages { margin-bottom: 18px; }
.flash { padding: 10px 14px; border-radius: 8px; font-size: .85rem; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.flash.success { background: rgba(0,201,167,0.1); color: #00c9a7; border: 1px solid rgba(0,201,167,0.2); }
.flash.error   { background: rgba(255,71,87,0.1); color: #ff4757; border: 1px solid rgba(255,71,87,0.2); }
.flash.info    { background: rgba(255,255,255,0.1); color: #ffffff; border: 1px solid rgba(255,255,255,0.2); }

/* ── Tables ────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; background: transparent; }
th { padding: 10px 12px; text-align: left; font-size: .68rem; font-weight: 700; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid rgba(255,255,255,0.07); background: transparent; }
td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); color: #fff; }
tr:hover td { background: rgba(255,255,255,0.03); }
thead { background: transparent; }

/* ── Badges ────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 6px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border: none; }
.badge-green  { background: rgba(0,201,167,0.12); color: #00c9a7; }
.badge-red    { background: rgba(255,71,87,0.12); color: #ff4757; }
.badge-yellow { background: rgba(245,158,11,0.12); color: #fbbf24; }
.badge-blue   { background: rgba(59,130,246,0.12); color: #60a5fa; }
.badge-gold   { background: rgba(255,255,255,0.12); color: #ffffff; }
.badge-navy   { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }

/* ── Dashboard greeting ────────────────────────────────────────────── */
.dashboard-greeting { margin-bottom: 20px; text-align: center; }
.dashboard-greeting h2 { font-size: 1.4rem; font-weight: 700; color: #fff; }
.dashboard-greeting .dates { display: flex; gap: 14px; margin-top: 5px; flex-wrap: wrap; justify-content: center; }
.dashboard-greeting .dates span { font-size: .85rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.dashboard-greeting .dates .hijri { color: #ffffff; font-weight: 600; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }

.ayah-card { background: #32343e; border-radius: 14px; padding: 20px 24px; margin-bottom: 20px; text-align: center; position: relative; overflow: hidden; }
.ayah-card::before { content: ''; position: absolute; top: 0; left: 0; width: 65%; height: 60%; background: var(--blend); pointer-events: none; border-radius: 14px 0 0 0; }
.ayah-card .arabic { font-family: 'Amiri', serif; font-size: 1.4rem; direction: rtl; margin-bottom: 10px; color: #ffffff; line-height: 2; position: relative; z-index: 1; }
.ayah-card .translation { font-size: .875rem; color: rgba(255,255,255,0.65); font-style: italic; position: relative; z-index: 1; }
.ayah-card .ref { font-size: .72rem; color: rgba(255,255,255,0.25); margin-top: 6px; position: relative; z-index: 1; }

.reminder-card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); border-radius: 14px; padding: 13px 18px; font-size: .875rem; color: rgba(255,255,255,0.7); font-style: italic; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }

/* ── Salah pills ───────────────────────────────────────────────────── */
.salah-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.salah-pill { padding: 4px 12px; border-radius: 6px; font-size: .75rem; font-weight: 700; }
.salah-pill.on_time { background: rgba(0,201,167,0.12); color: #00c9a7; }
.salah-pill.late    { background: rgba(245,158,11,0.12); color: #fbbf24; }
.salah-pill.missed, .salah-pill.none { background: rgba(255,71,87,0.12); color: #ff4757; }

/* ── Habit calendar ────────────────────────────────────────────────── */
.cal-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 10px; }
.cal-day { aspect-ratio: 1; border-radius: 4px; cursor: default; position: relative; }
.cal-day.green  { background: rgba(0,201,167,0.6); }
.cal-day.yellow { background: rgba(245,158,11,0.6); }
.cal-day.red    { background: rgba(255,71,87,0.6); }
.cal-day.empty  { background: rgba(255,255,255,0.06); }

/* ── Habit checkboxes ──────────────────────────────────────────────── */
.habit-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); }
.habit-item:last-child { border-bottom: none; }
.habit-check { display: flex; align-items: center; gap: 10px; flex: 1; }
.habit-toggle { width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: var(--transition); flex-shrink: 0; }
.habit-toggle.done { background: #00c9a7; border-color: #00c9a7; color: #23252c; }
.habit-name { font-size: .875rem; font-weight: 400; color: #fff; }
.habit-streak { font-size: .72rem; color: #ffffff; font-weight: 700; }

/* ── Dhikr ─────────────────────────────────────────────────────────── */
.dhikr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.dhikr-card { background: #32343e; border-radius: 14px; padding: 14px; text-align: center; border: none; transition: var(--transition); position: relative; overflow: hidden; }
.dhikr-card::before { content: ''; position: absolute; top: 0; left: 0; width: 65%; height: 60%; background: var(--blend); pointer-events: none; border-radius: 14px 0 0 0; }
.dhikr-card:hover { background: var(--card-hover); }
.dhikr-arabic { font-family: 'Amiri', serif; font-size: 1.15rem; color: #fff; direction: rtl; margin-bottom: 4px; position: relative; z-index: 1; }
.dhikr-name { font-size: .75rem; color: var(--text-muted); margin-bottom: 8px; position: relative; z-index: 1; }
.dhikr-count { font-size: 2rem; font-weight: 800; color: #ffffff; position: relative; z-index: 1; }
.dhikr-btns { display: flex; justify-content: center; gap: 8px; margin-top: 8px; position: relative; z-index: 1; }
.dhikr-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); color: #fff; }
.dhikr-btn:hover { background: #ffffff; border-color: #ffffff; color: #23252c; }

/* ── Dua cards ─────────────────────────────────────────────────────── */
.dua-card { background: #32343e; border-radius: 14px; border: none; padding: 14px 16px; margin-bottom: 10px; transition: var(--transition); }
.dua-card.active { border-left: 3px solid #ffffff; }
.dua-card.answered { border-left: 3px solid #00c9a7; }
.dua-card.alhamdulillah { border-left: 3px solid #3b82f6; }
.dua-arabic { font-family: 'Amiri', serif; font-size: 1.1rem; direction: rtl; text-align: right; color: #ffffff; margin-bottom: 6px; line-height: 1.8; }
.dua-text { font-size: .875rem; color: #fff; margin-bottom: 6px; }
.dua-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .75rem; color: var(--text-muted); }
.dua-days { background: rgba(255,255,255,0.12); color: #ffffff; padding: 2px 10px; border-radius: 6px; font-size: .72rem; font-weight: 700; }

/* ── Morning dua ────────────────────────────────────────────────────── */
.morning-dua { background: #32343e; border-radius: 14px; padding: 20px 24px; margin-bottom: 20px; text-align: center; position: relative; overflow: hidden; }
.morning-dua::before { content: ''; position: absolute; top: 0; left: 0; width: 65%; height: 60%; background: var(--blend); pointer-events: none; border-radius: 14px 0 0 0; }
.morning-dua .arabic { font-family: 'Amiri', serif; font-size: 1.4rem; direction: rtl; line-height: 2.2; color: #ffffff; margin-bottom: 10px; position: relative; z-index: 1; }
.morning-dua .english { font-size: .875rem; color: rgba(255,255,255,0.75); line-height: 1.7; font-style: italic; position: relative; z-index: 1; }

/* ── Progress ring ──────────────────────────────────────────────────── */
.progress-ring-wrap { display: flex; align-items: center; gap: 14px; }
circle.ring-bg  { fill: none; stroke: rgba(255,255,255,0.08); }
circle.ring-val { fill: none; stroke: #ffffff; stroke-linecap: round; transition: stroke-dashoffset .5s ease; transform: rotate(-90deg); transform-origin: 50% 50%; }

/* ── Auth ───────────────────────────────────────────────────────────── */
.auth-page { min-height: 100vh; background: #23252c; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-box { background: #32343e; border: none; border-radius: 16px; padding: 36px 40px; width: 100%; max-width: 420px; box-shadow: 0 24px 64px rgba(0,0,0,0.3); }
.auth-logo { text-align: center; margin-bottom: 26px; }
.auth-logo h1 { font-size: 1.3rem; font-weight: 800; color: #fff; font-style: italic; }
.auth-logo p { color: var(--text-muted); font-size: .85rem; margin-top: 4px; }
.auth-logo .arabic { font-family: 'Amiri', serif; font-size: 1.1rem; color: #ffffff; direction: rtl; margin-bottom: 4px; }
.auth-box .btn-primary { width: 100%; justify-content: center; padding: 11px; font-size: .95rem; margin-top: 8px; background: radial-gradient(ellipse at 50% 20%, #ff3da8 0%, #c4006e 45%, #7a0044 100%); color: #fff; border: none; box-shadow: 0 0 30px rgba(196,0,110,0.3), 0 8px 20px rgba(0,0,0,0.3); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }

/* ── Charts ─────────────────────────────────────────────────────────── */
.chart-wrap { position: relative; height: 220px; }

/* ══════════════════════════════════════════════════════════════════════
   TRADEZELLA DASHBOARD
══════════════════════════════════════════════════════════════════════ */
.tz-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.tz-month-nav { display: flex; align-items: center; gap: 12px; }
.tz-nav-btn { width: 30px; height: 30px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); background: radial-gradient(ellipse at 50% 20%, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%); cursor: pointer; font-size: .95rem; color: rgba(255,255,255,0.5); display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.tz-nav-btn:hover { background: radial-gradient(ellipse at 50% 20%, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.07) 100%); transform: translateY(-2px); color: #fff; }
.tz-nav-btn:active { transform: translateY(0px) scale(0.98); }
.tz-month-label { font-size: 1rem; font-weight: 700; color: #fff; min-width: 140px; text-align: center; }
.tz-toolbar-right { display: flex; gap: 8px; }

.tz-stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 1100px) { .tz-stats-row { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 700px)  { .tz-stats-row { grid-template-columns: repeat(2,1fr); } }

.tz-card {
  background: #32343e; border-radius: 14px; border: none;
  box-shadow: none; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 5px;
  position: relative; overflow: hidden;
}
.tz-card::before { content: ''; position: absolute; top: 0; left: 0; width: 65%; height: 60%; background: var(--blend); pointer-events: none; border-radius: 14px 0 0 0; z-index: 0; }
.tz-card > * { position: relative; z-index: 1; }
/* Stat card accent borders */
.tz-card:nth-child(1) { border-left: 3px solid #00c9a7; }
.tz-card:nth-child(2) { border-left: 3px solid #ffffff; }
.tz-card:nth-child(3) { border-left: 3px solid #e91e8c; }
.tz-card:nth-child(4) { border-left: 3px solid #3b82f6; }
.tz-card:nth-child(5) { border-left: 3px solid #f59e0b; }
.tz-card-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,0.32); }
.tz-card-sub { font-size: .75rem; color: var(--text-muted); }
.tz-pnl-value { font-size: 1.8rem; font-weight: 800; line-height: 1.15; color: #fff; }
.tz-gauge-card { align-items: center; }
.tz-gauge-wrap { position: relative; width: 120px; height: 72px; margin: 4px auto 0; }
.tz-gauge-pct { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 1.15rem; font-weight: 800; color: #fff; }
.tz-wbl-row { display: flex; gap: 10px; font-size: .78rem; font-weight: 700; }
.tz-wbl-w { color: #00c9a7; }
.tz-wbl-b { color: var(--text-muted); }
.tz-wbl-l { color: #ff4757; }
.tz-avgwl-values { display: flex; align-items: baseline; gap: 6px; font-size: 1rem; font-weight: 700; flex-wrap: wrap; }
.tz-avg-win  { color: #00c9a7; }
.tz-avg-loss { color: #ff4757; }
.tz-avg-sep  { color: var(--text-muted); font-weight: 400; }
.tz-ratio-bar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,0.08); margin-top: 4px; }
.tz-ratio-win  { background: #00c9a7; height: 100%; }
.tz-ratio-loss { background: #ff4757; height: 100%; }
.tz-pf-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.tz-streak-main { display: flex; align-items: baseline; gap: 6px; }
.tz-streak-fire { font-size: 1.3rem; }
.tz-streak-val  { font-size: 1.9rem; font-weight: 800; color: #ffffff; line-height: 1.1; }
.tz-streak-best { font-size: .72rem; color: #ffffff; font-weight: 700; }

.pos { color: #00c9a7 !important; }
.neg { color: #ff4757 !important; }

.tz-main-row { display: grid; grid-template-columns: 68fr 32fr; gap: 12px; margin-bottom: 20px; }
@media (max-width: 1100px) { .tz-main-row { grid-template-columns: 1fr; } }
.tz-right-col { display: flex; flex-direction: column; gap: 12px; }
.tz-row-2 { display: grid; grid-template-columns: 70fr 30fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 900px) { .tz-row-2 { grid-template-columns: 1fr; } }

.tz-calendar-panel, .tz-weekly-panel, .tz-equity-panel, .tz-recent-panel {
  background: #32343e; border-radius: 14px; border: none;
  box-shadow: none; padding: 16px 18px; min-width: 0;
  position: relative; overflow: hidden;
}
.tz-calendar-panel::before, .tz-weekly-panel::before,
.tz-equity-panel::before, .tz-recent-panel::before {
  content: ''; position: absolute; top: 0; left: 0; width: 65%; height: 60%;
  background: var(--blend); pointer-events: none; border-radius: 14px 0 0 0;
}
.tz-calendar-panel > *, .tz-weekly-panel > *,
.tz-equity-panel > *, .tz-recent-panel > * { position: relative; z-index: 1; }

.tz-panel-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tz-panel-title { font-size: .7rem; font-weight: 700; color: rgba(255,255,255,0.32); text-transform: uppercase; letter-spacing: .1em; }
.tz-panel-sub { font-size: .9rem; font-weight: 800; }
.tz-see-all { font-size: .78rem; color: #ffffff; }
.tz-see-all:hover { color: #b57aff; }

.tz-cal-month-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.tz-cal-stat { display: flex; flex-direction: column; gap: 1px; }
.tz-cal-stat-lbl { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,0.32); }
.tz-cal-stat-val { font-size: .85rem; font-weight: 700; color: #fff; }

.tz-cal-dow-header { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.tz-cal-dow-header div { text-align: center; font-size: .65rem; font-weight: 700; color: rgba(255,255,255,0.25); text-transform: uppercase; letter-spacing: .06em; padding: 4px 0; }
.tz-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.tz-cal-cell { min-height: 80px; border-radius: 6px; border: none; background: rgba(0,0,0,0.2); padding: 5px 6px; display: flex; flex-direction: column; position: relative; overflow: hidden; cursor: pointer; transition: background .18s; }
.tz-cal-cell:hover { background: rgba(255,255,255,0.06); }
.tz-cal-cell.empty { background: transparent; }
.tz-cal-cell.today { outline: 1.5px solid #ffffff; background: rgba(255,255,255,0.08); box-shadow: 0 0 10px rgba(255,255,255,0.15); }
.tz-cal-cell.pos-day { background: rgba(0,201,167,0.15); }
.tz-cal-cell.neg-day { background: rgba(255,71,87,0.12); }
.tz-cal-cell.be-day  { background: rgba(255,255,255,0.04); }
.tz-cal-cell.missed-day { border-left: 3px solid #f59e0b; }
.cal-num { font-size: .72rem; font-weight: 600; color: rgba(255,255,255,0.3); line-height: 1; }
.cal-pnl { font-size: .8rem; font-weight: 800; margin-top: 5px; line-height: 1; }
.cal-pnl.pos { color: #00c9a7; }
.cal-pnl.neg { color: #ff4757; }
.cal-meta { font-size: .62rem; color: rgba(255,255,255,0.25); margin-top: auto; line-height: 1; }

.tz-week-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tz-week-row:last-child { border-bottom: none; }
.tz-week-range { font-size: .85rem; font-weight: 700; color: #fff; }
.tz-week-days  { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.tz-week-pnl   { font-size: .95rem; font-weight: 800; }

.tz-row-3 { display: grid; grid-template-columns: 60fr 40fr; gap: 14px; margin-bottom: 22px; }
@media (max-width: 900px) { .tz-row-3 { grid-template-columns: 1fr; } }
.tz-chart-wrap { position: relative; height: 240px; }

.tz-recent-panel { width: 100%; overflow: hidden; }
.tz-trade-header, .tz-trade-row { display: grid; grid-template-columns: 22% 15% 25% 22% 16%; align-items: center; padding: 9px 6px; font-size: .8rem; width: 100%; }
.tz-trade-header { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,0.3); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.tz-trade-header div, .tz-trade-row div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tz-trade-row { border-bottom: 1px solid rgba(255,255,255,0.04); color: #fff; text-decoration: none; transition: background 0.15s; cursor: pointer; }
.tz-trade-row:hover { background: rgba(255,255,255,0.05); color: #fff; }
.tz-trade-row:last-child { border-bottom: none; }
.rt-date   { color: var(--text-muted); font-size: .72rem; }
.rt-dot    { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.rt-result { display: flex; align-items: center; font-size: .75rem; }
.rt-pnl    { font-weight: 700; }
.rt-r      { font-weight: 700; font-size: .72rem; }
.dir-long  { color: #00c9a7; font-weight: 700; }
.dir-short { color: #ff4757; font-weight: 700; }
.tz-empty  { color: var(--text-muted); font-size: .875rem; text-align: center; padding: 28px 0; }
.tz-loader { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 999; align-items: center; justify-content: center; }
.tz-spinner { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,0.1); border-top-color: #ffffff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mobile ─────────────────────────────────────────────────────────── */
.mobile-menu-btn { display: none; background: #32343e; color: #fff; border: none; padding: 7px 11px; font-size: 1.1rem; cursor: pointer; border-radius: 8px; }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 18px 14px; }
  .mobile-menu-btn { display: block; }
  .mobile-topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
  .card-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cal-grid { grid-template-columns: repeat(7, 1fr); }
}

/* ── Utilities ──────────────────────────────────────────────────────── */
.text-muted  { color: var(--text-muted); }
.text-gold   { color: #ffffff; }
.text-navy   { color: #fff; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.hidden { display: none !important; }
.arabic-text { font-family: 'Amiri', serif; direction: rtl; text-align: right; line-height: 2; font-size: 1.05rem; }
.conditional-section { display: none; background: rgba(0,0,0,0.15); border-radius: 8px; padding: 14px; margin-top: 10px; border: 1px solid var(--border); }
.conditional-section.visible { display: block; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-green  { background: #00c9a7; }
.dot-red    { background: #ff4757; }
.dot-yellow { background: #f59e0b; }
.dot-gold   { background: #ffffff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 22px; }
.tab-btn { padding: 8px 16px; background: none; border: none; font-size: .875rem; font-weight: 600; color: rgba(255,255,255,0.35); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: var(--transition); }
.tab-btn.active { color: #fff; border-bottom-color: #e91e8c; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Hover lift effects ────────────────────────────────────────────── */
/* Base transition on cards/panels */
.card, .stat-card, .tz-card,
.tz-calendar-panel, .tz-weekly-panel,
.tz-equity-panel, .tz-recent-panel,
.panel, .donut-card,
div[class*="card"], div[class*="panel"],
div[class*="widget"] {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

/* Cards hover — whole card lifts */
.card:hover, .stat-card:hover, .tz-card:hover,
.tz-calendar-panel:hover, .tz-weekly-panel:hover,
.tz-equity-panel:hover, .tz-recent-panel:hover,
.panel:hover, .donut-card:hover,
div[class*="card"]:hover, div[class*="panel"]:hover,
div[class*="widget"]:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.3);
  background: #3a3c47;
}

/* Calendar stats bar — cancel independent lift when card hovers */
#calendarPanel:hover .tz-cal-month-stats {
  transform: translateY(4px);
}

/* Emotion widgets */
.ew-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  border-left-color: #e91e8c !important;
}

/* Calendar cells — snappy micro lift */
.tz-cal-cell {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}
.tz-cal-cell:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4) !important;
  border-color: rgba(255,255,255,0.2) !important;
  z-index: 2;
}

/* ── Inner elements — no independent hover lift ──────────────────── */
/* Stat values inside cards */
.stat-value:hover, .stat-val:hover,
.wr-stat:hover, .dj-stat:hover {
  transform: none !important;
}

/* Trade rows inside panels — background only */
.trade-row:hover, .dj-trade-row:hover {
  transform: none !important;
  background: rgba(255,255,255,0.04);
}


/* Weekly breakdown rows */
.week-row:hover, .wr-row:hover {
  transform: none !important;
}

/* Weekly review form sections */
.wr-section:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Past routine/session items in dropdowns */
.past-routine-item:hover, .past-session-item:hover {
  transform: none !important;
  background: rgba(255,255,255,0.06) !important;
}


/* ── Universal card blend + z-index ──────────────────────────────── */
.card > *, .stat-card > *, .tz-card > *,
.tz-calendar-panel > *, .tz-weekly-panel > *,
.tz-equity-panel > *, .tz-recent-panel > *,
.widget > *, .pa-card > *, .pa-box > *,
div[class*="card"] > *, div[class*="panel"] > *,
div[class*="widget"] > * {
  position: relative;
  z-index: 1;
}

/* Universal card base — catches all card-like containers */
.pa-card, .pa-box, .mr-section, .sr-card,
.tj-filters, .cl-card, .mr-past-card,
.tt-phase, .rp-section {
  background: #32343e;
  border-radius: 14px;
  border: none;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.pa-card::before, .mr-section::before, .sr-card::before,
.tj-filters::before, .cl-card::before,
.mr-past-card::before, .rp-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 65%; height: 60%;
  background: radial-gradient(ellipse at 0% 0%, rgba(0,0,0,0.5) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 14px 0 0 0;
  z-index: 0;
}

.pa-card > *, .mr-section > *, .sr-card > *,
.tj-filters > *, .cl-card > *,
.mr-past-card > *, .rp-section > * {
  position: relative;
  z-index: 1;
}

/* Inner boxes inside cards — darker inset */
.pa-box, .tt-phase-body, .tt-phase-header {
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  border: none;
}

/* Expanded row areas */
.to-expand-inner {
  background: rgba(0,0,0,0.15);
  border-radius: 10px;
}

/* ── Auto-expanding textareas ──────��─────────────────────────── */
textarea {
  overflow: hidden !important;
  resize: none !important;
  min-height: 60px;
  height: auto;
}
