  :root {
    /* Backgrounds — Light (default) */
    --bg: #f5f4ef;
    --bg-widget: #ffffff;
    --bg-header: #f5f4ef;
    --bg-hover: #ebe9e1;
    --bg-selected: #e5e3db;

    /* Text */
    --fg: #3d3929;
    --fg-header: #6b6356;
    --fg-muted: #9b9688;

    /* Accent — terracotta */
    --accent: #c15f3c;
    --accent-hover: #a8502f;
    --accent-light: rgba(193, 95, 60, 0.10);

    /* Borders */
    --border: #e8e6de;
    --border-subtle: #d5d0c8;

    /* Severity */
    --pass-bg: #eaf2e5;
    --pass-fg: #4a7a35;
    --fail-bg: #f5e0da;
    --fail-fg: #993a28;
    --warn-bg: #f5ecd5;
    --warn-fg: #8a6820;
    --info-bg: #e5edf2;
    --info-fg: #3a6880;

    /* Shadows */
    --shadow: 0 1px 3px rgba(61,57,41,0.06), 0 1px 2px rgba(61,57,41,0.04);
    --shadow-lg: 0 8px 24px rgba(61,57,41,0.08), 0 2px 8px rgba(61,57,41,0.04);

    /* Radius */
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;

    /* Backward-compatible aliases for inline styles in JS/HTML */
    --primary: var(--accent);
    --primary-dark: var(--accent-hover);
    --primary-light: var(--accent-light);
    --text: var(--fg);
    --text-light: var(--fg-header);
    --muted: var(--fg-muted);
    --card: var(--bg-widget);
    --card-hover: var(--bg-hover);
    --input-border: var(--border-subtle);
    --input-focus: var(--accent);

    --gold: var(--accent);
    --gold2: var(--accent-hover);
    --cream: var(--fg);
    --bg2: var(--bg-widget);
    --bg3: var(--bg-hover);
    --red: var(--fail-fg);
    --green: var(--pass-fg);
    --blue: var(--info-fg);
    --orange: var(--warn-fg);

    /* Pastel avatar colors */
    --pastel-blue: #a8cce8;
    --pastel-green: #a8d8b8;
    --pastel-red: #e8a8a8;
    --pastel-orange: #e8c4a0;
    --pastel-purple: #d0b8e8;
  }

  /* ===== DARK THEME ===== */
  [data-theme="dark"] {
    --bg: #262624;
    --bg-widget: #30302e;
    --bg-header: #262624;
    --bg-hover: #2e2e2e;
    --bg-selected: #2a2a2a;

    --fg: #d4d4d4;
    --fg-header: #8e8e8e;
    --fg-muted: #666666;

    --accent: #c15f3c;
    --accent-hover: #d4714e;
    --accent-light: rgba(193, 95, 60, 0.15);

    --border: #3d3d3d;
    --border-subtle: #484848;

    --pass-bg: #1e2e1e;
    --pass-fg: #7ab868;
    --fail-bg: #2e1e1e;
    --fail-fg: #e07a6a;
    --warn-bg: #2e2a1e;
    --warn-fg: #d4a84a;
    --info-bg: #1e242e;
    --info-fg: #7aafc5;

    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);

    --primary: var(--accent);
    --primary-dark: var(--accent-hover);
    --primary-light: var(--accent-light);
    --text: var(--fg);
    --text-light: var(--fg-header);
    --muted: var(--fg-muted);
    --card: var(--bg-widget);
    --card-hover: var(--bg-hover);
    --input-border: var(--border-subtle);
    --input-focus: var(--accent);

    --gold: var(--accent);
    --gold2: var(--accent-hover);
    --cream: var(--fg);
    --bg2: var(--bg-widget);
    --bg3: var(--bg-hover);
    --red: var(--fail-fg);
    --green: var(--pass-fg);
    --blue: var(--info-fg);
    --orange: var(--warn-fg);

    /* Pastel avatar colors — darker for dark theme */
    --pastel-blue: #8ab4d4;
    --pastel-green: #8ac4a0;
    --pastel-red: #d48a8a;
    --pastel-orange: #d4a06a;
    --pastel-purple: #b8a0d4;
  }

  /* ===== DRACULA PRO THEME ===== */
  [data-theme="dracula"] {
    --bg: #22212C;
    --bg-widget: #2a2938;
    --bg-header: #22212C;
    --bg-hover: #302f3d;
    --bg-selected: #383748;

    --fg: #F8F8F2;
    --fg-header: #9580FF;
    --fg-muted: #7970A9;

    --accent: #FF80BF;
    --accent-hover: #FF99CC;
    --accent-light: rgba(255, 128, 191, 0.15);

    --border: #44435a;
    --border-subtle: #504C67;

    --pass-bg: rgba(138, 255, 128, 0.10);
    --pass-fg: #8AFF80;
    --fail-bg: rgba(255, 149, 128, 0.10);
    --fail-fg: #FF9580;
    --warn-bg: rgba(255, 184, 108, 0.12);
    --warn-fg: #FFB86C;
    --info-bg: rgba(128, 255, 234, 0.10);
    --info-fg: #80FFEA;

    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);

    --primary: var(--accent);
    --primary-dark: var(--accent-hover);
    --primary-light: var(--accent-light);
    --text: var(--fg);
    --text-light: var(--fg-header);
    --muted: var(--fg-muted);
    --card: var(--bg-widget);
    --card-hover: var(--bg-hover);
    --input-border: var(--border-subtle);
    --input-focus: var(--accent);

    --gold: #FFB86C;
    --gold2: #FFCB8A;
    --cream: var(--fg);
    --bg2: var(--bg-widget);
    --bg3: var(--bg-hover);
    --red: var(--fail-fg);
    --green: var(--pass-fg);
    --blue: var(--info-fg);
    --orange: #FFB86C;

    /* Pastel avatar colors — Dracula Pro palette */
    --pastel-blue: #9580FF;
    --pastel-green: #8AFF80;
    --pastel-red: #FF9580;
    --pastel-orange: #FFB86C;
    --pastel-purple: #FF80BF;
  }

  /* ===== GLASSY iOS THEME ===== */
  [data-theme="glass"] {
    --bg: linear-gradient(145deg, #e8ecf4 0%, #d5dce8 30%, #c9d6e8 60%, #dde4f0 100%);
    --bg-widget: rgba(255, 255, 255, 0.02);
    --bg-header: rgba(255, 255, 255, 0.05);
    --bg-hover: rgba(255, 255, 255, 0.06);
    --bg-selected: rgba(255, 255, 255, 0.10);

    --fg: #1c1c1e;
    --fg-header: #1c1c1e;
    --fg-muted: #6e6e73;

    --accent: #007AFF;
    --accent-hover: #0056CC;
    --accent-light: rgba(0, 122, 255, 0.12);

    --border: rgba(0, 0, 0, 0.08);
    --border-subtle: rgba(0, 0, 0, 0.05);

    --pass-bg: rgba(52, 199, 89, 0.12);
    --pass-fg: #248a3d;
    --fail-bg: rgba(255, 59, 48, 0.10);
    --fail-fg: #d70015;
    --warn-bg: rgba(255, 149, 0, 0.12);
    --warn-fg: #c77c00;
    --info-bg: rgba(0, 122, 255, 0.10);
    --info-fg: #0056CC;

    --shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);

    --primary: var(--accent);
    --primary-dark: var(--accent-hover);
    --primary-light: var(--accent-light);
    --text: var(--fg);
    --text-light: var(--fg-header);
    --muted: var(--fg-muted);
    --card: var(--bg-widget);
    --card-hover: var(--bg-hover);
    --input-border: rgba(0, 0, 0, 0.10);
    --input-focus: var(--accent);

    --gold: #FF9F0A;
    --gold2: #FFB340;
    --cream: var(--fg);
    --bg2: rgba(255, 255, 255, 0.4);
    --bg3: rgba(255, 255, 255, 0.3);
    --red: #FF3B30;
    --green: #34C759;
    --blue: #007AFF;
    --orange: #FF9F0A;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    --pastel-blue: #a8c8f0;
    --pastel-green: #a8e0b0;
    --pastel-red: #f0a8a8;
    --pastel-orange: #f0d0a0;
    --pastel-purple: #c8a8f0;
  }

  /* Glass background — vivid gradient orbs (Apple-style) */
  [data-theme="glass"] body {
    background:
      radial-gradient(circle at 15% 15%, rgba(0, 122, 255, 0.25) 0%, transparent 45%),
      radial-gradient(circle at 85% 20%, rgba(90, 200, 250, 0.30) 0%, transparent 45%),
      radial-gradient(circle at 50% 75%, rgba(175, 82, 255, 0.20) 0%, transparent 45%),
      radial-gradient(circle at 15% 65%, rgba(52, 199, 89, 0.15) 0%, transparent 40%),
      radial-gradient(circle at 80% 80%, rgba(255, 159, 10, 0.12) 0%, transparent 40%),
      linear-gradient(145deg, #e8ecf6 0%, #dae0f0 35%, #cdd5e8 65%, #e0e6f4 100%);
    background-attachment: fixed;
    min-height: 100vh;
  }

  /* Frosted glass effect on widgets — Apple Liquid Glass inspired */
  [data-theme="glass"] .card,
  [data-theme="glass"] .modal,
  [data-theme="glass"] .login-box,
  [data-theme="glass"] .hl-summary,
  [data-theme="glass"] .pp-summary,
  [data-theme="glass"] .tr-summary,
  [data-theme="glass"] .dash-stats .stat-card,
  [data-theme="glass"] .cal-summary,
  [data-theme="glass"] .fin-hero,
  [data-theme="glass"] .pet-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(1.5px) saturate(200%);
    -webkit-backdrop-filter: blur(1.5px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 1.2rem;
    box-shadow:
      0 8px 32px rgba(31, 38, 135, 0.22),
      inset 0 4px 20px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
  }
  /* Liquid shine — Apple-style inner refraction glow */
  [data-theme="glass"] .card::after,
  [data-theme="glass"] .login-box::after,
  [data-theme="glass"] .modal::after,
  [data-theme="glass"] .pet-card::after,
  [data-theme="glass"] .hl-summary::after,
  [data-theme="glass"] .pp-summary::after,
  [data-theme="glass"] .tr-summary::after,
  [data-theme="glass"] .dash-stats .stat-card::after,
  [data-theme="glass"] .cal-summary::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: inherit;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    box-shadow:
      inset -10px -8px 0px -11px rgba(255, 255, 255, 1),
      inset 0px -9px 0px -8px rgba(255, 255, 255, 1);
    opacity: 0.6;
    z-index: 0;
    pointer-events: none;
    filter: blur(1px) drop-shadow(10px 4px 6px rgba(0,0,0,0.15)) brightness(115%);
  }
  [data-theme="glass"] .card > *,
  [data-theme="glass"] .login-box > *,
  [data-theme="glass"] .modal > *,
  [data-theme="glass"] .pet-card > * {
    position: relative;
    z-index: 1;
  }
  /* Override login-box ::before (top gradient bar) for glass */
  [data-theme="glass"] .login-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007AFF, #5AC8FA, #007AFF);
    border-radius: 1.2rem 1.2rem 0 0;
    z-index: 2;
    pointer-events: none;
  }

  /* Nav / header glass */
  [data-theme="glass"] header > nav {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px) saturate(220%);
    -webkit-backdrop-filter: blur(30px) saturate(220%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 1px 0 24px rgba(31, 38, 135, 0.08);
  }
  [data-theme="glass"] .bottom-nav {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px) saturate(220%);
    -webkit-backdrop-filter: blur(30px) saturate(220%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 24px rgba(31, 38, 135, 0.08);
  }
  [data-theme="glass"] .app-dropdown {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px) saturate(220%);
    -webkit-backdrop-filter: blur(30px) saturate(220%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 40px rgba(31, 38, 135, 0.15);
  }

  /* Calendar day cells */
  [data-theme="glass"] .cal-day {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px) saturate(200%);
    -webkit-backdrop-filter: blur(12px) saturate(200%);
    border-color: rgba(255, 255, 255, 0.25);
  }
  [data-theme="glass"] .cal-day.today {
    background: rgba(0, 122, 255, 0.12);
    border-color: var(--accent);
  }

  /* Inputs */
  [data-theme="glass"] input,
  [data-theme="glass"] select,
  [data-theme="glass"] textarea {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  [data-theme="glass"] input:focus,
  [data-theme="glass"] select:focus,
  [data-theme="glass"] textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
  }

  /* Buttons */
  [data-theme="glass"] .btn-gold {
    background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
  }
  [data-theme="glass"] .btn-gold:hover {
    background: linear-gradient(135deg, #0056CC 0%, #007AFF 100%);
  }
  [data-theme="glass"] .btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  /* Login screen glass */
  [data-theme="glass"] #login-screen {
    background:
      radial-gradient(circle at 15% 15%, rgba(0, 122, 255, 0.25) 0%, transparent 45%),
      radial-gradient(circle at 85% 20%, rgba(90, 200, 250, 0.30) 0%, transparent 45%),
      radial-gradient(circle at 50% 75%, rgba(175, 82, 255, 0.20) 0%, transparent 45%),
      radial-gradient(circle at 15% 65%, rgba(52, 199, 89, 0.15) 0%, transparent 40%),
      linear-gradient(145deg, #e8ecf6 0%, #dae0f0 35%, #cdd5e8 65%, #e0e6f4 100%);
  }
  [data-theme="glass"] .login-box::before {
    background: linear-gradient(90deg, #007AFF, #5AC8FA, #007AFF);
  }
  [data-theme="glass"] .login-logo { color: #007AFF; }
  [data-theme="glass"] .login-tab.active {
    background: #007AFF;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
  }

  /* Tags */
  [data-theme="glass"] .tag-gold { background: rgba(255, 159, 10, 0.12); color: #c77c00; }
  [data-theme="glass"] .tag-red { background: rgba(255, 59, 48, 0.10); color: #d70015; }
  [data-theme="glass"] .tag-green { background: rgba(52, 199, 89, 0.12); color: #248a3d; }
  [data-theme="glass"] .tag-blue { background: rgba(0, 122, 255, 0.10); color: #0056CC; }

  /* Tab/section headers — subtle glass */
  [data-theme="glass"] .tab { background: transparent; }
  [data-theme="glass"] .section-title-group,
  [data-theme="glass"] .header-title { color: var(--fg); }

  /* Theme toggle pill */
  .theme-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    border: none;
    border-radius: 12px;
    background: var(--border-subtle);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.3s;
  }
  .theme-toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--fg);
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  }
  [data-theme="dark"] .theme-toggle {
    background: var(--accent);
  }
  [data-theme="dark"] .theme-toggle::after {
    transform: translateX(20px);
    background: #ffffff;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  html {
    touch-action: manipulation;
    -ms-touch-action: manipulation;
  }

  body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--fg);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-text-size-adjust: 100%;
  }

  /* ===== HAMBURGER — fixed top-right ===== */
  .mobile-hamburger.app-menu-wrap { display: flex; position: fixed; top: 8px; right: 12px; z-index: 200; flex-shrink: 0; }
  .mobile-hamburger .bnav-btn { background: none; border: none; padding: 4px; color: var(--fg-muted); cursor: pointer; }
  .mobile-hamburger .app-dropdown { left: auto; right: 0; transform-origin: top right; }
  .header-title { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 900px; margin: 0 auto; padding: 0 40px; min-width: 0; }
  .header-title .section-icon { width: 40px; height: 40px; flex-shrink: 0; }
  .header-title .section-title-text h1 { font-size: 1.3rem; margin: 0; line-height: 1.2; }
  .header-title .section-title-text .section-subtitle { font-size: 0.78rem; color: var(--fg-muted); line-height: 1.3; }
  .logo { display: none !important; }
  .tab .section-title-group { display: none; }
  .tab .section-header { display: none; }
  .header-actions { margin-left: auto; flex-shrink: 0; display: flex; gap: 8px; align-items: center; }

  /* ===== HEADER ===== */
  header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    padding: 0 56px 0 64px;
    display: flex;
    align-items: center;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .logo {
    font-family: inherit;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -0.01em;
    flex-shrink: 0;
    margin-left: auto;
  }
  .logo span { color: var(--fg); }

  /* ===== DESKTOP NAV — vertical sidebar ===== */
  header > nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: fixed;
    left: 0;
    top: 56px;
    bottom: 0;
    width: 64px;
    background: var(--bg-header);
    border-right: 1px solid var(--border);
    padding: 12px 0;
    z-index: 150;
    overflow-y: auto;
  }

  header > nav button {
    background: transparent;
    border: none;
    border-left: 2px solid transparent;
    color: var(--fg-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 8px;
    border-radius: 0;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  header > nav button:hover { color: var(--fg); background: var(--bg-hover); }
  header > nav button.active { background: transparent; color: var(--fg); border-left-color: var(--accent); font-weight: 600; }

  /* ===== BOTTOM NAV (mobile only) ===== */
  .bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-header);
    border-top: 1px solid var(--border);
    z-index: 200;
    padding: 6px 20px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
  }

  .bottom-nav-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    justify-items: center;
    align-items: center;
  }

  .bnav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 2px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color 0.15s;
    color: var(--fg-muted);
  }

  .bnav-btn .bnav-icon { font-size: 1.3rem; line-height: 1; }
  .bnav-btn .bnav-label {
    font-family: inherit;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.1px;
    white-space: nowrap;
  }

  .bnav-btn.active { color: var(--accent); }
  .bnav-btn.active .bnav-icon { transform: scale(1.1); }

  /* ===== APP DROPDOWN MENU ===== */
  .app-menu-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .app-dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    width: 260px;
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    z-index: 10000;
    padding: 8px 0;
    transform-origin: top left;
    animation: menuSlideDown 0.18s ease-out;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .app-dropdown.open { display: block; }

  @keyframes menuSlideDown {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  .app-dropdown .dm-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px; cursor: pointer;
    color: var(--fg); font-size: 0.9rem;
    transition: background 0.12s;
  }
  .app-dropdown .dm-item:hover { background: var(--bg3); }
  .app-dropdown .dm-item-danger { color: var(--red); }
  .app-dropdown .dm-item-danger:hover { background: rgba(201,76,76,0.1); }
  .app-dropdown .dm-icon {
    display: flex; align-items: center; justify-content: center;
    width: 22px; flex-shrink: 0; opacity: 0.7;
  }
  .app-dropdown .dm-badge {
    background: var(--red); color: #fff; font-size: 0.65rem;
    font-weight: 700; border-radius: 10px; padding: 1px 5px;
    min-width: 16px; text-align: center; margin-left: auto;
  }
  .app-dropdown .dm-badge:empty { display: none; }
  .app-dropdown .dm-sep {
    height: 1px; background: var(--border); margin: 6px 12px;
  }
  .app-dropdown .dm-section {
    padding: 8px 16px;
  }
  .app-dropdown .dm-label {
    font-size: 0.72rem; color: var(--fg-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 8px; font-weight: 600;
  }
  .app-dropdown .theme-picker { display: flex; gap: 10px; align-items: center; }
  .app-dropdown .text-size-control { display: flex; align-items: center; gap: 8px; }
  .app-dropdown .text-size-control input[type=range] { flex: 1; }
  .app-dropdown .text-size-labels { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--fg-muted); margin-top: 4px; }
  .app-dropdown .menu-lang-options { display: flex; gap: 6px; }

  .dm-tab-toggles { display: flex; flex-direction: column; gap: 6px; }
  .dm-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.85rem; color: var(--fg); cursor: pointer; padding: 2px 0;
  }
  .dm-toggle-row input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer;
  }

  /* overlay removed — dropdown closes via document click listener */

  /* ===== RESPONSIVE ===== */
  /* ===== TABS ===== */
  #app-screen { padding-left: 64px; }
  .tab { display: none; padding: 24px 40px; max-width: 900px; margin: 0 auto; overflow-x: hidden; }

  @media (max-width: 700px) {
    header > nav { display: none; }
    .bottom-nav { display: block; }
    body { padding-bottom: 80px; }
    header { padding: 0 64px 0 12px; gap: 8px; }
    #app-screen { padding-left: 0; }
    .tab { padding: 16px 14px; }
    .tab .section-header { display: none; }
    .tab .section-title-group { display: none; }
    .header-actions { display: flex; }
    .header-title { padding: 0; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
    .header-title .section-title-text { min-width: 0; overflow: hidden; }
    .header-title .section-title-text h1 { font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .header-title .section-subtitle { font-size: 0.7rem; }
    .header-title .section-icon { width: 32px; height: 32px; }
    .header-actions .btn { font-size: 0.75rem; padding: 6px 12px; }
    .header-actions .btn-icon { padding: 6px; line-height: 0; }
  }
  .tab.active { display: block; }

  /* ===== SECTION TITLES ===== */
  .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
  }

  .section-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
  }

  .section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
  }

  .section-title-text h1 {
    font-size: 1.3rem;
    line-height: 1.2;
    margin: 0;
  }

  .section-subtitle {
    font-size: 0.78rem;
    color: var(--fg-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .section-title-text {
    min-width: 0;
  }

  .section-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
  }

  h1 {
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--fg);
    letter-spacing: -0.01em;
  }

  h2 {
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
  }

  h3 {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
  }

  /* ===== FILTER PANEL ===== */
  .filter-panel {
    display: none;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .filter-panel.open { display: block; }

  .filter-section { margin-bottom: 12px; }
  .filter-section:last-child { margin-bottom: 0; }

  .filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
  }

