:root {
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
}

/* Light Mode Body */
body {
  font-family: 'Inter', 'Noto Sans Myanmar', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.1) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
  color: #1e293b;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Body */
html.dark body {
  background-color: #0b0f19;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.22) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.18) 0px, transparent 50%);
  color: #f1f5f9;
}

/* Liquid Ambient Background Orbs */
@keyframes float-slow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(15px, -20px) scale(1.04); }
}
.animate-orb-1 { animation: float-slow 16s ease-in-out infinite; }

/* Liquid Glass Cards */
.liquid-glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 10px 25px -5px rgba(15, 23, 42, 0.05),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.95);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html.dark .liquid-glass {
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 10px 30px -5px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.08);
}

/* 3D Action Icon Buttons (Clean, tactile, modern) */
.btn-3d-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 4px 10px -2px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 #ffffff;
  color: #334155;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.btn-3d-icon:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 14px -2px rgba(15, 23, 42, 0.14);
}
.btn-3d-icon:active {
  transform: translateY(1.5px);
}

html.dark .btn-3d-icon {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 
    0 4px 12px -2px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}

/* 3D Primary Button */
.btn-3d-primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 8px 18px -4px rgba(37, 99, 235, 0.4);
  transition: all 0.12s ease;
}
.btn-3d-primary:active {
  transform: translateY(1.5px);
}

