/* Design System & Root Variables */
:root {
    --bg-dark: #030303;
    --bg-card: rgba(18, 18, 18, 0.7);
    --bg-card-hover: rgba(28, 28, 28, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Variable theme backdrops */
    --bg-sidebar: #070707;
    --bg-topbar: rgba(3, 3, 3, 0.85);
    --bg-modal: #0a0a0a;
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-input-focus: rgba(255, 255, 255, 0.08);
    --bg-toggle: rgba(255, 255, 255, 0.04);
    --bg-select2-dropdown: #0c0c0c;
    --bg-table-header: rgba(255, 255, 255, 0.02);
    --bg-table-row-hover: rgba(255, 255, 255, 0.02);
    
    /* Glowing Accents */
    --color-primary: #ff7b00;
    --color-secondary: #ffae19;
    --color-purple: #9b5de5;
    
    /* Status Colors */
    --status-pending: #ff4d6d;
    --status-pending-bg: rgba(255, 77, 109, 0.15);
    --status-progress: #ffb703;
    --status-progress-bg: rgba(255, 183, 3, 0.15);
    --status-completed: #2ec4b6;
    --status-completed-bg: rgba(46, 196, 182, 0.15);
    
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-mode {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --border-color: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    /* Light Theme Overrides */
    --bg-sidebar: #ffffff;
    --bg-topbar: rgba(248, 250, 252, 0.8);
    --bg-modal: #ffffff;
    --bg-input: rgba(15, 23, 42, 0.04);
    --bg-input-focus: #ffffff;
    --bg-toggle: rgba(15, 23, 42, 0.04);
    --bg-select2-dropdown: #ffffff;
    --bg-table-header: rgba(15, 23, 42, 0.02);
    --bg-table-row-hover: rgba(15, 23, 42, 0.01);
    
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.animate-slide-in {
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Guest Layout (Auth) */
.auth-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(255, 174, 25, 0.15), transparent 50%),
                radial-gradient(circle at bottom left, rgba(255, 123, 0, 0.1), transparent 50%),
                var(--bg-dark);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.auth-logo i {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-card-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-card-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input,
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition-smooth);
    outline: none;
}

.input-wrapper input {
    padding-left: 44px;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition-smooth);
}

.input-wrapper input:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--color-primary);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.15);
}

.input-wrapper input:focus + .input-icon {
    color: var(--color-primary);
}

.auth-card-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-card-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.auth-card-footer a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

/* Alert Notification System */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: var(--shadow-soft);
    border-left: 4px solid transparent;
}

.alert-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.alert-title {
    font-weight: 600;
    font-size: 14px;
}