/* ========== UNIVERSAL FILTER BAR ========== */
.filter-bar {
  background: var(--bg-widget);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  margin-bottom: 12px;
}
.filter-bar .fb-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 14px;
}

.fb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fb-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  min-width: 52px;
  flex-shrink: 0;
}

.fb-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

.fb-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: none;
  color: var(--fg-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.3;
}
.fb-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(212, 168, 106, 0.06);
}
.fb-pill.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.fb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fb-pill-period {
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
}

.fb-pill-pick {
  font-size: 0.85rem;
  padding: 3px 8px;
}

.fb-month-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding-left: 62px;
}

.fb-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  color: var(--fg-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.fb-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.fb-month-label {
  font-weight: 600;
  color: var(--accent);
  min-width: 130px;
  text-align: center;
  font-size: 0.88rem;
}

.fb-month-count {
  font-size: 0.72rem;
  color: var(--fg-muted);
  margin-left: 4px;
}

/* Filter bar toggle header — fin-collapsible style */
.fb-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
  transition: background 0.15s;
}
.fb-toggle:hover { background: var(--bg-hover); color: var(--accent); }
.fb-toggle:hover .fb-chevron { color: var(--accent); }
.fb-toggle-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fb-toggle-left svg { opacity: 0.6; flex-shrink: 0; }
.fb-toggle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
}
.fb-chevron { transition: transform 0.25s ease, color 0.15s; color: var(--fg-muted); flex-shrink: 0; }
.filter-bar.fb-open .fb-chevron { transform: rotate(180deg); }

