/* ═══════════════════════════════════════════════════════════════
   tacuens — theme.css
   Single source of truth for the entire UI.

   TO CUSTOMIZE: only edit this file.
   Everything — colors, fonts, radius, spacing, shadows,
   buttons, inputs, cards — is defined here via CSS variables.

   Load order (every page):
     1. Bootstrap 4.5
     2. theme.css        ← this file
     3. [page].css       ← page-specific layout only
═══════════════════════════════════════════════════════════════ */


/* ──────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   All visual decisions live here as CSS custom properties.
────────────────────────────────────────────────────────────── */
:root {

  /* ── Brand colors ───────────────────────────── */
  --tc-accent:          #00d4b4;
  --tc-accent-2:        #00c4e8;
  --tc-accent-grad:     linear-gradient(90deg, #00d4b4, #00c4e8);
  --tc-accent-btn:      linear-gradient(90deg, #3de8c8, #00c4e8);
  --tc-accent-shadow:   rgba(0, 196, 180, 0.32);

  /* ── Background ─────────────────────────────── */
  --tc-bg-grad: linear-gradient(
    160deg,
    #cfe0ef 0%,
    #ddeaf7 40%,
    #e4eff7 70%,
    #d5e8f2 100%
  );

  /* ── Surfaces ───────────────────────────────── */
  --tc-surface:         rgba(255, 255, 255, 0.58);
  --tc-surface-solid:   rgba(255, 255, 255, 0.72);
  --tc-border:          rgba(255, 255, 255, 0.82);
  --tc-border-input:    rgba(200, 215, 228, 0.75);

  /* ── Text ───────────────────────────────────── */
  --tc-font:            'Nunito', sans-serif;
  --tc-text:            #0f1923;
  --tc-muted:           #7a8fa0;
  --tc-label:           #8a9eaf;

  /* ── Semantic colors ────────────────────────── */
  --tc-red:             #f04040;
  --tc-green:           #00c48c;
  --tc-orange:          #f5a623;

  /* ── Border radius ──────────────────────────── */
  --tc-radius-card:     20px;   /* cards, panels                  */
  --tc-radius:          16px;   /* buttons, large inputs          */
  --tc-radius-sm:       12px;   /* small inputs, tags             */
  --tc-radius-xs:       8px;    /* badges, chips                  */
  --tc-radius-pill:     50px;   /* pills, toggles                 */

  /* ── Shadows ────────────────────────────────── */
  --tc-shadow:          0 8px 32px rgba(0, 100, 150, 0.10);
  --tc-shadow-sm:       0 2px 12px rgba(0, 100, 150, 0.08);
  --tc-shadow-btn:      0 4px 18px rgba(0, 196, 180, 0.32);
  --tc-shadow-btn-hover:0 6px 22px rgba(0, 196, 180, 0.38);

  /* ── Spacing ────────────────────────────────── */
  --tc-gap:             12px;
  --tc-gap-sm:          8px;
  --tc-gap-xs:          4px;
  --tc-page-x:          16px;   /* horizontal page padding        */

  /* ── Input ──────────────────────────────────── */
  --tc-input-py:        13px;   /* input vertical padding         */
  --tc-input-px:        14px;   /* input horizontal padding       */
  --tc-input-font-size: 15px;
  --tc-input-font-weight: 600;
  --tc-input-bg:        rgba(255, 255, 255, 0.65);

  /* ── Button ─────────────────────────────────── */
  --tc-btn-py:          15px;
  --tc-btn-px:          20px;
  --tc-btn-font-size:   15.5px;
  --tc-btn-font-weight: 800;

  /* ── Typography scale ───────────────────────── */
  --tc-text-xs:         11px;
  --tc-text-sm:         12px;
  --tc-text-base:       14px;
  --tc-text-md:         15px;
  --tc-text-lg:         17px;
  --tc-text-xl:         20px;
  --tc-text-2xl:        24px;
  --tc-text-3xl:        28px;

  /* ── Transitions ────────────────────────────── */
  --tc-transition:      0.18s ease;
  --tc-transition-bounce: cubic-bezier(0.22, 0.68, 0, 1.2);

  /* ── App shell ──────────────────────────────── */
  --tc-app-max-width:   480px;
  --tc-nav-height:      64px;   /* bottom nav height (excl. safe area) */
  --tc-navbar-height:   56px;   /* top nav height                  */
  --tc-blur:            blur(20px);

}


/* ──────────────────────────────────────────────────────────────
   2. BASE RESET & GLOBAL
────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  min-height: 100vh;
  font-family: var(--tc-font);
  background: var(--tc-bg-grad);
  color: var(--tc-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* PWA safe-area insets (iOS notch / home indicator) */
body {
  padding-top:    env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left:   env(safe-area-inset-left);
  padding-right:  env(safe-area-inset-right);
}

a { color: inherit; }
button { font-family: var(--tc-font); }


/* ──────────────────────────────────────────────────────────────
   3. TYPOGRAPHY UTILITIES
────────────────────────────────────────────────────────────── */
.tc-label {
  font-size: var(--tc-text-xs);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tc-label);
  margin-bottom: 6px;
  display: block;
}

.tc-section-label {
  font-size: var(--tc-text-xs);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tc-label);
  margin-bottom: 10px;
  margin-top: 20px;
}

