/* -------------------------------------------------
   Premium Dark Theme for FemUnion SFS
   ------------------------------------------------- */
:root {
  --c-bg: #09090b;
  --c-surface: rgba(24, 24, 27, 0.7);
  --c-surface-hover: rgba(39, 39, 42, 0.8);
  --c-primary: #FF2A85;
  --c-primary-dark: #E60066;
  --c-accent: #8A2BE2;
  --c-text: #FAFAFA;
  --c-muted: #A1A1AA;
  --c-success: #10B981;
  --c-error: #EF4444;
  --radius: 1rem;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --gradient-brand: linear-gradient(135deg, var(--c-primary), var(--c-accent));
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--c-bg);
  background-image: radial-gradient(circle at 50% -20%, rgba(138, 43, 226, 0.15), transparent 60%);
  background-attachment: fixed;
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px; /* Space for bottom nav */
}
a { color: var(--c-primary); text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* Header */
header.header {
  padding: 1.2rem 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--glass-border);
  background: rgba(9, 9, 11, 0.8);
}
header .title {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Bottom Nav */
nav.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(18, 18, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: var(--glass-border);
  display: flex;
  justify-content: space-around;
  padding: 0.6rem 0.5rem;
  z-index: 100;
  padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
}
nav .nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--c-muted);
  font-size: 0.65rem;
  font-weight: 500;
  transition: all 0.2s ease;
  flex: 1;
  position: relative;
}
nav .nav-btn svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
  transition: transform 0.2s ease;
}
nav .nav-btn:hover { color: var(--c-text); }
nav .nav-btn.active { color: var(--c-primary); }
nav .nav-btn.active svg { transform: scale(1.1); stroke-width: 2.2; }

.badge-dot {
  position: absolute;
  top: -2px;
  right: calc(50% - 16px);
  background: var(--c-error);
  color: white;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
  border: 2px solid #121214;
}

/* Main */
main.content {
  padding: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Card */
.card {
  background: var(--c-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.card h2 { margin-bottom: 0.6rem; font-size: 1.2rem; font-weight: 600; }
.card h3 { margin-bottom: 0.4rem; font-size: 1.05rem; font-weight: 600; }
.card p { margin-bottom: 0.3rem; color: var(--c-muted); font-size: 0.9rem; }
.card p b { color: var(--c-text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all .2s ease;
  border: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 15px rgba(255, 42, 133, 0.3); }
.btn-success { background: var(--c-success); color: #fff; }
.btn-error   { background: var(--c-error); color: #fff; }
.btn-muted   { background: rgba(255,255,255,0.1); color: var(--c-text); border: var(--glass-border); }
.btn-muted:hover { background: rgba(255,255,255,0.15); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 42, 133, 0.2);
  color: var(--c-primary);
  border: 1px solid rgba(255, 42, 133, 0.3);
}

.loader {
  text-align: center;
  color: var(--c-muted);
  padding: 3rem;
  font-size: 0.95rem;
}

/* Dashboard */
.greeting { margin-bottom: 1.5rem; }
.greeting-name {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.greeting-sub { font-size: .85rem; color: var(--c-muted); }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--c-surface);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.stat-icon-wrap {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.6rem;
}
.stat-card.purple .stat-icon-wrap { background: rgba(138, 43, 226, 0.2); color: #B266FF; }
.stat-card.orange .stat-icon-wrap { background: rgba(255, 165, 0, 0.2); color: #FFB347; }
.stat-card.green .stat-icon-wrap  { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.stat-card.red .stat-icon-wrap    { background: rgba(239, 68, 68, 0.2); color: #F87171; }

.stat-num { font-size: 1.8rem; font-weight: 700; line-height: 1; margin-bottom: .2rem; }
.stat-label { font-size: .75rem; color: var(--c-muted); font-weight: 500; }

/* Ad Banner */
.ad-banner {
  background: linear-gradient(45deg, rgba(255,42,133,0.15), rgba(138,43,226,0.15));
  border: 1px solid rgba(255,42,133,0.3);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.ad-banner::after {
  content: "РЕКЛАМА";
  position: absolute;
  top: 0; right: 0;
  background: rgba(255,42,133,0.8);
  color: white;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-bottom-left-radius: 0.4rem;
}
.ad-title { font-weight: 700; color: #fff; margin-bottom: 0.3rem; font-size: 1.1rem; }
.ad-desc { font-size: 0.85rem; color: var(--c-muted); margin-bottom: 0.8rem; }

/* Alert banner */
.alert-banner {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 0.8rem;
  padding: 0.8rem 1rem;
  font-size: .85rem;
  color: #FCD34D;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.alert-banner.red {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
}

/* Modals & Inputs */
input, select, textarea {
  width: 100%;
  padding: 0.7rem;
  border-radius: 0.6rem;
  border: var(--glass-border);
  background: rgba(0,0,0,0.3);
  color: var(--c-text);
  margin-bottom: 0.8rem;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-primary); }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 1000;
  animation: overlayIn .2s ease;
}
@keyframes overlayIn { from { opacity:0 } to { opacity:1 } }
.modal-box {
  background: #18181B;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 1.5rem 1.2rem;
  width: 100%; max-width: 480px;
  animation: slideUp .25s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}
@keyframes slideUp { from { transform: translateY(100%); opacity:0 } to { transform: translateY(0); opacity:1 } }
.modal-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; text-align: center; }

/* Calendar grid */
.cal-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: .5rem; margin-bottom: 1.2rem;
}
.cal-day {
  background: rgba(255,255,255,.05);
  border: var(--glass-border);
  border-radius: 0.8rem;
  padding: .8rem .2rem;
  text-align: center;
  cursor: pointer;
  transition: all .15s ease;
}
.cal-day:hover { background: rgba(255,42,133,0.2); border-color: var(--c-primary); transform: scale(1.02); }
.cal-day .cal-label { font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 0.2rem; }
.cal-day .cal-date  { font-size: .75rem; color: var(--c-muted); display: block; }

