* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: light only;
}

html {
    color-scheme: light only;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    color: #334155;
    color-scheme: light only;
    margin: 0;
    padding: 0;
}

/* Main Container - Two Columns */
.main-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
}

/* Left Column - Logo + Sidebar */
.left-column {
    width: 240px;
    display: flex;
    flex-direction: column;
    background: #fcfcfd;
    border-right: 1px solid #e1e8ef;
    flex-shrink: 0;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    padding: 0 32px;
    height: 64px;
    flex-shrink: 0;
    background: #ffffff;
    border-bottom: 1px solid #e1e8ef;
}

.topbar-logo {
    max-height: 42px;
    width: auto;
}

/* Right Column - Tabs + Content */
.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Row - Module Tabs */
.topbar-top-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #e1e8ef;
    height: 44px;
    background: #ffffff;
    flex-shrink: 0;
}

/* Module Tabs Row - Spans Full Width */
.module-tabs-row {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 20px 32px 5px;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.module-tabs-row::-webkit-scrollbar {
    height: 4px;
}

.module-tabs-row::-webkit-scrollbar-track {
    background: transparent;
}

.module-tabs-row::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.module-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.15s ease, color 0.15s ease, border-bottom-color 0.15s ease;
    text-decoration: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.module-tab * {
    pointer-events: none;
}

.module-tab:hover {
    background: #f8fafc;
    color: #0f172a;
}

.module-tab.active {
    color: #059669;
    background: #f8fafc;
    border-bottom-color: #059669;
}

.module-tab-icon {
    font-size: 14px;
}

.module-tab-badge {
    font-size: 9px;
    padding: 2px 5px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* Professional Sidebar */
.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.nav-section {
    padding: 24px 0 0;
}

.nav-section:first-child {
    padding-top: 0;
}

.nav-section-title {
    padding: 16px 16px 6px;
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.nav-section:first-child .nav-section-title {
    padding-top: 12px;
}

.nav-item {
    padding: 11px 16px;
    margin: 1px 12px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    position: relative;
}

.nav-item * {
    pointer-events: none;
}

.nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.nav-item.active {
    background: #059669;
    color: #ffffff;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #059669;
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    width: 18px;
    font-size: 15px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.nav-item.active .nav-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.nav-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.nav-item.active .nav-badge.warning {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Bottom Row - Page Info + User Actions */
.topbar-bottom-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 3px 32px 2px;
    background: #ffffff;
    border-bottom: 1px solid #e1e8ef;
    min-height: 50px;
    flex-shrink: 0;
}

.topbar-bottom-row .page-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
}

.topbar-bottom-row h1 {
    font-size: 26px;
    color: #0f172a;
    font-weight: 700;
    margin: 0px;
    letter-spacing: -0.5px;
}

.topbar-bottom-row .breadcrumb {
    font-size: 13px;
    color: #64748b;
    padding-bottom: 0px;
    margin-bottom: 1px;
}

.topbar-bottom-row .breadcrumb a {
    color: #059669;
    text-decoration: none;
    font-weight: 500;
}

.topbar-bottom-row .breadcrumb a:hover {
    color: #047857;
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8fafc;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8fafc;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.assistant-wrapper {
    position: relative;
}

.assistant-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    max-height: 360px;
    overflow-y: auto;
    min-width: 360px;
}

.assistant-result-header {
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.assistant-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
    color: #0f172a;
    transition: background 0.1s;
}

.assistant-result-item:hover {
    background: #f1f5f9;
}

.assistant-result-item i {
    font-size: 15px;
    color: #2563eb;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.assistant-result-item .ar-text {
    flex: 1;
    min-width: 0;
}

.assistant-result-item .ar-title {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
}

.assistant-result-item .ar-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 1px;
}

.assistant-no-results {
    padding: 16px 14px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.assistant-response {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
}

.assistant-response p {
    margin: 0 0 8px;
}

.assistant-response p:last-child {
    margin-bottom: 0;
}

.assistant-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    color: #0369a1;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.assistant-link:hover {
    background: #e0f2fe;
}

.assistant-link i {
    font-size: 12px;
}

.assistant-box {
    padding: 11px 16px 11px 40px;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    width: 280px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.assistant-box:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.assistant-box::placeholder {
    color: #93c5fd;
}

.assistant-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #2563eb;
    font-size: 15px;
}

.assistant-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.assistant-chip {
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    color: #2563eb;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background 0.1s;
}

.assistant-chip:hover {
    background: #e0f2fe;
}

.assistant-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
}

.assistant-loading i {
    color: #2563eb;
}

.assistant-response a:not(.assistant-link) {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.assistant-response a:not(.assistant-link):hover {
    text-decoration: underline;
}

.assistant-response ol,
.assistant-response ul {
    margin: 0 0 8px;
    padding-left: 20px;
}

.assistant-response li {
    margin-bottom: 4px;
}

.search-wrapper {
    position: relative;
}

.search-box {
    padding: 11px 16px 11px 40px;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    width: 320px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.search-box:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e1e8ef;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
    text-decoration: none;
}

.icon-btn * {
    pointer-events: none;
}

.icon-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.notification-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 7px;
    height: 7px;
    background: #059669;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.icon-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #ffffff;
    line-height: 1;
}

.user-avatar-wrapper {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    border: 1px solid #e1e8ef;
}

.user-avatar-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 1100;
    padding: 6px 0;
}