.alert-desc {
    font-size: 13px;
    opacity: 0.9;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-left-color: #ef4444;
    color: #fca5a5;
    border-top: 1px solid rgba(239, 68, 68, 0.1);
    border-right: 1px solid rgba(239, 68, 68, 0.1);
    border-bottom: 1px solid rgba(239, 68, 68, 0.1);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-left-color: #10b981;
    color: #a7f3d0;
    border-top: 1px solid rgba(16, 185, 129, 0.1);
    border-right: 1px solid rgba(16, 185, 129, 0.1);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.close-alert {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.close-alert:hover {
    opacity: 1;
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #060910;
    box-shadow: 0 4px 15px rgba(255, 123, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 123, 0, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

/* Authenticated Layout (Dashboard) */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(255, 123, 0, 0.05), transparent 60%),
                var(--bg-dark);
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 30px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(255, 123, 0, 0.5);
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 550;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.menu-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.menu-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
    color: #060910;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    box-shadow: 0 4px 15px rgba(255, 123, 0, 0.25);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.username {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.email {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 12px;
    color: #fca5a5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Main Content Layout */
.main-wrapper {
    margin-left: 280px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-bar {
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: var(--bg-topbar);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-size: 22px;
}

.date-display {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.content-container {
    padding: 40px;
    flex-grow: 1;
}

/* KPI Cards Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-soft);
}

.kpi-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.kpi-card.total .kpi-icon-wrapper {
    background: rgba(255, 174, 25, 0.15);
    color: var(--color-secondary);
}

.kpi-card.pending .kpi-icon-wrapper {
    background: rgba(255, 77, 109, 0.15);
    color: var(--status-pending);
}

.kpi-card.in-progress .kpi-icon-wrapper {
    background: rgba(255, 183, 3, 0.15);
    color: var(--status-progress);
}

.kpi-card.completed .kpi-icon-wrapper {
    background: rgba(46, 196, 182, 0.15);
    color: var(--status-completed);
}

.kpi-content h3 {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

/* Completion Card Section */
.completion-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

.completion-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.completion-info h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.section-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.completion-percentage {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
}

.progress-bar-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
    border-radius: 50px;
    box-shadow: 0 0 8px rgba(255, 123, 0, 0.4);
    transition: width 0.8s ease-in-out;
}

/* Charts Section */
.charts-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 16px;
}

.chart-body {
    flex-grow: 1;
}

.chart-canvas-container {
    position: relative;
    height: 230px;
    width: 100%;
}

.chart-canvas-container-full {
    position: relative;
    height: 280px;
    width: 100%;
}

.full-width-card {
    grid-column: 1 / -1;
}

/* Tasks Management Styles */
.tasks-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.filters-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 10px 16px;
    flex-grow: 1;
    max-width: 800px;
}

.filters-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group {
    flex-grow: 1;
}

.search-group {
    position: relative;
    display: flex;
    align-items: center;
    flex-grow: 2;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
}

.search-group input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: var(--transition-smooth);
}

.search-group input:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
}

.filter-group select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-group select:focus {
    border-color: var(--color-primary);
}

.btn-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-reset:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Tasks Cards Grid */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    transition: var(--transition-smooth);
}

.task-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.badge {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
}

.badge-category {
    background: rgba(255, 174, 25, 0.12);
    color: var(--color-secondary);
    border: 1px solid rgba(255, 174, 25, 0.15);
}

.badge-source {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 10px;
    border: 1px solid var(--border-color);
}

.task-card-body {
    flex-grow: 1;
    margin-bottom: 20px;
}

.task-title {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.task-description {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.task-due-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.task-due-date i {
    font-size: 14px;
}

.badge-status {
    font-size: 10px;
    letter-spacing: 0.5px;
}

.badge-status.status-Pending {
    background: var(--status-pending-bg);
    color: var(--status-pending);
}

.badge-status.status-In\ Progress {
    background: var(--status-progress-bg);
    color: var(--status-progress);
}

.badge-status.status-Completed {
    background: var(--status-completed-bg);
    color: var(--status-completed);
}

/* Status left-border tags on Task Card */
.task-card.status-Pending { border-left: 4px solid var(--status-pending); }
.task-card.status-In\ Progress { border-left: 4px solid var(--status-progress); }
.task-card.status-Completed { border-left: 4px solid var(--status-completed); }

.task-card.status-Completed .task-title {
    text-decoration: line-through;
    opacity: 0.6;
}

.task-card.status-Completed .task-description {
    opacity: 0.5;
}

/* Overdue States */
.task-card.overdue-card {
    border-left: 4px solid var(--status-pending) !important;
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.05), var(--bg-card));
}

.overdue-text {
    color: var(--status-pending) !important;
    font-weight: 600;
}

