/* === dashboard-style.css (Final Desktop Styles with Scroll Fix) === */

/* ==================================================
   1. ROOT VARIABLES & THEME
   ================================================== */
:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --primary-500: #3730a3;
  --secondary-500: #6366f1;
  --secondary-color: #64748b;
  --background-color: #f1f5f9;
  --card-background: #ffffff;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --danger-color: #991b1b;
  --danger-500: #dc2626;
  --danger-bg: #fee2e2;
  --danger-hover-bg: #fecaca;

  --font-family: 'Lexend', sans-serif;

  --radius: 0.75rem;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --transition-speed: 0.2s;
  --header-height: 73px;
  --sidebar-left-width: 260px;
  --sidebar-right-width: 300px;
}

/* ==================================================
   2. MODERN SCROLLBAR STYLES
   ================================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--secondary-color);
}

/* ==================================================
   3. GLOBAL STYLES & LAYOUT
   ================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body.dashboard-body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ==================================================
   4. HEADER
   ================================================== */
.dashboard-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  background-color: var(--card-background);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}
.header-left-section,
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-logo {
  height: 40px;
  width: auto;
}
.logo-container h1 {
  font-size: 1.25rem;
  font-weight: 600;
}
.header-nav.right-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-icon,
.header-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-speed) ease-in-out;
}
.header-icon:hover {
  color: var(--primary-color);
  background-color: #ede9fe;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.header-icon i {
  font-size: 1.1rem;
}
.header-profile {
  position: relative;
  border: 2px solid var(--border-color);
}
.header-profile img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.header-profile:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color);
}
#right-sidebar-toggle .icon-open {
    display: inline-block;
}
#right-sidebar-toggle .icon-close {
    display: none;
}

#right-sidebar-toggle.is-active .icon-open {
    display: none;
}
#right-sidebar-toggle.is-active .icon-close {
    display: inline-block;
}
/* Dropdown */
.dropdown {
  position: relative;
}
.dropdown-content {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background-color: var(--card-background);
  border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  border: 1px solid var(--border-color);
  width: 240px;
  padding: 0.5rem 0;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}
.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-header {
  padding: 0.75rem 1rem;
  font-weight: 600;
}
.dropdown-empty {
  padding: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.dropdown-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 0.5rem 0;
}
.dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all var(--transition-speed) ease;
}
.dropdown-item:hover {
  background-color: #f8f9fa;
  color: var(--text-primary);
}
.dropdown-item-danger:hover {
  background-color: var(--danger-bg);
  color: var(--danger-color);
}

/* ==================================================
   5. SIDEBARS & CONTENT AREA
   ================================================== */
.sidebar {
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--card-background);
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 999;
}
.left-sidebar {
  width: var(--sidebar-left-width);
  left: 0;
  border-right: 1px solid var(--border-color);
}
.right-sidebar {
  width: var(--sidebar-right-width);
  right: 0;
  border-left: 1px solid var(--border-color);
}
.main-content {
    position: relative;
    height: 100vh;          /* lock viewport height */
    overflow-y: auto;       /* scroll inside this container */
    flex-grow: 1;
    padding-left: var(--sidebar-left-width);
    padding-right: var(--sidebar-right-width);
    padding-bottom: 5rem;   /* space for buttons */
    box-sizing: border-box;
}
.notification-link{
	text-decoration: none !important;
}
.layout-two-column .main-content {
  padding-right: 0; 
}
.main-content > div {
  padding: 2rem;
}

/* --- FINAL: Polished Service Grid & Card Styles --- */

/* The grid container for the service cards */
.service-grid {
    display: grid;
    /* Creates a responsive grid that fits as many cards as possible */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

/* The individual service card styling */
.service-card {
    display: flex;
    flex-direction: column; /* Stacks the icon and text vertically */
    align-items: center;    /* Centers content horizontally */
    justify-content: center;/* Centers content vertically */
    padding: 24px 16px;
    background-color: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: #374151; /* Default text color */
    transition: all 0.2s ease-in-out;
    min-height: 140px; /* Ensures all cards have the same height */
}

/* Hover effect for the card */
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.1);
    border-color: #93C5FD; /* Blue accent border */
    color: #2563EB; /* Blue accent text/icon color */
}

/* Styling for the icon inside the card */
.service-card i {
    font-size: 32px; /* Makes the icon larger */
    margin-bottom: 16px; /* Creates space between the icon and the name */
}