.tc-page-title {
  font-size: var(--tc-text-3xl);
  font-weight: 900;
  color: var(--tc-text);
  letter-spacing: -0.4px;
}

.section-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--tc-text);
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}
.section-sub {
  font-size: var(--tc-text-sm);
  font-weight: 500;
  color: var(--tc-muted);
}
.section-accent-line {
  width: 38px;
  height: 3px;
  background: var(--tc-accent-grad);
  border-radius: 4px;
  margin-top: 8px;
}


/* ──────────────────────────────────────────────────────────────
   4. SURFACE / CARD
────────────────────────────────────────────────────────────── */
.tc-card {
  background: var(--tc-surface);
  backdrop-filter: var(--tc-blur);
  -webkit-backdrop-filter: var(--tc-blur);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-card);
  box-shadow: var(--tc-shadow);
}

.tc-card-solid {
  background: var(--tc-surface-solid);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--tc-radius-card);
  box-shadow: var(--tc-shadow-sm);
}


/* ──────────────────────────────────────────────────────────────
   5. INPUTS
────────────────────────────────────────────────────────────── */
.tc-input-group {
  display: flex;
  align-items: center;
  background: var(--tc-input-bg);
  border: 1.5px solid var(--tc-border-input);
  border-radius: var(--tc-radius-sm);
  transition: border-color var(--tc-transition), box-shadow var(--tc-transition);
  overflow: hidden;
}
.tc-input-group:focus-within {
  border-color: var(--tc-accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 180, 0.14);
}
.tc-input-group:has(.is-invalid) {
  border-color: var(--tc-red);
  box-shadow: 0 0 0 3px rgba(240, 64, 64, 0.11);
}
.tc-input-group:has(.is-valid) {
  border-color: var(--tc-green);
  box-shadow: 0 0 0 3px rgba(0, 196, 140, 0.11);
}

.tc-input-icon {
  padding: 0 10px 0 var(--tc-input-px);
  color: var(--tc-muted);
  font-size: 17px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.tc-input-group .form-control {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: var(--tc-input-py) 8px var(--tc-input-py) 0;
  font-family: var(--tc-font);
  font-size: var(--tc-input-font-size);
  font-weight: var(--tc-input-font-weight);
  color: var(--tc-text);
  border-radius: 0 !important;
}
.tc-input-group .form-control::placeholder {
  color: rgba(122, 143, 160, 0.65);
  font-weight: 500;
}
.tc-input-group .form-control.is-invalid,
.tc-input-group .form-control.is-valid {
  background-image: none !important;
  padding-right: 8px !important;
}

.tc-input-suffix {
  padding: 0 13px 0 6px;
  color: var(--tc-muted);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color var(--tc-transition);
  background: transparent;
  border: none;
}
.tc-input-suffix:hover { color: var(--tc-text); }
.tc-input-suffix.text-success { color: var(--tc-green) !important; }

.tc-field-error {
  display: none;
  align-items: center;
  gap: 5px;
  color: var(--tc-red);
  font-size: var(--tc-text-sm);
  font-weight: 600;
  margin-top: 5px;
}
.tc-field-error i { font-size: 13px; }

/* Search bar */
.tc-search-wrap { padding: 0 var(--tc-page-x) 12px; }
.tc-search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--tc-input-bg);
  border: 1.5px solid var(--tc-border-input);
  border-radius: var(--tc-radius-sm);
  padding: 10px var(--tc-input-px);
  transition: border-color var(--tc-transition), box-shadow var(--tc-transition);
}
.tc-search-inner:focus-within {
  border-color: var(--tc-accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 180, 0.12);
}
.tc-search-inner i { font-size: 18px; color: var(--tc-muted); flex-shrink: 0; }
.tc-search-inner input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--tc-font);
  font-size: var(--tc-text-md);
  font-weight: 600;
  color: var(--tc-text);
  outline: none;
}
.tc-search-inner input::placeholder { color: rgba(122,143,160,.6); font-weight: 500; }