/* Actions list inside task card */
.task-card-actions {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.task-card:hover .task-card-actions {
    opacity: 1;
    pointer-events: auto;
}

/* Displace footer details when hover actions appear to prevent overlapping */
.task-card:hover .task-card-footer {
    opacity: 0.2;
}

.btn-action-edit, .btn-action-delete {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: var(--transition-smooth);
}

.btn-action-edit {
    background: rgba(255, 174, 25, 0.15);
    color: var(--color-secondary);
}

.btn-action-edit:hover {
    background: var(--color-secondary);
    color: #060910;
}

.btn-action-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.btn-action-delete:hover {
    background: #ef4444;
    color: white;
}

/* Empty States */
.empty-state {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 500px;
    margin: 40px auto;
}

.empty-icon {
    font-size: 48px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 18px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 380px;
    margin-bottom: 10px;
}

/* Modal Popup System */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 9, 16, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
    overflow: visible;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    transition: var(--transition-smooth);
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-content form {
    padding: 24px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.col-half {
    flex: 1;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar-brand .logo-text,
    .menu-item span,
    .sidebar-footer .user-info,
    .btn-logout span {
        display: none;
    }
    
    .sidebar-brand {
        justify-content: center;
        padding: 20px 0;
    }
    
    .menu-item {
        justify-content: center;
        padding: 14px 0;
    }
    
    .sidebar-footer {
        padding: 16px 0;
        align-items: center;
    }
    
    .user-profile {
        justify-content: center;
    }
    
    .btn-logout {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        padding: 0;
    }

    .main-wrapper {
        margin-left: 80px;
    }
    
    .top-bar {
        padding: 0 20px;
    }
    
    .content-container {
        padding: 20px;
    }
    
    .tasks-page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters-form {
        flex-wrap: wrap;
    }
    
    .search-group {
        width: 100%;
        flex-basis: 100%;
    }
    
    .category-title {
        display: none;
    }
    
    .menu-item.sub-item {
        padding: 14px 0;
        justify-content: center;
    }
}

/* Custom Combobox Container */
.custom-combobox {
    position: relative;
    width: 100%;
}

/* Trigger Box */
.combobox-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.combobox-trigger:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.custom-combobox.active .combobox-trigger {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.15);
}

.combobox-caret {
    font-size: 12px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.custom-combobox.active .combobox-caret {
    transform: rotate(180deg);
    color: var(--color-primary);
}

/* Dropdown Panel */
.combobox-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #0f172a; /* Solid dark theme background to avoid bleed-through */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: fadeIn 0.2s ease forwards;
}

.custom-combobox.active .combobox-dropdown {
    display: flex;
}

/* Search Box Wrapper */
.combobox-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2px;
}

.combobox-search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.combobox-search-input {
    width: 100%;
    padding: 12px 16px 12px 42px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: var(--text-primary) !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Options Container */
.combobox-options {
    max-height: 200px;
    overflow-y: auto;
    padding: 6px;
}

/* Custom Scrollbar for Options List */
.combobox-options::-webkit-scrollbar {
    width: 6px;
}

.combobox-options::-webkit-scrollbar-track {
    background: transparent;
}

.combobox-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.combobox-options::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Options */
.combobox-option {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.combobox-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.combobox-option.selected {
    background: rgba(255, 123, 0, 0.15);
    color: var(--color-secondary);
    font-weight: 500;
}

.client-opt-name {
    font-weight: 500;
}

.client-opt-package {
    font-size: 11px;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.combobox-option.selected .client-opt-package {
    background: rgba(255, 174, 25, 0.15);
    border-color: rgba(255, 174, 25, 0.2);
}

.combobox-option.no-results {
    color: var(--text-muted);
    font-style: italic;
    cursor: default;
    justify-content: center;
}
.combobox-option.no-results:hover {
    background: transparent;
}

/* Select2 Custom Dark Theme Overrides */
.select2-container--default .select2-selection--single {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    transition: var(--transition-smooth) !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
    padding-left: 16px !important;
    padding-right: 30px !important;
    font-size: 14px !important;
    width: 100% !important;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-muted) !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 16px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--text-secondary) transparent transparent transparent !important;
}
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--text-secondary) transparent !important;
}
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--color-primary) !important;
    background: var(--bg-input-focus) !important;
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.15) !important;
    outline: none !important;
}