.user-avatar-menu.open {
    display: block;
}

.user-avatar-menu-company {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px 0;
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    white-space: nowrap;
}

.user-avatar-menu-company i {
    font-size: 11px;
    opacity: 0.85;
}

.user-avatar-menu-name {
    padding: 2px 16px 10px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

.user-avatar-menu-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 2px 0;
}

.user-avatar-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: #334155;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.user-avatar-menu-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.user-avatar-menu-item i {
    width: 16px;
    text-align: center;
    color: #64748b;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    overflow-y: auto;
    padding: 6px 40px 32px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #e1e8ef;
    transition: all 0.2s;
    position: relative;
}

.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.stat-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-card.danger .stat-icon {
    background: #fee2e2;
    color: #dc2626;
}

.stat-card.warning .stat-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.stat-card.success .stat-icon {
    background: #d1fae5;
    color: #059669;
}

.stat-card.info .stat-icon {
    background: #dbeafe;
    color: #2563eb;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.stat-change {
    font-size: 13px;
    color: #059669;
    font-weight: 500;
}

.stat-change.negative {
    color: #dc2626;
}

/* Calendar and Schedule Grid */
.calendar-schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    margin-bottom: 24px;
}

.calendar-card, .schedule-card, .week-view-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e1e8ef;
    padding: 24px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-month {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.calendar-nav {
    display: flex;
    gap: 6px;
}

.calendar-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e1e8ef;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #64748b;
}

.calendar-nav-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.calendar-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    padding: 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
}

.calendar-day:hover {
    background: #f1f5f9;
}

.calendar-day.other-month {
    color: #cbd5e1;
}

.calendar-day.today {
    background: #059669;
    color: #ffffff;
    font-weight: 700;
}

.calendar-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #059669;
}

.calendar-day.today.has-events::after {
    background: #ffffff;
}

/* Schedule */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e8ef;
}