/* ──────────────────────────────────────────────────────────────
   6. PASSWORD STRENGTH
────────────────────────────────────────────────────────────── */
#pw-strength-wrap {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.pw-strength-bar {
  flex: 1;
  height: 4px;
  background: rgba(180, 200, 215, 0.3);
  border-radius: 4px;
  overflow: hidden;
}
#pw-strength-fill {
  height: 100%;
  border-radius: 4px;
  width: 0;
  transition: width 0.28s ease, background 0.28s ease;
}
#pw-strength-label {
  font-size: var(--tc-text-xs);
  font-weight: 700;
  min-width: 46px;
  text-align: right;
}


/* ──────────────────────────────────────────────────────────────
   7. BUTTONS
────────────────────────────────────────────────────────────── */

/* Primary — gradient accent */
.btn-tc-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: var(--tc-btn-py) var(--tc-btn-px);
  background: var(--tc-accent-btn);
  border: none;
  border-radius: var(--tc-radius);
  font-family: var(--tc-font);
  font-size: var(--tc-btn-font-size);
  font-weight: var(--tc-btn-font-weight);
  color: var(--tc-text);
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--tc-shadow-btn);
  position: relative;
  transition: opacity var(--tc-transition), transform 0.14s, box-shadow var(--tc-transition);
  text-decoration: none;
}
.btn-tc-primary:hover:not(:disabled) {
  opacity: 0.91;
  transform: translateY(-1px);
  box-shadow: var(--tc-shadow-btn-hover);
  color: var(--tc-text);
  text-decoration: none;
}
.btn-tc-primary:active:not(:disabled) { transform: translateY(0); }
.btn-tc-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Loading state */
.btn-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2.5px solid rgba(0, 0, 0, 0.18);
  border-top-color: var(--tc-text);
  border-radius: 50%;
  animation: tc-spin 0.6s linear infinite;
}
.btn-tc-primary.btn-loading .btn-spinner { display: inline-block; }
.btn-tc-primary.btn-loading .btn-text    { opacity: 0; position: absolute; }

/* Google OAuth button */
.btn-tc-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px var(--tc-btn-px);
  background: var(--tc-surface-solid);
  border: 1.5px solid var(--tc-border-input);
  border-radius: var(--tc-radius);
  font-family: var(--tc-font);
  font-size: var(--tc-text-base);
  font-weight: 700;
  color: var(--tc-text);
  cursor: pointer;
  transition: background var(--tc-transition), box-shadow var(--tc-transition);
  text-decoration: none;
}
.btn-tc-google:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--tc-shadow-sm);
  text-decoration: none;
  color: var(--tc-text);
}
.btn-tc-google img,
.btn-tc-google svg { width: 20px; height: 20px; }

/* ── FAB action overlay & menu ─────────────────── */
.tc-fab-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,25,35,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 190;
  animation: tc-fade-in .2s ease both;
}
.tc-fab-overlay.active { display: block; }