/* Styling for the service name text */
.service-card span {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* ==================================================
   6. NAVIGATION
   ================================================== */
.main-nav {
  flex-grow: 1;
}
.main-nav h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 1.5rem 0 0.75rem;
}
.main-nav ul {
  list-style: none;
}
.main-nav ul li a {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-speed);
}
.main-nav ul li a i {
  width: 20px;
  text-align: center;
  margin-right: 0.75rem;
}
.main-nav ul li.active a,
.form-steps-nav li.is-active a {
  background-color: #ede9fe;
  color: var(--primary-color);
  font-weight: 600;
}
.main-nav ul li a:hover {
  background-color: #f8f9fa;
  color: var(--text-primary);
}
.nav-badge {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  font-weight: 600;
  margin-left: auto;
}
/* This is your Floating Action Button (FAB) */
#mobile-cost-toggle {
    display: none; /* Hidden by default on desktop */
    position: fixed;
    bottom: 20px;
    right: 20px; /* Positioned at the bottom-right */
    z-index: 999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

#mobile-cost-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    /* Show the floating button on mobile */
    #mobile-cost-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* By default, the right sidebar is hidden off-screen to the right */
    .sidebar.right-sidebar {
        position: fixed;
        top: 73px;
        right: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000; /* Ensure it's below the left sidebar but above content */
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    /* When toggled, the right sidebar slides into view */
    .sidebar.right-sidebar.is-visible {
        transform: translateX(0);
    }
}
.sidebar-close-btn {
    display: none; /* Hidden by default */
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1010; /* Ensure it's on top of sidebar content */
    transition: all 0.2s ease-in-out;
}

.sidebar-close-btn:hover {
    transform: rotate(90deg);
    color: var(--error-color);
}

/* 2. Rule to SHOW the 'X' button ONLY when the sidebar is open */
.sidebar.right-sidebar.is-visible .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. Add a transition to the main floating button for a smooth fade */
#mobile-cost-toggle {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    opacity: 1;
}

/* 4. Rule to HIDE the main floating button when the sidebar is open */
.sidebar.right-sidebar.is-visible ~ #mobile-cost-toggle {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none; /* Prevent clicking the invisible button */
}
/* ==================================================
   7. BUTTONS
   ================================================== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-family: var(--font-family);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-speed);
  width: 100%;
}
.btn i {
  font-size: 1rem;
}
.btn-primary {
  background-color: var(--primary-color);
  color: white;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}
.btn-secondary {
  background-color: var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background-color: #d1d5db;
}
.btn-logout {
  margin-top: auto;
  background-color: var(--danger-bg);
  color: var(--danger-color);
}
.btn-logout:hover {
  background-color: var(--danger-hover-bg);
}

/* ==================================================
   8. COST SUMMARY
   ================================================== */
.cost-summary-card {
  flex-grow: 1;
}
.cost-summary-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}
.cost-summary-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.cost-items {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}
.cost-items .empty-costs {
  text-align: center;
  padding: 2rem 0;
  font-style: italic;
}
.cost-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  animation: slideIn 0.4s ease-out;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.cost-item .item-name {
  color: var(--text-secondary);
}
.cost-item .item-price {
  font-weight: 500;
}
.cost-total {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 1.1rem;
}
.cost-total .total-amount {
  font-size: 1.5rem;
  color: var(--primary-color);
}
/* --- FINAL: Action Cards Grid Styles --- */
.action-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #E5E7EB;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.1);
    border-color: #93C5FD; /* A subtle blue border on hover */
}

.action-card .card-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Icon color variations */
.card-icon.icon-purple { background-color: #E0E7FF; color: #6366F1; }
.card-icon.icon-green { background-color: #D1FAE5; color: #059669; }
.card-icon.icon-orange { background-color: #FEF3C7; color: #D97706; }

.action-card .card-content { flex-grow: 1; }
.action-card .card-content h4 { margin: 0 0 4px 0; font-size: 16px; font-weight: 600; color: #111827; }
.action-card .card-content p { margin: 0; font-size: 14px; color: #6B7280; line-height: 1.4; }

.action-card .card-arrow {
    font-size: 16px;
    color: #9CA3AF;
    transition: transform 0.2s ease;
}

.action-card:hover .card-arrow {
    transform: translateX(5px);
}