/* =========================================================
   ReglDönemi - site.css
   Sade, modern, kadın sağlığı uygulamasına uygun tasarım.
   ========================================================= */

:root {
  --primary: #a45a63;
  --primary-dark: #7e424a;
  --primary-light: #f3dfe1;
  --accent: #d9a5ad;
  --background: #fbf7f3;
  --surface: #ffffff;
  --text: #33272a;
  --muted: #8a7d80;
  --border: #ece0e0;
  --success: #6b9080;
  --danger: #c0555e;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 6px 24px rgba(122, 66, 74, 0.08);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  background-color: var(--background);
  color: var(--text);
  font-family: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ---------------- Logo ---------------- */
.app-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.app-logo span { color: var(--primary); font-weight: 400; }

/* ---------------- Marketing header/footer ---------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .nav-link {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0.9rem;
}
.site-header .nav-link:hover { color: var(--primary); }
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

/* ---------------- Buttons ---------------- */
.btn-primary-soft {
  background-color: var(--primary);
  color: #fff !important;
  border: none;
  font-weight: 600;
}
.btn-primary-soft:hover { background-color: var(--primary-dark); color: #fff; }

.btn-outline-primary-soft {
  background-color: transparent;
  color: var(--primary-dark) !important;
  border: 1.5px solid var(--primary);
  font-weight: 600;
}
.btn-outline-primary-soft:hover { background-color: var(--primary-light); }

.btn-app {
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-weight: 600;
}

/* ---------------- Hero ---------------- */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--background) 100%);
}
.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
}
.hero p.lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 560px;
}
@media (max-width: 767px) {
  .hero { padding: 3rem 0 2.5rem; text-align: center; }
  .hero h1 { font-size: 2rem; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
}

/* ---------------- Cards ---------------- */
.card-soft {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.6rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.4rem;
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}
.feature-card .feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.feature-card h5 { font-weight: 700; color: var(--text); }
.feature-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

/* ---------------- Auth pages ---------------- */
.auth-wrapper {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 2.2rem;
  width: 100%;
  max-width: 440px;
}
.auth-card h2 { font-weight: 700; color: var(--primary-dark); margin-bottom: 0.3rem; }
.auth-card .subtitle { color: var(--muted); margin-bottom: 1.6rem; }

.btn-google {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  width: 100%;
}
.btn-google:hover { background: var(--background); }

.divider-text {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 1.2rem 0;
  position: relative;
}
.divider-text::before, .divider-text::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  border-top: 1px solid var(--border);
}
.divider-text::before { left: 0; }
.divider-text::after { right: 0; }

/* ---------------- Forms ---------------- */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 0.65rem 0.9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(164, 90, 99, 0.15);
}
label.form-label { font-weight: 600; color: var(--text); font-size: 0.92rem; }
.text-danger { color: var(--danger) !important; }

.alert-soft {
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.92rem;
}
.alert-success.alert-soft { background: #e4f0ea; color: #2f5c48; }
.alert-danger.alert-soft { background: #fbe6e7; color: #8c333a; }

/* =========================================================
   APP SHELL (Giriş yapmış kullanıcı arayüzü)
   ========================================================= */
.app-shell { background: var(--background); }

.app-topbar {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 60;
}
.app-nav-link { color: var(--text); font-weight: 500; padding: 0.4rem 0.6rem; border-radius: 8px; }
.app-nav-link:hover { color: var(--primary); }
.app-avatar { font-size: 1.4rem; }

.app-body {
  display: flex;
  min-height: calc(100vh - 60px);
}
.app-sidebar {
  width: 230px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 0 1rem;
}
.sidebar-link {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text);
}
.sidebar-link:hover { background: var(--primary-light); color: var(--primary-dark); }

.app-content { flex: 1; min-width: 0; padding-bottom: 5.5rem; }
@media (min-width: 992px) {
  .app-content { padding-bottom: 2rem; }
}

/* ---------------- Bottom mobile nav ---------------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 70;
  box-shadow: 0 -4px 18px rgba(0,0,0,0.05);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  flex: 1;
}
.bottom-nav-item span { font-size: 1.25rem; }
.bottom-nav-add { margin-top: -22px; }
.add-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem !important;
  box-shadow: 0 6px 14px rgba(164,90,99,0.4);
}

/* ---------------- Dashboard ---------------- */
.cycle-hero-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 1.6rem;
  box-shadow: var(--shadow-soft);
}
.cycle-hero-card .cycle-day {
  font-size: 2.4rem;
  font-weight: 800;
}
.cycle-hero-card .cycle-sub {
  opacity: 0.9;
  font-size: 1rem;
}
.cycle-hero-card .badge-info-note {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  display: inline-block;
  margin-top: 0.8rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
}
.stat-card .stat-label { color: var(--muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.stat-card .stat-value { font-size: 1.4rem; font-weight: 700; color: var(--text); }

.quick-action-btn {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  padding: 0.9rem;
  font-weight: 600;
  color: var(--text);
  width: 100%;
  text-align: center;
}
.quick-action-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.quick-action-btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.quick-action-btn.primary:hover { background: var(--primary-dark); }

/* ---------------- Calendar ---------------- */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 4px;
}
.calendar-day {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  position: relative;
}
.calendar-day.other-month { opacity: 0.35; }
.calendar-day.today { border: 2px solid var(--primary-dark); }
.calendar-day.period-day { background: var(--primary); color: #fff; border-color: var(--primary); }
.calendar-day.predicted-day { background: var(--primary-light); color: var(--primary-dark); }
.calendar-day .log-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--success);
  position: absolute; bottom: 5px;
}
.calendar-legend { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 1rem; font-size: 0.82rem; color: var(--muted); }
.calendar-legend .dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; margin-right: 6px; vertical-align: middle; }

/* ---------------- History ---------------- */
.history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-item .dates { font-weight: 700; }
.history-item .cycle-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------------- Symptom chips ---------------- */
.symptom-chip input { display: none; }
.symptom-chip label {
  display: inline-block;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
}
.symptom-chip input:checked + label {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------------- Mood / flow selectors ---------------- */
.option-pill {
  display: inline-block;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.4rem;
  text-align: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  width: 100%;
}
input:checked + .option-pill {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.section-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.9rem;
  font-size: 1.05rem;
}


/* ---------------- Admin panel ---------------- */
.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  height: 100%;
}
.admin-stat-icon { font-size: 1.4rem; margin-bottom: 0.35rem; }
.admin-stat-value { font-size: 1.8rem; line-height: 1.1; font-weight: 800; color: var(--primary-dark); }
.admin-stat-label { font-size: 0.86rem; color: var(--muted); margin-top: 0.25rem; }
.admin-feedback-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
.admin-feedback-row:last-child { border-bottom: 0; }
.admin-message-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.admin-feedback-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-table th { white-space: nowrap; font-size: 0.82rem; color: var(--muted); }
.min-w-0 { min-width: 0; }