.tc-fab-menu {
  display: none;
  position: fixed;
  bottom: calc(var(--tc-nav-height) + env(safe-area-inset-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: calc(var(--tc-app-max-width) - 32px);
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  z-index: 195;
  animation: tc-slide-up .28s var(--tc-transition-bounce) both;
}
.tc-fab-menu.active { display: grid; }

.tc-fab-card {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 20px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(0,60,100,.14);
  transition: transform .15s, box-shadow .15s;
}
.tc-fab-card:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(0,60,100,.18); text-decoration: none; }
.tc-fab-card:active { transform: scale(.97); }

.tc-fab-card-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.tc-fab-card-icon.green { background: rgba(0,212,180,.18); color: var(--tc-accent); }
.tc-fab-card-icon.blue  { background: rgba(0,196,232,.18); color: var(--tc-accent-2); }

.tc-fab-card-label {
  font-size: 16px;
  font-weight: 900;
  color: var(--tc-text);
  text-align: center;
}
.tc-fab-card-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--tc-muted);
  text-align: center;
  line-height: 1.4;
}

/* FAB open state — rotates to X */
.tc-fab.open {
  background: rgba(255,255,255,.2);
  box-shadow: 0 4px 18px rgba(0,0,0,.2);
}

/* Dark mode */
body.tc-dark .tc-fab-card {
  background: rgba(18,26,36,.96);
  border-color: rgba(255,255,255,.1);
}

/* ── FAB menu overlay ──────────────────────── */
.tc-fab-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,25,35,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 190;
  opacity: 0;
  transition: opacity .22s ease;
}
.tc-fab-backdrop.visible { opacity: 1; }

.tc-fab-menu {
  position: fixed;
  bottom: calc(var(--tc-nav-height) + env(safe-area-inset-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: calc(var(--tc-app-max-width) - 32px);
  max-width: calc(100vw - 32px);
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 195;
  opacity: 0;
  transition: opacity .22s ease, transform .22s cubic-bezier(.22,.68,0,1.2);
}
.tc-fab-menu.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tc-fab-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 14px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--tc-radius-card);
  box-shadow: 0 8px 32px rgba(0,80,120,.15);
  text-decoration: none;
  color: inherit;
  transition: transform .14s, box-shadow .14s;
}
.tc-fab-option:hover  { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(0,80,120,.2); text-decoration: none; color: inherit; }
.tc-fab-option:active { transform: scale(.97); }

.tc-fab-option-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.tc-fab-option-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.tc-fab-option-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--tc-text);
}
.tc-fab-option-desc {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--tc-muted);
  line-height: 1.4;
}

/* FAB open state — rotates and changes color */
.tc-fab.open {
  background: rgba(15,25,35,.85);
  box-shadow: 0 4px 18px rgba(0,0,0,.3);
}

/* Dark mode FAB menu */
body.tc-dark .tc-fab-option {
  background: rgba(22,32,45,.97);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

/* FAB (floating action button) */
.tc-fab {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--tc-accent-btn);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  color: var(--tc-text);
  box-shadow: var(--tc-shadow-btn);
  cursor: pointer;
  transition: transform 0.15s, box-shadow var(--tc-transition);
  margin-bottom: 6px;
  flex-shrink: 0;
  text-decoration: none;
}
.tc-fab:hover {
  transform: scale(1.08);
  box-shadow: var(--tc-shadow-btn-hover);
  text-decoration: none;
  color: var(--tc-text);
}
.tc-fab:active { transform: scale(.95); }

/* Header FAB (smaller, in page header) */
.tc-header-fab {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--tc-accent-btn);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--tc-text);
  box-shadow: var(--tc-shadow-btn);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow var(--tc-transition);
  flex-shrink: 0;
}
.tc-header-fab:hover {
  transform: scale(1.07);
  box-shadow: var(--tc-shadow-btn-hover);
  color: var(--tc-text);
  text-decoration: none;
}
.tc-header-fab:active { transform: scale(.94); }


/* ──────────────────────────────────────────────────────────────
   8. NAVIGATION
────────────────────────────────────────────────────────────── */

/* Top navbar */
.tc-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  padding-top: calc(14px + env(safe-area-inset-top));
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: var(--tc-blur);
  -webkit-backdrop-filter: var(--tc-blur);
}

