﻿/* ============================================
   oliv â€” Design System v2
   Bubbly Â· Warm Â· Modern
============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Backgrounds — soft warm white */
  --bg-deep:    #eff3ea;   /* sidebar: faint sage tint     */
  --bg-base:    #f8f6f0;   /* page bg: warm off-white      */
  --bg-surface: #ffffff;   /* cards: pure white            */
  --bg-raised:  #fafaf8;   /* slightly elevated white      */
  --bg-glass:   rgba(255, 255, 255, 0.60);
  --bg-glass2:  rgba(255, 255, 255, 0.88);

  /* Borders */
  --border:       rgba(0, 0, 0, 0.07);
  --border-hover: rgba(70, 100, 38, 0.28);
  --border-focus: rgba(70, 100, 38, 0.55);

  /* Accents — leaves & branches */
  --pink:    #b87840;   /* warm branch / amber        */
  --purple:  #4e6e2a;   /* deep leaf green            */
  --coral:   #c89050;   /* warm sand                  */
  --amber:   #7a4e20;   /* dark wood brown            */
  --mint:    #5a8060;   /* soft sage                  */
  --blue:    #688050;   /* muted earthy green         */

  --gradient-brand:  linear-gradient(135deg, #426020 0%, #6a9a38 100%);
  --gradient-warm:   linear-gradient(135deg, #7a4e20 0%, #c08040 100%);
  --gradient-cool:   linear-gradient(135deg, #304e18 0%, #4e6e2a 100%);
  --gradient-panel:  linear-gradient(150deg, #2a4c1a 0%, #3a6426 35%, #4a7c30 75%, #5a9438 100%);
  --gradient-amber:  linear-gradient(135deg, #7a4e20, #c08040);

  /* Text — dark on light */
  --text-1: #1a201a;   /* near black, warm             */
  --text-2: #354030;   /* dark muted sage              */
  --text-3: #5a6850;   /* medium muted                 */
  --text-4: #8a9880;   /* light labels                 */

  /* Semantic */
  --error:   #c03a3a;
  --success: #487830;
  --warn:    #a86a20;

  --font: 'Inter', system-ui, -apple-system, sans-serif;

  --r-xs:   8px;
  --r-sm:   12px;
  --r-md:   18px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-2xl:  42px;
  --r-full: 9999px;

  /* Shadows — light & airy */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.09);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.12);
  --shadow-pink: 0 8px 28px rgba(70, 100, 38, 0.18);
  --shadow-glow: 0 0 40px rgba(70, 100, 38, 0.09);

  --ease:   0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-1);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* â”€â”€ Scrollbar â”€â”€ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 99px; opacity: 0.5; }

/* ============================================
   AUTH LAYOUT
============================================ */
.auth-page {
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* â”€â”€ Left Decorative Panel â”€â”€ */
.auth-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 56px 48px;
  background: var(--gradient-panel);
  height: 100%;
}

/* Blob decorations */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.45;
}
.blob-1 { width: 340px; height: 340px; background: #1e3c14; top: -80px; left: -80px; }
.blob-2 { width: 260px; height: 260px; background: #2e5c1c; bottom: -60px; right: -40px; }
.blob-3 { width: 180px; height: 180px; background: #72b040; top: 50%; left: 50%; transform: translate(-50%,-50%); opacity: 0.25; }

.auth-panel .brand {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 44px;
}

.auth-panel .brand-logo {
  width: 68px;
  height: 68px;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 30px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.auth-panel .brand-name {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.auth-panel .brand-tagline {
  margin-top: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 0.93rem;
}

/* Feature pill cards */
.panel-features {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}

.panel-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--r-xl);
  backdrop-filter: blur(16px);
  transition: background var(--ease), transform var(--ease);
}
.panel-feature:hover {
  background: rgba(255,255,255,0.18);
  transform: translateX(4px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.feature-text strong {
  display: block;
  font-size: 0.87rem;
  font-weight: 700;
  color: #fff;
}
.feature-text span {
  font-size: 0.77rem;
  color: rgba(255,255,255,0.65);
}

/* â”€â”€ Right Form Panel â”€â”€ */
.auth-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 48px;
  background: var(--bg-base);
  overflow-y: auto;
  height: 100%;
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
}

.auth-header {
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-1);
  line-height: 1.2;
}

.auth-header p {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 0.9rem;
}

.auth-header p a {
  color: var(--pink);
  font-weight: 600;
  transition: color var(--ease);
}
.auth-header p a:hover { color: var(--purple); }

/* ============================================
   FORM ELEMENTS
============================================ */
.form-group {
  margin-bottom: 16px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 7px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 15px;
  color: var(--text-4);
  font-size: 15px;
  pointer-events: none;
  transition: color var(--ease);
  z-index: 1;
}

.form-input {
  width: 100%;
  padding: 14px 15px 14px 44px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
  outline: none;
}

.form-input::placeholder { color: var(--text-4); }

.form-input:focus {
  border-color: var(--purple);
  background: var(--bg-raised);
  box-shadow: 0 0 0 4px rgba(70, 100, 38, 0.07);
}

.input-wrapper:focus-within .input-icon { color: var(--purple); }

.toggle-password {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-4);
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
  transition: color var(--ease);
  z-index: 1;
}
.toggle-password:hover { color: var(--text-2); }

/* Validation states */
.form-input.is-error   { border-color: var(--error); box-shadow: 0 0 0 4px rgba(248,113,113,0.1); }
.form-input.is-success { border-color: var(--success); }

.field-message { font-size: 0.78rem; margin-top: 5px; display: none; }
.field-message.error   { color: var(--error);   display: block; }
.field-message.success { color: var(--success); display: block; }

/* Checkbox */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.87rem;
  color: var(--text-3);
}

.form-check input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border-hover);
  border-radius: var(--r-xs);
  background: var(--bg-surface);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--bounce);
  position: relative;
}

