/* ===================================
   NUMERALIA DASHBOARD - Professional UI
   =================================== */

:root {
  --primary-blue: #0a2f5c;
  --secondary-blue: #1a4d8f;
  --accent-gold: #f4b942;
  --success-green: #27ae60;
  --text-light: #ffffff;
  --text-dark: #2c3e50;
  --bg-light: #f5f7fa;
  --border-color: #e1e8ed;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ===================================
   TOP NAVIGATION BAR (like BrainRooms)
   =================================== */

.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(135deg, #1a1f3a 0%, #0f1428 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  z-index: 2000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.top-navbar-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.top-brand {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.top-brand-name {
  font-size: 20px;
  font-weight: 700;
  color: #27ae60;
  margin: 0;
  letter-spacing: 2px;
  font-family: 'Cinzel', serif;
  text-shadow: 0 0 15px rgba(39, 174, 96, 0.6);
}

.top-brand-tagline {
  font-size: 11px;
  color: #f4b942;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  text-shadow: 0 0 15px rgba(244, 185, 66, 0.3);
}

.top-navbar-icons {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.top-nav-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
}

.top-nav-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.top-navbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.notification-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.notification-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.notification-btn .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f4b942;
  color: #0a2f5c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.top-user-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(244, 185, 66, 0.3);
}

/* ===================================
   LAYOUT GRID
   =================================== */

.dashboard-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "sidebar header"
    "sidebar main";
  min-height: 100vh;
  padding-top: 70px;
}

/* ===================================
   SIDEBAR
   =================================== */

.sidebar {
  grid-area: sidebar;
  background: linear-gradient(180deg, #062c5f 0%, #051f45 100%);
  color: var(--text-light);
  padding: 0;
  position: fixed;
  width: 260px;
  height: calc(100vh - 70px);
  top: 70px;
  overflow-y: auto;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.sidebar::-webkit-scrollbar {
  width: 12px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.sidebar::-webkit-scrollbar-thumb {
  background: #f4b942;
  border-radius: 6px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #ffc952;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.sidebar-brand h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
  margin: 0;
  letter-spacing: 1px;
}

.sidebar-brand p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.sidebar-profile {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent-gold);
  margin: 0 auto 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #f4b942;
  font-family: 'Cinzel', serif;
  letter-spacing: 2px;
  text-shadow: 0 0 15px rgba(244, 185, 66, 0.5);
}

.profile-role {
  font-size: 18px;
  color: #f4b942;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  letter-spacing: 1px;
}

.sidebar-menu {
  padding: 20px 0;
}

.menu-section {
  margin-bottom: 24px;
}

.menu-section-title {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0 20px 8px;
  font-weight: 600;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 18px;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border-left-color: var(--accent-gold);
}

.menu-item.active {
  background: rgba(244, 185, 66, 0.15);
  color: var(--accent-gold);
  border-left-color: var(--accent-gold);
  font-weight: 600;
}

.menu-item-icon {
  font-size: 20px;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

/* ===================================
   HEADER
   =================================== */

.dashboard-header {
  grid-area: header;
  background: white;
  padding: 20px 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: 260px;
  position: sticky;
  top: 70px;
  z-index: 100;
}

.header-title h2 {
  font-size: 28px;
  color: var(--primary-blue);
  font-weight: 700;
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-selector {
  display: flex;
  gap: 8px;
}

.lang-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-dark);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-transform: uppercase;
}

.lang-btn:hover,
.lang-btn.active {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.header-user:hover {
  background: var(--bg-light);
}

.header-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ===================================
   MAIN CONTENT
   =================================== */

.dashboard-main {
  grid-area: main;
  padding: 40px;
  margin-left: 260px;
  min-height: calc(100vh - 80px);
}

/* ===================================
   STATS CARDS
   =================================== */

.stats-grid {
  display: flex;
  justify-content: flex-start;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #e8edf2;
  position: relative;
  width: 260px;
  flex: 0 0 260px;
  text-align: left !important;
}

.stat-card * {
  text-align: left !important;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
  border-color: #d0dae6;
}

.stat-card-header {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 20px;
}

.stat-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: #0d3b66;
  color: white;
  flex-shrink: 0;
}

.stat-card.success .stat-card-icon {
  background: #10b981;
}

.stat-card.warning .stat-card-icon {
  background: #fbbf24;
}

.stat-card.info .stat-card-icon {
  background: #3b82f6;
}

.stat-value {
  font-size: 42px;
  font-weight: 700;
  color: #0d3b66;
  margin-bottom: 6px;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: #8c9aa8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

/* ===================================
   TABLE
   =================================== */

.data-table-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #e8edf2;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 28px;
  border-bottom: 1px solid #e8edf2;
  background: #fafbfc;
}

.table-header h3 {
  font-size: 22px;
  color: #0d3b66;
  font-weight: 700;
  margin: 0;
}

.btn-primary {
  padding: 12px 20px;
  background: #0d3b66;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(13, 59, 102, 0.2);
}

.btn-primary:hover {
  background: #0f4478;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 59, 102, 0.3);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f8f9fa;
}

.data-table th {
  padding: 18px 28px;
  text-align: left;
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  border-bottom: 1px solid #e8edf2;
  background: #fafbfc;
}

.data-table td {
  padding: 22px 28px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: #1f2937;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: all 0.2s ease;
  background: white;
}

.data-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.data-table tbody tr:hover {
  background: #f0f4f8;
  box-shadow: inset 0 0 0 1px #e8edf2;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  padding: 9px 18px;
  border: none;
  background: #0d3b66;
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-action:hover {
  background: #0f4478;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(13, 59, 102, 0.25);
}

.btn-action.success {
  background: #10b981;
}

.btn-action.success:hover {
  background: #059669;
}

.status-badge {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

.status-badge.new {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.active {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1024px) {
  .dashboard-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main";
  }

  .sidebar {
    position: fixed;
    left: -260px;
    transition: left 0.3s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .dashboard-header,
  .dashboard-main {
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    padding: 16px 20px;
  }

  .dashboard-main {
    padding: 20px;
  }

  .header-title h2 {
    font-size: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .table-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .data-table {
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 12px;
  }
}

/* ===================================
   UTILITIES
   =================================== */

.text-center {
  text-align: center;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-40 {
  margin-bottom: 40px;
}

.mt-40 {
  margin-top: 40px;
}

.hidden {
  display: none;
}
