/* ================================================
   MONYRATNA - MODERN ADMIN DASHBOARD
   Jewellery Golden/Black/White Theme
   Fully Responsive with Bootstrap 5
   ================================================ */

:root {
  /* Jewellery Golden Theme Colors */
  --primary-red: #DAA520;
  --dark-red: #B8860B;
  --darker-red: #8B7500;
  --accent-red: #FFD700;
  
  /* Base Colors */
  --bg-black: #000000;
  --bg-dark: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-sidebar: #0d0d0d;
  
  /* Text Colors */
  --text-white: #ffffff;
  --text-light: #e0e0e0;
  --text-muted: #999999;
  
  /* Borders */
  --border-color: #333333;
  --border-red: rgba(255, 0, 0, 0.3);
  
  /* Spacing */
  --sidebar-width: 260px;
  --topbar-height: 60px;
  --sidebar-collapsed: 70px;
  
  /* Transitions */
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-black);
  color: var(--text-white);
  overflow-x: hidden;
}

/* ===== TOPBAR ===== */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: #131313;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  transition: left var(--transition-speed) ease;
}

.topbar.sidebar-collapsed {
  left: var(--sidebar-collapsed);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 24px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.topbar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user-info i {
  color: var(--text-white);
  font-size: 18px;
}

.topbar-username {
  color: var(--text-white);
  font-weight: 600;
  font-size: 16px;
}

.mobile-logo {
  display: none;
  height: 40px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Notification Dropdown */
.topbar-notifications {
  position: relative;
}

.notification-toggle {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-white);
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.notification-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.notification-toggle i {
  font-size: 18px;
}

.notification-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: var(--primary-red);
  border-radius: 50%;
  border: 2px solid var(--bg-topbar);
}

.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  width: 320px;
  max-height: 400px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1001;
  overflow: hidden;
}

.notification-dropdown.show {
  display: block;
}

.notification-title {
  padding: 15px 20px;
  margin: 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-white);
  font-size: 16px;
  font-weight: 600;
}

.notification-list {
  max-height: 350px;
  overflow-y: auto;
}

.notification-list::-webkit-scrollbar {
  width: 5px;
}

.notification-list::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

.notification-list::-webkit-scrollbar-thumb {
  background: var(--primary-red);
  border-radius: 5px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 20px;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: rgba(255, 0, 0, 0.05);
  color: var(--text-white);
}

.notification-item i {
  font-size: 16px;
  margin-top: 2px;
}

.notification-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.topbar-profile {
  position: relative;
}

.profile-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 15px;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.profile-dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.profile-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid var(--text-white);
}

.profile-name {
  color: var(--text-white);
  font-weight: 600;
  font-size: 14px;
}

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  min-width: 200px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1001;
}

.profile-dropdown.show {
  display: block;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--text-white);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

.profile-dropdown-item:last-child {
  border-bottom: none;
}

.profile-dropdown-item:hover {
  background: rgba(255, 0, 0, 0.1);
}

.profile-dropdown-item i {
  color: var(--primary-red);
  font-size: 16px;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1001;
  transition: width var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--primary-red);
  border-radius: 5px;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-logo {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo img {
  max-width: 150px;
  height: auto;
  transition: all var(--transition-speed) ease;
}

.sidebar.collapsed .sidebar-logo img {
  max-width: 40px;
}

.sidebar-logo h3 {
  color: var(--primary-red);
  margin-top: 10px;
  font-weight: 700;
  transition: opacity var(--transition-speed) ease;
}

.sidebar.collapsed .sidebar-logo h3 {
  opacity: 0;
  height: 0;
  margin: 0;
}

/* Sidebar Menu */
.sidebar-menu {
  padding: 20px 0;
  list-style: none;
}

.sidebar-menu-item {
  margin-bottom: 5px;
}

.sidebar-menu-link {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.sidebar-menu-link:hover {
  background: rgba(255, 0, 0, 0.1);
  color: var(--primary-red);
  padding-left: 28px;
}

.sidebar-menu-link.active {
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.2) 0%, rgba(255, 0, 0, 0.05) 100%);
  color: var(--primary-red);
  border-left: 4px solid var(--primary-red);
  font-weight: 700;
}

