/* ==========================================================================
   Bulkin Go Business Management - Modern Glassmorphic Design System & Global Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Default Theme: Royal Indigo Dark */
  --bg-primary: #0a0e1a;
  --bg-secondary: rgba(16, 22, 42, 0.7);
  --bg-tertiary: #1e294b;
  --accent-color: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.15);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --glass-bg: rgba(16, 22, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: rgba(0, 0, 0, 0.4);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  --sidebar-width: 260px;
  --sidebar-collapsed-width: 70px;
  
  --dropdown-bg: #10162a;
  
  --font-body: 'Outfit', sans-serif;
  --font-title: 'Outfit', sans-serif;
  --transition-speed: 0.3s;

  --header-bg: #0b1a24;
  --header-text: #ffffff;
  --header-border: rgba(255,255,255,0.1);
  --search-bg: rgba(255,255,255,0.06);
  --search-border: rgba(255,255,255,0.15);
  --search-text: #ffffff;
  --separator-color: rgba(255, 255, 255, 0.15);

  --input-bg: rgba(255, 255, 255, 0.05);
  --input-focus-bg: rgba(255, 255, 255, 0.08);
}

/* Color Theme Classes */
[data-theme="emerald"] {
  --bg-primary: #040d12;
  --bg-secondary: rgba(18, 53, 36, 0.7);
  --bg-tertiary: #1a4d2e;
  --accent-color: #10b981;
  --accent-hover: #059669;
  --accent-light: rgba(16, 185, 129, 0.15);
  --dropdown-bg: #091711;
}

[data-theme="crimson"] {
  --bg-primary: #120303;
  --bg-secondary: rgba(43, 8, 8, 0.7);
  --bg-tertiary: #4c1111;
  --accent-color: #ef4444;
  --accent-hover: #dc2626;
  --accent-light: rgba(239, 68, 68, 0.15);
  --dropdown-bg: #1b0a0a;
}

[data-theme="light-indigo"] {
  --bg-primary: #f8fafc;
  --bg-secondary: rgba(255, 255, 255, 0.85);
  --bg-tertiary: #e2e8f0;
  --accent-color: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.1);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-shadow: rgba(99, 102, 241, 0.05);
  --dropdown-bg: #ffffff;

  --header-bg: #ffffff;
  --header-text: #0f172a;
  --header-border: #e2e8f0;
  --search-bg: #f1f5f9;
  --search-border: #cbd5e1;
  --search-text: #0f172a;
  --separator-color: #e2e8f0;

  --input-bg: #ffffff;
  --input-focus-bg: #ffffff;
}

[data-theme="white"] {
  --bg-primary: #ffffff;
  --bg-secondary: rgba(248, 250, 252, 0.95);
  --bg-tertiary: #f1f5f9;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.1);
  --text-primary: #000000;
  --text-secondary: #1e293b;
  --text-muted: #475569;
  --glass-bg: rgba(255, 255, 255, 0.98);
  --glass-border: #cbd5e1;
  --glass-shadow: rgba(0, 0, 0, 0.04);
  --dropdown-bg: #ffffff;

  --header-bg: #ffffff;
  --header-text: #000000;
  --header-border: #cbd5e1;
  --search-bg: #f8fafc;
  --search-border: #cbd5e1;
  --search-text: #000000;
  --separator-color: #cbd5e1;

  --input-bg: #ffffff;
  --input-focus-bg: #ffffff;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.5;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* ==========================================================================
   GLASSMORPHISM UTILITIES
   ========================================================================== */

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 24px;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.glass-btn {
  background: var(--accent-color);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition-speed), transform 0.1s;
}