.form-check input[type="checkbox"]:checked {
  background: var(--gradient-brand);
  border-color: transparent;
  transform: scale(1.05);
}

.form-check input[type="checkbox"]:checked::after {
  content: 'âœ“';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: white;
  font-weight: 800;
}

.form-check a { color: var(--pink); font-weight: 600; }
.form-check a:hover { color: var(--purple); }

/* Form row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Extras row */
.form-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.forgot-link {
  font-size: 0.84rem;
  color: var(--pink);
  font-weight: 600;
  transition: color var(--ease);
}
.forgot-link:hover { color: var(--purple); }

/* Password strength */
.password-strength { margin-top: 8px; }
.strength-bars { display: flex; gap: 5px; margin-bottom: 5px; }
.strength-bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.3s;
}
.strength-bar.weak   { background: var(--error); }
.strength-bar.fair   { background: #fb923c; }
.strength-bar.good   { background: var(--amber); }
.strength-bar.strong { background: var(--success); }
.strength-label { font-size: 0.74rem; color: var(--text-4); }

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-full);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--ease);
  white-space: nowrap;
  letter-spacing: 0.1px;
}

.btn-primary {
  width: 100%;
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-pink);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0.08));
  opacity: 0;
  transition: opacity var(--ease);
}

.btn-primary:hover { box-shadow: 0 12px 36px rgba(70, 100, 38, 0.20); transform: translateY(-1px); }
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-pink); }

.btn-primary.loading { pointer-events: none; opacity: 0.75; }

.btn-ghost {
  background: var(--bg-glass);
  color: var(--text-3);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-1);
  background: var(--bg-glass2);
}

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: none;
}
.btn.loading .spinner { display: block; }
.btn.loading .btn-text { opacity: 0.6; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--text-4);
  font-size: 0.8rem;
  font-weight: 500;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

/* ============================================
   AUTH METHOD TABS (Email / Phone)
============================================ */
.auth-tabs {
  display: flex;
  gap: 5px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  padding: 5px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 10px 18px;
  border-radius: var(--r-full);
  border: none;
  background: none;
  color: var(--text-3);
  font-size: 0.87rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.auth-tab.active {
  background: var(--gradient-brand);
  color: white;
  box-shadow: 0 4px 14px rgba(70, 100, 38, 0.18);
}

.auth-tab:not(.active):hover {
  color: var(--text-1);
  background: var(--bg-glass);
}

/* Phone input group */
.phone-input-group {
  display: flex;
  gap: 8px;
}

.country-select {
  padding: 14px 10px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 0.88rem;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
  transition: border-color var(--ease);
  width: 92px;
  flex-shrink: 0;
}
.country-select:focus { border-color: var(--purple); }

.phone-sent-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(70, 100, 38, 0.06);
  border: 1px solid rgba(70, 100, 38, 0.12);
  border-radius: var(--r-lg);
  margin-bottom: 20px;
}
.phone-sent-info .sent-icon { font-size: 22px; flex-shrink: 0; }
.phone-sent-info p { font-size: 0.85rem; color: var(--text-2); margin: 0; }
.phone-sent-info strong { color: var(--text-1); }