/* Filter badge on toggle buttons (legacy) */
.filter-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 4px;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .fb-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .fb-label {
    min-width: auto;
  }
  .fb-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    max-width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .fb-month-pick {
    padding-left: 0;
  }
}

  /* ===== CARDS ===== */
  .card {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    transition: border-color 0.15s;
  }

  .card:hover { border-color: var(--accent); }

  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
  @media (max-width: 700px) {
    .grid3 { grid-template-columns: 1fr 1fr; }
    h1 { font-size: 1.5rem; }
    .section-header { flex-direction:column; align-items:flex-start; }
    .section-actions { justify-content:center; width:100%; }
  }
  @media (max-width: 420px) {
    .grid2, .grid3 { grid-template-columns: 1fr; }
  }

  /* ===== FORM ELEMENTS ===== */
  .form-group {
    margin-bottom: 14px;
  }

  label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
  }

  input, select, textarea {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: inherit;
    background: var(--bg);
    color: var(--fg);
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
  }

  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
  }

  input::placeholder { color: var(--fg-muted); }
  textarea::placeholder { color: var(--fg-muted); }

  textarea { resize: vertical; min-height: 80px; }

  select option { background: var(--bg-widget); color: var(--fg); }

  /* ===== BUTTONS ===== */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
  }

  .btn:active { transform: scale(0.98); }

  .btn-gold { background: var(--accent); color: #ffffff; }
  .btn-gold:hover { background: var(--accent-hover); }
  .btn-gold:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; opacity: 0.6; }
  .btn-gold:disabled:hover { background: var(--border); }

  .btn-ghost { background: var(--bg-hover); color: var(--fg); border: 1px solid var(--border); }
  .btn-ghost:hover { background: var(--bg-selected); border-color: var(--border-subtle); }

  .btn-outline { background: transparent; color: var(--fg); border: 1px dashed var(--border); }
  .btn-outline:hover { border-color: var(--accent); color: var(--accent); }

  .btn-ai { background: linear-gradient(135deg, rgba(138,180,212,0.15), rgba(160,120,200,0.15)); color: #8ab4d4; border: 1px solid rgba(138,180,212,0.35); }
  .btn-ai:hover { background: linear-gradient(135deg, rgba(138,180,212,0.25), rgba(160,120,200,0.25)); border-color: rgba(138,180,212,0.5); }

  .btn-red { background: var(--fail-bg); color: var(--fail-fg); border: 1px solid rgba(224, 122, 106, 0.2); }
  .btn-red:hover { background: #3a2222; }

  .btn-fixed { min-width: 150px; justify-content: center; }

  .btn-sm { padding: 6px 12px; font-size: 12px; }

  /* ===== TAG ===== */
  .tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
  }

  /* Light theme tags (default) */
  .tag-gold { background: #f5ecd5; color: #8a6820; }
  .tag-red { background: #f5e0da; color: #993a28; }
  .tag-green { background: #eaf2e5; color: #4a7a35; }
  .tag-blue { background: #e5edf2; color: #3a6880; }
  .tag-orange { background: #f5ecd5; color: #8a6820; }
  .tag-purple { background: #efe5f5; color: #6a4a80; }

  /* Dark theme tags */
  [data-theme="dark"] .tag-gold { background: #3d3428; color: #d4a86a; }
  [data-theme="dark"] .tag-red { background: #3a2828; color: #d48a8a; }
  [data-theme="dark"] .tag-green { background: #283a28; color: #8ac4a0; }
  [data-theme="dark"] .tag-blue { background: #28303a; color: #8ab4d4; }
  [data-theme="dark"] .tag-orange { background: #3a3028; color: #d4a06a; }
  [data-theme="dark"] .tag-purple { background: #32283a; color: #b8a0d4; }

  /* Dracula Pro theme tags */
  [data-theme="dracula"] .tag-gold { background: rgba(255,184,108,0.15); color: #FFB86C; }
  [data-theme="dracula"] .tag-red { background: rgba(255,149,128,0.15); color: #FF9580; }
  [data-theme="dracula"] .tag-green { background: rgba(138,255,128,0.15); color: #8AFF80; }
  [data-theme="dracula"] .tag-blue { background: rgba(128,255,234,0.15); color: #80FFEA; }
  [data-theme="dracula"] .tag-orange { background: rgba(255,184,108,0.15); color: #FFB86C; }
  [data-theme="dracula"] .tag-purple { background: rgba(149,128,255,0.15); color: #9580FF; }

  /* ===== PETS SUMMARY ===== */
  .pp-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-bottom: 20px;
  }
  .pp-summary-item { text-align: center; flex: 1; }
  .pp-summary-val { font-size: 1.5rem; font-weight: 700; color: var(--fg); line-height: 1.1; }
  .pp-summary-label { font-size: 0.72rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
  .pp-summary-sep { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; margin: 0 8px; }

  /* ===== DOG CARD ===== */
  .pet-card {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
  }

  .pet-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }

  .pet-card-top {
    background: var(--bg-hover);
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
  }

  .pp-header { display: flex; align-items: center; gap: 14px; }
  .pp-header-info { flex: 1; min-width: 0; }
  .pp-del { position: absolute; top: 12px; right: 12px; opacity: 0; transition: opacity 0.15s; }
  .pet-card:hover .pp-del { opacity: 1; }

  .pet-name {
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .pp-badge { font-size: 0.65rem; padding: 2px 8px; border-radius: 12px; font-weight: 600; white-space: nowrap; }
  .pp-badge-gold { background: var(--accent); color: #fff; }
  .pp-badge-muted { background: var(--accent-light); color: var(--accent); }

  .pet-breed { color: var(--fg-muted); font-size: 0.82rem; margin-top: 2px; }

  .pet-card-body { padding: 16px 20px 18px; }

  /* Stat grid with icons */
  .pp-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
  .pp-stat { display: flex; align-items: center; gap: 8px; }
  .pp-stat-icon { color: var(--fg-muted); display: flex; align-items: center; flex-shrink: 0; opacity: 0.6; }
  .pp-stat-data { min-width: 0; }
  .pp-stat-val { font-size: 0.88rem; font-weight: 600; color: var(--fg); line-height: 1.2; }
  .pp-stat-label { font-size: 0.68rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.03em; }

  /* Quick stats row */
  .pp-quick-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
  .pp-qs {
    font-size: 0.72rem;
    color: var(--fg-muted);
    background: var(--bg-hover);
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
  }
  .pp-qs-val { font-weight: 700; color: var(--fg); }

  /* Info rows (chip, vaccine) */
  .pp-info-section { margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
  .pp-info-row { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--fg-muted); }
  .pp-info-icon { display: flex; align-items: center; flex-shrink: 0; }
  .pp-chip { font-family: monospace; letter-spacing: 1px; color: var(--fg); font-size: 0.75rem; }

  /* Activity tags */
  .pp-activities { display: flex; flex-wrap: wrap; gap: 5px; }
  .pp-act-tag {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid transparent;
    padding: 3px 10px;
    border-radius: 14px;
    transition: border-color 0.15s;
  }
  .pet-card:hover .pp-act-tag { border-color: var(--accent); }
  .pp-no-act { font-size: 0.75rem; color: var(--fg-muted); }

  /* Legacy compat */
  .pet-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
  .stat-item label { font-size: 11px; margin-bottom: 2px; }
  .stat-item .value { font-size: 0.9rem; font-weight: 600; color: var(--fg); }

  .sports-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

  @media (max-width: 700px) {
    .pp-summary { padding: 14px 12px; }
    .pp-summary-val { font-size: 1.2rem; }
    .pp-del { opacity: 1; }
  }

  /* ===== SPORT PICKER ===== */
  .sports-tags-display { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 0; }
  .sports-tags-display:empty { display: none; }
  .activity-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--bg3); color: var(--gold); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: 0.78rem; font-weight: 500; }
  .activity-tag .remove { cursor: pointer; opacity: 0.6; font-size: 0.9rem; }
  .activity-tag .remove:hover { opacity: 1; color: var(--red); }
  .activity-picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 400px; overflow-y: auto; padding: 4px 0; margin-bottom: 16px; }
  .activity-pick-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 0.85rem; color: var(--cream); background: var(--bg3); border: 1px solid transparent; transition: all 0.15s; }
  .activity-pick-item:hover { border-color: var(--border); }
  .activity-pick-item.selected { background: rgba(205,160,100,0.15); border-color: var(--gold); color: var(--gold); }
  .activity-pick-item .check { width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; }
  .activity-pick-item.selected .check { background: var(--gold); border-color: var(--gold); color: var(--bg); }

  /* ===== DOG PHOTO ===== */
  .pet-avatar-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
    flex-shrink: 0;
  }

  .pet-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    overflow: hidden;
    border: 2px solid var(--border);
    transition: border-color 0.15s;
  }

  .pet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }

  .pet-avatar-upload-btn {
    position: absolute;
    bottom: 0; right: 0;
    width: 24px; height: 24px;
    background: var(--accent);
    border: 2px solid var(--bg-widget);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background 0.15s;
    z-index: 2;
  }

  .pet-avatar-upload-btn:hover { background: var(--accent-hover); }
  .pet-avatar-upload-btn input[type="file"] {
    position: absolute; inset: 0;
    opacity: 0; cursor: pointer;
    width: 100%; height: 100%;
    border-radius: 50%;
  }

  /* photo upload in modal */
  .photo-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 14px;
    background: var(--bg-hover);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s;
    margin-bottom: 14px;
  }

  .form-group .photo-upload-area { display: flex; }
  .photo-upload-area:hover { border-color: var(--accent); }

  /* PDF pet chips */
  .pdf-pet-chips {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .pdf-pet-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    border-radius: 20px;
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-hover);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--fg);
    transition: all 0.15s;
  }
  .pdf-pet-chip:hover { border-color: var(--accent); }
  .pdf-pet-chip.selected {
    border-color: var(--gold);
    background: var(--gold-bg, rgba(196,164,105,0.12));
    color: var(--gold);
  }
  .pdf-pet-chip .chip-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .photo-preview {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
  }

  .photo-preview img { width: 100%; height: 100%; object-fit: cover; }

  /* color picker */
  .color-picker-row { display: flex; gap: 10px; margin-top: 6px; }
  .color-dot {
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    border: 3px solid transparent; transition: border-color 0.15s, transform 0.15s;
    opacity: 0.6;
  }
  .color-dot:hover { transform: scale(1.15); opacity: 1; }
  .color-dot.active { border-color: var(--cream); transform: scale(1.15); opacity: 1; }

  /* Range slider */
  .range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    background: var(--border-subtle);
    border-radius: 5px;
    outline: none;
    margin: 12px 0;
  }
  .range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg-widget);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  }
  .range-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg-widget);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  }

  .photo-upload-info { text-align: center; }
  .photo-upload-info strong { display: block; font-size: 0.85rem; color: var(--fg); margin-bottom: 2px; }
  .photo-upload-info span { font-size: 12px; color: var(--fg-muted); }

  .photo-uploading {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--accent);
  }

  .photo-uploading.show { display: flex; }

  /* ===== TABLE ===== */
  .table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }

  thead { background: var(--bg-hover); }
  th {
    padding: 8px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }

  td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--fg);
    vertical-align: middle;
  }

  tr:last-child td { border-bottom: none; }
  tbody tr:hover td { background: var(--bg-hover); }

  /* ===== HEALTH SPECIFIC ===== */
  .days-counter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 12px;
  }

  .days-ok { color: var(--pass-fg); }
  .days-warn { color: var(--warn-fg); }
  .days-danger { color: var(--fail-fg); }

  /* ===== HEALTH MOBILE CARDS ===== */
  .h-cards { display: none; }
  @media (max-width: 700px) {
    .health-section .table-wrap { display: none; }
    .h-cards { display: flex; flex-direction: column; gap: 8px; }
    .h-card {
      background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 12px 14px;
    }
    .h-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
    .h-card-date { font-size: 0.78rem; color: var(--fg-muted); }
    .h-card-pet { font-size: 0.72rem; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--accent); color: #fff; }
    .h-card-title { font-size: 0.92rem; font-weight: 700; color: var(--fg); margin-bottom: 4px; }
    .h-card-details { font-size: 0.8rem; color: var(--fg-muted); line-height: 1.5; }
    .h-card-details span { color: var(--fg); }
    .h-card-notes { font-size: 0.78rem; color: var(--fg-muted); font-style: italic; margin-top: 4px; }
    .h-card-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
  }

  /* ===== REMINDERS ===== */
  .rem-summary {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 18px 10px; margin-bottom: 16px;
  }
  .rem-summary-item { text-align: center; flex: 1; min-width: 0; }
  .rem-summary-val { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
  .rem-summary-label { font-size: 0.68rem; color: var(--fg-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rem-summary-sep { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; }

  .rem-section { margin-bottom: 18px; }
  .rem-section-header {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 10px 14px; border-radius: var(--radius-lg);
    transition: background 0.15s;
  }
  .rem-section-header:hover { background: var(--bg-hover); }
  .rem-section-header.rem-section-static { cursor: default; }
  .rem-section-header.rem-section-static:hover { background: transparent; }
  .rem-section-title { font-size: 0.88rem; font-weight: 600; color: var(--fg); }
  .rem-section-count { font-weight: 400; font-size: 0.8rem; color: var(--fg-muted); }
  .rem-section-arrow { color: var(--fg-muted); font-size: 0.7rem; transition: transform 0.25s ease; }
  .rem-section.collapsed .rem-section-body { display: none; }
  .rem-section:not(.collapsed) .rem-section-arrow { transform: rotate(90deg); }
  .rem-section-body { padding: 0 4px 4px; }

  .reminder-banner {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
  }
  .reminder-banner:hover { background: var(--bg-hover); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
  .reminder-banner:active { transform: scale(0.995); }
  .reminder-banner h4 { margin: 0 0 2px; font-size: 0.88rem; font-weight: 600; color: var(--fg); }
  .reminder-banner p { margin: 0; font-size: 0.78rem; color: var(--fg-muted); }
  .reminder-banner-warn { border-left-color: var(--warn-fg); }
  .reminder-banner-danger { border-left-color: var(--fail-fg); }
  .reminder-banner-info { border-left-color: rgba(138,180,212,0.6); }
  .reminder-icon { flex-shrink: 0; margin-top: 2px; }
  .reminder-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
  .reminder-tag {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.68rem; padding: 2px 7px; border-radius: 6px;
    background: rgba(212,168,106,0.12); color: var(--accent);
  }
  .reminder-chevron { margin-left: auto; color: var(--fg-muted); opacity: 0.5; flex-shrink: 0; align-self: center; }

  /* Reminder settings modal */
  .rem-modal-section { margin-bottom: 18px; }
  .rem-modal-section-title { font-size: 0.78rem; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
  .rem-method-grid { display: flex; gap: 8px; }
  .rem-method-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 8px; border-radius: var(--radius-lg); border: 2px solid var(--border);
    background: var(--bg-widget); cursor: pointer; transition: all 0.2s; color: var(--fg-muted);
  }
  .rem-method-btn:hover { border-color: var(--accent); background: rgba(212,168,106,0.06); }
  .rem-method-btn.active { border-color: var(--accent); background: rgba(212,168,106,0.12); color: var(--accent); }
  .rem-method-btn .rem-method-icon { font-size: 1.4rem; }
  .rem-method-btn .rem-method-label { font-size: 0.78rem; font-weight: 600; }
  .rem-method-btn .rem-method-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
  .rem-method-btn.active .rem-method-check { border-color: var(--accent); background: var(--accent); }

  .rem-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .rem-time-btn {
    padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--bg-widget); cursor: pointer; text-align: center; transition: all 0.15s;
    color: var(--fg); font-size: 0.82rem; font-weight: 500;
  }
  .rem-time-btn:hover { border-color: var(--accent); background: rgba(212,168,106,0.06); }
  .rem-time-btn.active { border-color: var(--accent); background: rgba(212,168,106,0.12); color: var(--accent); font-weight: 600; }
  .rem-time-btn .rem-time-sub { font-size: 0.7rem; color: var(--fg-muted); margin-top: 2px; }
  .rem-custom-date { display: flex; gap: 8px; margin-top: 10px; }
  .rem-custom-date input { flex: 1; }

  .rem-info-banner {
    background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 14px 18px; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 12px;
    font-size: 0.82rem; color: var(--fg-muted);
  }
  .rem-info-banner strong { color: var(--fg); }
  .rem-info-icon { flex-shrink: 0; margin-top: 1px; }

  /* ===== CALENDAR ===== */
  /* ===== CALENDAR SUMMARY ===== */
  .cal-summary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 18px 24px; margin-bottom: 16px;
  }
  .cal-summary-item { text-align: center; flex: 1; }
  .cal-summary-val { font-size: 1.5rem; font-weight: 700; color: var(--fg); line-height: 1.1; }
  .cal-summary-label { font-size: 0.72rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
  .cal-summary-sep { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; margin: 0 8px; }

  .cal-month-nav {
    display: flex; gap: 12px; align-items: center; justify-content: center; margin-bottom: 16px;
  }
  .cal-month-nav .cal-nav-btn {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--bg-widget); color: var(--fg); display: flex; align-items: center;
    justify-content: center; cursor: pointer; font-size: 1.1rem; transition: border-color 0.15s;
  }
  .cal-month-nav .cal-nav-btn:hover { border-color: var(--accent); }
  .cal-month-label { font-size: 1.1rem; font-weight: 700; color: var(--fg); min-width: 180px; text-align: center; }

  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 8px;
  }

  .cal-header {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 0;
  }

  .cal-day {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 84px;
    padding: 6px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    position: relative;
    font-size: 12px;
  }

  .cal-day:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
  .cal-day.today { border-color: var(--accent); background: var(--accent-light); }
  .cal-day.has-event { border-color: var(--info-fg); }
  .cal-day .day-num { font-weight: 700; color: var(--fg); font-size: 0.88rem; }
  .cal-day.today .day-num { color: var(--accent); }
  .cal-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin: 2px 2px; }
  .cal-day.empty { background: transparent; border-color: transparent; cursor: default; opacity: 0.3; }
  .cal-day.empty:hover { background: transparent; border-color: transparent; box-shadow: none; }

  @media (max-width: 700px) {
    .calendar-grid { gap: 2px; overflow-x: auto; }
    .cal-day { min-height: 44px; padding: 3px 2px; border-radius: var(--radius-sm); }
    .cal-day .day-num { font-size: 0.75rem; }
    .cal-dot { width: 5px; height: 5px; margin: 1px; }
    .cal-header { font-size: 0.62rem; padding: 4px 0; letter-spacing: 0; }
    .cal-month-nav { gap: 8px; margin-bottom: 10px; }
    .cal-month-label { font-size: 0.95rem; min-width: 130px; }
    .cal-nav-btn { width: 30px; height: 30px; font-size: 0.9rem; }
    .cal-summary { padding: 10px 8px; gap: 4px; flex-wrap: wrap; }
    .cal-summary-val { font-size: 1.1rem; }
    .cal-summary-label { font-size: 0.62rem; }
    .cal-summary-sep { height: 20px; margin: 0 4px; }
    .cal-day .cal-event-text { font-size: 0.55rem; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  }

  @media (max-width: 420px) {
    .calendar-grid { gap: 1px; }
    .cal-day { min-height: 36px; padding: 2px; }
    .cal-day .day-num { font-size: 0.7rem; }
    .cal-dot { width: 4px; height: 4px; }
    .cal-header { font-size: 0.58rem; }
    .cal-month-label { font-size: 0.85rem; min-width: 110px; }
  }

  /* ===== STATS ===== */
  .stat-card {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
  }

  .stat-big { font-size: 2.5rem; font-weight: 600; font-family: inherit; color: var(--accent); }
  .stat-label { font-size: 12px; color: var(--fg-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

  /* ===== DASHBOARD (WHOOP-style) ===== */
  .dash-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    position: relative;
  }
  .dash-settings-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--fg-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
    opacity: 0.5;
  }
  .dash-settings-btn:hover { opacity: 1; color: var(--accent); background: var(--bg-hover); }

  /* Dashboard settings toggle */
  .dash-settings-list { display: flex; flex-direction: column; gap: 2px; }
  .dash-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.1s;
  }
  .dash-settings-item:hover { background: var(--bg-hover); }
  .dash-settings-item input[type=checkbox] { display: none; }
  .toggle-switch {
    width: 40px;
    height: 22px;
    background: var(--border);
    border-radius: 11px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
  }
  .toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  }
  .dash-settings-item input:checked + .toggle-switch {
    background: var(--accent);
  }
  .dash-settings-item input:checked + .toggle-switch::after {
    transform: translateX(18px);
  }

  /* Training goal setting */
  .dash-settings-goal { padding: 4px 0 8px; }
  .dash-settings-goal-label {
    font-size: 0.85rem;
    color: var(--fg);
    margin-bottom: 10px;
    display: block;
  }
  .dash-settings-goal .slider-row { padding: 0 2px; }
  .slider-edge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fg-muted);
    min-width: 14px;
    text-align: center;
  }
  .dash-settings-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
  }

  .dash-ring {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
  }
  .dash-ring svg { width: 100%; height: 100%; }
  .dash-ring-score {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--fg);
  }
  .dash-hero-info { flex: 1; }
  .dash-hero-label { font-size: 1.1rem; font-weight: 600; color: var(--fg); margin-bottom: 4px; }
  .dash-hero-sub { font-size: 0.85rem; color: var(--fg-muted); }
  .dash-streak {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--warn-bg);
    color: var(--warn-fg);
    font-size: 0.8rem;
    font-weight: 600;
  }

  .dash-pet-filter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    align-self: center;
    margin-left: auto;
    max-width: 55%;
  }
  .dash-pet-filter .dash-filter-tag:first-child {
    grid-column: 1 / -1;
    justify-self: center;
  }
  .dash-filter-tag {
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg-muted);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
    text-align: center;
  }
  .dash-filter-tag:hover { border-color: var(--accent); color: var(--accent); }
  .dash-filter-tag.active {
    background: rgba(212,168,106,0.15);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
  }

  .dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
  }
  .dash-stat-card {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    border-top: 3px solid var(--border);
  }
  .dash-stat-accent { border-top-color: var(--accent); }
  .dash-stat-warn { border-top-color: var(--warn-fg); }
  .dash-stat-info { border-top-color: var(--info-fg); }
  .dash-stat-pass { border-top-color: var(--pass-fg); }
  .dash-stat-val {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--fg);
    line-height: 1.2;
  }
  .dash-stat-label {
    font-size: 0.7rem;
    color: var(--fg-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .dash-trend {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 8px;
    vertical-align: middle;
  }
  .dash-trend-up { background: var(--pass-bg); color: var(--pass-fg); }
  .dash-trend-down { background: var(--fail-bg); color: var(--fail-fg); }
  .dash-trend-flat { background: var(--bg-hover); color: var(--fg-muted); }

  .dash-section {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
  }
  .dash-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
  }

  /* Bar chart */
  .dash-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    height: 110px;
    padding-top: 20px;
  }
  .dash-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .dash-bar {
    width: 100%;
    max-width: 36px;
    background: var(--accent-light);
    border-radius: 4px 4px 0 0;
    transition: height 0.4s ease;
  }
  .dash-bar[data-today="1"] { background: var(--accent); }
  .dash-bar-val {
    font-size: 0.65rem;
    color: var(--fg-muted);
    min-height: 14px;
  }
  .dash-bar-label {
    font-size: 0.65rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    font-weight: 600;
  }

  /* Pet cards */
  .dash-pet-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
  }
  .dash-pet-card:hover { background: var(--bg-hover); }
  .dash-pet-card + .dash-pet-card { border-top: 1px solid var(--border); }
  .dash-pet-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  }
  .dash-pet-info { flex: 1; min-width: 0; }
  .dash-pet-name { font-weight: 600; font-size: 0.95rem; color: var(--fg); }
  .dash-pet-meta { font-size: 0.78rem; color: var(--fg-muted); margin-top: 2px; }
  .dash-pet-health {
    font-size: 0.72rem;
    color: var(--pass-fg);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .dash-pet-arrow { color: var(--fg-muted); flex-shrink: 0; }

  /* Events */
  .dash-event-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
  }
  .dash-event-row:hover { opacity: 0.85; }
  .dash-event-row + .dash-event-row { border-top: 1px solid var(--border); }
  .dash-event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
  }
  .dash-event-info { flex: 1; }
  .dash-event-title { font-size: 0.88rem; font-weight: 500; color: var(--fg); display: flex; align-items: center; gap: 4px; }
  .dash-event-meta { font-size: 0.75rem; color: var(--fg-muted); margin-top: 1px; }

  @media (max-width: 700px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-hero { padding: 16px; gap: 16px; flex-wrap: wrap; }
    .dash-ring { width: 96px; height: 96px; }
    .dash-ring-score { font-size: 1.6rem; }
    .dash-pet-filter {
      max-width: 100%;
      width: 100%;
      margin-left: 0;
      gap: 6px;
    }
    .dash-filter-tag { text-align: center; padding: 5px 4px; font-size: 0.68rem; }
  }
  @media (max-width: 420px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
  }

  /* ===== RATING STARS ===== */
  .rating-display { display: flex; gap: 4px; }
  .star { font-size: 1rem; color: var(--fg-muted); }
  .star.filled { color: var(--warn-fg); }

  /* ===== MODAL ===== */
  .modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  .modal-bg.open { display: flex; }

  .modal {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }

  .modal-title {
    font-family: inherit;
    font-size: 1.4rem;
    color: var(--fg);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
  }

  .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

  /* Day detail modal — compact proportions */
  #modal-day-detail .modal { max-width: 400px; padding: 20px 24px; }
  #modal-day-detail .modal-title { font-size: 1rem; margin-bottom: 10px; padding-bottom: 10px; display: flex; align-items: center; gap: 8px; }
  #modal-day-detail .modal-title svg { flex-shrink: 0; }
  #modal-day-detail .modal-actions { margin-top: 14px; padding-top: 12px; gap: 8px; }
  #modal-day-detail .modal-actions .btn { font-size: 0.82rem; padding: 8px 16px; }
  #modal-day-detail #day-detail-content { font-size: 0.88rem; }
  #modal-day-detail #day-detail-content p { padding: 12px; }
  @media (max-width: 420px) {
    #modal-day-detail .modal { padding: 16px 18px; }
    #modal-day-detail .modal-title { font-size: 0.92rem; margin-bottom: 8px; padding-bottom: 8px; }
    #modal-day-detail .modal-actions .btn { padding: 7px 14px; font-size: 0.78rem; }
  }

  /* Hamburger menu */
  .menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: var(--radius); cursor: pointer; color: var(--cream); font-size: 0.95rem; transition: background 0.15s; }
  .menu-item:hover { background: var(--bg3); }
  .menu-item-danger { color: var(--red); }
  .menu-item-danger:hover { background: rgba(201,76,76,0.1); }
  .menu-icon { display: flex; align-items: center; justify-content: center; width: 24px; flex-shrink: 0; opacity: 0.7; }
  .menu-badge { background: var(--red); color: #fff; font-size: 0.7rem; font-weight: 700; border-radius: 10px; padding: 1px 6px; min-width: 18px; text-align: center; }
  .menu-badge:empty { display: none; }
  .menu-separator { height: 1px; background: var(--border); margin: 8px 0; }
  .menu-section { padding: 8px 12px; }
  .menu-label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; font-weight: 600; }
  .text-size-control { display: flex; align-items: center; gap: 12px; }
  .text-size-sample { color: var(--cream); font-weight: 600; }
  .text-size-sm { font-size: 0.75rem; }
  .text-size-lg { font-size: 1.4rem; }
  .text-size-control input[type="range"] { flex:1; -webkit-appearance:none; appearance:none; height:10px; background:var(--border-subtle); border-radius:5px; outline:none; cursor:pointer; }
  .text-size-control input[type="range"]::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:28px; height:28px; border-radius:50%; background:var(--gold); border:2px solid var(--bg-widget); box-shadow:0 1px 4px rgba(0,0,0,0.2); cursor:pointer; }
  .text-size-control input[type="range"]::-moz-range-thumb { width:28px; height:28px; border-radius:50%; background:var(--gold); border:2px solid var(--bg-widget); box-shadow:0 1px 4px rgba(0,0,0,0.2); cursor:pointer; }
  .text-size-control input[type="range"]::-moz-range-track { height:10px; background:var(--border-subtle); border-radius:5px; }
  .text-size-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--muted); margin-top: 4px; padding: 0 28px; }
  .menu-lang-options { display: flex; gap: 8px; }
  .lang-btn { padding: 8px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg3); color: var(--cream); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
  .lang-btn.active { background: var(--gold); color: var(--bg); border-color: var(--gold); }
  .lang-btn:hover:not(.active) { border-color: var(--gold); color: var(--gold); }

  /* Form grid */
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .form-group label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }

  /* Theme dots */
  .theme-dot {
    width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border);
    cursor: pointer; position: relative; transition: all 0.15s; display: flex; align-items: center; justify-content: center;
  }
  .theme-dot:hover { border-color: var(--accent); transform: scale(1.1); }
  .theme-dot.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
  .theme-dot-light { background: #f5f3ed; }
  .theme-dot-dark { background: #262624; }
  .theme-dot-dracula { background: linear-gradient(135deg, #22212C 50%, #9580FF 50%); }
  .theme-dot-glass { background: linear-gradient(135deg, #d5dce8 30%, rgba(255,255,255,0.8) 50%, #c9d6e8 70%); border-color: rgba(0,122,255,0.3); }
  .theme-dot-check { display: none; }
  .theme-dot.active .theme-dot-check { display: block; color: var(--accent); font-size: 14px; font-weight: 700; }

  /* Backup action buttons */
  /* ===== BACKUP MODERN ===== */
  .bk-status {
    background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 16px 20px; margin-bottom: 12px;
  }
  .bk-status-row { display: flex; align-items: center; gap: 12px; }
  .bk-status-text { font-weight: 700; font-size: 0.95rem; color: var(--fg); }
  .bk-status-size { margin-left: auto; font-size: 0.82rem; color: var(--accent); font-weight: 600; }

  .bk-stats {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 18px 10px; margin-bottom: 16px;
  }
  .bk-stat { text-align: center; flex: 1; min-width: 0; }
  .bk-stat-val { font-size: 1.5rem; font-weight: 700; color: var(--fg); line-height: 1.1; }
  .bk-stat-label { font-size: 0.68rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.02em; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bk-stat-sep { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; margin: 0 8px; }

  .bk-section {
    background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 18px 20px;
  }
  .bk-section-title { font-size: 0.95rem; font-weight: 700; color: var(--fg); margin-bottom: 12px; }

  .bk-hist-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
  }
  .bk-hist-row:last-child { border-bottom: none; }
  .bk-hist-main { flex: 1; min-width: 0; }
  .bk-hist-file { font-size: 0.82rem; color: var(--accent); font-family: monospace; display: flex; align-items: center; gap: 6px; }
  .bk-hist-meta { font-size: 0.75rem; color: var(--fg-muted); margin-top: 2px; }
  .bk-hist-summary { font-size: 0.78rem; color: var(--fg-muted); flex-shrink: 0; text-align: right; }

  .backup-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .backup-action-btn {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 18px 10px; border-radius: var(--radius-lg); border: 1px solid var(--border);
    background: transparent; color: var(--fg); cursor: pointer; transition: all 0.15s;
    text-align: center;
  }
  .backup-action-btn:hover { border-color: var(--accent); background: rgba(139,92,246,0.06); }
  .backup-action-btn:active { transform: scale(0.97); }
  .backup-action-icon { color: var(--accent); display: flex; align-items: center; justify-content: center; }
  .backup-action-text { display: flex; flex-direction: column; gap: 2px; }
  .backup-action-text strong { font-size: 0.85rem; }
  .backup-action-text small { font-size: 0.72rem; color: var(--fg-muted); }
  @media (max-width: 500px) {
    .backup-actions { grid-template-columns: 1fr; }
    .backup-action-btn { flex-direction: row; gap: 12px; padding: 14px; text-align: left; }
    .bk-stats { padding: 14px 12px; }
    .bk-stat-val { font-size: 1.2rem; }
  }

  /* ===== DOG SELECTOR ===== */
  .pet-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }

  .pet-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--bg-hover);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-muted);
    transition: border-color 0.15s, color 0.15s;
  }

  .pet-pill:hover { border-color: var(--accent); color: var(--accent); }
  .pet-pill.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); font-weight: 600; }

  /* ===== WEEK PLAN ===== */
  .week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 12px;
  }

  .week-day {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 12px;
    min-height: 120px;
    transition: border-color 0.15s;
  }
  .week-day:hover { border-color: var(--accent); }

  .week-day h4 {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }

  .week-entry {
    background: var(--info-bg);
    border: 1px solid rgba(122, 175, 197, 0.2);
    border-radius: var(--radius);
    padding: 8px 10px;
    font-size: 0.8rem;
    margin-bottom: 6px;
    color: var(--fg);
    line-height: 1.35;
  }

  .week-entry.rest { background: var(--fail-bg); border-color: rgba(224, 122, 106, 0.2); }

  /* ===== INTENSITY ===== */
  .intensity-bar { display: flex; gap: 3px; align-items: center; }
  .int-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-subtle); }
  .int-dot.on { background: var(--pass-fg); }
  .int-dot.high { background: var(--fail-fg); }
  .int-dot.mid { background: var(--warn-fg); }

  /* ===== EMPTY STATE ===== */
  .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--fg-muted);
  }

  .empty-state .icon { margin-bottom: 20px; display: flex; justify-content: center; align-items: center; min-height: 120px; }
  .empty-state h3 { color: var(--fg); margin-bottom: 8px; font-family: inherit; opacity: 0.7; }
  .empty-state p { font-size: 14px; opacity: 0.55; }

  /* ===== TABS INSIDE ===== */
  .inner-tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
  .inner-tab {
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: none;
    color: var(--fg-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
  }

  .inner-tab:hover { border-color: var(--accent); color: var(--accent); }
  .inner-tab.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); font-weight: 600; }
  .inner-content { display: none; }
  .inner-content.active { display: block; }

  /* ===== FINANCE PANEL ===== */
  .expense-summary { margin-bottom: 8px; }

  .fin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
  }
  .fin-hero-period { font-size: 0.78rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
  .fin-hero-total { font-size: 2.2rem; font-weight: 700; color: var(--fg); line-height: 1.1; }
  .fin-hero-count { font-size: 0.82rem; color: var(--fg-muted); margin-top: 4px; }
  .fin-trend { font-size: 0.78rem; font-weight: 600; margin-top: 6px; padding: 3px 10px; border-radius: 20px; display: inline-block; }
  .fin-trend-up { color: var(--fail-fg); background: var(--fail-bg); }
  .fin-trend-down { color: var(--pass-fg); background: var(--pass-bg); }
  .fin-trend-flat { color: var(--fg-muted); background: var(--bg-hover); }

  .fin-cats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }
  .fin-cat-card {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 14px 10px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .fin-cat-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
  .fin-cat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
  .fin-cat-icon { display: flex; align-items: center; }
  .fin-cat-pct { font-size: 0.72rem; font-weight: 600; color: var(--fg-muted); }
  .fin-cat-amount { font-size: 1.1rem; font-weight: 700; color: var(--fg); }
  .fin-cat-label { font-size: 0.72rem; color: var(--fg-muted); margin-bottom: 8px; }
  .fin-cat-bar { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
  .fin-cat-bar-fill { height: 100%; border-radius: 2px; transition: width 0.4s ease; min-width: 1px; }

  /* Pet breakdown */
  .fin-section { margin-bottom: 16px; }
  .fin-section-title { font-size: 0.82rem; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
  .fin-pet-bars {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
  }
  .fin-pet-row { margin-bottom: 12px; }
  .fin-pet-row:last-child { margin-bottom: 0; }
  .fin-pet-row-info { display: flex; justify-content: space-between; margin-bottom: 4px; }
  .fin-pet-name { font-size: 0.85rem; font-weight: 600; color: var(--fg); }
  .fin-pet-val { font-size: 0.85rem; font-weight: 600; color: var(--fg); }
  .fin-pet-pct { font-size: 0.72rem; color: var(--fg-muted); font-weight: 400; }
  .fin-pet-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
  .fin-pet-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s ease; }

  /* Collapsible section */
  .fin-collapsible {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
  }
  .fin-collapsible .fin-section-title { margin-bottom: 0; }
  .fin-collapse-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    padding: 16px 20px;
    margin: 0;
    transition: background 0.15s;
  }
  .fin-collapse-toggle:hover { background: var(--bg-hover); color: var(--accent); }
  .fin-collapse-toggle:hover .fin-chevron { color: var(--accent); }
  .fin-chevron { transition: transform 0.25s ease, color 0.15s; color: var(--fg-muted); flex-shrink: 0; }
  .fin-collapsible.open .fin-chevron { transform: rotate(180deg); }
  .fin-collapse-body { padding: 0 20px 20px; }

  /* Prediction chart */
  .fin-chart-card {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
  }
  .fin-pred-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
  .fin-pred-next { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
  .fin-pred-label { font-size: 0.78rem; color: var(--fg-muted); }
  .fin-pred-cats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 0.78rem; color: var(--fg-muted); }
  .fin-pred-cat-item { display: inline-flex; align-items: center; gap: 4px; }
  .fin-pred-cat-item strong { color: var(--fg); }
  .fin-pred-cat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

  /* Transaction list */
  .fin-tx-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 4px;
    background: var(--bg-hover);
    border-radius: var(--radius);
  }
  .fin-tx-tab {
    padding: 6px 12px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: var(--fg-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
  }
  .fin-tx-tab:hover { color: var(--fg); background: var(--bg-widget); }
  .fin-tx-tab.active { color: var(--accent); background: var(--bg-widget); font-weight: 600; box-shadow: var(--shadow); }

  .fin-tx-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 0.82rem;
    color: var(--fg-muted);
    margin-bottom: 8px;
  }
  .fin-tx-total { font-weight: 700; color: var(--accent); font-size: 0.9rem; }

  .fin-tx-group { margin-bottom: 4px; }
  .fin-tx-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .fin-tx-day-total { font-size: 0.75rem; color: var(--fg-muted); font-weight: 500; }

  .fin-tx-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 4px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .fin-tx-row:hover { border-color: var(--accent); box-shadow: var(--shadow); }

  .fin-tx-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .fin-tx-info { flex: 1; min-width: 0; }
  .fin-tx-desc { font-size: 0.88rem; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fin-tx-meta { font-size: 0.72rem; color: var(--fg-muted); margin-top: 1px; }
  .fin-tx-amount { font-size: 0.9rem; font-weight: 700; color: var(--fg); white-space: nowrap; }
  .fin-tx-del {
    background: none;
    border: none;
    color: var(--fg-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
  }
  .fin-tx-row:hover .fin-tx-del { opacity: 1; }
  .fin-tx-del:hover { color: var(--fail-fg); }

  @media (max-width: 700px) {
    .fin-hero { flex-direction: column; text-align: center; padding: 20px 16px; }
    .fin-hero-total { font-size: 1.8rem; }
    .fin-cats { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
    .fin-cat-amount { font-size: 0.95rem; }
    .fin-tx-del { opacity: 1; }
    .week-grid { grid-template-columns: 1fr 1fr; }
    .cal-day { min-height: 60px; }
    .cal-summary { padding: 14px 12px; }
    .cal-summary-val { font-size: 1.2rem; }
  }

  /* ===== LOGIN SCREEN ===== */
  /* ---- Login Screen ---- */
  #login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at 30% 20%, rgba(193,95,60,0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(193,95,60,0.04) 0%, transparent 60%),
                var(--bg);
    padding: 20px;
  }

  .login-box {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 36px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(61,57,41,0.08), 0 2px 8px rgba(61,57,41,0.04);
    position: relative;
    overflow: hidden;
    animation: loginSlideUp 0.5s ease-out;
  }

  .login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #d4845e, var(--accent));
    border-radius: 16px 16px 0 0;
  }

  @keyframes loginSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .login-paw {
    text-align: center;
    font-size: 40px;
    margin-bottom: 8px;
    line-height: 1;
    filter: grayscale(0.3);
  }

  .login-logo {
    font-family: inherit;
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
  }

  .login-logo span { color: var(--fg); }

  .login-tagline {
    text-align: center;
    color: var(--fg-muted);
    font-size: 13px;
    margin-bottom: 32px;
    letter-spacing: 0.3px;
  }

  .login-tabs {
    display: flex;
    background: var(--bg-hover);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
  }

  .login-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    border-radius: 6px;
    background: none;
    color: var(--fg-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .login-tab:hover:not(.active) {
    color: var(--fg);
    background: rgba(193,95,60,0.06);
  }

  .login-tab.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(193,95,60,0.3);
  }

  /* Input wrapper with icon */
  .login-input-wrap {
    position: relative;
  }

  .login-input-wrap .login-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fg-muted);
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.15s;
  }

  .login-input-wrap input:focus ~ .login-icon,
  .login-input-wrap input:not(:placeholder-shown) ~ .login-icon {
    opacity: 0.8;
    color: var(--accent);
  }

  .login-box input[type="email"],
  .login-box input[type="password"],
  .login-box input[type="text"] {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 15px;
    border: 1.5px solid var(--border);
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  .login-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(193,95,60,0.1);
  }

  .login-input-wrap input {
    padding-left: 44px !important;
  }

  /* Login button enhanced */
  .login-box .btn-gold {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent) 0%, #d4845e 100%);
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
  }

  .login-box .btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(193,95,60,0.3);
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  }

  .login-box .btn-gold:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(193,95,60,0.2);
  }

  .login-box .btn-ghost {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
  }

  .login-box .btn-ghost:hover {
    background: rgba(193,95,60,0.08);
    border-color: rgba(193,95,60,0.2);
    color: var(--accent);
  }

  .login-error {
    background: var(--fail-bg);
    border: 1px solid rgba(224, 122, 106, 0.25);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--fail-fg);
    margin-bottom: 16px;
    display: none;
    text-align: center;
  }

  .login-success {
    background: var(--pass-bg);
    border: 1px solid rgba(122, 184, 104, 0.25);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--pass-fg);
    margin-bottom: 16px;
    display: none;
  }

  .login-divider {
    text-align: center;
    color: var(--fg-muted);
    font-size: 12px;
    margin: 18px 0;
    position: relative;
  }

  .login-divider::before, .login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--border);
  }

  .login-divider::before { left: 0; }
  .login-divider::after  { right: 0; }

  @media (max-width: 420px) {
    .login-box { padding: 32px 24px 28px; }
    .login-paw { font-size: 32px; }
    .login-logo { font-size: 28px; }
  }

  /* App screen wrapper */
  #app-screen { display: none; }

  /* User badge in header */
  .user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
  }

  #user-email-label {
    font-size: 13px;
    color: var(--fg-muted);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .btn-logout {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--fg-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
  }

  .btn-logout:hover { border-color: var(--fail-fg); color: var(--fail-fg); }

  /* Loading overlay */
  #loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(38, 38, 36, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
  }

  #loading-overlay.show { display: flex; }

  .spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

  @keyframes spin { to { transform: rotate(360deg); } }

  .loading-text {
    color: var(--fg-muted);
    font-size: 14px;
  }

  /* ===== SCROLLBARS ===== */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--fg-muted); }

  /* ===== TOGGLE SWITCH ===== */
  .toggle-switch-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .toggle-switch-label {
    font-size: 0.85rem;
    color: var(--fg-muted);
    font-weight: 500;
    transition: color 0.15s;
  }
  .toggle-switch-label.active { color: var(--accent); font-weight: 600; }
  .toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    border: none;
    border-radius: 13px;
    background: var(--accent-light);
    border: 2px solid var(--accent);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s;
  }
  .toggle-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    transition: transform 0.2s;
  }
  .toggle-switch.on .toggle-switch-thumb { transform: translateX(22px); }

  /* ===== HEALTH TOOLS BAR ===== */
  .health-tools {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 16px 10px;
  }
  .health-tool {
    background: none;
    border: none;
    color: var(--fg-muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .health-tool:hover { color: var(--accent); background: var(--accent-light); }
  .health-tool-ai { color: var(--info-fg); }
  .health-tool-ai:hover { color: var(--info-fg); background: var(--info-bg); }
  .health-tool-sep {
    width: 1px;
    height: 16px;
    background: var(--border);
    margin: 0 4px;
  }

  /* ===== TRAINING RATING ===== */
  .rating-input { display: flex; gap: 6px; }
  .rating-btns { display: flex; gap: 6px; }
  .slider-row { display:flex; align-items:center; gap:10px; }
  .slider-row input[type="range"] { flex:1; -webkit-appearance:none; appearance:none; height:10px; background:var(--border-subtle); border-radius:5px; outline:none; cursor:pointer; }
  .slider-row input[type="range"]::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:28px; height:28px; border-radius:50%; background:var(--accent); border:2px solid var(--bg-widget); box-shadow:0 1px 4px rgba(0,0,0,0.2); cursor:pointer; }
  .slider-row input[type="range"]::-moz-range-thumb { width:28px; height:28px; border-radius:50%; background:var(--accent); border:2px solid var(--bg-widget); box-shadow:0 1px 4px rgba(0,0,0,0.2); cursor:pointer; }
  .slider-row input[type="range"]::-moz-range-track { height:10px; background:var(--border-subtle); border-radius:5px; }

  /* Drum picker (scroll wheel) */
  .drum-picker { position:relative; height:120px; overflow:hidden; border-radius:10px; border:1px solid var(--border); background:var(--bg-widget); user-select:none; }
  .drum-scroll { height:100%; overflow-y:scroll; scroll-snap-type:y mandatory; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
  .drum-scroll::-webkit-scrollbar { display:none; }
  .drum-item { height:40px; display:flex; align-items:center; justify-content:center; font-size:1.15rem; color:var(--fg-muted); scroll-snap-align:center; cursor:pointer; transition:color 0.15s; }
  .drum-item.active { color:var(--fg); font-weight:700; font-size:1.3rem; }
  .drum-highlight { position:absolute; top:40px; left:4px; right:4px; height:40px; background:var(--accent-light); border-radius:8px; pointer-events:none; z-index:1; }
  .drum-fade-top { position:absolute; top:0; left:0; right:0; height:40px; background:linear-gradient(to bottom, var(--bg-widget), transparent); pointer-events:none; z-index:2; }
  .drum-fade-bottom { position:absolute; bottom:0; left:0; right:0; height:40px; background:linear-gradient(to top, var(--bg-widget), transparent); pointer-events:none; z-index:2; }
  /* Health summary */
  .hl-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-bottom: 16px;
  }
  .hl-summary-item { text-align: center; flex: 1; }
  .hl-summary-val { font-size: 1.5rem; font-weight: 700; color: var(--fg); line-height: 1.1; }
  .hl-summary-label { font-size: 0.72rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
  .hl-summary-sep { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; margin: 0 8px; }

  /* Health sections — modern card style */
  .health-section {
    background: var(--bg-widget);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    overflow: hidden;
  }
  .health-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
  }
  .health-section-header:hover { background: var(--bg-hover); }
  .health-section-title { font-size: 0.88rem; font-weight: 600; color: var(--fg); }
  .health-section-count { font-weight: 400; font-size: 0.8rem; color: var(--fg-muted); }
  .health-section-arrow { color: var(--fg-muted); font-size: 0.7rem; transition: transform 0.25s ease; }
  .health-section.collapsed .health-section-body { display: none; }
  .health-section:not(.collapsed) .health-section-arrow { transform: rotate(90deg); }
  .health-section-body { padding: 0 12px 12px; }

  /* Health reminder banners — use main .reminder-banner styles */

  @media (max-width: 700px) {
    .hl-summary { padding: 14px 12px; }
    .hl-summary-val { font-size: 1.2rem; }
  }

  /* ===== TRENING CARDS ===== */
  .tr-summary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 18px 24px; margin-bottom: 16px;
  }
  .tr-summary-item { text-align: center; flex: 1; }
  .tr-summary-val { font-size: 1.5rem; font-weight: 700; color: var(--fg); line-height: 1.1; }
  .tr-summary-label { font-size: 0.72rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
  .tr-summary-sep { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; margin: 0 8px; }

  /* Training rows */
  .tr-list {
    background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden;
  }
  .tr-row {
    display: flex; align-items: stretch; gap: 14px; padding: 14px 16px;
    border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.12s; position: relative;
  }
  .tr-row:last-child { border-bottom: none; }
  .tr-row:hover { background: rgba(255,255,255,0.03); }
  .tr-row-date {
    flex-shrink: 0; width: 40px; text-align: center; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
  }
  .tr-row-day { font-size: 1.3rem; font-weight: 700; color: var(--fg); line-height: 1; }
  .tr-row-month { font-size: 0.7rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.03em; }
  .tr-row-main { flex: 1; min-width: 0; }
  .tr-row-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
  .tr-row-pet {
    font-size: 0.78rem; font-weight: 600; padding: 1px 10px; border-radius: 20px;
    background: var(--accent); color: #fff; white-space: nowrap;
  }
  .tr-row-disc { font-size: 0.75rem; color: var(--fg-muted); }
  .tr-row-dur { font-size: 0.88rem; color: var(--accent); font-weight: 600; margin-left: auto; }
  .tr-row-exercises { font-size: 0.88rem; color: var(--fg); line-height: 1.35; }
  .tr-row-notes { font-size: 0.78rem; color: var(--fg-muted); font-style: italic; margin-top: 2px; }
  .tr-row-meters { flex-shrink: 0; width: 220px; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-left: 24px; border-left: 1px solid var(--border); }
  .tr-meter-label { font-size: 0.75rem; color: var(--fg-muted); margin-bottom: 3px; }
  .tr-bar3 { display: flex; align-items: center; gap: 10px; }
  .tr-bar3-seg { width: 30px; height: 10px; border-radius: 4px; background: var(--border); }
  .tr-bar3-seg.active { }
  .tr-bar3-label { font-size: 0.82rem; font-weight: 600; margin-left: 14px; }
  .tr-row-del { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity 0.15s; }
  .tr-row:hover .tr-row-del { opacity: 1; }

  /* Competition cards */
  .tr-comp-card {
    background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 16px 18px; margin-bottom: 10px; transition: border-color 0.15s; position: relative;
  }
  .tr-comp-card:hover { border-color: var(--accent); }
  .tr-comp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
  .tr-comp-header-left { display: flex; align-items: center; gap: 8px; }
  .tr-comp-header-right { display: flex; align-items: center; gap: 6px; }
  .tr-comp-pet {
    font-size: 0.78rem; font-weight: 600; padding: 1px 10px; border-radius: 20px;
    background: var(--accent); color: #fff;
  }
  .tr-comp-disc { font-size: 0.75rem; color: var(--fg-muted); }
  .tr-comp-date { font-size: 0.82rem; color: var(--fg-muted); }
  .tr-comp-del { opacity: 0; transition: opacity 0.15s; }
  .tr-comp-card:hover .tr-comp-del { opacity: 1; }
  .tr-comp-body { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
  .tr-comp-info { flex: 1; }
  .tr-comp-location { font-size: 0.9rem; color: var(--fg); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
  .tr-comp-results { font-size: 0.9rem; color: var(--gold, #facc15); display: flex; align-items: center; gap: 6px; font-weight: 600; }
  .tr-comp-cost-block { text-align: right; flex-shrink: 0; }
  .tr-comp-total { font-size: 1.2rem; font-weight: 700; color: var(--fg); }
  .tr-comp-breakdown { font-size: 0.7rem; color: var(--fg-muted); margin-top: 2px; }

  .tr-stat-card {
    background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 18px; margin-bottom: 12px;
  }
  .tr-stat-header { font-size: 1rem; font-weight: 700; color: var(--fg); margin-bottom: 14px; }
  .tr-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
  .tr-stat-item { text-align: center; }
  .tr-stat-val { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
  .tr-stat-label { font-size: 0.72rem; color: var(--fg-muted); text-transform: uppercase; margin-top: 2px; }
  .tr-stat-disc { }
  .tr-stat-disc-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--fg-muted); margin-bottom: 6px; }
  .tr-stat-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
  .tr-stat-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }

  @media (max-width: 700px) {
    .tr-summary { padding: 14px 12px; }
    .tr-summary-val { font-size: 1.2rem; }
    .tr-row { flex-wrap: wrap; gap: 8px; }
    .tr-row-meters { width: 100%; flex-direction: row; gap: 20px; border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 10px; }
    .tr-comp-body { flex-direction: column; align-items: flex-start; }
    .tr-comp-cost-block { text-align: left; }
    .tr-stat-grid { grid-template-columns: repeat(2, 1fr); }
  }

  /* AI Chat */
  .ai-chat-messages { display:flex; flex-direction:column; gap:8px; max-height:55vh; overflow-y:auto; padding:8px 0; margin-bottom:12px; }
  .ai-chat-msg { max-width:85%; padding:10px 14px; border-radius:12px; font-size:0.9rem; line-height:1.45; word-break:break-word; }
  .ai-chat-msg.user { align-self:flex-end; background:var(--accent); color:#fff; border-bottom-right-radius:4px; }
  .ai-chat-msg.assistant { align-self:flex-start; background:var(--bg-widget); border:1px solid var(--border); border-bottom-left-radius:4px; }
  .ai-chat-msg.assistant .ai-urgency-high { color:var(--fail-fg); font-weight:700; }
  .ai-chat-msg.system { align-self:center; color:var(--fg-muted); font-size:0.8rem; font-style:italic; }
  .ai-chat-input-row { display:flex; gap:8px; align-items:flex-end; }
  .ai-chat-textarea { flex:1; resize:none; padding:10px 12px; border:1px solid var(--border-subtle); border-radius:var(--radius); background:var(--bg-widget); color:var(--fg); font-family:inherit; font-size:0.9rem; }
  .ai-chat-textarea:focus { outline:none; border-color:var(--accent); }
  .ai-chat-typing { display:flex; gap:4px; padding:8px 14px; }
  .ai-chat-typing span { width:6px; height:6px; border-radius:50%; background:var(--fg-muted); animation:aiTyping 1.2s ease-in-out infinite; }
  .ai-chat-typing span:nth-child(2) { animation-delay:0.2s; }
  .ai-chat-typing span:nth-child(3) { animation-delay:0.4s; }
  @keyframes aiTyping { 0%,60%,100% { opacity:0.3; transform:scale(0.8); } 30% { opacity:1; transform:scale(1.1); } }
  .ai-disclaimer { text-align:center; font-size:0.7rem; color:var(--warn-fg); padding:2px 0 6px; opacity:0.7; }
  .checkbox-label { display:flex; align-items:center; gap:8px; font-size:0.88rem; color:var(--cream); cursor:pointer; padding:4px 0; }
  .checkbox-label input[type="checkbox"] { width:18px; height:18px; accent-color:var(--gold); cursor:pointer; }
  .share-person { display:flex; justify-content:space-between; align-items:center; padding:8px 10px; background:rgba(255,255,255,0.04); border-radius:8px; margin-bottom:6px; font-size:0.84rem; }
  .share-person .share-email { color:var(--cream); }
  .share-person .share-level { font-size:0.76rem; padding:2px 8px; border-radius:10px; }
  .share-level-write { background:var(--gold); color:var(--bg); }
  .share-level-read { background:rgba(212,168,106,0.2); color:var(--gold); }
  .share-status { font-size:0.7rem; padding:2px 6px; border-radius:10px; }
  .share-status-pending { background:rgba(255,152,0,0.15); color:#ff9800; }
  .share-status-accepted { background:rgba(76,175,80,0.15); color:#4caf50; }

  /* Pending invitations banner */
  .invitations-banner { background:var(--bg-widget); border:1px solid var(--gold); border-radius:12px; padding:14px 16px; margin-bottom:16px; }
  .invitations-title { font-weight:600; font-size:0.9rem; margin-bottom:10px; display:flex; align-items:center; gap:6px; color:var(--gold); }
  .invitation-card { display:flex; justify-content:space-between; align-items:center; padding:10px 12px; background:rgba(212,168,106,0.06); border-radius:8px; margin-bottom:6px; }
  .invitation-info { display:flex; flex-direction:column; gap:2px; }
  .invitation-info strong { font-size:0.88rem; }
  .invitation-meta { font-size:0.76rem; color:var(--muted); }
  .invitation-actions { display:flex; align-items:center; gap:8px; }
  .rating-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-hover);
    color: var(--fg-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    display: flex; align-items: center; justify-content: center;
  }

  .rating-btn:hover, .rating-btn.active { background: var(--accent); color: #ffffff; border-color: var(--accent); }

  /* ===== PROGRESS CHART ===== */
  .progress-bar-wrap { margin-bottom: 12px; }
  .progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--fg-muted); margin-bottom: 6px; }
  .progress-bar { height: 8px; background: var(--border); border-radius: var(--radius-sm); overflow: hidden; }
  .progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent) 0%, var(--warn-fg) 100%); border-radius: var(--radius-sm); transition: width 0.5s ease; }

  /* ===== NOTIFICATION BADGE ===== */
  .notif-wrap { position: relative; display: inline-flex; }
  .notif-badge {
    position: absolute;
    top: -6px; right: -6px;
    background: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-header);
    z-index: 10;
  }

  /* ===== INFO BANNER ===== */
  .info-banner {
    background: var(--info-bg);
    border: 1px solid rgba(122, 175, 197, 0.2);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--fg-muted);
  }
  .info-banner .info-icon { font-size: 1.4rem; flex-shrink: 0; }
  .info-banner strong { color: var(--fg); }

  /* PWA Offline indicator */
  .offline-bar {
    display: none;
    background: var(--warn-bg, #fff3cd);
    color: var(--warn-fg, #856404);
    text-align: center;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    transition: transform 0.3s ease;
    transform: translateY(-100%);
  }
  .offline-bar.visible {
    display: block;
    transform: translateY(0);
  }

  /* Pull-to-refresh indicator */
  .ptr-indicator {
    display: none;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    color: var(--fg-muted);
    background: var(--bg);
    transition: transform 0.2s ease;
  }
  .ptr-indicator.visible {
    display: block;
  }
  .ptr-indicator.refreshing {
    display: block;
    color: var(--accent);
  }

  /* Skeleton loading */
  .skeleton { background: var(--bg-hover); border-radius: 8px; position: relative; overflow: hidden; }
  .skeleton::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent); animation: skeleton-shimmer 1.5s infinite; }
  @keyframes skeleton-shimmer { to { left: 100%; } }
  .skeleton-card { height: 72px; margin-bottom: 10px; }
  .skeleton-bar { height: 16px; margin-bottom: 8px; }
  .skeleton-bar.w60 { width: 60%; }
  .skeleton-bar.w40 { width: 40%; }
  .skeleton-bar.w80 { width: 80%; }
  .skeleton-circle { width: 44px; height: 44px; border-radius: 50%; }
  .skeleton-row { display: flex; gap: 12px; align-items: center; padding: 12px; }

  /* Undo toast button */
  .toast-undo-btn { background: transparent; border: 1px solid currentColor; color: inherit; padding: 3px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600; margin-left: 4px; }
  .toast-undo-btn:hover { opacity: 0.8; }

  /* ========== BEHAVIOR CARDS ========== */
  .beh-exercise-card { cursor: pointer; margin-bottom: 8px; padding: 12px; transition: border-color 0.2s; }
  .beh-exercise-card:hover { border-color: var(--accent); }
  .beh-ex-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
  .beh-ex-title { font-weight: 600; font-size: 0.95rem; }
  .beh-ex-meta { display: flex; gap: 8px; align-items: center; }
  .beh-ex-cat { font-size: 0.72rem; color: var(--fg-muted); background: var(--surface); padding: 2px 8px; border-radius: 10px; }
  .beh-ex-diff { font-size: 0.72rem; font-weight: 600; }
  .beh-ex-desc { font-size: 0.85rem; color: var(--fg-muted); line-height: 1.4; }
  .beh-ex-detail { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
  .beh-ex-detail ol { margin: 6px 0 10px 18px; padding: 0; font-size: 0.85rem; line-height: 1.6; }
  .beh-ex-tips { font-size: 0.82rem; color: var(--accent); background: rgba(193,95,60,0.08); padding: 8px 10px; border-radius: 6px; line-height: 1.4; }