/* Dropdown Container */
.select2-dropdown {
    background: var(--bg-select2-dropdown) !important; /* dark/light dropdown background */
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-soft) !important;
    backdrop-filter: blur(16px) !important;
    overflow: hidden !important;
    margin-top: 4px !important;
    z-index: 9999 !important;
}

/* Search Box inside dropdown */
.select2-container--default .select2-search--dropdown {
    padding: 12px !important;
    background: var(--bg-input) !important;
    border-bottom: 1px solid var(--border-color) !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    padding: 8px 12px !important;
    outline: none !important;
    font-size: 14px !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--color-primary) !important;
    background: var(--bg-input-focus) !important;
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.15) !important;
}

/* Options/Results List */
.select2-container--default .select2-results__options {
    max-height: 200px !important;
    padding: 6px !important;
}
.select2-container--default .select2-results__option {
    padding: 10px 14px !important;
    border-radius: 8px !important;
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    background: transparent !important;
    transition: var(--transition-smooth) !important;
    margin-bottom: 2px !important;
}
.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: rgba(255, 123, 0, 0.15) !important;
    color: var(--color-primary) !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--color-primary) !important;
    color: #ffffff !important;
}
.select2-container--default .select2-results__option--disabled {
    color: var(--text-muted) !important;
}
.select2-results__message {
    color: var(--text-muted) !important;
    font-size: 14px !important;
    padding: 10px 14px !important;
}

/* Specific styling for smaller filters (like dashboard header) */
.filter-select-wrapper .select2-container--default .select2-selection--single {
    height: 38px !important;
    border-radius: 10px !important;
}
.filter-select-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    right: 10px !important;
}
.filter-select-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 13px !important;
    padding-left: 12px !important;
    line-height: 36px !important;
}

/* Filter Container and Grid */
.filter-row-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-grid > * {
    flex: 1 1 180px;
}

.filter-grid .btn-reset {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
}

.filter-input-wrapper input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: var(--transition-smooth);
}

.filter-input-wrapper input:focus {
    border-color: var(--color-primary);
    background: var(--bg-input-focus);
}

.filter-select-wrapper select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-select-wrapper select:focus {
    border-color: var(--color-primary);
}

.filter-grid input[type="date"] {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
    width: 100%;
    padding: 10px 12px;
    font-size: 12px;
}

.filter-grid input[type="date"]:focus {
    border-color: var(--color-primary);
    background: var(--bg-input-focus);
}

/* Table Layout styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
    margin-top: 10px;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}

.premium-table th {
    background: var(--bg-table-header);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.premium-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.premium-table tbody tr {
    transition: var(--transition-smooth);
}

.premium-table tbody tr:hover {
    background: var(--bg-table-row-hover);
}

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

/* Actions in Table */
.table-actions {
    display: flex;
    gap: 8px;
}

/* Pagination Styling */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 16px 16px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

/* Adjust table responsive bottom radius since pagination is attached below it */
.table-responsive.has-pagination {
    border-radius: 16px 16px 0 0;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination-nav {
    display: flex;
    gap: 6px;
}

.pagination-btn {
    background: var(--bg-toggle);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 500;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #060910;
}

.pagination-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #060910;
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Theme Toggle Button Styles */
.btn-theme-toggle {
    background: var(--bg-toggle);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition-smooth);
}

.btn-theme-toggle:hover {
    background: var(--bg-input-focus);
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

/* Floating guest mode theme toggle */
.guest-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(8px);
}

/* Sidebar Menu Categories & Sub-items */
.menu-category {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0;
}

.category-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
    padding: 10px 18px 4px 18px;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition-smooth);
}

.menu-item.sub-item {
    padding: 10px 18px 10px 28px;
    font-size: 14px;
}

.menu-item.sub-item i {
    font-size: 15px;
    margin-right: 2px;
}

/* Switch Toggles for App Features */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-toggle);
  border: 1px solid var(--border-color);
  transition: .3s;
  border-radius: 22px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #060910;
}