.otp-input {
  letter-spacing: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  font-family: monospace;
}

.resend-link {
  font-size: 0.83rem;
  color: var(--text-4);
  text-align: center;
  margin-top: 14px;
}
.resend-link button {
  background: none; border: none;
  color: var(--pink);
  font-size: 0.83rem;
  font-family: var(--font);
  cursor: pointer;
  font-weight: 700;
  transition: color var(--ease);
}
.resend-link button:hover { color: var(--purple); }
.resend-link button:disabled { color: var(--text-4); cursor: default; }

/* ============================================
   TOAST
============================================ */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  padding: 13px 18px;
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  border: 1px solid var(--border-hover);
  color: var(--text-1);
  font-size: 0.87rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s var(--bounce);
  max-width: 320px;
}

.toast.success { border-color: rgba(70, 100, 38, 0.18); }
.toast.error   { border-color: rgba(248,113,113,0.35); }
.toast-icon { font-size: 17px; }

@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(110%); opacity: 0; }
}
.toast.removing { animation: toastOut 0.25s ease forwards; }

/* ============================================
   MODAL
============================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-hover);
  border-radius: var(--r-xl);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.28s var(--bounce);
}

@keyframes modalIn {
  from { transform: scale(0.92) translateY(16px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

/* Profile setup overlay */
.setup-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(10px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.setup-overlay.open { display: flex; }

/* ============================================
   APP LAYOUT (Dashboard)
============================================ */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* â”€â”€ Sidebar â”€â”€ */
.sidebar {
  background: var(--bg-deep);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  margin-bottom: 28px;
}

.sidebar-logo {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(70, 100, 38, 0.18);
}

.sidebar-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(135deg, #7a8c30 0%, #aaba42 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-section { margin-bottom: 6px; }

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-4);
  padding: 0 10px;
  margin-bottom: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  color: var(--text-3);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
  margin-bottom: 2px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
}

.nav-item:hover {
  background: var(--bg-glass);
  color: var(--text-1);
}

.nav-item.active {
  background: rgba(70, 100, 38, 0.09);
  color: var(--purple);
}

.nav-icon { font-size: 17px; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--gradient-warm);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--r-full);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--ease);
}
.user-card:hover { border-color: var(--border-hover); background: var(--bg-glass2); }

.user-avatar {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.user-info { flex: 1; overflow: hidden; }
.user-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role { font-size: 0.72rem; color: var(--text-4); }
.user-more { color: var(--text-4); font-size: 13px; }

/* â”€â”€ Main content â”€â”€ */
.main-content {
  background: var(--bg-base);
  overflow-y: auto;
}

/* â”€â”€ Topnav â”€â”€ */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 246, 240, 0.93);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.topnav-left h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-1);
}
.topnav-left p {
  font-size: 0.79rem;
  color: var(--text-4);
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  font-size: 16px;
  transition: all var(--ease);
  position: relative;
}
.icon-btn:hover { border-color: var(--border-hover); color: var(--text-1); }
.icon-btn .badge {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--pink);
  border-radius: 50%;
  border: 2px solid var(--bg-base);
}

/* â”€â”€ Page content â”€â”€ */
.page-content { padding: 28px; }

/* â”€â”€ Stats grid â”€â”€ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px;
  transition: all var(--ease);
}
.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.stat-icon.purple { background: rgba(70, 100, 38, 0.09); }
.stat-icon.pink   { background: rgba(70, 100, 38, 0.08); }
.stat-icon.blue   { background: rgba(70, 100, 38, 0.08); }
.stat-icon.green  { background: rgba(70, 100, 38, 0.08); }

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 5px;
}
.stat-label { font-size: 0.79rem; color: var(--text-4); font-weight: 600; }
.stat-change { margin-top: 10px; font-size: 0.77rem; font-weight: 700; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--error); }

/* â”€â”€ Content grid â”€â”€ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
}

/* â”€â”€ Generic card â”€â”€ */
.card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-1);
}