.tc-navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.tc-navbar-logo-icon {
  width: 34px; height: 34px;
  background: var(--tc-text);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.tc-navbar-logo-icon svg { width: 20px; height: 20px; fill: #fff; }
.tc-navbar-logo-text {
  font-size: var(--tc-text-xl);
  font-weight: 900;
  color: var(--tc-text);
  letter-spacing: -0.3px;
}

.tc-navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: var(--tc-radius-pill);
  padding: 5px 14px 5px 5px;
  box-shadow: var(--tc-shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow var(--tc-transition);
}
.tc-navbar-user:hover { box-shadow: var(--tc-shadow); text-decoration: none; }

.tc-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--tc-accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.tc-navbar-username {
  font-size: var(--tc-text-base);
  font-weight: 700;
  color: var(--tc-text);
  white-space: nowrap;
}

/* Bottom nav */
.tc-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--tc-app-max-width);
  background: rgba(255,255,255,0.82);
  backdrop-filter: var(--tc-blur);
  -webkit-backdrop-filter: var(--tc-blur);
  border-top: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 -4px 24px rgba(0,80,120,.08);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 200;
  height: calc(var(--tc-nav-height) + env(safe-area-inset-bottom));
}

.tc-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 16px 8px;
  cursor: pointer;
  text-decoration: none;
  color: var(--tc-muted);
  font-size: var(--tc-text-xs);
  font-weight: 700;
  transition: color var(--tc-transition);
  flex: 1;
  position: relative;
}
.tc-nav-item:hover { text-decoration: none; color: var(--tc-text); }
.tc-nav-item.active { color: var(--tc-accent); }
.tc-nav-item i { font-size: 22px; }
.tc-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 3px;
  background: var(--tc-accent-grad);
  border-radius: 3px 3px 0 0;
}

/* Filter tabs */
.tc-filter-tabs {
  display: flex;
  gap: var(--tc-gap-sm);
  padding: 6px 20px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tc-filter-tabs::-webkit-scrollbar { display: none; }
.tc-filter-tab {
  flex-shrink: 0;
  padding: 7px 18px;
  border-radius: var(--tc-radius-pill);
  font-family: var(--tc-font);
  font-size: var(--tc-text-base);
  font-weight: 700;
  border: 1.5px solid rgba(200, 215, 228, 0.6);
  background: rgba(255,255,255,0.55);
  color: var(--tc-muted);
  cursor: pointer;
  transition: all var(--tc-transition);
  white-space: nowrap;
}
.tc-filter-tab:hover { background: rgba(255,255,255,0.8); color: var(--tc-text); }
.tc-filter-tab.active {
  background: var(--tc-accent-btn);
  border-color: transparent;
  color: var(--tc-text);
  box-shadow: var(--tc-shadow-btn);
}

/* Lang toggle */
.lang-toggle {
  display: flex;
  gap: 3px;
  background: rgba(200, 218, 232, 0.38);
  border-radius: 10px;
  padding: 3px;
}
.lang-toggle .lang-btn {
  background: transparent;
  border: none;
  padding: 5px 11px;
  border-radius: var(--tc-radius-xs);
  font-family: var(--tc-font);
  font-size: 13px;
  font-weight: 700;
  color: var(--tc-muted);
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: background var(--tc-transition), color var(--tc-transition), box-shadow var(--tc-transition);
  line-height: 1;
}
.lang-toggle .lang-btn.active {
  background: #fff;
  color: var(--tc-text);
  box-shadow: 0 2px 6px rgba(0, 80, 120, 0.10);
}


/* ──────────────────────────────────────────────────────────────
   9. SHARED UI COMPONENTS
────────────────────────────────────────────────────────────── */

/* Divider */
.tc-divider {
  text-align: center;
  color: var(--tc-muted);
  font-size: 13px;
  font-weight: 600;
  position: relative;
  margin: 18px 0;
}
.tc-divider::before, .tc-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 36%;
  height: 1px;
  background: rgba(160, 185, 205, 0.38);
}
.tc-divider::before { left: 0; }
.tc-divider::after  { right: 0; }

/* Accent line (under logo / section headings) */
.tc-accent-line {
  width: 46px; height: 3px;
  background: var(--tc-accent-grad);
  border-radius: 4px;
  margin: 4px auto 0;
}

/* Back button */
.tc-back-btn {
  background: transparent;
  border: none;
  color: var(--tc-text);
  font-size: 20px;
  padding: 4px;
  cursor: pointer;
  display: flex; align-items: center;
  transition: opacity var(--tc-transition);
  line-height: 1;
  text-decoration: none;
}
.tc-back-btn:hover { opacity: 0.55; text-decoration: none; color: var(--tc-text); }

