:root {
    --primary-color: #7C4DFF;
    --primary-rgb: 124, 77, 255;
    --primary-hover: #6a3de8;
    --secondary-color: #2962FF;
    --secondary-rgb: 41, 98, 255;
    --bg-dark: #1E1E2F;
    --sidebar-bg: #1e2030;
    --sidebar-active: var(--primary-color);
    --main-bg: #f8faff;
    --text-main: #333;
    --text-muted: #888;
    --white: #ffffff;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --border-color: #eee;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--main-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: #aeb2b9;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    overflow-x: hidden;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .badge,
.sidebar.collapsed .close-sidebar,
.sidebar.collapsed .nav-menu span,
.sidebar.collapsed .chevron {
    opacity: 0;
    pointer-events: none;
    width: 0;
    margin: 0;
    overflow: hidden;
}

.badge {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-color);
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.close-sidebar {
    background: none;
    border: none;
    color: #aeb2b9;
    font-size: 1.2rem;
    cursor: pointer;
}

.nav-menu {
    flex: 1;
    padding: 10px 12px;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu ul li {
    margin-bottom: 4px;
}

.nav-menu ul li a {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    text-decoration: none;
    color: #aeb2b9;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Employee Selection Grid */
.employee-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.employee-select-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.employee-select-card:hover {
    border-color: #4f46e5;
    background: #f1f5f9;
}

.employee-select-card.selected {
    background: #eef2ff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px #4f46e5;
}

.emp-avatar-mini {
    width: 24px;
    height: 24px;
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

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

.emp-name-mini {
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-dept-mini {
    font-size: 9px;
    color: #64748b;
}

.select-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.employee-select-card.selected .select-indicator {
    display: flex;
}

.sidebar.collapsed .nav-menu ul li a {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed .nav-menu ul li a i:first-child {
    margin-right: 0;
    font-size: 1.4rem;
}

.nav-menu ul li a i:first-child {
    margin-right: 12px;
    font-size: 1.1rem;
}

.nav-menu ul li a .chevron {
    margin-left: auto;
    font-size: 0.8rem;
}

.nav-menu ul li.active a, .submenu-item.active a {
    background: var(--primary-color);
    color: white;
}

/* Sidebar Submenu */
.submenu {
    list-style: none;
    padding-left: 15px;
    margin-top: 5px;
    display: none;
}

.has-submenu.open .submenu {
    display: block;
}

.submenu-item {
    margin-bottom: 4px;
}

.submenu-item a {
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
}

.submenu-item.active a {
    background: rgba(var(--primary-rgb), 0.15) !important;
    color: var(--primary-color) !important;
}

.active-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-left: auto;
}

.nav-menu ul li a:hover:not(.active a) {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(4px);
}

.nav-menu ul li a:active {
    transform: scale(0.98);
}

.sidebar-footer {
    padding: 20px;
}

.collapse-btn {
    background: none;
    border: none;
    color: #aeb2b9;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.collapse-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar.collapsed .sidebar-footer {
    display: flex;
    justify-content: center;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 260px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
}

.header {
    height: 70px;
    background: var(--white);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    right: 0;
    left: 260px;
    z-index: 900;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0) scale(0.96);
    filter: brightness(0.95);
}

.btn i {
    font-size: 1.1rem;
}

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

.btn-blue {
    background: var(--secondary-color);
}

.btn-success {
    background: #10b981;
}

.btn:hover {
    filter: brightness(1.1);
}

/* Global Loading State for Buttons */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
    cursor: not-allowed !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ri-spin {
    animation: spin 1s infinite linear;
    display: inline-block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 10px;
}

.icon-notification {
    position: relative;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-notification:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}

.icon-notification:active {
    transform: scale(0.9);
}

.icon-notification .dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    display: none;
}

.icon-notification .dot.active {
    display: block;
    box-shadow: 0 0 0 2px white;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 20px);
    right: -10px;
    width: 350px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid #f0f0f0;
    z-index: 1100;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideDown 0.3s ease;
    cursor: default;
}

.icon-notification.active .notification-dropdown {
    display: flex;
}

.notification-dropdown .dropdown-header {
    padding: 15px 20px;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.notification-dropdown .dropdown-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.notification-dropdown .dropdown-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 0.2s;
    cursor: pointer;
    text-align: left;
}

.notification-item:hover {
    background: #f8faff;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item .notif-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-item .notif-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-item .notif-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.notification-item .notif-desc {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    white-space: normal;
}

.notification-item .notif-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.notification-item .notif-priority {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.priority-high { background: #fee2e2; color: #ef4444; }
.priority-medium { background: #fef3c7; color: #d97706; }
.priority-low { background: #dcfce7; color: #10b981; }

.empty-notifications {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

.empty-notifications i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.5;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 12px;
    transition: background 0.2s;
    position: relative;
}

.user-profile:hover, .user-profile.active {
    background: #f0f2f5;
}

.user-profile.active .trigger-arrow {
    transform: rotate(180deg);
}

.avatar {
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

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

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.user-company {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Profile Dropdown Styling */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

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

.user-profile.active .profile-dropdown {
    display: flex;
}

.dropdown-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.dropdown-body {
    padding: 10px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: #444;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item:hover {
    background: #f8f9ff;
    padding-left: 20px;
}

.dropdown-item:active {
    transform: scale(0.97);
}

.dropdown-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: #f5f5f5;
    margin: 8px 15px;
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout i {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: #fff5f5;
}

/* Dashboard Body */
.dashboard-body {
    padding: 100px 30px 30px; /* Top padding to account for fixed header (70px + margin) */
}

/* Collapsed Sidebar Adjustments */
.sidebar.collapsed ~ .main-content {
    margin-left: 70px;
}

.sidebar.collapsed ~ .main-content .header {
    left: 70px;
}

.bi-section {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.bi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.bi-title-group {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.bi-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bi-text h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.bi-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bi-text p i {
    color: orange;
}

.sync-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bi-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    border-radius: 10px 10px 0 0;
    transition: all 0.2s ease;
}

.tab:hover:not(.active) {
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--primary-color);
}

.tab:active {
    transform: scale(0.97);
}

.dash-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.dash-tab-pane.active {
    display: block;
}

.dash-leads-list-section {
    margin-top: 24px;
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}
.dash-leads-list-title {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-leads-list-title i { color: var(--primary-color); }
.dash-leads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dash-leads-empty {
    text-align: center;
    padding: 24px;
    color: #94a3b8;
    font-size: 0.9rem;
}
.dash-lead-item {
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}
.dash-lead-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.dash-lead-name { font-weight: 600; font-size: 0.95rem; color: #1e293b; }
.dash-lead-status { font-size: 11px; padding: 3px 8px; border-radius: 6px; }
.dash-lead-meta {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    gap: 16px;
    margin-bottom: 4px;
}
.dash-lead-meta i { margin-right: 4px; color: #94a3b8; }
.dash-lead-date { font-size: 0.75rem; color: #94a3b8; }

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

.tab i {
    font-size: 1.1rem;
}

.tab.active {
    color: white;
    background: var(--primary-color);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.metric-card {
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #f0f0f0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.metric-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.metric-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.metric-icon.blue { background: #e8f0fe; color: #2962FF; }
.metric-icon.green { background: #e6f7ef; color: #00C853; }
.metric-icon.orange { background: #fff4e5; color: #FF9100; }
.metric-icon.purple { background: #f3e5f5; color: #7C4DFF; }

/* Viz Area */
.viz-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    min-height: 400px;
}

.viz-card {
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.viz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.sidebar-viz h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 100px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    margin-top: 50px;
}

/* View Management */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Tasks Page Styling */
.tasks-page {
    padding: 100px 30px 30px; /* Top padding to clear fixed header (70px + margin) */
}

.filters-section {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filters-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.filter-icon-box {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filters-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-notification {
    width: 35px;
    height: 35px;
    border: 1px solid #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.btn-request { background: #00c853; }
.btn-shifted { background: var(--primary-color); }
.btn-show-filters { background: #e91e63; }

.btn-action:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-action:active {
    transform: translateY(0) scale(0.95);
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 1px solid #eee;
    border-radius: 10px;
    outline: none;
    font-size: 0.9rem;
}

/* Expanded Filters Panel */
.filters-panel {
    display: none;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #f5f5f5;
    animation: fadeIn 0.3s ease;
}

.filters-panel.active {
    display: block;
}

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

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.filter-group {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group.full-width {
    flex: 1 1 100%;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    color: var(--primary-color);
}

.filter-group select {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #eee;
    background: #fff;
    font-size: 0.85rem;
    color: #333;
    outline: none;
}

.filter-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #eee;
    background: white;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #444;
    transition: all 0.2s;
}

.filter-tag:hover {
    border-color: var(--primary-color);
    background: #fcfaff;
    transform: translateY(-1px);
}

.filter-tag:active {
    transform: scale(0.96);
}

.filter-tag.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(41, 98, 255, 0.3);
}

.filter-pill {
    padding: 8px 24px;
    border-radius: 20px;
    border: 1px solid #eee;
    background: white;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    color: #444;
}

.filter-pill.active {
    background: #d81b60;
    color: white;
    border-color: #d81b60;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: flex-start; /* Better for scrolling tall modals */
    padding: 40px 20px;
    overflow-y: auto;
    z-index: 2000;
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.header-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.header-text p {
    font-size: 0.85rem;
    color: #777;
}

.modal-close {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #eee;
    color: #333;
}

.modal-body {
    padding: 60px 30px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.form-help {
    font-size: 0.75rem;
    color: #888;
    margin-top: 6px;
    margin-left: 4px;
}

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

.input-with-icon i {
    position: absolute;
    left: 14px;
    color: #888;
    font-size: 1.1rem;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.input-with-icon input:focus {
    border-color: #6C5CE7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.input-with-icon input::placeholder {
    color: #aaa;
}

.select-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.select-with-icon i {
    position: absolute;
    left: 14px;
    color: #888;
    font-size: 1.1rem;
    pointer-events: none;
}
.select-with-icon select {
    width: 100%;
    padding-left: 42px;
}

.modal-empty-state {
    text-align: center;
}

.empty-icon {
    font-size: 4.5rem;
    color: #b0bec5;
    margin-bottom: 20px;
}

.modal-empty-state h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.modal-empty-state p {
    font-size: 0.95rem;
    color: #777;
}

/* Create Task Modal Specific Styles */
.modal-large {
    max-width: 900px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.header-purple {
    background: #9c27b0 !important; /* Vibrant Purple as per img */
}

.header-orange {
    background: #f39c12 !important; /* Vibrant Orange */
}

.icon-white {
    background: rgba(255, 255, 255, 0.2) !important;
}

.text-white h3, .text-white p {
    color: white !important;
}

.close-white {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.modal-body.scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.form-section {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color); /* Match purple branding from img */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    font-size: 1.1rem;
}

.section-title span {
    color: #ff3d00;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

.form-group label span {
    color: #ff3d00;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #eee;
    background: #fcfcfc;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
    border-color: var(--primary-color);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.select-with-icon i, .input-with-icon i {
    position: absolute;
    left: 14px;
    color: #888;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
}

.followup-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: #f8fafc;
    border-left: 3px solid #f39c12;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-weight: 600;
    color: #475569;
}

.history-time-change {
    color: #1e293b;
    margin-bottom: 4px;
}

.history-reason {
    color: #64748b;
    font-style: italic;
    background: rgba(243, 156, 18, 0.05);
    padding: 6px;
    border-radius: 4px;
    margin-top: 6px;
}

.history-date-badge {
    color: #f39c12;
    font-size: 0.75rem;
}

.select-with-icon select, .input-with-icon input {
    padding-left: 42px !important;
}

/* Inline History Styles */
.history-toggle-btn {
    background: #fefcda;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 20px;
    transition: all 0.2s;
}

.history-toggle-btn i {
    background: #3b82f6;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.history-toggle-btn:hover {
    background: #fef9c3;
}

.inline-history-container {
    margin: 0 20px 20px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 16px;
    padding: 20px;
}

.history-summary-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.history-summary-header i {
    background: #3b82f6;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.history-summary-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #78350f;
}

.history-summary-header p {
    margin: 0;
    font-size: 14px;
    color: #b45309;
}

.inline-history-item {
    background: white;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.history-item-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.history-item-badge {
    background: #f97316;
    color: white;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
}

.history-item-date {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.date-change-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.old-date-box, .new-date-box {
    flex: 1;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.old-date-box {
    background: #fff1f2;
    border: 1px solid #fda4af;
    color: #be123c;
}

.new-date-box {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

.box-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: none;
    opacity: 0.9;
}

.date-val {
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-val i {
    color: #3b82f6 !important;
    font-size: 16px;
}

.change-arrow {
    color: #d97706;
    font-size: 18px;
    font-weight: 800;
}

.reason-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 15px;
}

.reason-box .box-label {
    color: #92400e;
    margin-bottom: 4px;
    display: block;
}

.reason-box p {
    margin: 0;
    font-size: 14px;
    color: #78350f;
    font-weight: 500;
}

.inline-history-container hr {
    display: none;
}

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

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

.flex-1 {
    flex: 1;
    min-width: 200px;
}

.mb-20 {
    margin-bottom: 20px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    width: 100%;
    padding-right: 40px;
}

.input-with-icon i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    z-index: 2;
}

/* Hide native browser date/time icons and stretch click target */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 1;
}

input[type="date"],
input[type="time"] {
    position: relative;
    cursor: pointer;
}

.select-with-status {
    position: relative;
    display: flex;
    align-items: center;
}

.select-with-status select {
    width: 100%;
}

.status-badge {
    position: absolute;
    right: 35px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.status-badge.orange {
    background: #ffcc80;
    color: #ef6c00;
}

/* Attachment Cards */
.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.attachment-card {
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.attachment-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.attachment-card:active {
    transform: translateY(-1px) scale(0.98);
}

.attachment-card.blue { background: #e3f2fd; color: #1976d2; }
.attachment-card.purple { background: #f3e5f5; color: #7b1fa2; }
.attachment-card.green { background: #e8f5e9; color: #388e3c; }

/* Expanded Modal Field Styles */
.badge-mini {
    background: #f0f0f0;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 5px;
}

.select-placeholder-box {
    padding: 15px;
    background: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 10px;
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.select-placeholder-box:hover {
    background: #f5f5f5;
}

.section-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.mb-0 { margin-bottom: 0 !important; }

.toggle-switch-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

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

.flex-w-50 {
    width: calc(50% - 5px);
}

/* Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #9c27b0;
}

input:focus + .slider {
    box-shadow: 0 0 1px #9c27b0;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card-text {
    display: flex;
    flex-direction: column;
}

.card-title {
    font-weight: 700;
    font-size: 0.9rem;
}

.card-size {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Modal Footer */
.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #fff;
}

.btn-cancel {
    padding: 10px 25px;
    border-radius: 8px;
    border: 1px solid #eee;
    background: transparent;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-create {
    padding: 10px 30px;
    border-radius: 8px;
    border: none;
    background: var(--secondary-color);
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(41, 98, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content.modal-large {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

/* Task Mini Stats */
.task-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.task-stat-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border: 1px solid transparent;
}

.task-stat-card.border-blue { border: 2px solid #b3e5fc; background: #f1faff; }
.task-stat-card.border-yellow { border: 2px solid #fff9c4; background: #fffdf2; }
.task-stat-card.border-purple { border: 2px solid #f3e5f5; background: #faf5ff; }
.task-stat-card.border-green { border: 2px solid #e8f5e9; background: #f7fff8; }

.task-stat-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.task-stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.stat-text {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.stat-icon-small {
    font-size: 1.5rem;
    opacity: 0.5;
}

.stat-icon-small.blue { color: #03a9f4; }
.stat-icon-small.yellow { color: #fbc02d; }
.stat-icon-small.purple { color: #7b1fa2; }
.stat-icon-small.green { color: #2e7d32; }

.check-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1rem;
}
.check-icon.blue { color: #03a9f4; }
.check-icon.green { color: #4caf50; }

/* Task Table */
.task-table-container {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.table-header-dark {
    background: #1e2030;
    color: white;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-header-dark h3 {
    font-size: 1rem;
    font-weight: 500;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.task-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

.task-table th {
    text-align: left;
    padding: 20px 25px;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
}

.task-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.task-table th.sortable:hover {
    color: var(--primary-color);
}
.task-table th.sortable .sort-icon {
    opacity: 0.4;
    margin-left: 4px;
    vertical-align: middle;
}
.task-table th.sortable:hover .sort-icon { opacity: 0.8; }

.task-table tbody tr.task-row:hover {
    background: #f8fafc;
}
.task-table tbody tr.task-row {
    transition: background 0.15s ease;
}

.badge-status-clickable {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.badge-status-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.sub-th {
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 500;
    margin-top: 5px;
}

.table-empty-state {
    padding: 100px 0;
    text-align: center;
    color: #888;
}

.empty-icon-large {
    font-size: 4rem;
    color: #eee;
    margin-bottom: 15px;
}

.table-empty-state h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 5px;
}

/* --- Attendance Module Styles --- */

/* Daily Attendance View */
.attendance-top-banner {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
}
.attendance-title-main h2 {
    color: #7c4dff;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 700;
}
.attendance-title-main p {
    color: var(--text-secondary);
    font-size: 14px;
}

.attendance-info-cards {
    display: flex;
    width: 100%;
    gap: 20px;
}
.att-info-card {
    flex: 1;
    background: #f8f9fc;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}
.att-info-card span {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.att-info-card strong {
    font-size: 15px;
    color: var(--text-primary);
}
.att-info-card .text-blue { color: #2196f3; }
.att-info-card .text-green { color: #4caf50; }
.att-info-card .text-purple { color: #9c27b0; }

.attendance-monthly-summary {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 24px;
}
.summary-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.summary-header-row h3 {
    color: var(--primary-color);
    font-size: 18px;
}
.total-records {
    font-size: 13px;
    color: var(--text-secondary);
}

.att-metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}
.att-metric {
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.att-metric:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.att-metric.green { background: #e8f5e9; }
.att-metric.orange { background: #fff3e0; }
.att-metric.red { background: #ffebee; }
.att-metric.blue { background: #e3f2fd; }
.att-metric.purple { background: #f3e5f5; }

.att-metric-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}
.att-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}
.att-metric.green .att-icon { background: #4caf50; }
.att-metric.orange .att-icon { background: #ff9800; }
.att-metric.red .att-icon { background: #f44336; }
.att-metric.blue .att-icon { background: #2196f3; }
.att-metric.purple .att-icon { background: #9c27b0; }

.att-count {
    text-align: right;
}
.att-count span {
    font-size: 24px;
    font-weight: 700;
}
.att-metric.green .att-count { color: #2e7d32; }
.att-metric.orange .att-count { color: #e65100; }
.att-metric.red .att-count { color: #c62828; }
.att-metric.blue .att-count { color: #1565c0; }
.att-metric.purple .att-count { color: #6a1b9a; }

.att-metric h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin: 0;
}
.att-metric.green h4 { color: #2e7d32; }
.att-metric.orange h4 { color: #e65100; }
.att-metric.red h4 { color: #c62828; }
.att-metric.blue h4 { color: #1565c0; }
.att-metric.purple h4 { color: #6a1b9a; }

.att-metric p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}
.att-sub-note {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: auto;
    padding-top: 10px;
}

.attendance-calendar-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.cal-header-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.cal-icon {
    width: 40px;
    height: 40px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.cal-header-title h3 {
    color: #4f46e5;
    font-size: 18px;
}
.cal-header-title p {
    font-size: 13px;
    color: var(--text-secondary);
}

.cal-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.cal-tab {
    font-size: 14px;
    color: #4f46e5;
    font-weight: 500;
    border-bottom: 2px solid #4f46e5;
    padding-bottom: 15px;
    margin-bottom: -16px;
}
.cal-selectors {
    display: flex;
    gap: 20px;
}
.cal-select-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
}
.cal-select-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 150px;
    outline: none;
    background: white;
}

.cal-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.cal-table th {
    padding: 15px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.cal-table td {
    padding: 20px 10px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 14.28%;
}
.cal-table td .day {
    font-size: 14px;
    color: var(--text-primary);
}
.cal-table td.holiday {
    background: #fff8f8;
}
.cal-table td.holiday .day {
    color: #f44336;
}
.cal-table td.today-cell {
    border: 1px solid #2196f3;
    background: #f0f8ff;
}
.cal-table td.today-cell .day {
    color: #2196f3;
    font-weight: 600;
}
.cal-table td .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin: 5px auto 0;
}
.dot.green { background: #4caf50; }
.dot.yellow { background: #ffeb3b; }
.dot.red { background: #f44336; }
.dot.orange { background: #ff9800; }
.dot.blue { background: #2196f3; }

.cal-legend {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.legend-items {
    display: flex;
    gap: 15px;
}
.legend-items span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Manual Attendance View */
.manual-att-header {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.title-with-icon {
    display: flex;
    align-items: center;
    gap: 20px;
}
.title-with-icon i {
    font-size: 28px;
    color: #4f46e5;
}
.title-with-icon h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 5px;
}
.title-with-icon p {
    font-size: 14px;
    color: var(--text-secondary);
}

.manual-tabs {
    display: flex;
    gap: 15px;
}
.manual-tab {
    padding: 10px 24px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.manual-tab:hover {
    background: #f0f2f9;
    transform: translateY(-1px);
}

.manual-tab:active {
    transform: scale(0.97);
}
.manual-tab.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.manual-att-form-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.manual-form .form-row {
    margin-bottom: 25px;
    display: flex;
    gap: 30px;
}
.manual-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.manual-form .flex-1 {
    flex: 1;
}
.manual-form label {
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.manual-form label i {
    color: #8b5cf6;
    font-size: 16px;
}
.manual-form select,
.manual-form input,
.manual-form textarea {
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    background: #f8fafc;
}
.manual-form select:focus,
.manual-form input:focus,
.manual-form textarea:focus {
    border-color: #8b5cf6;
    background: white;
}
.manual-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Attendance Reports View */
.att-reports-banner {
    background: linear-gradient(135deg, #4f46e5, #7c4dff);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 24px;
}
.att-reports-banner h2 {
    font-size: 28px;
    margin-bottom: 10px;
}
.att-reports-banner p {
    font-size: 15px;
    opacity: 0.9;
}

.att-reports-main-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}
.att-reports-main-tabs .main-tab {
    flex: 1;
    background: white;
    border: none;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}
.att-reports-main-tabs .main-tab i {
    font-size: 24px;
    color: var(--text-secondary);
}
.att-reports-main-tabs .main-tab small {
    font-size: 12px;
    color: var(--text-secondary);
}
.att-reports-main-tabs .main-tab.active#tabEmployeeCards {
    background: #10b981;
    color: white;
}
.att-reports-main-tabs .main-tab.active#tabEmployeeCards i,
.att-reports-main-tabs .main-tab.active#tabEmployeeCards small {
    color: white;
}
.att-reports-main-tabs .main-tab.active#tabDeptReport {
    background: #4f46e5;
    color: white;
}
.att-reports-main-tabs .main-tab.active#tabDeptReport i,
.att-reports-main-tabs .main-tab.active#tabDeptReport small {
    color: white;
}

.att-report-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.att-report-content.hidden {
    display: none;
}
.report-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.report-header-row h3 {
    font-size: 18px;
    color: var(--text-primary);
}
.icon-colored {
    font-size: 20px;
    color: #4f46e5;
}
.view-toggle {
    display: flex;
    background: #f8f9fc;
    border-radius: 8px;
    padding: 4px;
}
.view-toggle button {
    background: transparent;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}
.view-toggle button.active {
    background: white;
    color: #4f46e5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.report-empty-state {
    text-align: center;
    padding: 60px 0;
}
.empty-icon-twins {
    font-size: 48px;
    color: #4f46e5;
    margin-bottom: 15px;
}
.empty-icon-building {
    font-size: 48px;
    color: #64748b;
    margin-bottom: 15px;
}
.report-empty-state h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.report-empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
}

.debug-info-box {
    background: #fffde7;
    border: 1px solid #fff59d;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    color: #f57f17;
    font-size: 13px;
}
.debug-info-box strong {
    color: #f57f17;
    font-size: 14px;
}
.debug-info-box small {
    display: block;
    margin-top: 5px;
    color: #fbc02d;
}
.debug-actions {
    display: flex;
    gap: 10px;
}
.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}
.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =============================================
   SHARED MODULE STYLES (Employee, Lead, Leave, Payroll, Project, Support)
   ============================================= */

.module-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.module-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-title i { color: #7c4dff; }

.module-sub {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 2px;
}

.module-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.module-filter-bar .search-input-box {
    flex: 1;
    min-width: 200px;
}

.module-filter-bar select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 13px;
    color: #475569;
    min-width: 140px;
    outline: none;
    cursor: pointer;
}

/* Projects Unified Filter refinements */
.projects-unified-filter {
    background: white;
    padding: 12px 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 15px;
    overflow-x: auto; /* Allow horizontal scroll if parent is too small */
}

.projects-unified-filter::-webkit-scrollbar {
    height: 4px;
}

.projects-unified-filter::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.projects-unified-filter .filter-right {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
    justify-content: flex-start; /* Align to start since search is gone */
    flex-wrap: nowrap;
}

.projects-unified-filter .filter-group {
    display: flex;
    flex-direction: row; /* Ensure they stay in a row, overriding global column */
    gap: 6px;
    flex-wrap: nowrap;
}

.projects-unified-filter select {
    min-width: 110px;
    max-width: 140px;
    padding: 7px 10px;
    font-size: 12px;
}

.projects-unified-filter .divider {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    margin: 0 2px;
}

.projects-meta-bar {
    margin-top: -10px;
}

/* Status Pill Button */
.status-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.status-pill-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.status-pill-btn i {
    font-size: 14px;
}

/* Color coding for various phases */
.status-pill-btn.phase-0 { background: #eef2ff; color: #6366f1; } /* MSEB Sanctions */
.status-pill-btn.phase-1 { background: #ecfdf5; color: #10b981; } /* Name Change */
.status-pill-btn.phase-2 { background: #fff7ed; color: #f59e0b; } /* Fabrication */
.status-pill-btn.phase-3 { background: #fef2f2; color: #ef4444; } /* Installation */
.status-pill-btn.phase-4 { background: #f0f9ff; color: #0ea5e9; } /* Net Metering */
.status-pill-btn.phase-5 { background: #faf5ff; color: #a855f7; } /* Subsidy Process */

/* Project Finance Styles */
.finance-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.finance-glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.finance-glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.12);
    background: rgba(255, 255, 255, 0.85);
}

.finance-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--card-accent, #64748b);
}

.finance-glass-card.blue { --card-accent: #6366f1; }
.finance-glass-card.green { --card-accent: #10b981; }
.finance-glass-card.red { --card-accent: #ef4444; }

.finance-glass-card .stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.finance-glass-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

/* Donut Chart Styling */
.finance-visual-box {
    display: flex;
    align-items: center;
    gap: 30px;
    background: white;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.progress-donut-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-donut {
    transform: rotate(-90deg);
}

.progress-donut circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.progress-donut .bg {
    stroke: #f1f5f9;
}

.progress-donut .meter {
    stroke: #6366f1;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1s ease-out;
}

.donut-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.donut-percent {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
}

.donut-label {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}

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

.staggered-row {
    animation: fadeInSlideUp 0.5s ease forwards;
    opacity: 0;
}

.payment-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.payment-badge.upi { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #4338ca; }
.payment-badge.cash { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }
.payment-badge.bank { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #15803d; }
.payment-badge.cheque { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #7e22ce; }

.module-table-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    overflow: hidden;
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
}

.crm-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.crm-table td {
    padding: 14px 20px;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid #f8fafc;
    vertical-align: middle;
}

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

.crm-table tr:hover td { background: #f8fafc; }

/* Project Card & Reschedule History Styling */
.project-card.rescheduled {
    border-left: 4px solid #f59e0b; /* Amber */
}

.reschedule-badge {
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.reschedule-history-container {
    background: #fffbeb; 
    border: 1px solid #fef3c7;
    border-radius: 12px;
    padding: 24px;
    margin-top: 15px;
}

.history-header-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.history-header-icon {
    width: 32px;
    height: 32px;
    background: #3b82f6; /* Blue */
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.history-header-text h4 {
    color: #92400e;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.history-header-text p {
    color: #b45309;
    font-size: 12px;
    margin: 2px 0 0 0;
}

.history-card {
    background: white;
    border: 1px solid #fde68a;
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 20px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.history-item-num {
    position: absolute;
    top: -10px;
    left: 15px;
    background: #f59e0b;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid white;
}

.history-date {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
    margin-left: 30px;
}

.date-transfer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.date-badge {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.date-badge .label { 
    font-size: 11px; 
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

.date-badge .value { 
    font-weight: 700; 
    font-size: 14px;
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.date-badge.red { 
    background: #fef2f2; 
    color: #991b1b; 
    border-color: #fca5a5;
}
.date-badge.green { 
    background: #f0fdf4; 
    color: #166534; 
    border-color: #86efac;
}

.transfer-arrow { 
    color: #f59e0b; 
    font-size: 20px; 
    font-weight: bold;
}

.reason-box {
    background: #fffbeb;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #fef3c7;
}
.reason-box .label { 
    font-weight: 700; 
    color: #92400e; 
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: capitalize;
}
.reason-box .value { 
    color: #78350f; 
    font-size: 13px;
    line-height: 1.5;
}

.btn-history-toggle {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-history-toggle:hover {
    background: #fef08a;
    transform: translateY(-1px);
}

.btn-history-toggle i {
    color: #3b82f6;
    font-size: 16px;
}


/* Premium Project Card Styling (Matching Images) */
.project-card {
    background: white;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    position: relative;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.proj-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.proj-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.proj-icon-circle {
    width: 36px;
    height: 36px;
    background: #fdf2f2;
    color: #e11d48; /* Pink/Red for Phone icon in image */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.proj-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.proj-priority {
    background: #fef9c3;
    color: #854d0e;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 10px;
    text-transform: uppercase;
}

.proj-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.badge-item.date { background: #e0f2fe; color: #0369a1; }
.badge-item.time { background: #f1f5f9; color: #475569; }
.badge-item.status-pending { background: #ffedd5; color: #9a3412; }
.badge-item.rescheduled { background: #dbeafe; color: #1d4ed8; }

.proj-note-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.proj-note-box i {
    color: #94a3b8;
    font-size: 18px;
    margin-top: 2px;
}

.proj-note-box p {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.whatsapp-btn {
    background: #25d366;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 18px;
    right: 20px;
}

.whatsapp-btn:hover {
    background: #128c7e;
    transform: scale(1.05);
}

.whatsapp-btn i {
    font-size: 18px;
}

.row-rescheduled {
    background-color: #fffbeb !important; /* Extremely light amber for rescheduled rows */
}

.history-row td {
    padding: 0 20px !important;
    background-color: #fffbeb !important;
}

.proj-status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}
.proj-status-badge.planning { background: #fef3c7; color: #92400e; }
.proj-status-badge.in-progress { background: #dbeafe; color: #1e40af; }
.proj-status-badge.completed { background: #dcfce7; color: #166534; }
.proj-status-badge.on-hold { background: #f3f4f6; color: #374151; }

.btn-history-toggle.active {
    background-color: #fef08a !important;
    color: #854d0e !important;
}

.emp-name-cell .emp-name { font-weight: 600; font-size: 14px; }
.emp-name-cell .emp-email { font-size: 12px; color: #94a3b8; }

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.active, .status-badge.won, .status-badge.approved, .status-badge.resolved, .status-badge.completed { background: #dcfce7; color: #16a34a; }
.status-badge.inactive, .status-badge.lost, .status-badge.rejected, .status-badge.closed { background: #fee2e2; color: #dc2626; }
.status-badge.pending, .status-badge.new, .status-badge.planning { background: #fef9c3; color: #ca8a04; }
.status-badge.contacted, .status-badge.in-progress { background: #dbeafe; color: #2563eb; }
.status-badge.proposal, .status-badge.on-hold { background: #ede9fe; color: #7c3aed; }
.status-badge.open { background: #ffedd5; color: #ea580c; }

/* Priority badges */
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.priority-badge.high { background: #fee2e2; color: #dc2626; }
.priority-badge.medium { background: #fef9c3; color: #ca8a04; }
.priority-badge.low { background: #dcfce7; color: #16a34a; }

/* Table action buttons */
.tbl-btn {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tbl-btn:hover {
    filter: contrast(1.1) brightness(1.05);
    transform: translateY(-1px);
}

.tbl-btn:active {
    transform: scale(0.95);
}

.tbl-btn.edit { background: #eef2ff; color: #4f46e5; }
.tbl-btn.delete { background: #fee2e2; color: #dc2626; }
.tbl-btn.approve { background: #dcfce7; color: #16a34a; }
.tbl-btn.reject { background: #fee2e2; color: #dc2626; }
.tbl-btn.view { background: #dbeafe; color: #2563eb; }
.tbl-btn.followup { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

.tbl-actions { display: flex; gap: 5px; }

/* Empty table state */
.crm-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
}
.crm-empty-state i { font-size: 48px; margin-bottom: 12px; display: block; }
.crm-empty-state h4 { font-size: 16px; color: #64748b; margin-bottom: 6px; }
.crm-empty-state p { font-size: 13px; }

/* --- Refined Lead Management Styles --- */
.lead-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.lead-tabs {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
}

.lead-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.lead-tab i { font-size: 16px; }

.lead-tab:hover {
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--primary-color);
}

.lead-tab.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.lead-pipeline-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.pipeline-tile {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: left;
    border: 1px solid #f1f5f9;
    transition: transform 0.2s;
}

.pipeline-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.pipeline-tile .p-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    display: block;
    margin-bottom: 8px;
}

.pipeline-tile .p-value {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
}

.pipeline-tile.total { border-left: 4px solid #2563eb; background: #f0f7ff; }
.pipeline-tile.total .p-title { color: #2563eb; }

.lead-filter-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.filter-top-row {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-top-row .search-input-box { flex: 1; min-width: 250px; }

.filter-top-row select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: #475569;
    min-width: 130px;
    outline: none;
    background: #fff;
}

.btn-grey {
    background: #e2e8f0;
    border: none;
    color: #475569;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.btn-outline-grey {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.filter-bottom-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-metric-total {
    background: #22c55e;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-export {
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: white;
}

.btn-export.pdf { background: #ef4444; }
.btn-export.excel { background: #10b981; }
.btn-export.import { background: #2563eb; }

.lead-table th {
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.title-purpose-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.purpose-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f7ff;
    color: #2563eb;
    font-size: 14px;
}

.purpose-text {
    background: #eff6ff;
    color: #1e40af;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #dbeafe;
}

.contact-info-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.contact-item i { color: #94a3b8; font-size: 14px; }

.status-dropdown {
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: #f8fafc;
}

.budget-val {
    font-weight: 600;
    color: #1e293b;
}

.recent-notes-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    border: 1px solid #f1f5f9;
}

.notes-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.note-item {
    padding: 10px 0;
    border-bottom: 1px dashed #f1f5f9;
}

.note-author { font-weight: 600; color: #475569; margin-right: 8px; }
.note-text { color: #64748b; font-size: 13px; }

/* Pipeline Summary for Leads */
.pipeline-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pipeline-card {
    flex: 1;
    min-width: 100px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-top: 4px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.pipeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.pipeline-card.new { border-top-color: #f59e0b; }
.pipeline-card.contacted { border-top-color: #3b82f6; }
.pipeline-card.proposal { border-top-color: #8b5cf6; }
.pipeline-card.won { border-top-color: #10b981; }
.pipeline-card.lost { border-top-color: #ef4444; }

.pipeline-card .p-count { font-size: 28px; font-weight: 800; color: #1e293b; }
.pipeline-card .p-label { font-size: 12px; color: #94a3b8; margin-top: 4px; text-transform: capitalize; }

/* Projects Filter Cards */
.projects-filter-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    margin-bottom: 20px;
    overflow: hidden;
}
.filter-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}
.filter-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-card-title i { color: #64748b; }
.filter-selected-badge {
    font-size: 13px;
    color: #94a3b8;
    background: #f8fafc;
    padding: 4px 12px;
    border-radius: 8px;
}
.filter-card-body {
    padding: 20px;
}
.filter-card-body.advanced-filters-grid .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}
.filter-card-body.advanced-filters-grid .filter-row:last-of-type { margin-bottom: 0; }
.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}
.filter-item label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-item label i { color: #94a3b8; font-size: 14px; }
.filter-item select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 13px;
    color: #475569;
    min-width: 140px;
    outline: none;
    cursor: pointer;
}
.projects-search-box { flex: 1; min-width: 280px; }
.filter-card-body:not(.advanced-filters-grid) {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-card-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}
.projects-count-text {
    font-size: 13px;
    color: #3b82f6;
    display: flex;
    align-items: center;
    gap: 6px;
}
.projects-count-text i { font-size: 16px; }
.btn-danger-outline {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.btn-danger-outline:hover { background: #fff1f2; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #475569;
}
.btn-outline:hover { background: #f8fafc; }

/* Project Cards Grid */
.project-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    width: 100%;
}


.project-card.planning { border-left-color: #f59e0b; }
.project-card.in-progress { border-left-color: #3b82f6; }
.project-card.completed { border-left-color: #10b981; }
.project-card.on-hold { border-left-color: #ef4444; }

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-card-title { font-size: 16px; font-weight: 700; color: #1e293b; }
.project-card-client { font-size: 12px; color: #94a3b8; margin-top: 3px; }

.project-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}

.project-meta i { color: #7c4dff; width: 16px; }

.project-card-footer {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

/* Form group in modals */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: white;
    color: #1e293b;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #7c4dff;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.08);
}

.form-group textarea { resize: vertical; }

/* modal-close button */
.modal-close {
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
}

.modal-close:hover { 
    background: #fee2e2; 
    color: #dc2626; 
    transform: rotate(90deg);
}

.modal-close:active {
    transform: rotate(90deg) scale(0.9);
}

/* --- Task Performance View Styles --- */
.perf-banner {
    background: linear-gradient(135deg, #311b5e, #5534aa, #7c4dff);
    border-radius: 16px;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 24px;
    color: white;
    box-shadow: 0 10px 30px rgba(97, 61, 193, 0.15);
}

.perf-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.perf-title-box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.perf-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #00e5ff;
}

.perf-title-text h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #00e5ff;
}

.perf-title-text p {
    font-size: 15px;
    color: #e2e8f0;
    opacity: 0.9;
}

.perf-banner-actions {
    display: flex;
    gap: 15px;
}

.btn-cyan-outline {
    background: transparent;
    border: 1px solid #00e5ff;
    color: #00e5ff;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-cyan-filled {
    background: #00e5ff;
    border: none;
    color: #1e1b4b;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
}

.perf-cards-row {
    display: flex;
    gap: 20px;
}

.perf-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.perf-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.perf-card-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.perf-card-title {
    font-size: 13px;
    color: white;
    font-weight: 500;
}

.perf-card-value {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.perf-card-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.perf-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.perf-card-icon.blue { color: #00e5ff; }
.perf-card-icon.green { color: #4ade80; }
.perf-card-icon.yellow { color: #facc15; }
.perf-card-icon.red { color: #ff5252; }

.perf-filters-section {
    background: white;
    border-radius: 12px;
    padding: 24px 30px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.perf-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.perf-filters-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-icon-blue {
    width: 42px;
    height: 42px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.perf-filters-title h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.perf-filters-title p {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-dark-outline {
    background: #475569;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    cursor: pointer;
}

.perf-filters-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.perf-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-lbl {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.search-input-box i {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
}

.search-input-box input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    font-size: 13px;
}

.perf-filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    font-size: 13px;
    color: var(--text-secondary);
    background: white;
}

.text-purple { color: #8b5cf6; }
.text-green { color: #10b981; }
.text-yellow { color: #f59e0b; }
.text-red { color: #ef4444; }

.perf-section-block {
    background: white;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    overflow: hidden;
}

.perf-section-header {
    padding: 20px 30px;
    border-bottom: 1px solid #f1f5f9;
}

.perf-section-header h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

.perf-section-header.with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-text-blue {
    background: transparent;
    color: #3b82f6;
    border: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.perf-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.perf-table {
    width: 100%;
    border-collapse: collapse;
}

.perf-table th {
    text-align: left;
    padding: 15px 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.perf-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.perf-empty-state i {
    font-size: 50px;
    color: #94a3b8;
    margin-bottom: 15px;
}

.perf-empty-state h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.perf-empty-state p {
    font-size: 13px;
    color: var(--text-secondary);
}

.perf-empty-state.simple {
    padding: 40px;
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.icon-circle i {
    font-size: 24px;
    color: #94a3b8;
    margin: 0;
}
/* Premium Modal Styles */
.modal-large {
    max-width: 800px;
    width: 90%;
    height: auto;
    max-height: 95vh;
}

.header-purple {
    background: linear-gradient(135deg, #6a1b9a, #7b1fa2, #8e24aa);
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.icon-white {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.4rem;
}

.text-white h3 { color: white; margin: 0; font-size: 1.2rem; }
.text-white p { color: rgba(255, 255, 255, 0.8); margin: 4px 0 0; font-size: 0.85rem; }

.close-white { color: white; opacity: 0.8; }
.close-white:hover { opacity: 1; color: white; }

.modal-body.scrollable {
    max-height: 70vh;
    overflow-y: auto;
    padding: 30px;
    display: block; /* Disable flex centering which causes top overlap */
    width: 100%;
}

.form-section {
    background: #fcfcfc;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--primary-color);
}

.section-title i {
    font-size: 1.2rem;
}

.btn-purple {
    background: var(--primary-color);
    color: white !important;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-purple:hover {
    background: #6200ea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 600px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Company Profile Modal
   ============================================================ */

.profile-modal-content {
    max-width: 560px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.profile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #EFEFEF;
    background: #fff;
}

.profile-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
}

.profile-modal-title i {
    color: #6C5CE7;
    font-size: 20px;
}

.profile-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-profile-edit {
    background: #6C5CE7;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}
.btn-profile-edit:hover { background: #5b4cc4; }

.profile-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #888;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.profile-modal-close:hover { color: #333; }

.profile-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-section {
    border: 1px solid #EFEFEF;
    border-radius: 10px;
    padding: 16px 18px;
}

.profile-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #6C5CE7;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.profile-basic-info {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #F5F4FF;
    border-radius: 8px;
    padding: 14px 16px;
}

.profile-avatar-large {
    width: 52px;
    height: 52px;
    background: #6C5CE7;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-basic-details label {
    font-size: 11px;
    color: #999;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.profile-biz-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.profile-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-detail-item.full-width {
    grid-column: 1 / -1;
}

.profile-detail-item label {
    font-size: 11px;
    color: #999;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-detail-item label i {
    color: #6C5CE7;
    font-size: 13px;
}

.profile-detail-item p {
    font-size: 14px;
    color: #222;
    font-weight: 500;
}

.profile-detail-item p.text-muted {
    color: #999;
    font-weight: 400;
}

.holiday-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.holiday-tag {
    background: #EEF0FF;
    color: #6C5CE7;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 500;
}

.profile-modal-footer {
    padding: 14px 24px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #EFEFEF;
}

.btn-profile-close {
    background: #6C5CE7;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-profile-close:hover { background: #5b4cc4; }

/* Profile Edit Fields */
.profile-edit-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-edit-field label {
    font-size: 11px;
    color: #6C5CE7;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    font-family: 'Inter', sans-serif;
}

.profile-input:focus { border-color: #6C5CE7; }

.profile-input-file {
    font-size: 13px;
    color: #555;
    padding: 4px 0;
}

.holidays-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
}

.holiday-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

.holiday-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #6C5CE7;
    cursor: pointer;
}

.btn-profile-cancel {
    background: transparent;
    color: #555;
    border: 1px solid #DDD;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-profile-cancel:hover { background: #f5f5f5; }

/* ===== Attachment Card Upload Styles ===== */
.attachment-card {
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    position: relative;
}
.attachment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}
.attachment-card.att-selected {
    box-shadow: 0 0 0 2.5px #6c63ff inset;
}
.att-file-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #4f46e5;
    background: #eef2ff;
    border-radius: 6px;
    padding: 3px 10px;
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Detailed Payroll Generator --- */
.payroll-detailed-generator {
    background: #f8fafc;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.payroll-form-container {
    background: white;
}

.payroll-form-header {
    padding: 24px 30px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(to right, #ffffff, #f8faff);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.breadcrumb .active {
    color: #7c4dff;
    font-weight: 700;
}

.payroll-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    padding: 30px;
}

.payroll-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    height: 100%;
}

.payroll-section-card:hover {
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: #7c4dff40;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    width: 32px;
    height: 32px;
    background: #f5f3ff;
    color: #7c4dff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.earnings .section-title i { background: #f0fdf4; color: #10b981; }
.deductions .section-title i { background: #fef2f2; color: #ef4444; }

.payroll-form-group {
    margin-bottom: 18px;
}

.payroll-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.payroll-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.2s;
    background: #fcfdfe;
}

.payroll-input:focus {
    outline: none;
    border-color: #7c4dff;
    background: white;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.payroll-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.payroll-footer-card {
    background: #f8fafc;
    padding: 30px 40px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-summary {
    display: flex;
    gap: 50px;
}

.calc-item {
    display: flex;
    flex-direction: column;
}

.calc-item .label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calc-item .value {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
}

.calc-item.highlight .value {
    font-size: 32px;
    background: linear-gradient(135deg, #7c4dff, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-large {
    padding: 16px 36px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3);
}

.history-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.history-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
}

.btn-refresh-history {
    background: #f1f5f9;
    color: #64748b;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh-history:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.payroll-actions-cell {
    display: flex;
    gap: 8px;
}

.btn-payroll-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-payroll-action.view { background: #f0f7ff; color: #3b82f6; }
.btn-payroll-action.delete { background: #fff1f2; color: #ef4444; }

.btn-payroll-action:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

/* --- Add Employee Section --- */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 5px;
}

.breadcrumb-nav .active {
    color: #7c4dff;
    font-weight: 700;
}

.add-emp-container {
    max-width: 1200px;
    margin: 20px 0 40px;
}

.form-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-section-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}

.form-section-card.full-width {
    grid-column: span 2;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    width: 36px;
    height: 36px;
    background: #f5f3ff;
    color: #7c4dff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

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

.form-group-item label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.2s;
    background: #fcfdfe;
}

.form-input:focus {
    outline: none;
    border-color: #7c4dff;
    background: white;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.form-grid-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.doc-upload-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 10px;
}

.doc-upload-item label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 10px;
}

.file-drop-zone {
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fcfdfe;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
}

.file-drop-zone i {
    font-size: 28px;
    color: #cbd5e1;
}

.file-drop-zone span {
    font-size: 12px;
    font-weight: 500;
}

.file-drop-zone:hover, .file-drop-zone.active {
    border-color: #7c4dff;
    background: #f5f3ff;
    color: #7c4dff;
}

.file-drop-zone:hover i, .file-drop-zone.active i {
    color: #7c4dff;
}

.file-drop-zone.success {
    border-color: #10b981;
    background: #f0fdf4;
    color: #10b981;
}

.file-drop-zone.success i {
    color: #10b981;
}

@media (max-width: 1024px) {
    .form-section-grid {
        grid-template-columns: 1fr;
    }
    .form-section-card.full-width {
        grid-column: span 1;
    }
    .doc-upload-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .form-grid-inner, .doc-upload-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================ */
/* Enhanced Lead Row Styling */
/* ============================================================ */

.enhanced-lead-row {
    transition: all 0.2s ease-in-out;
}
.enhanced-lead-row:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.lead-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 20px;
}

.lead-date-pill i {
    color: #94a3b8;
}

.lead-name-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.l-name-main {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
}

.l-source-sub {
    font-size: 11px;
    font-weight: 600;
    color: #8b5cf6;
    background: #f5f3ff;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.lead-owner-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.owner-name {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.styled-drop {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.styled-drop:focus {
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.req-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #d97706;
    border: 1px solid #fde68a;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
}

.req-badge i {
    color: #f59e0b;
}

/* Column Manager Styles */
.column-manager-container {
    position: relative;
    display: inline-block;
}

.column-manager-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    padding: 15px;
    margin-top: 10px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.column-manager-dropdown.active {
    display: flex;
}

.column-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.column-option:hover {
    background: #f1f5f9;
}

.column-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #7c4dff;
    cursor: pointer;
}

.hidden-column {
    display: none !important;
}

/* Enhanced Filtering Styles */
.filter-dropdown-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    border-radius: 12px;
}

/* ---------------------------------------------------
   LEAD MANAGEMENT SUB-TABS & FOLLOW-UP MANAGER
   --------------------------------------------------- */

.lead-sub-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 20px;
}

.lead-sub-tab {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: none;
}

.lead-sub-tab i {
    font-size: 16px;
}

.lead-sub-tab:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.lead-sub-tab.active {
    background: #ef4444; /* Match "Follow-ups" red from image */
    color: white !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.lead-sub-tab.home.active {
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

/* Follow-Up Card Grid */
.followup-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.followup-stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid #f1f5f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.followup-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.followup-stat-card.blue { border-left: 4px solid #3b82f6; background: #f0f9ff; }
.followup-stat-card.orange { border-left: 4px solid #f97316; background: #fff7ed; }
.followup-stat-card.purple { border-left: 4px solid #8b5cf6; background: #f5f3ff; }
.followup-stat-card.red { border-left: 4px solid #ef4444; background: #fef2f2; }
.followup-stat-card.green { border-left: 4px solid #10b981; background: #f0fdf4; }

.followup-stat-val {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.followup-stat-card.blue .followup-stat-val { color: #3b82f6; }
.followup-stat-card.orange .followup-stat-val { color: #f97316; }
.followup-stat-card.purple .followup-stat-val { color: #8b5cf6; }
.followup-stat-card.red .followup-stat-val { color: #ef4444; }
.followup-stat-card.green .followup-stat-val { color: #10b981; }

.followup-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

/* Follow-up View Controls */
.followup-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 12px 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.followup-tabs {
    display: flex;
    gap: 10px;
}

.followup-tab {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    background: white;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.followup-tab.active {
    background: #7c4dff;
    color: white !important;
    border-color: #7c4dff;
}

/* Follow-up Items */
.followup-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.followup-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.followup-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #7c4dff;
}

.followup-card.high::before { background: #ef4444; }
.followup-card.medium::before { background: #f59e0b; }
.followup-card.low::before { background: #10b981; }

.followup-card-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.followup-lead-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.followup-lead-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fef2f2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.followup-lead-details h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.followup-priority-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.followup-priority-badge.high { background: #fee2e2; color: #ef4444; }
.followup-priority-badge.medium { background: #fef3c7; color: #d97706; }
.followup-priority-badge.low { background: #d1fae5; color: #10b981; }

.followup-schedule-info {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding: 0 20px;
}

.followup-info-pill {
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.followup-info-pill.rescheduled {
    background: #e0f2fe;
    color: #0284c7;
}

.followup-notes-box {
    margin: 15px 20px;
    padding: 12px 15px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #e2e8f0;
}

.followup-notes-box p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.followup-actions {
    padding: 15px 20px 20px;
    display: flex;
    gap: 12px;
}

.btn-followup {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-followup.complete { background: #10b981; color: white; border: none; }
.btn-followup.reschedule { background: #f59e0b; color: white; border: none; }
.btn-followup.delete { 
    background: #dc2626; 
    color: white; 
    border: none;
    max-width: none;
}

.btn-followup:hover { opacity: 0.9; transform: translateY(-1px); }

/* Schedule Modal Specifics */
.schedule-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Follow-up Header Box */
.followup-header-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px 0;
}

.followup-manager-intro h3 {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.followup-manager-intro h3 i {
    color: #f59e0b;
    font-size: 24px;
}

.followup-manager-intro p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.whatsapp-btn {
    background: #25d366;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.whatsapp-btn:hover { opacity: 0.8; }

/* Grid utility */
.schedule-modal-full { grid-column: span 2; }


/* Project Workflow Stepper */
.project-workflow-container {
    margin: 15px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.workflow-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 5px;
    margin-top: 5px;
}

.workflow-stepper::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 30px;
    right: 30px;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 9px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    max-width: 50px;
    line-height: 1.1;
}

.step-item.active .step-dot {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}

.step-item.active .step-label {
    color: #1e293b;
    font-weight: 700;
}

.step-item.completed .step-dot {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.step-item.completed .step-label {
    color: #6366f1;
}

.workflow-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.current-step-info {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.current-step-info strong {
    color: #6366f1;
}

.btn-next-step {
    background: #6366f1;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-next-step:hover {
    background: #4f46e5;
}

.btn-next-step:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* =================== QUOTATION PRINT STYLES =================== */
#quotationPrintContainer {
    font-family: Arial, sans-serif;
    color: #1e293b;
    line-height: 1.3;
}

@page {
    margin: 0; /* Forces removal of browser-added URL header/footer */
}

.print-page {
    background: white;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 20mm 15mm; /* Internal padding since margin is 0 */
    position: relative;
    box-shadow: none;
    box-sizing: border-box;
}

@media print {
    body > *:not(#quotationPrintContainer) {
        display: none !important;
    }
    #quotationPrintContainer {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    .print-page {
        margin: 0;
        page-break-after: always;
        width: 100%;
        min-height: 100vh;
        border: none !important;
    }
}

.header-line { border: none; border-top: 2.5px solid #000; margin: 8px 0; }
.print-project-title { color: #0284c7; text-align: center; font-size: 20pt; margin: 15px 0 5px 0; font-weight: bold; }
.print-kw-title { color: #0284c7; text-align: center; font-size: 24pt; margin: 0 0 15px 0; font-weight: bold; }

.print-logo-section { text-align: center; padding: 20px 0; position: relative; }
.print-main-logo-new { max-height: 100px; width: auto; }
.print-slogan { background: #ffff00; font-weight: 900; font-size: 16pt; padding: 8px; margin-top: 15px; text-transform: uppercase; color: #000; display: inline-block; width: 100%; }

.print-address-row { display: flex; justify-content: space-between; margin-top: 30px; padding: 0 5px; font-size: 10.5pt; }
.print-client-info { text-align: left; min-width: 250px; }
.print-footer-address { position: absolute; bottom: 10mm; width: calc(100% - 30mm); text-align: center; color: #2563eb; font-size: 9.5pt; border-top: 1px solid #e2e8f0; padding-top: 8px; left: 15mm; font-weight: 600; }

.doc-title { text-align: center; font-size: 22pt; font-weight: 900; margin-bottom: 20px; letter-spacing: 2px; }
.quotation-meta { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 10pt; }
.meta-right { text-align: right; }
.comp-name { color: #1e1b4b; font-size: 16pt; font-weight: 900; }
.comp-sub { color: #f59e0b; font-size: 11pt; font-weight: 700; }
.comp-motto { font-size: 8.5pt; color: #4338ca; }

.quote-table, .terms-table, .bank-table { width: 100% !important; border-collapse: collapse; margin-top: 8px; font-size: 10pt; table-layout: fixed; }
.quote-table th, .quote-table td { border: 1.5px solid #000; padding: 7px; text-align: left; }
.quote-table thead th { background: #f59e0b; color: #000; text-align: center; font-weight: 900; }
.hl-yellow { background: #ffff00 !important; font-weight: bold; text-align: center; }
.hl-green { background: #4ade80 !important; font-weight: bold; }
.hl-blue { background: #bfdbfe !important; font-weight: bold; }
.final-total { background: #fff; font-weight: 900; font-size: 11.5pt; }

.section-heading { background: #f8fafc; padding: 7px; border-left: 5px solid #f59e0b; margin: 20px 0 10px 0; font-weight: bold; }
.terms-block { margin: 15px 0; line-height: 1.6; font-size: 10pt; }
.bank-table td { padding: 5px; border: 1.5px solid #000; }
.bank-table td:first-child { font-weight: bold; width: 150px; background: #f8fafc; }

/* Responsive adjustments for modal */
.select-with-icon { position: relative; }
.select-with-icon i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #64748b; font-size: 1.1rem; }
.select-with-icon select { padding-left: 40px !important; height: 48px; width: 100%; border-radius: 12px; border: 1.5px solid #e2e8f0; background: #fff; font-size: 14.5px; color: #1e293b; transition: all 0.3s ease; appearance: none; cursor: pointer; }
.select-with-icon::after { content: '\ea4e'; font-family: 'remixicon'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #64748b; pointer-events: none; }
.select-with-icon select:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); outline: none; }


/* Theme Gallery */
.theme-gallery-content { max-width: 600px; }
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 10px 0; }
.theme-card { border: 2px solid #f1f5f9; border-radius: 12px; padding: 15px; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; gap: 10px; }
.theme-card:hover { border-color: var(--primary-color); background: #f8fafc; }
.theme-card.active { border-color: var(--primary-color); background: rgba(var(--primary-rgb), 0.05); }
.theme-preview { display: flex; gap: 4px; height: 30px; border-radius: 6px; overflow: hidden; }
.preview-bar { flex: 1; }
.theme-name { font-weight: 600; font-size: 0.95rem; color: #1e293b; }

/* ============================================================ */
/* Change Password / Auth Modals                                 */
/* ============================================================ */

.modal-overlay-auth {
    z-index: 2000;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
}

.modal-content-auth {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

.modal-header-auth {
    padding: 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-auth h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body-auth {
    padding: 24px;
}

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

.auth-label {
    display: block;
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.1rem;
}

.auth-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.2s;
    color: #333;
}

.auth-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.auth-form-help {
    margin: 5px 0 20px 0;
    color: #94a3b8;
    font-size: 0.8rem;
}

.modal-footer-auth {
    display: flex;
    gap: 16px;
    padding: 0;
    border-top: none;
    margin-top: 24px;
}

/* Button variants for auth modals */
.btn-auth-cancel {
    flex: 1;
    padding: 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-auth-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-auth-submit {
    flex: 1;
    padding: 12px 14px;
    background: #8b5cf6;
    border: none;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-auth-submit:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-auth-submit span {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    text-align: left;
}