.card-action {
  font-size: 0.79rem;
  color: var(--pink);
  font-weight: 700;
  cursor: pointer;
  transition: color var(--ease);
}
.card-action:hover { color: var(--purple); }

/* â”€â”€ Activity feed â”€â”€ */
.activity-list { display: flex; flex-direction: column; gap: 2px; }

.activity-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  transition: background var(--ease);
}
.activity-item:hover { background: var(--bg-glass); }

.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.activity-dot.purple { background: var(--purple); }
.activity-dot.pink   { background: var(--pink); }
.activity-dot.blue   { background: var(--blue); }
.activity-dot.green  { background: var(--success); }

.activity-text {
  flex: 1;
  font-size: 0.84rem;
  color: var(--text-2);
}
.activity-text strong { color: var(--text-1); font-weight: 700; }
.activity-time { font-size: 0.73rem; color: var(--text-4); white-space: nowrap; }

/* â”€â”€ Quick actions â”€â”€ */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 18px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 16px 12px;
  background: var(--bg-glass);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--ease);
  font-family: var(--font);
  color: var(--text-3);
  font-size: 0.79rem;
  font-weight: 600;
}
.quick-action-btn:hover {
  border-color: rgba(70, 100, 38, 0.28);
  color: var(--text-1);
  background: rgba(70, 100, 38, 0.06);
  transform: translateY(-2px);
}
.quick-action-btn .qa-icon { font-size: 22px; }

/* â”€â”€ Couple card â”€â”€ */
.couple-card {
  background: linear-gradient(135deg, rgba(70, 100, 38, 0.09), rgba(70, 100, 38, 0.06));
  border: 1.5px solid rgba(70, 100, 38, 0.16);
  border-radius: var(--r-xl);
  padding: 22px;
  margin-bottom: 18px;
  text-align: center;
}

.couple-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.couple-avatar {
  width: 52px; height: 52px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  border: 3px solid var(--bg-surface);
  overflow: hidden;
  position: relative;
}
.couple-avatar img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.couple-avatar.him { background: var(--gradient-cool); }
.couple-avatar.her { background: var(--gradient-brand); }
.couple-heart { font-size: 24px; }

.couple-names {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 4px;
}
.couple-since { font-size: 0.77rem; color: var(--text-4); }

.couple-streak {
  margin-top: 14px;
  padding: 9px 14px;
  background: rgba(70, 100, 38, 0.07);
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.81rem;
  color: var(--text-3);
}
.couple-streak strong { color: var(--purple); font-weight: 800; }

/* â”€â”€ Chart â”€â”€ */
.chart-placeholder {
  height: 150px;
  background: var(--bg-glass);
  border-radius: var(--r-lg);
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding: 14px;
  overflow: hidden;
}

.chart-bar {
  flex: 1;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: var(--gradient-brand);
  opacity: 0.65;
  transition: opacity var(--ease);
  max-width: 44px;
}
.chart-bar:hover { opacity: 1; }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1100px) {
  .stats-grid    { grid-template-columns: repeat(2, 1fr); }
  .content-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .auth-panel { display: none; }
  .auth-form-side { height: auto; min-height: 100vh; padding: 40px 24px; overflow-y: visible; }

  .app-layout { grid-template-columns: 1fr; }
  .sidebar {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    height: 100vh;
    width: 260px;
  }
  .sidebar.open { display: flex; }
}

@media (max-width: 600px) {
  .page-content  { padding: 16px; }
  .stats-grid    { grid-template-columns: 1fr 1fr; }
  .topnav        { padding: 14px 18px; }
  .form-row      { grid-template-columns: 1fr; }
}

/* ============================================
   AVATAR IMAGE SUPPORT
============================================ */
.user-avatar img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* ============================================
   NO-PARTNER EMPTY STATE