.schedule-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.schedule-date {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.schedule-item {
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.schedule-item:hover {
    background: #f8fafc;
    padding-left: 12px;
    margin-left: -12px;
    border-radius: 8px;
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-time {
    width: 75px;
    flex-shrink: 0;
}

.time-display {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.time-duration {
    font-size: 12px;
    color: #94a3b8;
}

.schedule-content {
    flex: 1;
    display: flex;
    gap: 14px;
    align-items: center;
}

.schedule-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.schedule-icon.urgent {
    background: #fef3c7;
    color: #f59e0b;
}

.schedule-icon.medium {
    background: #dbeafe;
    color: #2563eb;
}

.schedule-icon.low {
    background: #d1fae5;
    color: #059669;
}

.schedule-details {
    flex: 1;
}

.schedule-item-title {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 6px;
    font-size: 14px;
}

.schedule-location, .schedule-tech {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.schedule-location i, .schedule-tech i {
    margin-right: 6px;
    width: 14px;
    color: #94a3b8;
}

/* Week View */
.week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e8ef;
}

.week-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.week-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.week-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e1e8ef;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #64748b;
}

.week-nav-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.week-day {
    background: #fcfcfd;
    border-radius: 8px;
    padding: 14px;
    border: 1px solid #e1e8ef;
}

.week-day-header {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e8ef;
}

.week-day-name {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.week-day-number {
    font-size: 18px;
    font-weight: 700;
    color: #334155;
    margin-top: 6px;
}

.week-day-number.today {
    background: #059669;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px auto 0;
}

.week-events {
    margin-top: 10px;
}

.week-event {
    background: #ffffff;
    padding: 9px;
    border-radius: 6px;
    margin-bottom: 7px;
    border-left: 3px solid #059669;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e1e8ef;
    border-left: 3px solid #059669;
}

.week-event:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-color: #cbd5e1;
}

.week-event.urgent {
    border-left-color: #f59e0b;
}

.week-event-time {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
    font-weight: 500;
}

.week-event-title {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

/* Page Content */
.page-content {
    padding: 24px;
    height: 100%;
    overflow-y: auto;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.page-header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn * {
    pointer-events: none;
}

.btn-primary {
    background: #059669;
    color: #ffffff;
}

.btn-primary:hover {
    background: #047857;
}

.btn-primary:active,
.btn-primary:focus {
    background: #047857;
    outline: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-secondary:active,
.btn-secondary:focus {
    background: #e2e8f0;
    outline: none;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-danger:active,
.btn-danger:focus {
    background: #b91c1c;
    outline: none;
}

.btn-success {
    background: #10b981;
    color: #ffffff;
}

.btn-success:hover {
    background: #059669;
}

.btn-success:active,
.btn-success:focus {
    background: #059669;
    outline: none;
}

.btn-warning {
    background: #f59e0b;
    color: #ffffff;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-warning:active,
.btn-warning:focus {
    background: #d97706;
    outline: none;
}

.btn-info {
    background: #3b82f6;
    color: #ffffff;
}

.btn-info:hover {
    background: #2563eb;
}

.btn-info:active,
.btn-info:focus {
    background: #2563eb;
    outline: none;
}

.btn-sm {
    padding: 6px 12px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Filter Section */
.filter-section {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e1e8ef;
    margin-bottom: 20px;
    position: relative;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    transition: all 0.2s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Filter Toggle Buttons */
.filter-toggle-btn {
    position: relative;
    white-space: nowrap;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #059669;
    color: #ffffff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    min-width: 20px;
}

/* Filter Dropdowns */
.filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 280px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

.filter-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e1e8ef;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.filter-dropdown-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-dropdown-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.filter-options-compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    padding: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-option:hover {
    background: #f1f5f9;
}

.filter-option.selected {
    background: #ecfdf5;
}

.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #059669;
}

.filter-option label {
    cursor: pointer;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    flex: 1;
    margin: 0;
}

.filter-option.selected label {
    color: #065f46;
    font-weight: 600;
}

.filter-group-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 10px 4px;
    margin-top: 4px;
}

.filter-group-label:first-child {
    margin-top: 0;
}

/* Filter Chips */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ecfdf5;
    border: 1px solid #059669;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #065f46;
}

.filter-chip-remove {
    background: none;
    border: none;
    color: #059669;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.filter-chip-remove:hover {
    background: #059669;
    color: #ffffff;
}

/* User Assignment Container */
.user-assignment-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
}

.user-assignment-container.vertical {
    display: flex;
    flex-direction: column;
}

.user-assignment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
    background: #ffffff;
    border: 1px solid #e1e8ef;
}

.user-assignment-option:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.user-assignment-option.selected {
    background: #ecfdf5;
    border-color: #059669;
}

.user-assignment-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #059669;
}

.user-assignment-option label {
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    font-weight: 500;
    flex: 1;
    margin: 0;
}

.user-assignment-option.selected label {
    color: #065f46;
    font-weight: 600;
}

/* Roles Permission List */
.roles-permission-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.role-assignment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    transition: all 0.2s ease;
    gap: 16px;
}

.role-assignment-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.role-assignment-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
    margin: 0;
}

.role-assignment-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #059669;
}

.role-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.role-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.role-description {
    font-size: 13px;
    color: #64748b;
}

.system-role-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    margin-top: 4px;
}

.permission-level-select {
    padding: 6px 12px;
    border: 1px solid #e1e8ef;
    border-radius: 6px;
    font-size: 14px;
    color: #334155;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.permission-level-select:hover:not(:disabled) {
    border-color: #cbd5e1;
}

.permission-level-select:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Module Permission List */
.modules-permission-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.module-assignment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.module-assignment-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.module-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.module-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.module-description {
    font-size: 13px;
    color: #64748b;
}