/* Back to login link */
.tc-back-to-login {
  display: flex; align-items: center; justify-content: center;
  gap: 5px;
  color: var(--tc-muted);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--tc-transition);
}
.tc-back-to-login:hover { color: var(--tc-text); text-decoration: none; }

/* Forgot / footer links */
.tc-forgot {
  display: block;
  text-align: right;
  color: var(--tc-accent-2);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity var(--tc-transition);
}
.tc-forgot:hover { opacity: 0.7; color: var(--tc-accent-2); text-decoration: none; }

.tc-footer-link {
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tc-muted);
}
.tc-footer-link a {
  color: var(--tc-accent);
  font-weight: 800;
  text-decoration: none;
  transition: opacity var(--tc-transition);
}
.tc-footer-link a:hover { opacity: 0.75; text-decoration: none; }

/* Section row (label + link) */
.tc-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  margin-top: 20px;
}
.tc-section-row .tc-section-label { margin: 0; }
.tc-section-row a {
  font-size: 13px;
  font-weight: 800;
  color: var(--tc-accent-2);
  text-decoration: none;
  transition: opacity var(--tc-transition);
}
.tc-section-row a:hover { opacity: .72; text-decoration: none; }

/* Page header row (title + fab) */
.tc-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--tc-page-x) 10px;
  padding-top: calc(16px + env(safe-area-inset-top));
}