.glass-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.glass-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.glass-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.glass-btn-transparent {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.glass-btn-transparent:hover {
  background: rgba(255, 255, 255, 0.08);
}


.glass-input {
  background: var(--input-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  outline: none;
  width: 100%;
  transition: border-color var(--transition-speed), background var(--transition-speed);
}

select.glass-input option {
  background-color: var(--dropdown-bg, #10162a);
  color: var(--text-primary, #f8fafc);
}

.glass-input:focus {
  border-color: var(--accent-color);
  background: var(--input-focus-bg, rgba(255, 255, 255, 0.08));
}

/* ==========================================================================
   LANDING PAGE LAYOUT
   ========================================================================== */

.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 8%;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.logo-container span span {
  color: #818cf8 !important;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(129, 140, 248, 0.4);
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-color), #818cf8);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.landing-hero {
  padding: 100px 8% 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
}

.hero-badge {
  background: var(--accent-light);
  color: var(--accent-color);
  padding: 6px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 24px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.hero-title {
  font-family: var(--font-title);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: 900px;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 20px;
}

/* Feature grid */
.section-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
}

.landing-section {
  padding: 80px 8%;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-card {
  text-align: left;
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Pricing Grid */
.pricing-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 40px;
}

.pricing-card {
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.pricing-card.premium::after {
  content: 'BEST VALUE';
  position: absolute;
  top: 20px;
  right: -35px;
  background: var(--accent-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 35px;
  transform: rotate(45deg);
}

.price-header {
  text-align: center;
  margin-bottom: 24px;
}

.price-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.price-amount {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 10px 0;
  font-family: var(--font-title);
}

.price-features {
  list-style: none;
  width: 100%;
  margin-bottom: 30px;
}

.price-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.price-features li i {
  color: var(--success);
}

/* ==========================================================================
   DASHBOARD PANEL LAYOUT
   ========================================================================== */

.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  background: rgba(15, 23, 42, 0.95);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-speed);
  z-index: 100;
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
}

.sidebar-menu {
  list-style: none;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-speed), color var(--transition-speed);
}

.menu-item:hover, .menu-item.active {
  background: var(--accent-light);
  color: #ffffff;
}

.menu-item i {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--glass-border);
}

.sidebar-footer #sidebar-username {
  color: var(--text-primary) !important;
}

.sidebar-footer #sidebar-role {
  color: var(--text-secondary) !important;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.top-nav {
  height: 70px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-bar {
  position: relative;
  width: 300px;
}

.search-bar input {
  padding-left: 40px;
}

.search-bar i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
}

.content-body {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background: radial-gradient(circle at bottom right, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
}

/* ==========================================================================
   CARDS & GRID LAYOUT
   ========================================================================== */

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

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

.metric-info h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.metric-info .value {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   TABLES & FORMS
   ========================================================================== */

.table-container {
  overflow-x: auto;
  margin-top: 20px;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 14px 18px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.9rem;
}

.custom-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.95rem;
}

.custom-table tr:hover td {
  background: var(--accent-light);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
}

.status-paid {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.status-unpaid {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.status-partial {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* Form Groups */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   AI CHAT ASSISTANT
   ========================================================================== */

.ai-chat-card {
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 15px;
}

.chat-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 14px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.chat-bubble.ai {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  align-self: flex-start;
}

.chat-bubble.user {
  background: var(--accent-color);
  color: white;
  align-self: flex-end;
}

.chat-input-row {
  display: flex;
  gap: 12px;
}

/* ==========================================================================
   THEME SELECTOR PANEL
   ========================================================================== */

.theme-palette {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.theme-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
}

.theme-indigo { background: #6366f1; }
.theme-emerald { background: #10b981; }
.theme-crimson { background: #ef4444; }
.theme-light { background: #cbd5e1; }
.theme-white { background: #ffffff; border: 1px solid #cbd5e1 !important; }

/* ==========================================================================
   VERTICAL DROPDOWN ACTION MENU
   ========================================================================== */
.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 105%;
  background: var(--dropdown-bg);
  border: 1px solid var(--glass-border);
  min-width: 190px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 999;
  border-radius: 8px;
  padding: 6px 0;
  margin-top: 5px;
  text-align: left;
}

.dropdown-content a {
  color: var(--text-primary) !important;
  padding: 10px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 10px;
  font-size: 0.85rem;
  transition: background 0.25s ease, color 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}

.dropdown-content a:hover {
  background: var(--accent-light);
  color: var(--accent-color) !important;
}

.show-dropdown {
  display: block !important;
}

/* Sidebar Dropdown Menu & Submenus */
.menu-item-dropdown {
  display: flex;
  flex-direction: column;
}

.menu-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.25s ease;
}

.menu-item-header > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item-header:hover {
  background: var(--glass-highlight);
  color: #ffffff;
}

.submenu-item {
  color: rgba(255, 255, 255, 0.65);
  transition: all 0.25s ease;
  margin-bottom: 2px;
}

.submenu-item:hover {
  background: var(--glass-highlight);
  color: #ffffff;
}

.submenu-item.active {
  background: var(--accent-light) !important;
  color: #ffffff !important;
  font-weight: 600;
}

.arrow-icon {
  font-size: 0.8rem;
  transition: transform 0.25s ease;
}

.arrow-rotate {
  transform: rotate(180deg);
}

.toggle-vars-arrow {
  transition: transform 0.2s ease;
  display: inline-block;
  transform-origin: center;
}

.vars-detail-box {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}