.sidebar-menu-link i {
  font-size: 22px;
  min-width: 30px;
  text-align: center;
}

.sidebar-menu-text {
  font-size: 17px;
  font-weight: 600;
  transition: opacity var(--transition-speed) ease;
}

.sidebar.collapsed .sidebar-menu-text {
  opacity: 0;
  width: 0;
}

/* Submenu */
.sidebar-submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.3);
  position: relative;
  margin-left: 20px;
}

.sidebar-menu-item.has-submenu.open .sidebar-submenu {
  max-height: 800px;
  padding: 5px 0;
}

/* Vertical line connecting submenu items */
.sidebar-submenu::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-red), transparent);
  opacity: 0.3;
}

.sidebar-submenu li {
  position: relative;
}

/* Horizontal connector line for each submenu item */
.sidebar-submenu li::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  width: 15px;
  height: 2px;
  background: var(--primary-red);
  opacity: 0.3;
  transform: translateY(-50%);
}

.sidebar-submenu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 55px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

/* Dot indicator for submenu items */
.sidebar-submenu-link::before {
  content: '';
  position: absolute;
  left: 35px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  border: 2px solid var(--bg-sidebar);
  transition: all 0.3s ease;
}

.sidebar-submenu-link:hover {
  color: var(--primary-red);
  padding-left: 60px;
  background: rgba(255, 0, 0, 0.05);
}

.sidebar-submenu-link:hover::before {
  background: var(--primary-red);
  box-shadow: 0 0 10px var(--primary-red);
  transform: scale(1.4);
}

.sidebar-submenu-link.active {
  color: var(--primary-red);
  font-weight: 700;
  background: rgba(255, 0, 0, 0.1);
}

.sidebar-submenu-link.active::before {
  background: var(--primary-red);
  box-shadow: 0 0 12px var(--primary-red);
}

.submenu-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
  font-size: 12px;
  opacity: 0.7;
}

.sidebar-menu-item.has-submenu.open .submenu-arrow {
  transform: rotate(180deg);
  color: var(--primary-red);
  opacity: 1;
}

.sidebar.collapsed .submenu-arrow {
  display: none;
}

/* Collapsed sidebar - hide submenu structure */
.sidebar.collapsed .sidebar-submenu {
  display: none;
}

/* Submenu item icons */
.sidebar-submenu-link i {
  font-size: 15px;
  min-width: 20px;
  opacity: 0.8;
}

.sidebar-submenu-link:hover i,
.sidebar-submenu-link.active i {
  opacity: 1;
  color: var(--primary-red);
  transform: scale(1.1);
}

/* Nested submenu (if you have child items within submenu) */
.sidebar-submenu .sidebar-submenu {
  margin-left: 20px;
}

.sidebar-submenu .sidebar-submenu::before {
  left: 15px;
}

.sidebar-submenu .sidebar-submenu li::before {
  left: 15px;
}

.sidebar-submenu .sidebar-submenu .sidebar-submenu-link {
  padding-left: 70px;
  font-size: 12px;
}

.sidebar-submenu .sidebar-submenu .sidebar-submenu-link::before {
  left: 50px;
  width: 4px;
  height: 4px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 30px;
  min-height: calc(100vh - var(--topbar-height));
  transition: margin-left var(--transition-speed) ease;
}

.main-content.sidebar-collapsed {
  margin-left: var(--sidebar-collapsed);
}

/* ===== DASHBOARD WIDGETS ===== */
.dashboard-header {
  margin-bottom: 30px;
}

.dashboard-title {
  color: var(--text-white);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.dashboard-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

/* Stats Cards */
.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-red) 0%, var(--dark-red) 100%);
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
  border-color: var(--primary-red);
}

.stats-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.stats-card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-white);
  box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.stats-card-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 5px;
}

.stats-card-label {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Income Widgets */
.income-widget {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 0, 0, 0.05) 100%);
  border: 1px solid var(--border-red);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 15px;
  align-items: center;
  transition: all 0.3s ease;
}

.income-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.2);
}

.income-widget-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--darker-red) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

.income-widget-info {
  text-align: right;
}

.income-widget-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.income-widget-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--accent-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  background: #1a1a1a;
  padding: 15px 20px;
  border-bottom: none;
}