/* 3D Success Button */
.btn-3d-success {
  background: linear-gradient(180deg, #10b981 0%, #059669 50%, #047857 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 18px -4px rgba(16, 185, 129, 0.4);
  transition: all 0.12s ease;
}
.btn-3d-success:active {
  transform: translateY(1.5px);
}

/* 3D Microphone Orb Button */
.btn-3d-mic {
  background: radial-gradient(circle at 35% 25%, #ff6b6b 0%, #ef4444 55%, #b91c1c 100%);
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 24px -4px rgba(239, 68, 68, 0.45);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-3d-mic:hover {
  transform: scale(1.04);
}
.btn-3d-mic:active {
  transform: scale(0.95);
}

/* 3D Glass Pill Button */
.btn-3d-glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px -1px rgba(15, 23, 42, 0.05);
  color: #334155;
  transition: all 0.12s ease;
}
.btn-3d-glass:active {
  transform: translateY(1px);
}

html.dark .btn-3d-glass {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.35);
  color: #f1f5f9;
}

/* ========================================================================== */
/* 3D DESKTOP & TABLET TOP TABS                                              */
/* ========================================================================== */
.nav-tab {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 3px 6px -1px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 #ffffff;
  color: #475569;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.nav-tab:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 5px 12px -2px rgba(15, 23, 42, 0.12), inset 0 1px 0 #ffffff;
  color: #1e293b;
}
.nav-tab:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

html.dark .nav-tab {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 3px 8px -1px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}
html.dark .nav-tab:hover {
  color: #ffffff;
  box-shadow: 0 5px 14px -2px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* 3D Icon Badge in Desktop Tab */
.nav-tab .nav-tab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(241, 245, 249, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 4px -1px rgba(15, 23, 42, 0.08), inset 0 1px 0 #ffffff;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.nav-tab .nav-tab-icon i {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

html.dark .nav-tab .nav-tab-icon {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 5px -1px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Active 3D Elevated State for Desktop Tab */
.nav-tab.active {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 6px 16px -2px rgba(37, 99, 235, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.15) !important;
  color: #ffffff !important;
  transform: translateY(-1.5px);
}
.nav-tab.active:hover {
  transform: translateY(-2px);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 8px 20px -2px rgba(37, 99, 235, 0.6) !important;
}
.nav-tab.active:active {
  transform: translateY(1px);
}
.nav-tab.active .nav-tab-icon {
  background: rgba(255, 255, 255, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}
.nav-tab.active .nav-tab-icon i,
.nav-tab.active i {
  color: #ffffff !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)) !important;
}

/* Precise 3px Separation between Desktop Nav Card and Content Card below */
@media (min-width: 768px) {
  header nav {
    margin-bottom: 3px !important;
  }
}

/* ========================================================================== */
/* 3D MOBILE BOTTOM NAVIGATION BAR                                           */
/* ========================================================================== */
.mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px) saturate(220%);
  -webkit-backdrop-filter: blur(28px) saturate(220%);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 8px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

html.dark .mobile-bottom-nav {
  background: rgba(15, 23, 42, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.5);
}

.mobile-nav-btn {
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #64748b;
  position: relative;
  outline: none;
}
.mobile-nav-btn span {
  transition: all 0.18s ease;
}

/* 3D Tactile Icon Wrapper on Mobile */
.nav-icon-wrapper {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 3px 8px -1px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 #ffffff;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.nav-icon-wrapper i {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
  transition: all 0.18s ease;
}

html.dark .nav-icon-wrapper {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 
    0 3px 10px -1px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Active 3D Floating State on Mobile */
.mobile-nav-btn.active {
  color: #2563eb;
}
html.dark .mobile-nav-btn.active {
  color: #60a5fa;
}
.mobile-nav-btn.active span {
  font-weight: 800;
  color: #2563eb;
  transform: translateY(-1px);
}
html.dark .mobile-nav-btn.active span {
  color: #60a5fa;
}

.mobile-nav-btn.active .nav-icon-wrapper {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 8px 18px -3px rgba(37, 99, 235, 0.55),
    0 3px 6px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px) scale(1.08);
}
.mobile-nav-btn.active .nav-icon-wrapper i {
  color: #ffffff !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.mobile-nav-btn:active .nav-icon-wrapper {
  transform: translateY(1px) scale(0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Inputs, Selects & Textareas */
html.dark input:not([type="checkbox"]):not([type="radio"]),
html.dark textarea,
html.dark select {
  background-color: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #f8fafc !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #94a3b8 !important;
}

/* Native Select Options in Light & Dark Mode (Dividers & Touch friendly) */
select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}
html.dark select option {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* 3D Segmented Note Type Switcher Buttons (Tactile, Embossed) */
.note-type-tab {
  padding: 0.55rem 0.85rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  user-select: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 5px -1px rgba(15, 23, 42, 0.06), inset 0 1px 0 #ffffff;
  color: #64748b;
}

html.dark .note-type-tab {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.note-type-tab:hover {
  transform: translateY(-1.5px);
  color: #1e293b;
  box-shadow: 0 4px 10px -2px rgba(15, 23, 42, 0.12);
}

html.dark .note-type-tab:hover {
  color: #f8fafc;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.6);
}

.note-type-tab:active {
  transform: translateY(1px);
}

/* 3D Active State (Elevated, gradient glow, tactile) */
.note-type-tab.active {
  background: linear-gradient(180deg, #4f46e5 0%, #4338ca 50%, #3730a3 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 6px 14px -3px rgba(79, 70, 229, 0.45),
    0 2px 4px -1px rgba(79, 70, 229, 0.3) !important;
  transform: translateY(-1.5px);
}

html.dark .note-type-tab.active {
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 6px 16px -2px rgba(99, 102, 241, 0.55),
    0 2px 6px -1px rgba(0, 0, 0, 0.5) !important;
}

/* 3D ColorNote Swatch Palette (Vibrant, Prominent, Clear Selected State) */
.modal-swatch-btn {
  border-width: 2px !important;
  box-shadow: 
    0 2px 6px -1px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-swatch-btn:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 14px -2px rgba(15, 23, 42, 0.22);
}
.modal-swatch-btn:active {
  transform: translateY(1px) scale(0.96);
}
.modal-swatch-btn.active-swatch {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 
    0 0 0 2.5px #ffffff,
    0 0 0 4.5px #4f46e5,
    0 8px 16px -2px rgba(79, 70, 229, 0.45) !important;
}
html.dark .modal-swatch-btn.active-swatch {
  box-shadow: 
    0 0 0 2.5px #0f172a,
    0 0 0 4.5px #818cf8,
    0 8px 18px -2px rgba(99, 102, 241, 0.55) !important;
}

/* Dark mode text helpers */
html.dark .text-slate-900,
html.dark .text-slate-800 {
  color: #f8fafc !important;
}
html.dark .text-slate-700,
html.dark .text-slate-600 {
  color: #cbd5e1 !important;
}
html.dark .text-slate-500,
html.dark .text-slate-400 {
  color: #94a3b8 !important;
}

/* Dark mode subtle containers */
html.dark .bg-white\/40,
html.dark .bg-white\/50,
html.dark .bg-white\/60,
html.dark .bg-white\/70,
html.dark .bg-white\/80,
html.dark .bg-white\/90 {
  background-color: rgba(30, 41, 59, 0.65) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
html.dark .bg-slate-200\/60 {
  background-color: rgba(51, 65, 85, 0.7) !important;
  color: #e2e8f0 !important;
}

/* -------------------------------------------------------------------------- */
/*           COLORNOTE ADAPTIVE CARD SYSTEM (PERFECT IN LIGHT & DARK)         */
/* -------------------------------------------------------------------------- */
.colornote-card {
  border-radius: 0 !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.25s ease, border-color 0.25s ease;
}

/* Light Mode: High-contrast rich dark typography on pastel cards */
.colornote-card .note-title {
  color: #0f172a !important;
}
.colornote-card .note-body {
  color: #1e293b !important;
}
.colornote-card .note-tag {
  background-color: rgba(255, 255, 255, 0.75) !important;
  color: #1e293b !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.colornote-card .note-badge {
  background-color: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}
.colornote-card .note-action-btn {
  color: #475569 !important;
}
.colornote-card .note-action-btn:hover {
  background-color: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}
.colornote-card .note-checklist-item {
  background-color: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}
.colornote-card .note-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #475569 !important;
}
.colornote-card .note-copy-btn {
  background-color: rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}
.colornote-card .note-copy-btn:hover {
  background-color: rgba(0, 0, 0, 0.12) !important;
}

.colornote-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.1);
}

.colornote-list-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -2px rgba(15, 23, 42, 0.08);
}

/* Dark Mode: Sleek OLED Dark Tinted Cards (Like Keep & Notion Dark Mode) */
html.dark .colornote-card {
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.6) !important;
  border-width: 1px !important;
}
html.dark .colornote-card[data-color-palette="yellow"] {
  background-color: #231f10 !important;
  border-color: rgba(234, 179, 8, 0.4) !important;
}
html.dark .colornote-card[data-color-palette="green"] {
  background-color: #0e2217 !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
}
html.dark .colornote-card[data-color-palette="blue"] {
  background-color: #0f2133 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}
html.dark .colornote-card[data-color-palette="purple"] {
  background-color: #21132e !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
}
html.dark .colornote-card[data-color-palette="orange"] {
  background-color: #29180e !important;
  border-color: rgba(251, 146, 60, 0.4) !important;
}
html.dark .colornote-card[data-color-palette="pink"] {
  background-color: #2a111e !important;
  border-color: rgba(244, 114, 182, 0.4) !important;
}
html.dark .colornote-card[data-color-palette="default"] {
  background-color: #1e293b !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}

html.dark .colornote-card .note-title {
  color: #ffffff !important;
}
html.dark .colornote-card .note-body {
  color: #f1f5f9 !important;
}
html.dark .colornote-card .note-tag {
  background-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
html.dark .colornote-card .note-badge {
  background-color: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}
html.dark .colornote-card .note-action-btn {
  color: #cbd5e1 !important;
}
html.dark .colornote-card .note-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}
html.dark .colornote-card .note-checklist-item {
  background-color: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f1f5f9 !important;
}
html.dark .colornote-card .note-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
}
html.dark .colornote-card .note-copy-btn {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}
html.dark .colornote-card .note-copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.25) !important;
}

/* Pulsing Mic Ring */
@keyframes liquid-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 0.15; }
  100% { transform: scale(1); opacity: 0.8; }
}
.pulse-ring {
  animation: liquid-pulse 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

/* Scrollbars */
.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }

/* Large Font Readability Mode */
html.font-large {
  font-size: 112%;
}

/* Icon Preset Buttons in Settings */
.icon-preset-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid transparent;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-preset-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.icon-preset-btn.active {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: scale(1.05);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}
html.dark .icon-preset-btn {
  background: rgba(30, 41, 59, 0.8);
  color: #f8fafc;
}
html.dark .icon-preset-btn.active {
  background: rgba(37, 99, 235, 0.25);
  border-color: #60a5fa;
}

/* Gradient Color Swatches */
.gradient-swatch {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.gradient-swatch:hover {
  transform: scale(1.1);
}
.gradient-swatch.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px #3b82f6, 0 4px 10px rgba(0,0,0,0.2);
  transform: scale(1.12);
}

/* 3D Segmented Switcher for Money Tracker (Expense vs Income) */
.money-type-btn {
  padding: 0.55rem 0.85rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  user-select: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 5px -1px rgba(15, 23, 42, 0.06), inset 0 1px 0 #ffffff;
  color: #64748b;
}

html.dark .money-type-btn {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.money-type-btn:hover {
  transform: translateY(-1.5px);
  color: #1e293b;
  box-shadow: 0 4px 10px -2px rgba(15, 23, 42, 0.12);
}

html.dark .money-type-btn:hover {
  color: #f8fafc;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.6);
}

.money-type-btn:active {
  transform: translateY(1px);
}

/* Active Expense: Rose / Red 3D Glow */
.money-type-btn.active-out {
  background: linear-gradient(180deg, #f43f5e 0%, #e11d48 50%, #be123c 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 6px 14px -3px rgba(225, 29, 72, 0.45),
    0 2px 4px -1px rgba(225, 29, 72, 0.3) !important;
  transform: translateY(-1.5px);
}

/* Active Income: Emerald / Green 3D Glow */
.money-type-btn.active-in {
  background: linear-gradient(180deg, #10b981 0%, #059669 50%, #047857 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 6px 14px -3px rgba(5, 150, 105, 0.45),
    0 2px 4px -1px rgba(5, 150, 105, 0.3) !important;
  transform: translateY(-1.5px);
}

/* 3D Period Pills (Daily Expenses) */
.money-period-pill {
  transition: all 0.15s ease;
  cursor: pointer;
}
.money-period-pill:hover {
  transform: translateY(-1px);
}
.money-period-pill.active {
  background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px -2px rgba(13, 148, 136, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Mobile bottom sheet slide up animation & Category Dropdown styling */
@keyframes slideUpBottomSheet {
  from {
    transform: translateY(100%);
    opacity: 0.85;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.bottom-sheet-mobile {
  animation: slideUpBottomSheet 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Dropdown smooth fade & scale animation */
@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-animate {
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: top right;
}

/* Category Dropdown item divider and mobile touch friendliness */
.cat-dropdown-item {
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.cat-dropdown-item:not(:last-child) {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
html.dark .cat-dropdown-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Segmented Tabs inside Money Category Studio */
.money-cat-type-tab {
  color: #64748b;
  transition: all 0.2s ease;
}
.money-cat-type-tab.active {
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}
html.dark .money-cat-type-tab.active {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* Quick Tone Pills inside Translator */
.tone-pill {
  transition: all 0.2s ease;
}
.tone-pill.active {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.4);
}
html.dark .tone-pill.active {
  background-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
}

/* Quick Phrase Chips styling */
.quick-phrase-chip:hover {
  border-color: #3b82f6;
  color: #2563eb;
}
html.dark .quick-phrase-chip:hover {
  border-color: #60a5fa;
  color: #93c5fd;
}

/* Quick Phrases & Notes Category Drag to Scroll */
#quickPhrasesContainer,
#notesCategoryScrollTrack {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-overflow-scrolling: touch;
}
#quickPhrasesContainer.is-dragging,
#notesCategoryScrollTrack.is-dragging {
  cursor: grabbing !important;
}
#quickPhrasesContainer.is-dragging .quick-phrase-chip,
#notesCategoryScrollTrack.is-dragging .notes-cat-pill {
  cursor: grabbing !important;
  pointer-events: none;
}

/* Higher Z-Index for Studio / Category Manager Modals so they float on top of other form modals */
.modal-studio-level {
  z-index: 70 !important;
}