.module-permissions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.permission-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
}

.permission-checkbox-label:hover {
    background: #f1f5f9;
}

.permission-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #059669;
}

.permission-checkbox-label span {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.permission-checkbox-label input[type="checkbox"]:checked + span {
    color: #059669;
    font-weight: 600;
}

/* Office Assignments Grid */
.office-assignments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
}

.office-assignment-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.assignment-column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
}

.assignment-column-header i {
    font-size: 18px;
}

.assignment-column-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.office-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
}

.office-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: #f8fafc;
    border: 1px solid #e1e8ef;
}

.office-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.office-item.selected {
    background: #ecfdf5;
    border-color: #059669;
}

.office-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
    margin: 0;
}

.office-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #059669;
    flex-shrink: 0;
}

.office-name {
    font-size: 14px;
    color: #334155;
    font-weight: 500;
    flex: 1;
}

.office-item.selected .office-name {
    color: #065f46;
    font-weight: 600;
}

/* Entity Assignments Table */
.entity-assignments-container {
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    overflow: hidden;
}

.entity-assignments-table {
    width: 100%;
    border-collapse: collapse;
}

.entity-assignments-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e1e8ef;
}

.entity-assignments-table thead th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entity-assignments-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.entity-assignments-table tbody tr:last-child {
    border-bottom: none;
}

.entity-assignments-table tbody tr:hover {
    background: #f8fafc;
}

.entity-assignments-table td {
    padding: 10px 16px;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
}

.entity-assignments-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #059669;
}