/* Dot indicators */
.tc-dots { display: flex; justify-content: center; gap: 6px; }
.tc-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  opacity: 0.3;
  transition: opacity 0.25s;
}
.tc-dot.active { opacity: 1; }
.tc-dot-1 { background: var(--tc-accent); }
.tc-dot-2 { background: #4a9ef5; }
.tc-dot-3 { background: #c47af5; }
.tc-dot-4 { background: #f07a9a; }

/* Toast — vertically centered, pill style */
.tacuens-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  background: rgba(15, 25, 35, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 14px 26px;
  border-radius: 50px;
  font-family: var(--tc-font);
  font-size: var(--tc-text-base);
  font-weight: 700;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  transition: opacity 0.22s ease, transform 0.22s var(--tc-transition-bounce);
  z-index: 9999;
  white-space: nowrap;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(var(--tc-app-max-width) - 48px);
  text-align: center;
}
.tacuens-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.tacuens-toast.toast-error   { background: rgba(220, 38, 38, 0.92);  }
.tacuens-toast.toast-success { background: rgba(0, 180, 130, 0.92);  }

/* Error banner */
.tc-error-banner {
  background: rgba(240,64,64,.1);
  border: 1px solid rgba(240,64,64,.25);
  border-radius: var(--tc-radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tc-red);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}

/* Skeleton loader */
.tc-skeleton {
  background: linear-gradient(90deg,
    rgba(200,218,232,.45) 25%,
    rgba(220,232,242,.70) 50%,
    rgba(200,218,232,.45) 75%
  );
  background-size: 200% 100%;
  animation: tc-shimmer 1.4s infinite;
  border-radius: var(--tc-radius-xs);
}
.tc-skeleton-card {
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: var(--tc-radius-card);
  padding: 16px;
  box-shadow: var(--tc-shadow-sm);
  margin-bottom: 10px;
}

/* Empty state */
.tc-empty {
  text-align: center;
  padding: 32px var(--tc-page-x);
  color: var(--tc-muted);
}
.tc-empty i { font-size: 40px; opacity: .35; display: block; margin-bottom: 10px; }
.tc-empty p { font-size: var(--tc-text-base); font-weight: 600; margin: 0; }

/* Logo (auth pages) */
.tc-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.tc-logo-icon {
  width: 46px; height: 46px;
  background: var(--tc-text);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tc-logo-icon svg { width: 28px; height: 28px; fill: #fff; }
.tc-logo-text {
  font-size: var(--tc-text-3xl);
  font-weight: 900;
  color: var(--tc-text);
  letter-spacing: -0.5px;
  line-height: 1;
}


/* ──────────────────────────────────────────────────────────────
   10. ANIMATIONS
────────────────────────────────────────────────────────────── */
@keyframes tc-slide-up {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
@keyframes tc-spin    { to { transform: rotate(360deg); } }
@keyframes tc-shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}


/* ──────────────────────────────────────────────────────────────
   10b. MODALS (shared bottom-sheet pattern)
────────────────────────────────────────────────────────────── */
/* ── Modal backdrop ─────────────────────────── */
.tc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,25,35,.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
  animation: tc-fade-in .2s ease both;
}
.tc-modal-backdrop.closing { animation: tc-fade-out .2s ease both; }

@keyframes tc-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes tc-fade-out { from { opacity: 1; } to { opacity: 0; } }

/* ── Modal sheet ────────────────────────────── */
.tc-modal {
  background: rgba(245,248,252,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: var(--tc-app-max-width);
  padding: 28px 24px 32px;
  box-shadow: 0 -8px 40px rgba(0,60,100,.12);
  animation: tc-sheet-up .28s cubic-bezier(.22,.68,0,1.2) both;
  position: relative;
}
.tc-modal-backdrop.closing .tc-modal { animation: tc-sheet-down .22s ease both; }

@keyframes tc-sheet-up   { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes tc-sheet-down { from { transform: translateY(0); }    to { transform: translateY(100%); } }

/* Modal close button */
.tc-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(200,218,232,.4);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--tc-muted);
  cursor: pointer;
  transition: background var(--tc-transition);
}
.tc-modal-close:hover { background: rgba(200,218,232,.7); color: var(--tc-text); }

/* ── Leave confirm modal ────────────────────── */
.tc-leave-modal .tc-modal-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--tc-text);
  margin-bottom: 8px;
  padding-right: 36px;
}
.tc-leave-modal .tc-modal-body {
  font-size: 14px;
  font-weight: 500;
  color: var(--tc-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}
.tc-leave-modal .tc-modal-body strong { color: var(--tc-text); }
.btn-tc-leave {
  width: 100%;
  padding: 15px;
  background: rgba(200,218,232,.3);
  border: none;
  border-radius: var(--tc-radius);
  font-family: var(--tc-font);
  font-size: 16px;
  font-weight: 800;
  color: var(--tc-red);
  cursor: pointer;
  transition: background var(--tc-transition);
}
.btn-tc-leave:hover { background: rgba(240,64,64,.1); }

/* ── Invite modal ───────────────────────────── */
.tc-invite-modal .tc-modal-icon {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--tc-accent-btn);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  color: var(--tc-text);
  margin: 0 auto 16px;
  box-shadow: 0 4px 18px var(--tc-accent-shadow);
}

/* ──────────────────────────────────────────────────────────────
   11. DARK MODE
   Applied via body.tc-dark (set by settings.js + theme-init.php)
────────────────────────────────────────────────────────────── */
body.tc-dark {
  --tc-bg-grad:       linear-gradient(160deg, #0d1117 0%, #111820 50%, #0f161e 100%);
  --tc-surface:       rgba(255,255,255,.06);
  --tc-surface-solid: rgba(255,255,255,.08);
  --tc-border:        rgba(255,255,255,.1);
  --tc-border-input:  rgba(255,255,255,.12);
  --tc-text:          #e8f0f7;
  --tc-muted:         #6b8096;
  --tc-label:         #5a7088;
  --tc-input-bg:      rgba(255,255,255,.07);
}
/* Dark mode — navigation components */
body.tc-dark .tc-navbar {
  background: rgba(13, 17, 23, 0.85);
}
body.tc-dark .tc-navbar-user {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.1);
}
body.tc-dark .tc-bottom-nav {
  background: rgba(13, 17, 23, 0.92);
  border-top-color: rgba(255,255,255,.08);
}
body.tc-dark .tc-nav-item { color: #4a6278; }
body.tc-dark .tc-nav-item:hover { color: #8aa8c0; }
body.tc-dark .tc-nav-item.active { color: var(--tc-accent); }
body.tc-dark .tc-navbar-logo-text,
body.tc-dark .tc-navbar-username { color: var(--tc-text); }
body.tc-dark .tc-navbar-logo-icon { background: #e8f0f7; }
body.tc-dark .tc-navbar-logo-icon svg { fill: #0d1117; }

/* Dark mode — modals */
body.tc-dark .tc-modal {
  background: rgba(18, 26, 36, 0.97);
  border-top: 1px solid rgba(255,255,255,.08);
}
body.tc-dark .tc-modal-close {
  background: rgba(255,255,255,.08);
}
body.tc-dark .tc-modal-close:hover {
  background: rgba(255,255,255,.15);
  color: var(--tc-text);
}

/* Dark mode — cards & surfaces (home, lists, groups) */
body.tc-dark .tc-stat-card,
body.tc-dark .tc-pinned-card,
body.tc-dark .tc-txn-card,
body.tc-dark .tc-list-item,
body.tc-dark .tc-group-card,
body.tc-dark .tc-skeleton-card {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
}
body.tc-dark .tc-txn-card:hover,
body.tc-dark .tc-list-item:hover {
  background: rgba(255,255,255,.09);
}

/* Dark mode — search bar */
body.tc-dark .tc-search-inner {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
}
body.tc-dark .tc-search-inner input { color: var(--tc-text); }

/* Dark mode — filter tabs */
body.tc-dark .tc-filter-tab {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
  color: var(--tc-muted);
}
body.tc-dark .tc-filter-tab:hover {
  background: rgba(255,255,255,.09);
  color: var(--tc-text);
}
body.tc-dark .tc-filter-tab.active {
  background: var(--tc-accent-btn);
  border-color: transparent;
  color: #0f1923;
}

/* Dark mode — group card internals */
body.tc-dark .tc-group-divider   { background: rgba(255,255,255,.07); }
body.tc-dark .tc-group-action-btn {
  background: rgba(255,255,255,.08);
  color: var(--tc-muted);
}
body.tc-dark .tc-group-action-btn:hover {
  background: rgba(255,255,255,.14);
  color: var(--tc-text);
}
body.tc-dark .tc-group-action-btn.danger:hover {
  background: rgba(240,64,64,.2);
  color: var(--tc-red);
}

/* Dark mode — error banner */
body.tc-dark .tc-error-banner {
  background: rgba(240,64,64,.12);
  border-color: rgba(240,64,64,.2);
}

/* Dark mode — budget bar track */
body.tc-dark .tc-budget-bar { background: rgba(255,255,255,.1); }

/* Dark mode — section row links */
body.tc-dark .tc-section-row a { color: var(--tc-accent); }

/* Dark mode — page title */
body.tc-dark .tc-page-title { color: var(--tc-text); }

/* Dark mode — lang toggle */
body.tc-dark .lang-toggle { background: rgba(255,255,255,.08); }
body.tc-dark .lang-toggle .lang-btn.active {
  background: rgba(255,255,255,.15);
  color: var(--tc-text);
}

/* ──────────────────────────────────────────────────────────────
   12. RESPONSIVE & PWA
────────────────────────────────────────────────────────────── */
@media (max-width: 380px) {
  :root {
    --tc-btn-py:       13px;
    --tc-btn-font-size:14.5px;
    --tc-text-3xl:     24px;
  }
}

@media (min-width: 480px) {
  .app-shell {
    border-left:  1px solid rgba(200,218,232,.3);
    border-right: 1px solid rgba(200,218,232,.3);
  }
}

@media (display-mode: standalone) {
  body { background-attachment: fixed; }
  .auth-wrapper  { min-height: 100dvh; }
  .app-shell     { min-height: 100dvh; }
}

/* ── Pull-to-refresh indicator (universal) ─── */
/* Edit here to change PTR style across all pages */
.tc-ptr-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 36px;
  margin-top: -8px;
  margin-bottom: 4px;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
.tc-ptr-spinner {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--tc-surface-solid);
  border: 1px solid rgba(255,255,255,.88);
  box-shadow: var(--tc-shadow-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--tc-accent);
}
.tc-ptr-indicator.spinning {
  opacity: 1 !important;
  transform: translateY(8px) !important;
}
.tc-ptr-indicator.spinning .tc-ptr-spinner i {
  animation: tc-spin .7s linear infinite;
}
body.tc-dark .tc-ptr-spinner {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.12);
}