.card-title {
  color: var(--text-white);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.card-body {
  padding: 20px;
  color: var(--text-white);
}

/* Tables */
.table {
  color: var(--text-white);
}

.table thead th {
  background: var(--primary-red);
  color: var(--text-white);
  border: none;
  font-weight: 600;
  padding: 12px 15px;
}

.table tbody tr {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

.table tbody tr:hover {
  background: rgba(255, 0, 0, 0.1);
}

.table tbody td {
  padding: 12px 15px;
  border: none;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
  color: var(--text-white);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--dark-red) 0%, var(--darker-red) 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--primary-red);
  color: var(--primary-red);
}

.btn-outline-primary:hover {
  background: var(--primary-red);
  color: var(--text-white);
}

/* Forms */
.form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-white);
  padding: 10px 15px;
  border-radius: 8px;
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-red);
  color: var(--text-white);
  box-shadow: 0 0 0 0.2rem rgba(255, 0, 0, 0.25);
}

.form-label {
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Badges */
.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 11px;
}

.badge-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.badge-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.badge-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.badge-primary {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .topbar {
    left: 0;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .topbar-user-info {
    display: none;
  }
  
  .mobile-logo {
    display: block;
  }
  
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 20px 15px;
  }
  
  .dashboard-title {
    font-size: 24px;
  }
  
  .stats-card-value {
    font-size: 24px;
  }
  
  .income-widget {
    grid-template-columns: 50px 1fr;
    gap: 10px;
    padding: 15px;
  }
  
  .income-widget-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .income-widget-value {
    font-size: 20px;
  }
  
  .profile-name {
    display: none;
  }
}

@media (max-width: 576px) {
  .topbar {
    padding: 0 15px;
  }
  
  .topbar-username {
    font-size: 14px;
  }
  
  .card-body {
    padding: 15px;
  }
  
  .stats-card {
    padding: 15px;
  }
}

/* ===== PAGE TITLE & BREADCRUMB ===== */
.page-title {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.3) 100%);
  padding: 10px 0;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--primary-red);
  border-left: 4px solid var(--primary-red);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-title .row {
  align-items: center;
  margin: 0;
  padding: 0 15px;
}

.page-title h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-white);
  margin: 0;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title h3 i {
  color: var(--primary-red);
  font-size: 1.25rem;
}

.breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 3px;
  list-style: none;
}

.breadcrumb-item {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  padding: 0 6px;
  color: var(--primary-red);
  opacity: 0.6;
  font-size: 1rem;
  font-weight: 700;
}

.breadcrumb-item a {
  color: var(--primary-red);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 0, 0, 0.05);
}

.breadcrumb-item a:hover {
  color: #ffffff;
  text-decoration: none;
  background: rgba(255, 0, 0, 0.2);
  transform: translateY(-1px);
}

.breadcrumb-item a svg,
.breadcrumb-item a i {
  width: 14px;
  height: 14px;
  font-size: 13px;
}

.breadcrumb-item.active {
  color: var(--text-white);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

/* Responsive Breadcrumb */
@media (max-width: 767px) {
  .page-title {
    padding: 8px 0;
    margin-bottom: 12px;
  }
  
  .page-title .row {
    padding: 0 10px;
  }
  
  .page-title h3 {
    font-size: 1.125rem;
    margin-bottom: 6px;
  }
  
  .page-title h3 i {
    font-size: 1rem;
  }
  
  .breadcrumb {
    justify-content: flex-start;
    font-size: 0.75rem;
    gap: 2px;
  }
  
  .breadcrumb-item {
    font-size: 0.75rem;
  }
  
  .breadcrumb-item + .breadcrumb-item::before {
    padding: 0 4px;
    font-size: 0.875rem;
  }
  
  .breadcrumb-item a,
  .breadcrumb-item.active {
    padding: 2px 6px;
  }
}

/* ===== UTILITIES ===== */
.text-red {
  color: var(--primary-red) !important;
}

.bg-red {
  background: var(--primary-red) !important;
}

.border-red {
  border-color: var(--primary-red) !important;
}

/* Loading Spinner */
.spinner-border {
  color: var(--primary-red);
}

/* Alerts */
.alert {
  border-radius: 8px;
  border: none;
}

.alert-success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.alert-info {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}