.entity-tree-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.entity-type-icon {
    color: #64748b;
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.entity-type-badge {
    font-size: 11px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.assignee-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #ecfdf5;
    border: 1px solid #059669;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #065f46;
}

.assignee-chip-remove {
    background: none;
    border: none;
    color: #059669;
    cursor: pointer;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.assignee-chip-remove:hover {
    background: #059669;
    color: #ffffff;
}

/* Task Assignee Search */
.task-assignee-search-container {
    position: relative;
}

.task-assignee-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.task-assignee-search-input {
    padding-left: 36px !important;
}

.task-assignee-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 280px;
    overflow-y: auto;
}

.task-assignee-search-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.task-assignee-search-item:last-child {
    border-bottom: none;
}

.task-assignee-search-item:hover {
    background: #ecfdf5;
}

.task-assignee-search-no-results {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

/* Table Container */
.table-container {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e1e8ef;
    overflow: hidden;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e1e8ef;
}

.data-table th {
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.data-table th.sortable:hover {
    color: #059669;
}

.data-table th.sortable .sort-icon {
    margin-left: 6px;
    font-size: 11px;
    color: #cbd5e1;
}

.data-table th.sortable:hover .sort-icon {
    color: #059669;
}

.data-table th.sortable .fa-sort-up,
.data-table th.sortable .fa-sort-down {
    color: #059669;
}

.data-table th.actions-column {
    width: 240px;
    text-align: center;
}

.data-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table td {
    padding: 16px;
    font-size: 14px;
    color: #334155;
}

.data-table td.actions-cell {
    text-align: center;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* User Name Cell */
.user-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Loading and Error States */
.loading-row,
.loading-cell {
    text-align: center;
    padding: 60px 16px;
    color: #64748b;
    font-size: 14px;
}

.loading-cell i {
    margin-right: 8px;
    color: #059669;
}

.error-cell {
    text-align: center;
    padding: 60px 16px;
    color: #dc2626;
    font-size: 14px;
}

.error-cell i {
    margin-right: 8px;
}

/* No Results */
.no-results {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e1e8ef;
    padding: 60px 24px;
    text-align: center;
    color: #64748b;
}

.no-results i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
    display: block;
}

.no-results p {
    margin: 0;
    font-size: 14px;
}

/* Table Links */
.table-link {
    color: #059669;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.table-link * {
    pointer-events: none;
}

.table-link:hover {
    color: #047857;
    text-decoration: underline;
}

.table-link i {
    font-size: 13px;
    opacity: 0.7;
}

.email-link:hover i {
    opacity: 1;
}

.phone-link:hover i {
    opacity: 1;
}

/* ========== USER DASHBOARD ========== */

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 24px;
    color: #64748b;
}

.loading-state i {
    font-size: 48px;
    color: #059669;
    margin-bottom: 16px;
}

.loading-state p {
    font-size: 16px;
    margin: 0;
}

/* Dashboard Header */
.user-dashboard-header {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e1e8ef;
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile-section {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.user-avatar-large i {
    font-size: 48px;
}

.user-profile-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-name-large {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.user-title-text {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

.user-meta {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.user-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.user-meta-item i {
    color: #94a3b8;
}

.user-header-actions {
    display: flex;
    gap: 12px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
}

.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Dashboard Cards */
.dashboard-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e1e8ef;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e1e8ef;
    background: #f8fafc;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.card-body {
    padding: 24px;
}

/* Info Rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.info-value {
    font-size: 14px;
    color: #0f172a;
    font-weight: 500;
    text-align: right;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* Roles List */
.roles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.role-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e1e8ef;
}

.role-indicator {
    width: 4px;
    height: 100%;
    min-height: 40px;
    border-radius: 2px;
    flex-shrink: 0;
}

.role-info {
    flex: 1;
}

.role-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.role-description {
    font-size: 12px;
    color: #64748b;
}

/* Modules List */
.modules-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.module-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e1e8ef;
    transition: all 0.2s ease;
}

.module-item.module-enabled {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.module-item.module-disabled {
    opacity: 0.6;
}

.module-icon {
    width: 20px;
    text-align: center;
    color: #059669;
    font-size: 16px;
}

.module-item.module-disabled .module-icon {
    color: #94a3b8;
}

.module-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
}

.module-status {
    font-size: 14px;
}

/* Charts */
.dashboard-card canvas {
    max-height: 300px;
}

/* Activity Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.timeline-item:last-child .timeline-content {
    border-bottom: none;
    padding-bottom: 0;
}

.timeline-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.timeline-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

.timeline-timestamp {
    font-size: 12px;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Customer Icon */
.customer-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* ========== MODAL STYLES ========== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}

.modal-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-container.modal-lg {
    max-width: 1000px;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e1e8ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 6px 6px;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modal-container.modal-has-autocomplete {
    overflow: visible;
}

.modal-container.modal-has-autocomplete .modal-body {
    overflow-y: visible;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e1e8ef;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f8fafc;
}

/* Bootbox Confirm Styling */
.bootbox .modal-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

.bootbox .modal-footer .btn {
    flex: 0 1 auto;
    width: auto;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Flatpickr Custom Styling */
.flatpickr-calendar {
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.flatpickr-months {
    background: #f8fafc;
    border-bottom: 1px solid #e1e8ef;
}

.flatpickr-current-month {
    color: #0f172a;
    font-weight: 600;
}

.flatpickr-weekdays {
    background: #f8fafc;
}

.flatpickr-weekday {
    color: #64748b;
    font-weight: 600;
}

.flatpickr-day {
    color: #334155;
    border-radius: 6px;
}

.flatpickr-day:hover {
    background: #f1f5f9;
    border-color: #e1e8ef;
}

.flatpickr-day.today {
    border-color: #059669;
    background: #ecfdf5;
    color: #059669;
}

.flatpickr-day.selected {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.flatpickr-day.selected:hover {
    background: #047857;
    border-color: #047857;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #64748b;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: #059669;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #059669;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.form-label .required {
    color: #dc2626;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-input.is-invalid {
    border-color: #dc2626;
}

.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Override Bootstrap's form-select for consistency */
.form-select {
    border: 1px solid #e1e8ef;
    border-radius: 6px;
    font-size: 14px;
    color: #0f172a;
    background-color: #ffffff;
    transition: all 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #ffffff;
}

/* Override Bootstrap's form-control for consistency */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e1e8ef;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
    background-color: #ffffff;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #ffffff;
}

.form-control:disabled {
    background-color: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Force white background for all selects in modals */
.modal-body select.form-input,
.modal-body select.form-control {
    background-color: #ffffff !important;
}

.modal-body select.form-input:focus,
.modal-body select.form-control:focus {
    background-color: #ffffff !important;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-error {
    margin-top: 6px;
    font-size: 12px;
    color: #dc2626;
}

/* Entity Modal Styles - Matching Org Chart Modal */
.entity-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.entity-modal-overlay[style*="display: block"],
.entity-modal-overlay[style*="display: flex"] {
    display: flex !important;
}

.entity-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.entity-modal h3 {
    color: #182442;
    font-size: 20px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}

.entity-modal-field {
    margin-bottom: 20px;
}

.entity-modal-field label {
    display: block;
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.entity-name-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.entity-name-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.entity-name-input.error {
    border-color: #f56565;
}

.entity-name-input.error:focus {
    border-color: #f56565;
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

.entity-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.entity-parent-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background-color: white;
}

.entity-parent-select:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.entity-type-option {
    padding: 16px;
    border-radius: 8px;
    border: 2px solid;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.entity-type-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.entity-type-option.selected {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3);
}

.entity-type-option.holding {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.entity-type-option.company {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

.entity-type-option.subsidiary {
    background: #f3e5f5;
    border-color: #9c27b0;
    color: #6a1b9a;
}

.entity-type-option.region {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.entity-type-option.division {
    background: #fce4ec;
    border-color: #e91e63;
    color: #ad1457;
}

.entity-type-option.office {
    background: #e0f2f1;
    border-color: #009688;
    color: #00695c;
}

.entity-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.entity-modal-save {
    padding: 10px 20px;
    background: #059669;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.entity-modal-save:hover {
    background: #047857;
}

.entity-modal-cancel {
    padding: 10px 20px;
    background: #e2e8f0;
    color: #718096;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.entity-modal-cancel:hover {
    background: #cbd5e0;
}

/* ========== CUSTOMER DASHBOARD ========== */

/* Customer Dashboard Header */
.customer-dashboard-header {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e1e8ef;
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.customer-profile-section {
    display: flex;
    align-items: center;
    gap: 24px;
}

.customer-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(3, 105, 161, 0.2);
}

.customer-profile-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.customer-name-large {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.customer-meta {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.customer-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.customer-meta-item i {
    color: #94a3b8;
}

.customer-header-actions {
    display: flex;
    gap: 12px;
}

/* Customer Stats Grid */
.customer-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-icon.buildings {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.locations {
    background: #e0e7ff;
    color: #4f46e5;
}

.stat-icon.assets {
    background: #fef3c7;
    color: #f59e0b;
}

.stat-icon.jobs {
    background: #d1fae5;
    color: #059669;
}

.stat-icon.quotes {
    background: #fce7f3;
    color: #db2777;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

.chart-wrapper {
    position: relative;
    height: 280px;
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e1e8ef;
    overflow-x: auto;
    padding-bottom: 0;
}

.tab-button {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-bottom: -2px;
}

.tab-button * {
    pointer-events: none;
}

.tab-button:hover {
    color: #059669;
    background: #f8fafc;
}

.tab-button.active {
    color: #059669;
    border-bottom-color: #059669;
    background: transparent;
}

.tab-button i {
    font-size: 16px;
}

/* Grouped Tile Navigation */
.nav-tile-groups {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tile-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tile-group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    padding-left: 4px;
}

.tile-group-items {
    display: flex;
    gap: 6px;
}

.nav-tile {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}

.nav-tile:hover {
    border-color: #059669;
    background: #ecfdf5;
    color: #065f46;
    text-decoration: none;
}

.nav-tile.active {
    border-color: #059669;
    background: #059669;
    color: #ffffff;
    text-decoration: none;
}

.nav-tile i {
    font-size: 13px;
    opacity: 0.7;
}

.nav-tile.active i {
    opacity: 1;
}

.nav-tile .tile-badge {
    font-size: 10px;
    font-weight: 700;
    background: #e2e8f0;
    color: #64748b;
    padding: 1px 5px;
    border-radius: 6px;
    margin-left: 2px;
}

.nav-tile.active .tile-badge {
    background: rgba(255,255,255,0.25);
    color: #ffffff;
}

.nav-tile.nav-tile-view:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.nav-tile.nav-tile-danger:hover {
    border-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

.nav-tile.nav-tile-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f8fafc;
}

.nav-tile.nav-tile-disabled:hover {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: inherit;
}

/* ============================================================
   Detail-page tab bar — single-row pill bar + "More" overflow.
   Used by _CustomerTabNav / _BuildingTabNav. Distinct .dnav-*
   prefix so it never collides with .nav-tile (table row actions)
   or .tab-button (in-page sub-tabs).
   ============================================================ */
.dnav-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
}

.dnav-seg {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    flex-wrap: wrap;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    padding: 4px;
}

.dnav-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    text-decoration: none;
}

.dnav-pill i {
    font-size: 12.5px;
    opacity: 0.65;
}

.dnav-pill:hover {
    color: #065f46;
    background: #ffffff;
    text-decoration: none;
}

.dnav-pill.active {
    background: #ffffff;
    color: #059669;
    border-color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.dnav-pill.active i {
    opacity: 1;
    color: #059669;
}

.dnav-more-wrap {
    position: relative;
    flex: 0 0 auto;
}

.dnav-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.dnav-more-btn .chev {
    font-size: 10px;
    opacity: 0.6;
}

.dnav-more-btn:hover {
    border-color: #059669;
    color: #065f46;
    background: #ecfdf5;
}

.dnav-more-btn.active {
    border-color: #059669;
    color: #059669;
    background: #ecfdf5;
}

.dnav-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 210px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    padding: 6px;
    z-index: 30;
    display: none;
}

.dnav-menu.open {
    display: block;
}

.dnav-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
}

.dnav-menu a i {
    width: 16px;
    text-align: center;
    opacity: 0.65;
}

.dnav-menu a:hover {
    background: #ecfdf5;
    color: #065f46;
    text-decoration: none;
}

.dnav-menu a.active {
    background: #059669;
    color: #ffffff;
}

.dnav-menu a.active i {
    opacity: 1;
}

/* Tab Content */
.tab-content-container {
    position: relative;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Card Header with Actions */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-text {
    background: transparent;
    border: none;
    color: #059669;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-text * {
    pointer-events: none;
}

.btn-text:hover {
    color: #047857;
    text-decoration: underline;
}

/* List Items */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 16px;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.list-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-item-title i {
    color: #64748b;
    font-size: 14px;
}

.list-item-subtitle {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.list-item-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.list-item-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
}

.list-item-meta i {
    font-size: 12px;
}

.list-item-meta .link-email,
.list-item-meta .link-phone {
    color: #059669;
    text-decoration: none;
    font-weight: 500;
}

.list-item-meta .link-email:hover,
.list-item-meta .link-phone:hover {
    text-decoration: underline;
}

.list-item-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.list-item-value {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

/* Activity Items */
.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #059669;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.activity-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

.activity-meta {
    display: flex;
    gap: 16px;
}

.activity-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
}

.activity-meta i {
    font-size: 12px;
}

/* Billing Grid */
.billing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.billing-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.billing-stat {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e1e8ef;
}

.billing-stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.billing-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.billing-stat-meta {
    font-size: 12px;
    color: #94a3b8;
}

/* Badges */
/* Canonical badge — National-Accounts pill style: full-round, soft tint + matching 1px border. */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge i {
    font-size: 10px;
}

.badge-primary {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.badge-success {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.badge-warning {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.badge-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.badge-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

/* File Upload Styles */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 6px;
    font-size: 13px;
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.file-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 4px;
    color: #64748b;
    font-size: 14px;
}

.file-item-details {
    display: flex;
    flex-direction: column;
}

.file-item-name {
    font-weight: 500;
    color: #334155;
}

.file-item-size {
    font-size: 11px;
    color: #94a3b8;
}

.file-item-remove {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.file-item-remove:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Text Utilities */
.text-success {
    color: #059669 !important;
}

.text-warning {
    color: #f59e0b !important;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1400px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .billing-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .customer-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .billing-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== PAGINATION ========== */

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-top: none;
    border-radius: 0 0 10px 10px;
    margin-top: -1px;
}

.pagination-info {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-size-selector label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.page-size-select {
    padding: 6px 10px;
    border: 1px solid #e1e8ef;
    border-radius: 6px;
    font-size: 13px;
    color: #0f172a;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-size-select:hover {
    border-color: #cbd5e1;
}

.page-size-select:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e1e8ef;
    border-radius: 6px;
    background: #ffffff;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.pagination-btn.active {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 0 4px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .pagination-info {
        text-align: center;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 12px;
    }

    .pagination-buttons {
        justify-content: center;
    }

    .page-size-selector {
        justify-content: center;
    }
}

/* ========== SYSTEMS AND ASSETS - SELECTED ITEMS LIST ========== */

.selected-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    min-height: 42px;
    background: #f8fafc;
    border: 1px solid #e1e8ef;
    border-radius: 6px;
}

.selected-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    transition: all 0.2s ease;
}

.selected-item-badge:hover {
    border-color: #94a3b8;
}

.selected-item-name {
    display: inline-block;
}

.remove-selected-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
}

.remove-selected-item:hover {
    background: #fecaca;
    border-color: #fca5a5;
}

.remove-selected-item i {
    font-size: 10px;
}

/* ========== METADATA BADGES ========== */
/* For ActionTypes, Industries, LeadSources tables */

.badge-system {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.badge-custom {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ========== FORM VALIDATION ========== */

/* Invalid field highlighting */
.form-input.is-invalid,
.form-select.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.form-input.is-invalid:focus,
.form-select.is-invalid:focus,
input.is-invalid:focus,
select.is-invalid:focus,
textarea.is-invalid:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
}

/* Field error message */
.field-error-message {
    color: #dc2626;
    font-size: 13px;
    margin-top: 4px;
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Autocomplete Styles
   ======================================== */

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #cbd5e1;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: none;
}

.autocomplete-results.active {
    display: block;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f8fafc;
}

.autocomplete-item-name {
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 2px;
}

.autocomplete-item-meta {
    font-size: 12px;
    color: #64748b;
}

.autocomplete-item.create-new {
    background: #f0f9ff;
    color: #0369a1;
    font-weight: 500;
    border-top: 2px solid #e0f2fe;
}

.autocomplete-item.create-new:hover {
    background: #e0f2fe;
}

.autocomplete-item.create-new i {
    margin-right: 6px;
}

.autocomplete-no-results {
    padding: 16px 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* ========== NAVIGATION RESTRUCTURE ========== */

/* Operations Sidebar Sub-Headers */
.nav-sub-header {
    padding: 14px 16px 6px;
    font-size: 13px;
    font-weight: 700;
    color: #0369a1;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #0369a1;
    margin: 16px 12px 4px;
}

.nav-section:first-child .nav-sub-header {
    margin-top: 8px;
}

/* Sidebar Divider */
.nav-divider {
    height: 1px;
    background: #e1e8ef;
    margin: 12px 16px;
}

/* Top Bar Utility Button Active State */
.icon-btn.active-util {
    background: #ecfdf5;
    border-color: #059669;
    color: #059669;
}

.icon-btn.active-util:hover {
    background: #d1fae5;
    border-color: #047857;
    color: #047857;
}

/* Status Indicator - colored disc used on calendar/schedule/timeline job items */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #94a3b8;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.8);
}

.status-dot.status-pending {
    background: #94a3b8;
}

.status-dot.status-scheduled {
    background: #3b82f6;
}

.status-dot.status-in-progress {
    background: #10b981;
}

.status-dot.status-completed {
    background: #22c55e;
}

.status-dot.status-on-hold {
    background: #f59e0b;
}

/* Status Legend - pill style for legends only */
.status-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.status-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-legend-dot.status-pending {
    background: #94a3b8;
}

.status-legend-dot.status-scheduled {
    background: #3b82f6;
}

.status-legend-dot.status-in-progress {
    background: #10b981;
}

.status-legend-dot.status-completed {
    background: #22c55e;
}

.status-legend-dot.status-on-hold {
    background: #f59e0b;
}

/* Table Action Button Utilities */
.btn.btn-edit {
    background-color: #374151;
    color: #ffffff;
}

.btn.btn-edit:hover {
    background-color: #1f2937;
    color: #ffffff;
}

.btn.btn-delete {
    background-color: #b91c1c;
    color: #ffffff;
}

.btn.btn-delete:hover {
    background-color: #991b1b;
    color: #ffffff;
}

.btn.btn-action {
    background-color: #0284c7;
    color: #ffffff;
}

.btn.btn-action:hover {
    background-color: #0369a1;
    color: #ffffff;
}

/* Read-Only Module Enforcement */
body.module-read-only .actions-cell,
body.module-read-only .write-action {
    display: none !important;
}

/* ===== Merged CRM dashboard perspective sub-tabs (Prospecting / Customer Relations) ===== */
.lifecycle-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e1e8ef;
}

.lifecycle-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    margin-bottom: -1px;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0;
    text-decoration: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease, border-bottom-color 0.15s ease, background-color 0.15s ease;
}

.lifecycle-tab:hover {
    color: #0f172a;
    background: #f8fafc;
}

.lifecycle-tab.active {
    color: #059669;
    border-bottom-color: #059669;
    font-weight: 600;
}