============================================ */
.no-partner-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 64px 24px; gap: 16px;
}
.no-partner-state .nps-icon { font-size: 56px; }
.no-partner-state h3 { font-size: 1.25rem; font-weight: 700; color: var(--text-1); }
.no-partner-state p  { font-size: 0.9rem; color: var(--text-3); max-width: 320px; line-height: 1.6; }

/* ============================================
   CALENDAR
============================================ */
.cal-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.cal-month-label {
  font-size: 1.2rem; font-weight: 700; color: var(--text-1);
}
.cal-nav-btn {
  background: var(--bg-glass); border: 1.5px solid var(--border);
  color: var(--text-2); border-radius: var(--r-sm);
  padding: 8px 14px; cursor: pointer; font-size: 1rem;
  transition: background var(--ease), border-color var(--ease);
}
.cal-nav-btn:hover { background: var(--bg-glass2); border-color: var(--border-hover); }

.cal-dow-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.cal-dow {
  text-align: center; font-size: 0.72rem; font-weight: 600;
  color: var(--text-4); padding: 4px 0;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-day {
  aspect-ratio: 1; min-height: 48px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; padding: 6px 4px;
  border-radius: var(--r-sm); cursor: pointer;
  transition: background var(--ease); position: relative;
  border: 1.5px solid transparent;
}
.cal-day:hover { background: var(--bg-glass2); }
.cal-day.other-month .cal-day-num { color: var(--text-4); }
.cal-day.today {
  background: rgba(70, 100, 38, 0.09);
  border-color: rgba(70, 100, 38, 0.28);
}
.cal-day.today .cal-day-num { color: var(--purple); font-weight: 700; }
.cal-day.selected {
  background: rgba(70, 100, 38, 0.08);
  border-color: rgba(70, 100, 38, 0.18);
}
.cal-day-num { font-size: 0.85rem; font-weight: 500; color: var(--text-2); line-height: 1; }
.cal-dots {
  display: flex; gap: 3px; flex-wrap: wrap;
  justify-content: center; margin-top: 4px;
}
.cal-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.cal-dot.anniversary { background: #f43f8e; }
.cal-dot.birthday    { background: #fbbf24; }
.cal-dot.date-night  { background: #7aad92; }
.cal-dot.reminder    { background: #6aad5a; }
.cal-dot.special     { background: #6aad5a; }

.cal-side-panel {
  background: var(--bg-surface); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 20px; position: sticky; top: 80px;
}
.cal-side-title {
  font-size: 0.95rem; font-weight: 700; color: var(--text-1); margin-bottom: 16px;
}
.cal-event-list { display: flex; flex-direction: column; gap: 10px; }
.cal-event-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; border-radius: var(--r-md);
  background: var(--bg-glass); border: 1px solid var(--border);
  cursor: pointer; transition: background var(--ease);
}
.cal-event-item:hover { background: var(--bg-glass2); }
.cal-event-icon {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.cal-event-icon.anniversary { background: rgba(70, 100, 38, 0.08); }
.cal-event-icon.birthday    { background: rgba(251,191,36,0.15); }
.cal-event-icon.date-night  { background: rgba(70, 100, 38, 0.09); }
.cal-event-icon.reminder    { background: rgba(70, 100, 38, 0.08); }
.cal-event-icon.special     { background: rgba(70, 100, 38, 0.08); }
.cal-event-title { font-size: 0.88rem; font-weight: 600; color: var(--text-1); }
.cal-event-date  { font-size: 0.78rem; color: var(--text-3); margin-top: 2px; }

.event-type-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.event-type-chip {
  padding: 6px 12px; border-radius: var(--r-full);
  background: var(--bg-glass); border: 1.5px solid var(--border);
  font-size: 0.82rem; cursor: pointer; transition: all var(--ease);
  color: var(--text-2);
}
.event-type-chip.selected { border-color: var(--purple); background: rgba(70, 100, 38, 0.09); color: var(--purple); }

@media (max-width: 900px) {
  .cal-layout { grid-template-columns: 1fr; }
  .cal-side-panel { position: static; }
}

/* ============================================
   WISHLIST
============================================ */
.wish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.wish-card {
  background: var(--bg-surface); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
  transition: transform var(--ease), border-color var(--ease), opacity var(--ease);
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.wish-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.wish-card.fulfilled { opacity: 0.55; }
.wish-card.fulfilled .wish-title { text-decoration: line-through; color: var(--text-4); }
.wish-emoji { font-size: 36px; line-height: 1; }
.wish-title { font-size: 1rem; font-weight: 700; color: var(--text-1); }
.wish-desc  { font-size: 0.85rem; color: var(--text-3); line-height: 1.5; }
.wish-price {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--mint); font-weight: 600; font-size: 0.9rem;
}
.wish-meta  { font-size: 0.77rem; color: var(--text-4); margin-top: auto; }
.wish-actions { display: flex; gap: 8px; margin-top: 4px; }
.wish-fulfilled-badge {
  position: absolute; top: 12px; right: 12px;
  background: rgba(70, 100, 38, 0.08); border: 1px solid rgba(70, 100, 38, 0.16);
  color: var(--mint); font-size: 0.72rem; font-weight: 600;
  padding: 3px 8px; border-radius: var(--r-full); letter-spacing: 0.03em;
}
.wish-link-btn {
  background: none; border: none; color: var(--purple);
  cursor: pointer; font-size: 0.82rem; padding: 0;
  text-decoration: underline;
}
.emoji-picker-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
  margin-top: 8px;
}
.emoji-opt {
  aspect-ratio: 1; font-size: 1.4rem; border-radius: var(--r-sm);
  background: var(--bg-glass); border: 1.5px solid transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--ease);
}
.emoji-opt:hover { background: var(--bg-glass2); }
.emoji-opt.selected { border-color: var(--purple); background: rgba(70, 100, 38, 0.09); }

@media (max-width: 600px) {
  .wish-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   SETTINGS
============================================ */
.settings-layout {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: start;
}
.settings-sidenav {
  background: var(--bg-surface); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 12px; position: sticky; top: 80px;
}
.settings-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-md);
  font-size: 0.9rem; font-weight: 500; color: var(--text-2);
  cursor: pointer; transition: all var(--ease); border: none;
  background: none; width: 100%; text-align: left;
}
.settings-nav-item:hover { background: var(--bg-glass2); color: var(--text-1); }
.settings-nav-item.active { background: rgba(70, 100, 38, 0.09); color: var(--purple); }

.settings-panel { display: none; flex-direction: column; gap: 20px; }
.settings-panel.active { display: flex; }

.settings-section {
  background: var(--bg-surface); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
}
.settings-section-title {
  font-size: 1rem; font-weight: 700; color: var(--text-1); margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.settings-row {
  display: flex; align-items: center; gap: 16px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; padding-bottom: 0; }
.settings-row-label {
  font-size: 0.85rem; color: var(--text-3); min-width: 120px; flex-shrink: 0;
}
.settings-row-value { font-size: 0.9rem; color: var(--text-1); flex: 1; }

.avatar-upload-wrap {
  position: relative; width: 88px; height: 88px; cursor: pointer; flex-shrink: 0;
}
.avatar-upload-wrap .user-avatar {
  width: 88px; height: 88px; font-size: 28px; font-weight: 700;
  border-radius: 50%; background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
  color: white; overflow: hidden;
}
.avatar-upload-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,0.09); display: flex; align-items: center;
  justify-content: center; font-size: 20px; opacity: 0;
  transition: opacity var(--ease);
}
.avatar-upload-wrap:hover .avatar-upload-overlay { opacity: 1; }

.partner-card {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  background: var(--bg-glass); border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
}
.partner-card-info { flex: 1; }
.partner-card-name  { font-size: 1rem; font-weight: 700; color: var(--text-1); }
.partner-card-email { font-size: 0.82rem; color: var(--text-3); margin-top: 2px; }

.danger-zone {
  background: rgba(248,113,113,0.06); border: 1.5px solid rgba(248,113,113,0.2);
  border-radius: var(--r-lg); padding: 24px;
}
.danger-zone .settings-section-title { color: var(--error); border-color: rgba(248,113,113,0.2); }

@media (max-width: 760px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-sidenav { position: static; }
  .settings-sidenav { display: flex; flex-direction: row; overflow-x: auto; gap: 4px; padding: 8px; }
  .settings-nav-item { white-space: nowrap; }
}
