/* Professional Salon Management System Theme */
:root {
  /* Palette */
  --color-primary: #2563eb;
  /* Professional Blue */
  --color-primary-hover: #1d4ed8;
  --color-secondary: #475569;
  /* Slate Gray */
  --color-accent: #0891b2;
  /* Cyan Accent */
  --color-success: #10b981;
  /* Green for success */

  /* Backgrounds */
  --color-bg: #f8fafc;
  /* Clean light gray background */
  --color-surface: #ffffff;
  /* Pure white surface */
  --color-surface-alt: #f1f5f9;
  /* Light slate for active states */

  /* Text */
  --color-text: #1e293b;
  /* Dark slate */
  --muted-text: #64748b;
  /* Muted slate */
  --heading-color: #334155;

  /* Borders & Shadows */
  --color-border: #e2e8f0;
  /* Subtle gray border */
  --radius: 12px;
  /* Professional rounded corners */
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.15);
  --focus-ring: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);

  --sidebar-width: 270px;
  --font-main: 'Outfit', sans-serif;
}

html,
body {
  height: 100%;
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

/* Typography */
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
  color: var(--heading-color);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.text-muted {
  color: var(--muted-text) !important;
}

.text-primary {
  color: var(--color-primary) !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

/* Topbar */
.navbar {
  background-color: var(--color-surface) !important;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.navbar-brand {
  font-weight: 700;
  color: var(--color-primary) !important;
  font-size: 1.25rem;
}

.navbar .nav-link {
  color: var(--heading-color);
  font-weight: 500;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--color-primary);
}

/* Smooth interactions */
a,
.btn,
.nav-link,
.card {
  transition: all .2s ease;
}

* {
  outline: none;
}

*:focus-visible {
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/***** Layout *****/
.app-wrapper {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Sidebar - Professional & Sleek */
.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.04);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.75rem 0 0.5rem 0;
}

/* Backdrop for mobile sidebar */
.sidebar-backdrop {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 42, 46, 0.5);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 1025;
}

.sidebar-backdrop.show {
  display: block;
}

/* Brand Section */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(30, 64, 175, 0.2);
}

.brand-icon i {
  color: white;
  font-size: 0.9375rem;
}

.brand-text {
  flex: 1;
  line-height: 1.2;
}

.brand-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--heading-color);
  letter-spacing: -0.2px;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--muted-text);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem;
}

.sidebar-nav .nav {
  gap: 0.125rem;
}

.sidebar .nav-link {
  color: var(--muted-text);
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-decoration: none;
}

.sidebar .nav-link i {
  color: var(--muted-text);
  width: 20px;
  text-align: center;
  font-size: 1.05rem;
  transition: all 0.25s;
}

.sidebar .nav-link span {
  flex: 1;
}

.sidebar .nav-link:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--color-primary);
  transform: translateX(3px);
}

.sidebar .nav-link:hover i {
  color: var(--color-primary);
  transform: scale(1.1);
}

.sidebar .nav-link.active {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

.sidebar .nav-link.active i {
  color: white;
}

/* Dropdown Menu */
.nav-item.has-dropdown .nav-link {
  padding-right: 0.75rem;
}

.dropdown-icon {
  width: 16px !important;
  font-size: 0.75rem !important;
  margin-left: auto;
  transition: transform 0.3s ease;
}

.nav-link[aria-expanded="true"] .dropdown-icon {
  transform: rotate(180deg);
}

.submenu {
  padding: 0.375rem 0 0.375rem 0;
  margin-left: 1rem;
  border-left: 2px solid #e5e7eb;
  gap: 0.125rem;
}

.submenu .nav-link {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  margin-left: 0.5rem;
}

.submenu .nav-link i {
  font-size: 0.85rem;
}

.submenu .nav-link.active {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  color: var(--color-primary);
  border-left: 3px solid var(--color-primary);
  padding-left: calc(0.875rem - 3px);
}

.submenu .nav-link.active i {
  color: var(--color-primary);
}

/* Section Dividers */
.nav-divider {
  padding: 1rem 1rem 0.5rem;
  margin-top: 0.75rem;
  list-style: none;
}

.nav-divider span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  display: block;
}

.nav-divider:first-child {
  margin-top: 0;
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.main-content {
  flex: 1;
  padding: 2rem;
  padding-bottom: 1rem;
  background-image: radial-gradient(circle at top right, #fff0f5 0%, transparent 25%),
    radial-gradient(circle at bottom left, #fff8e1 0%, transparent 25%);
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-width: 575.98px) {
  .main-content {
    padding: 1rem;
  }
}

/***** Cards *****/
.card {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-kpi {
  border-left: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-kpi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px 0 0 4px;
}

/* Color Variants */
.card-kpi-purple::before {
  background: #2563eb;
}

.card-kpi-purple .kpi-icon {
  color: rgba(37, 99, 235, 0.15);
}

.card-kpi-purple .kpi-value {
  color: #2563eb;
}

.card-kpi-green::before {
  background: #10b981;
}

.card-kpi-green .kpi-icon {
  color: rgba(16, 185, 129, 0.15);
}

.card-kpi-green .kpi-value {
  color: #059669;
}

.card-kpi-orange::before {
  background: #0891b2;
}

.card-kpi-orange .kpi-icon {
  color: rgba(8, 145, 178, 0.15);
}

.card-kpi-orange .kpi-value {
  color: #0e7490;
}

.card-kpi-pink::before {
  background: #475569;
}

.card-kpi-pink .kpi-icon {
  color: rgba(71, 85, 105, 0.15);
}

.card-kpi-pink .kpi-value {
  color: #475569;
}


.card-kpi .card-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-text);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-kpi .kpi-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.kpi-icon {
  font-size: 3.5rem;
  line-height: 1;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Card Header */
.card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  color: var(--heading-color);
}

.card .card-body {
  padding: 1.5rem;
}

/* Buttons */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  padding: 0.5rem 1.25rem;
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn-accent {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1d4ed8 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-accent:hover {
  color: white;
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-outline-secondary {
  border-color: var(--color-border);
  color: var(--muted-text);
  background: white;
}

.btn-outline-secondary:hover {
  background: var(--color-surface-alt);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Tables */
.table {
  margin-bottom: 0;
}

.table thead th {
  background-color: #fff9fc;
  color: var(--muted-text);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--color-border);
  padding: 1rem;
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
  color: var(--heading-color);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background-color: var(--color-surface-alt);
}

/* Badges */
.badge {
  padding: 0.5em 0.85em;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.text-bg-success {
  background-color: rgba(32, 201, 151, 0.15) !important;
  color: #0f7a5a !important;
}

.text-bg-warning {
  background-color: rgba(253, 126, 20, 0.15) !important;
  color: #b35204 !important;
}

/* Responsive Sidebar */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    z-index: 1030;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    left: 0;
  }
}

/* User Avatar Icon */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.2);
}

.user-avatar i {
  color: #ffffff;
  font-size: 0.95rem;
}

.nav-link:hover .user-avatar {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.35);
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}