/* ===== Brilia Global Styles ===== */
:root {
  --primary: #0057B8;
  --primary-dark: #003D82;
  --primary-light: #E8F1FB;
  --accent: #00A36C;
  --accent-light: #E6F7F1;
  --amber: #F59E0B;
  --amber-light: #FEF3C7;
  --dark: #0F172A;
  --gray-900: #1E293B;
  --gray-700: #334155;
  --gray-500: #64748B;
  --gray-400: #94A3B8;
  --gray-200: #E2E8F0;
  --gray-100: #F1F5F9;
  --gray-50: #F8FAFC;
  --white: #FFFFFF;
  --red: #EF4444;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* ===== Typography ===== */
h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: 1.875rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--gray-700); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,87,184,0.35); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-accent {
  background: var(--accent);
  color: var(--white);
}
.btn-accent:hover { background: #008055; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,163,108,0.35); }

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}
.btn-ghost:hover { background: var(--gray-100); border-color: var(--gray-400); }

.btn-sm { padding: 7px 16px; font-size: 0.825rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ===== Nav ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-sm);
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 900;
}

.nav-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 8px 16px 8px 42px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  background: var(--gray-50);
  font-size: 0.875rem;
  color: var(--dark);
  transition: all 0.2s;
}
.nav-search input:focus { outline: none; border-color: var(--primary); background: white; }
.nav-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 14px;
  border-radius: var(--radius);
  color: var(--gray-500);
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  background: none;
  height: 56px;
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--dark); background: var(--gray-100); }
.nav-link.active { color: var(--primary); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}
.nav-link svg { font-size: 1.3rem; }
.nav-link .nav-icon { font-size: 1.05rem; line-height: 1; margin-bottom: 1px; }

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
  cursor: pointer;
  transition: border-color 0.2s;
}
.nav-avatar:hover { border-color: var(--primary); }

.badge {
  background: var(--red);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center;
}

/* ===== Cards ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-hover {
  transition: all 0.25s ease;
}
.card-hover:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ===== Stars ===== */
.stars { color: var(--amber); font-size: 0.85rem; letter-spacing: 1px; }
.rating-count { color: var(--gray-500); font-size: 0.8rem; margin-left: 4px; }

/* ===== Tags / Chips ===== */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-700);
}
.tag-primary { background: var(--primary-light); color: var(--primary); }
.tag-accent { background: var(--accent-light); color: var(--accent); }
.tag-amber { background: var(--amber-light); color: #92400E; }

/* ===== Avatar ===== */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; border: 3px solid var(--white); box-shadow: var(--shadow); }
.avatar-xxl { width: 128px; height: 128px; border: 4px solid var(--white); box-shadow: var(--shadow-lg); }

/* Avatar placeholder */
.avatar-placeholder {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== Form Elements ===== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--dark);
  transition: border-color 0.2s;
  background: white;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,87,184,0.1); }

.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--dark);
  background: white;
  appearance: none;
  cursor: pointer;
}
.form-select:focus { outline: none; border-color: var(--primary); }

/* ===== Divider ===== */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 20px 0;
}

/* ===== Verified badge ===== */
.verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
}
.verified::before { content: '✓'; font-weight: 900; }

/* ===== Status dot ===== */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid white;
}
.status-online { background: var(--accent); }
.status-offline { background: var(--gray-400); }

/* ===== Responsive Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ===== Utility ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.78rem; }
.text-muted { color: var(--gray-500); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Notification Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--dark);
  color: white;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.toast-success { background: var(--accent); }
.toast.toast-error { background: var(--red); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: white;
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: scale(1); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ===== Animations ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.fade-in { animation: fadeIn 0.4s ease forwards; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  .container { padding: 0 16px; }
  .navbar { padding: 0 16px; }
  .nav-search { display: none; }
  .hide-mobile { display: none !important; }
}

/* ===== Style A — Gradient Bubble Icon System ===== */
.nav-icon { display:inline-flex; align-items:center; justify-content:center; line-height:1; }
.nav-icon .nav-icon-bubble { margin:0; }

/* Nav link with bubble: add breathing room */
.nav-link { display:inline-flex; align-items:center; gap:6px; }

/* Sidebar nav items with bubble icon */
.nav-sidebar-item { display:flex; align-items:center; gap:10px; }
.nav-sidebar-item .icon { display:inline-flex; line-height:1; flex-shrink:0; }

/* Ensure bubble doesn't overflow navbar height */
.navbar .nav-icon-bubble { vertical-align:middle; }

/* Active nav link underline stays correct with bubble */
.nav-link.active .nav-icon-bubble {
  box-shadow: 0 0 0 2px rgba(255,255,255,.5), 0 2px 8px rgba(0,0,0,.2);
}
