 :root {
     --primary: #6366f1;
     --primary-dark: #4f46e5;
     --secondary: #f43f5e;
     --success: #10b981;
     --warning: #f59e0b;
     --danger: #ef4444;
     --dark: #1e293b;
     --light: #f8fafc;
     --gray-100: #f1f5f9;
     --gray-200: #e2e8f0;
     --gray-300: #cbd5e1;
     --gray-600: #475569;
     --gray-700: #334155;
     --gray-800: #1e293b;
     --shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
     --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
     --radius: 12px;
     --transition: all .3s cubic-bezier(.4, 0, .2, 1);
     --sidebar-width: 280px;
     --sidebar-collapsed-width: 80px;
 }

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

 body {
     font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
     background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
     min-height: 100vh;
     color: var(--gray-800);
     line-height: 1.6;
     display: flex;
 }

 /* Sidebar */
 .sidebar {
     width: var(--sidebar-width);
     background: rgba(255, 255, 255, .95);
     backdrop-filter: blur(20px);
     border-right: 1px solid rgba(255, 255, 255, .2);
     height: 100vh;
     position: fixed;
     left: 0;
     top: 0;
     overflow-y: auto;
     transition: var(--transition);
     z-index: 1000;
     box-shadow: var(--shadow-lg);
 }

 .sidebar.collapsed {
     width: var(--sidebar-collapsed-width)
 }

 .sidebar-header {
     padding: 1.5rem;
     border-bottom: 1px solid var(--gray-200);
     display: flex;
     align-items: center;
     justify-content: space-between
 }

 .logo {
     display: flex;
     align-items: center;
     gap: .75rem;
     color: var(--primary);
     font-weight: 700;
     font-size: 1.25rem
 }

 .logo-icon {
     font-size: 1.5rem
 }

 .logo-text {
     transition: opacity .3s ease
 }

 .sidebar.collapsed .logo-text {
     opacity: 0;
     width: 0;
     overflow: hidden
 }

 .toggle-sidebar {
     background: none;
     border: none;
     color: var(--gray-600);
     cursor: pointer;
     padding: .5rem;
     border-radius: var(--radius);
     transition: var(--transition)
 }

 .toggle-sidebar:hover {
     background: var(--gray-100);
     color: var(--primary)
 }

 .sidebar-nav {
     padding: 1rem 0
 }

 .nav-section {
     margin-bottom: 1.5rem
 }

 .nav-title {
     font-size: .75rem;
     text-transform: uppercase;
     letter-spacing: .05em;
     color: var(--gray-500);
     padding: 0 1.5rem;
     margin-bottom: .5rem;
     transition: opacity .3s ease
 }

 .sidebar.collapsed .nav-title {
     opacity: 0;
     height: 0;
     overflow: hidden;
     margin: 0;
     padding: 0
 }

 .nav-item {
     display: flex;
     align-items: center;
     padding: .75rem 1.5rem;
     color: var(--gray-700);
     text-decoration: none;
     transition: var(--transition);
     position: relative
 }

 .nav-item:hover {
     background: var(--gray-100);
     color: var(--primary)
 }

 .nav-item.active {
     background: rgba(99, 102, 241, .1);
     color: var(--primary);
     border-right: 3px solid var(--primary)
 }

 .nav-icon {
     width: 24px;
     height: 24px;
     display: flex;
     align-items: center;
     justify-content: center;
     margin-right: .75rem;
     transition: var(--transition)
 }

 .nav-text {
     transition: opacity .3s ease;
     font-weight: 500
 }

 .sidebar.collapsed .nav-text {
     opacity: 0;
     width: 0;
     overflow: hidden
 }

 .nav-badge {
     background: var(--primary);
     color: #fff;
     border-radius: 20px;
     padding: .25rem .5rem;
     font-size: .75rem;
     margin-left: auto
 }

 .sidebar-footer {
     padding: 1rem 1.5rem;
     border-top: 1px solid var(--gray-200);
     margin-top: auto
 }

 .user-profile {
     display: flex;
     align-items: center;
     gap: .75rem
 }

 .user-avatar {
     width: 40px;
     height: 40px;
     border-radius: 50%;
     background: linear-gradient(135deg, var(--primary), var(--secondary));
     display: flex;
     align-items: center;
     justify-content: center;
     color: #fff;
     font-weight: 600
 }

 .user-info {
     transition: opacity .3s ease
 }

 .sidebar.collapsed .user-info {
     opacity: 0;
     width: 0;
     overflow: hidden
 }

 .user-name {
     font-weight: 600;
     color: var(--dark)
 }

 .user-role {
     font-size: .875rem;
     color: var(--gray-600)
 }

 /* Main content wrapper */
 .main-content {
     flex: 1;
     margin-left: var(--sidebar-width);
     transition: var(--transition);
     min-height: 100vh;
     display: flex;
     flex-direction: column;
 }

 .main-content.expanded {
     margin-left: var(--sidebar-collapsed-width)
 }

 /* Container: make it flush with sidebar & full width */
 .dashboard-container {
     /* was: max-width:1400px; margin:0 auto; */
     max-width: none;
     width: 100%;
     margin: 0;
     /* remove centering gap */
     padding: 2rem;
     flex: 1;
 }

 .dashboard-header {
     background: rgba(255, 255, 255, .95);
     backdrop-filter: blur(20px);
     border-radius: var(--radius);
     padding: 2rem;
     margin-bottom: 2rem;
     box-shadow: var(--shadow-lg);
     border: 1px solid rgba(255, 255, 255, .2);
 }

 .header-content {
     display: flex;
     justify-content: space-between;
     align-items: center;
     flex-wrap: wrap;
     gap: 1rem
 }

 .welcome-section h1 {
     font-size: 2.5rem;
     font-weight: 800;
     background: linear-gradient(135deg, var(--primary), var(--secondary));
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     margin-bottom: .5rem
 }

 .welcome-section p {
     color: var(--gray-600);
     font-size: 1.1rem
 }

 .quick-stats {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
     gap: 1.5rem;
     margin: 2rem 0
 }

 .stat-card {
     background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
     padding: 1.5rem;
     border-radius: var(--radius);
     box-shadow: var(--shadow);
     border: 1px solid var(--gray-200);
     transition: var(--transition);
     position: relative;
     overflow: hidden
 }

 .stat-card::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     width: 4px;
     height: 100%;
     background: linear-gradient(135deg, var(--primary), var(--secondary))
 }

 .stat-card:hover {
     transform: translateY(-5px);
     box-shadow: var(--shadow-lg)
 }

 .stat-card.pending {
     --accent: var(--warning)
 }

 .stat-card.completed {
     --accent: var(--success)
 }

 .stat-card.overdue {
     --accent: var(--danger)
 }

 .stat-card.team {
     --accent: var(--primary)
 }

 .stat-number {
     font-size: 2.5rem;
     font-weight: 800;
     color: var(--accent);
     line-height: 1;
     margin-bottom: .5rem
 }

 .stat-label {
     color: var(--gray-600);
     font-weight: 600;
     font-size: .9rem;
     text-transform: uppercase;
     letter-spacing: .05em
 }

 .dashboard-grid {
     display: grid;
     grid-template-columns: 2fr 1fr;
     gap: 2rem;
     margin-top: 2rem
 }

 @media (max-width:1024px) {
     .dashboard-grid {
         grid-template-columns: 1fr
     }
 }

 .tasks-section,
 .reports-section,
 .quick-actions-section,
 .progress-section,
 .deadlines-section {
     background: rgba(255, 255, 255, .95);
     backdrop-filter: blur(20px);
     border-radius: var(--radius);
     padding: 2rem;
     box-shadow: var(--shadow-lg);
     border: 1px solid rgba(255, 255, 255, .2);
     margin-bottom: 2rem
 }

 .section-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 1.5rem
 }

 .section-header h2 {
     font-size: 1.5rem;
     font-weight: 700;
     color: var(--dark)
 }

 .view-all {
     color: var(--primary);
     text-decoration: none;
     font-weight: 600;
     font-size: .9rem;
     transition: var(--transition)
 }

 .view-all:hover {
     color: var(--primary-dark)
 }

 .task-list {
     display: flex;
     flex-direction: column;
     gap: 1rem
 }

 .task-card {
     background: #fff;
     padding: 1.5rem;
     border-radius: var(--radius);
     box-shadow: var(--shadow);
     border-left: 4px solid var(--primary);
     transition: var(--transition);
     cursor: pointer
 }

 .task-card:hover {
     transform: translateX(5px);
     box-shadow: var(--shadow-lg)
 }

 .task-card.urgent {
     border-left-color: var(--danger);
     background: linear-gradient(135deg, #fff, #fef2f2)
 }

 .task-card.high-priority {
     border-left-color: var(--warning);
     background: linear-gradient(135deg, #fff, #fffbeb)
 }

 .task-header {
     display: flex;
     justify-content: space-between;
     align-items: flex-start;
     margin-bottom: 1rem
 }

 .task-title {
     font-weight: 600;
     color: var(--dark);
     font-size: 1.1rem;
     margin-bottom: .5rem
 }

 .task-priority {
     padding: .25rem .75rem;
     border-radius: 20px;
     font-size: .75rem;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: .05em
 }

 .priority-high {
     background: var(--danger);
     color: #fff
 }

 .priority-medium {
     background: var(--warning);
     color: #fff
 }

 .priority-low {
     background: var(--success);
     color: #fff
 }

 .task-meta {
     display: flex;
     gap: 1rem;
     color: var(--gray-600);
     font-size: .9rem
 }

 .task-due {
     display: flex;
     align-items: center;
     gap: .5rem
 }

 .task-actions {
     display: flex;
     gap: .5rem;
     margin-top: 1rem
 }

 .report-list {
     display: flex;
     flex-direction: column;
     gap: 1rem
 }

 .report-card {
     background: #fff;
     padding: 1.5rem;
     border-radius: var(--radius);
     box-shadow: var(--shadow);
     border-left: 4px solid var(--primary);
     transition: var(--transition)
 }

 .report-card:hover {
     transform: translateX(5px);
     box-shadow: var(--shadow-lg)
 }

 .report-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 1rem
 }

 .report-title {
     font-weight: 600;
     color: var(--dark);
     font-size: 1.1rem
 }

 .report-date {
     color: var(--gray-600);
     font-size: .9rem
 }

 .report-status {
     padding: .25rem .75rem;
     border-radius: 20px;
     font-size: .75rem;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: .05em;
     display: inline-block;
     margin-bottom: 1rem
 }

 .status-pending {
     background: var(--warning);
     color: #fff
 }

 .status-completed {
     background: var(--success);
     color: #fff
 }

 .status-in-progress {
     background: var(--primary);
     color: #fff
 }

 .btn {
     padding: .75rem 1.5rem;
     border: none;
     border-radius: var(--radius);
     font-weight: 600;
     font-size: .9rem;
     cursor: pointer;
     transition: var(--transition);
     text-decoration: none;
     display: inline-flex;
     align-items: center;
     gap: .5rem;
     justify-content: center
 }

 .btn-primary {
     background: linear-gradient(135deg, var(--primary), var(--primary-dark));
     color: #fff
 }

 .btn-primary:hover {
     transform: translateY(-2px);
     box-shadow: 0 8px 25px -8px var(--primary)
 }

 .btn-success {
     background: linear-gradient(135deg, var(--success), #059669);
     color: #fff
 }

 .btn-danger {
     background: linear-gradient(135deg, var(--danger), #dc2626);
     color: #fff
 }

 .btn-outline {
     background: transparent;
     border: 2px solid var(--gray-300);
     color: var(--gray-700)
 }

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

 .btn-sm {
     padding: .5rem 1rem;
     font-size: .8rem
 }

 .quick-actions-grid {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 1rem
 }

 .action-card {
     background: linear-gradient(135deg, #fff, var(--gray-100));
     padding: 1.5rem;
     border-radius: var(--radius);
     text-align: center;
     text-decoration: none;
     color: var(--gray-700);
     transition: var(--transition);
     border: 1px solid var(--gray-200)
 }

 .action-card:hover {
     transform: translateY(-3px);
     box-shadow: var(--shadow-lg);
     color: var(--primary);
     border-color: var(--primary)
 }

 .action-icon {
     font-size: 2rem;
     margin-bottom: .5rem;
     opacity: .8
 }

 .progress-bar {
     background: var(--gray-200);
     border-radius: 10px;
     height: 8px;
     overflow: hidden;
     margin: 1rem 0
 }

 .progress-fill {
     height: 100%;
     background: linear-gradient(135deg, var(--primary), var(--secondary));
     border-radius: 10px;
     transition: width .5s ease
 }

 .progress-value {
     font-weight: 600;
     color: var(--dark)
 }

 .deadlines-list {
     display: flex;
     flex-direction: column;
     gap: 1rem
 }

 .deadline-item {
     background: #fff;
     padding: 1rem;
     border-radius: var(--radius);
     box-shadow: var(--shadow);
     border-left: 4px solid var(--warning)
 }

 .deadline-title {
     font-weight: 600;
     color: var(--dark);
     margin-bottom: .25rem
 }

 .deadline-date {
     color: var(--gray-600);
     font-size: .9rem
 }

 .empty-state {
     text-align: center;
     padding: 3rem 2rem;
     color: var(--gray-600)
 }

 .empty-state .icon {
     font-size: 3rem;
     margin-bottom: 1rem;
     opacity: .5
 }

 /* Footer: stretch to full main width */
 .dashboard-footer {
     background: rgba(255, 255, 255, .95);
     backdrop-filter: blur(20px);
     border-top: 1px solid rgba(255, 255, 255, .2);
     padding: 1.5rem 0;
     margin-top: auto;
     width: 100%;
 }

 .footer-content {
     display: flex;
     justify-content: space-between;
     align-items: center;
     flex-wrap: wrap;
     gap: 1rem;
     width: 100%;
     margin: 0;
     padding: 0 2rem;
     /* aligns with .dashboard-container padding */
 }

 .footer-links {
     display: flex;
     gap: 1.5rem
 }

 .footer-link {
     color: var(--gray-600);
     text-decoration: none;
     transition: var(--transition)
 }

 .footer-link:hover {
     color: var(--primary)
 }

 .footer-copyright {
     color: var(--gray-600);
     font-size: .9rem
 }

 @keyframes fadeIn {
     from {
         opacity: 0;
         transform: translateY(20px)
     }

     to {
         opacity: 1;
         transform: translateY(0)
     }
 }

 .dashboard-container>* {
     animation: fadeIn .6s ease-out
 }

 /* Mobile */
 @media (max-width:1024px) {
     .sidebar {
         transform: translateX(-100%)
     }

     .sidebar.mobile-open {
         transform: translateX(0)
     }

     .main-content {
         margin-left: 0;
         width: 100%
     }

     .mobile-menu-toggle {
         display: block;
         position: fixed;
         top: 1rem;
         left: 1rem;
         z-index: 1001;
         background: var(--primary);
         color: #fff;
         border: none;
         border-radius: var(--radius);
         width: 40px;
         height: 40px;
         display: flex;
         align-items: center;
         justify-content: center;
         box-shadow: var(--shadow-lg)
     }
 }

 @media (max-width:768px) {
     .dashboard-container {
         padding: 1rem
     }

     .dashboard-header {
         padding: 1.5rem
     }

     .welcome-section h1 {
         font-size: 2rem
     }

     .quick-stats {
         grid-template-columns: 1fr 1fr
     }

     .quick-actions-grid {
         grid-template-columns: 1fr
     }

     .task-meta {
         flex-direction: column;
         gap: .5rem
     }

     .footer-content {
         flex-direction: column;
         text-align: center;
         padding: 0 1rem
     }

     .footer-links {
         justify-content: center
     }
 }

 /* Dark mode */
 @media (prefers-color-scheme:dark) {
     :root {
         --light: #0f172a;
         --dark: #f8fafc;
         --gray-100: #1e293b;
         --gray-200: #334155
     }

     body {
         background: linear-gradient(135deg, #1e3a8a 0%, #7e22ce 100%)
     }
 }

 /* Subscription badges */
 .subscription-badge {
     background: linear-gradient(135deg, var(--primary), var(--secondary));
     color: #fff;
     padding: .25rem .75rem;
     border-radius: 20px;
     font-size: .75rem;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: .05em;
     margin-left: .5rem
 }

 .subscription-badge.free {
     background: linear-gradient(135deg, var(--gray-600), var(--gray-700))
 }

 .subscription-badge.pro {
     background: linear-gradient(135deg, var(--success), #059669)
 }

 .subscription-badge.business {
     background: linear-gradient(135deg, var(--primary), var(--primary-dark))
 }

 .subscription-badge.enterprise {
     background: linear-gradient(135deg, var(--secondary), #e11d48)
 }

 .nav-item.disabled {
     opacity: .5;
     cursor: not-allowed;
     position: relative
 }

 .nav-item.disabled:hover::after {
     content: "Upgrade to access";
     position: absolute;
     left: 100%;
     top: 50%;
     transform: translateY(-50%);
     background: var(--dark);
     color: #fff;
     padding: .5rem;
     border-radius: var(--radius);
     font-size: .75rem;
     white-space: nowrap;
     margin-left: .5rem;
     z-index: 1000
 }

 .upgrade-prompt {
     background: linear-gradient(135deg, rgba(99, 102, 241, .1), rgba(244, 63, 94, .1));
     border: 1px solid rgba(99, 102, 241, .2);
     border-radius: var(--radius);
     padding: 1rem;
     margin: 1rem;
     text-align: center
 }

 .upgrade-prompt .btn {
     margin-top: .5rem
 }