:root {
  --bg-dark: #0b0f19;
  --bg-card: rgba(23, 32, 51, 0.95);
  --border-color: rgba(255, 255, 255, 0.12);
  --primary-rose: #ec4899;
  --primary-purple: #8b5cf6;
  --primary-gradient: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #0b0f19 !important;
  color: #f8fafc !important;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10px 10px 80px 10px !important;
  overflow-x: hidden !important;
}

.app-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Lovely Header */
.app-header {
  background: var(--bg-card) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid var(--border-color) !important;
  padding: 14px 16px !important;
  border-radius: var(--radius-lg) !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-size: 24px;
  background: rgba(236, 72, 153, 0.15);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.brand h1 {
  font-size: 16.5px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
}

.subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Nav Sections */
.nav-section {
  display: none;
}

.nav-section.active {
  display: block;
}

/* Cards */
.card {
  background: var(--bg-card) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid var(--border-color) !important;
  padding: 16px !important;
  border-radius: var(--radius-lg) !important;
  margin-bottom: 12px !important;
}

.glass-card {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%) !important;
  border: 1px solid rgba(236, 72, 153, 0.35) !important;
}

.card h3 {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff !important;
  margin-bottom: 6px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  background: rgba(59, 130, 246, 0.25) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 700;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted) !important;
}

input[type="text"], input[type="password"], select, textarea {
  width: 100% !important;
  padding: 11px 13px !important;
  background: #0f172a !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  font-size: 12.5px !important;
  outline: none !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary-rose) !important;
}

/* Rich Text Toolbar Buttons */
.rich-toolbar {
  display: flex !important;
  gap: 4px !important;
  background: #0f172a !important;
  padding: 5px !important;
  border-radius: 10px !important;
  border: 1px solid var(--border-color) !important;
  margin-bottom: 5px !important;
  overflow-x: auto !important;
}

.rich-toolbar button {
  all: unset !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  padding: 5px 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

.rich-toolbar button:hover, .rich-toolbar button:active {
  background: var(--primary-rose) !important;
  border-color: var(--primary-rose) !important;
  color: #ffffff !important;
}

/* Switches & Toggles */
.toggle-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-item:last-child {
  border-bottom: none;
}

.toggle-item strong {
  font-size: 12.5px;
  color: #ffffff !important;
}

.toggle-item p {
  font-size: 10.5px;
  color: var(--text-muted) !important;
  margin-top: 2px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 23px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 17px;
  width: 17px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background: var(--primary-gradient);
}

input:checked + .slider:before {
  transform: translateX(21px);
}

/* Buttons with Flex Alignment & Perfect Line-Height */
.btn {
  all: unset !important;
  box-sizing: border-box !important;
  width: 100% !important;
  padding: 11px 14px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  line-height: 1.4 !important;
  transition: transform 0.12s ease !important;
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-primary {
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.4) !important;
}

.btn-secondary {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
}

.btn-sm {
  width: auto !important;
  padding: 7px 12px !important;
  font-size: 11.5px !important;
  border-radius: 10px !important;
}

/* Live Preview */
.preview-box {
  background: #0f172a !important;
  padding: 11px !important;
  border-radius: 12px !important;
  border: 1px dashed rgba(255, 255, 255, 0.15) !important;
  margin-top: 6px;
}

.preview-label {
  font-size: 9.5px;
  color: var(--primary-rose) !important;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-card {
  font-size: 12.5px;
  margin-top: 4px;
  color: #e2e8f0 !important;
}

/* Filter Item */
.filter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f172a !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  border: 1px solid var(--border-color) !important;
  margin-top: 8px;
}

.filter-kw {
  background: rgba(236, 72, 153, 0.2) !important;
  color: #f472b6 !important;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
}

/* FIXED FLOATING BOTTOM NAVIGATION TOOLBAR (COMPACT PERFECT FIT FOR ALL SCREENS) */
.bottom-nav {
  position: fixed !important;
  bottom: 8px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 16px) !important;
  max-width: 440px !important;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 28px !important;
  display: flex !important;
  justify-content: space-around !important;
  padding: 4px 6px !important;
  z-index: 9999 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.bottom-nav-item {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 7px 6px !important;
  border-radius: 20px !important;
  color: #94a3b8 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.nav-icon {
  font-size: 15px !important;
}

.nav-label {
  display: inline-block !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.bottom-nav-item.active {
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(236, 72, 153, 0.5) !important;
}

/* TOP POSITIONED TOAST NOTIFICATION (NEVER BLOCKS BOTTOM NAV) */
.toast {
  position: fixed !important;
  top: 14px !important;
  bottom: auto !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(-100px) !important;
  background: #10b981 !important;
  color: white !important;
  padding: 9px 20px !important;
  border-radius: 30px !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  z-index: 10000 !important;
}

.toast.show {
  transform: translateX(-50%) translateY(0) !important;
}
