/* assets/css/style.css - Classic White & Tritcal Grey Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Classic White & Clean Off-White Backgrounds */
    --bg-body: #f4f6f9;
    --bg-surface: #ffffff;
    --card-bg: #ffffff;
    --card-header: #f8fafc;
    --card-border: #edf2f7;
    --border-subtle: #e2e8f0;
    --border-grey: #cbd5e1;
    --border-focus: #94a3b8;
    --focus-ring: rgba(148, 163, 184, 0.22);
    --border-dark: #38393a;

    /* Tritcal Signature Charcoal Grey */
    --tritcal-grey: #38393a;
    --tritcal-grey-dark: #27282a;
    --tritcal-grey-light: #47484a;

    /* Tritcal Accents */
    --primary: #0948b3;
    --primary-hover: #07388d;
    --primary-light: #eef4ff;

    --tertiary: #f67a3c;
    --tertiary-hover: #e06223;
    --tertiary-light: #fff3ec;

    --success: #28a745;
    --success-hover: #218838;
    --success-light: #f0fdf4;

    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-light: #fef2f2;

    --text-heading: #1e293b;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Tritcal Charcoal Grey Tinted Soft Shadows */
    --shadow-sm: 0 2px 8px 0 rgba(0, 0, 0, 0.04), 0 1px 3px 0 rgba(0, 0, 0, 0.03);
    --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.07), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 24px -3px rgba(0, 0, 0, 0.10), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 32px -5px rgba(0, 0, 0, 0.16), 0 10px 16px -5px rgba(0, 0, 0, 0.08);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --sidebar-width: 260px;
    --header-height: 66px;
    --bottom-nav-height: 68px;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-body);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar (Classic Tritcal Slate Grey) */
.sidebar {
    width: var(--sidebar-width);
    background: #38393a;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    /* background: #2b2c2d; */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-close-mobile {
    display: none;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), #007bff);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 19px;
    box-shadow: 0 4px 10px rgba(9, 72, 179, 0.4);
}

.brand-text {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.4px;
}

.brand-text span {
    color: var(--tertiary);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    list-style: none;
}

.menu-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9ca3af;
    padding: 14px 12px 6px;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link i {
    font-size: 17px;
    width: 22px;
    text-align: center;
    color: #93c5fd;
    transition: var(--transition);
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link:hover i {
    color: var(--tertiary);
}

.nav-link.active {
    background: #27282a;
    color: #ffffff;
    font-weight: 700;
    border-left: 4px solid var(--tertiary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.nav-link.active i {
    color: #38bdf8;
}

.nav-link .badge {
    margin-left: auto;
    background: var(--tertiary);
    color: #ffffff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    background: var(--bg-body);
    transition: margin-left var(--transition), width var(--transition);
}

/* Top Sticky Header (Dark Slate Charcoal Grey Theme) */
.top-header {
    height: var(--header-height);
    background: linear-gradient(135deg, #38393a 0%, #2b2c2d 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 20px;
    color: #ffffff;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.page-title {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.desktop-greeting {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 3px;
    font-weight: 500;
}

.greeting-dot {
    color: #64748b;
}

.greeting-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f1f5f9;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-quick-btn {
    height: 38px;
    padding: 0 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    background: linear-gradient(135deg, var(--tertiary), #ff9259);
    color: #ffffff;
    border: none;
    box-shadow: 0 3px 10px rgba(246, 122, 60, 0.35);
}

.header-quick-btn:hover {
    background: linear-gradient(135deg, #e06223, var(--tertiary));
    transform: translateY(-1px);
}

/* Dropdown Panel */
.dropdown-panel {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: fadeIn 0.15s ease-out;
}

.dropdown-header {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--card-border);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-heading);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: var(--tritcal-grey-dark);
}

.dropdown-item i {
    width: 18px;
    font-size: 14px;
    text-align: center;
}

.btn-icon-notif {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon-notif:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--tertiary);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #2b2c2d;
    box-shadow: 0 2px 4px rgba(246, 122, 60, 0.4);
}

/* Notification Dropdown Container */
.notif-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 360px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1.5px solid var(--border-subtle);
    z-index: 9999;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}

.notif-dropdown-menu.active {
    display: flex !important;
    flex-direction: column !important;
}

.notif-dropdown-header {
    padding: 13px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-dropdown-list {
    max-height: 380px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.notif-item {
    padding: 13px 18px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    background: #ffffff;
    transition: background 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover, .notif-item:active {
    background: #f8fafc;
}

.notif-item.unread {
    background: #fff8f5;
    border-left: 3.5px solid #f67a3c;
}

.notif-item.unread:hover, .notif-item.unread:active {
    background: #fff1ea;
}

@media (max-width: 767px) {
    .notif-dropdown-menu {
        position: fixed !important;
        top: 62px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        border-radius: 16px !important;
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35) !important;
        z-index: 10500 !important;
    }

    .notif-dropdown-list {
        max-height: calc(75vh - 70px) !important;
    }
}

/* User Pill (Dark Header Variant) */
.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition);
}

.user-pill:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.14);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.user-pill-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-pill-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.user-pill-role {
    font-size: 10.5px;
    color: #cbd5e1;
    font-weight: 500;
}

.user-pill-logout {
    color: #94a3b8;
    margin-left: 6px;
    font-size: 14px;
    transition: var(--transition);
}

.user-pill-logout:hover {
    color: #fca5a5;
    transform: scale(1.15);
}

/* Sidebar Footer (Status Indicator) */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
}

.system-status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: pulseGlow 2s infinite;
}

.status-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.status-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #ffffff;
}

.status-sub {
    font-size: 10px;
    color: #9ca3af;
}

/* Content Body */
.content-body {
    flex: 1;
    padding: 28px;
}

/* Stat Grid & Cards (Classic White with Tritcal Border Highlights) */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--card-border);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09), 0 2px 6px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--card-accent, var(--primary));
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    background: var(--icon-bg, var(--primary-light));
    color: var(--icon-color, var(--primary));
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.5px;
}

.stat-sub {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Card Container (Classic White) */
.card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    overflow: visible;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.03);
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: #fbfdff;
    border-top-left-radius: calc(var(--radius-lg) - 1px);
    border-top-right-radius: calc(var(--radius-lg) - 1px);
}

.card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.card-body {
    padding: 22px;
}

/* Forms & Controls */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
    width: 100%;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    width: 100%;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
    width: 100%;
}

.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 16px;
    width: 100%;
}

.col-span-1 {
    grid-column: span 1;
}

.col-span-2 {
    grid-column: span 2;
}

.col-span-3 {
    grid-column: span 3;
}

.col-span-full,
.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.form-label .req {
    color: var(--tertiary);
    font-weight: 800;
}

.form-control,
.form-select {
    width: 100%;
    height: 35px;
    padding: 5px 11px;
    font-size: 12.5px;
    color: var(--text-heading);
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    outline: none;
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(56, 57, 58, 0.04);
}

.form-control:hover,
.form-select:hover {
    border-color: var(--border-grey);
}

.form-control::placeholder {
    color: #94a3b8;
    font-size: 12px;
}

textarea.form-control {
    height: auto;
    min-height: 60px;
    padding: 7px 11px;
    resize: vertical;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--focus-ring);
    background-color: #ffffff;
}

.input-with-action {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    position: relative;
}

.input-with-action .form-control,
.input-with-action .form-select,
.input-with-action .custom-select-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.btn-add-action {
    height: 35px;
    width: 35px;
    min-width: 35px;
    max-width: 35px;
    border-radius: 6px;
    background: #4f5358;
    color: #ffffff;
    border: 1px solid #43474c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(79, 83, 88, 0.15);
    padding: 0;
}

.btn-add-action:hover {
    background: #3d4146;
    color: #ffffff;
    transform: scale(1.03);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 14px;
    height: 35px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

/* Primary Button: Refined Medium Slate Charcoal */
.btn-primary {
    background: linear-gradient(135deg, #4f5358 0%, #3d4146 100%);
    color: #ffffff;
    border: 1px solid #3d4146;
    box-shadow: 0 3px 8px rgba(61, 65, 70, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3d4146 0%, #303438 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(61, 65, 70, 0.28);
    border-color: #303438;
}

.btn-accent-orange {
    background: linear-gradient(135deg, var(--tertiary), #ff9259);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(246, 122, 60, 0.25);
}

.btn-accent-orange:hover {
    background: linear-gradient(135deg, #e06223, var(--tertiary));
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #34c759);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.25);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838, var(--success));
}

.btn-secondary {
    background: #ffffff;
    color: #4b5563;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--border-grey);
    color: #1e293b;
}

/* Light Danger Style for Cancel and Close actions */
.btn-light-danger,
.btn-cancel {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.06) !important;
}

.btn-light-danger:hover,
.btn-cancel:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.14) !important;
}

.btn-light-danger:active,
.btn-cancel:active {
    background: #fecaca !important;
    transform: translateY(0);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-sm {
    height: 28px;
    padding: 3px 10px;
    font-size: 11.5px;
    border-radius: 5px;
}

.btn-block {
    width: 100%;
}

/* Custom Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
}

.custom-table th {
    background: #f8fafc;
    color: var(--tritcal-grey);
    font-weight: 700;
    padding: 13px 14px;
    border-bottom: 2px solid var(--card-border);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 0.5px;
}

.custom-table td {
    padding: 14px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-body);
    vertical-align: middle;
}

.custom-table tr:hover td {
    background: #f8fbff;
}

/* Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: capitalize;
}

.badge-pending {
    background: #fff3ec;
    color: #d95c1c;
    border: 1px solid #fed7aa;
}

.badge-called {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-cancelled {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.badge-active {
    background: #eef4ff;
    color: #0948b3;
    border: 1px solid #bfdbfe;
}

.badge-completed {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Modals */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(39, 40, 42, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10500 !important;
    padding: 16px !important;
    pointer-events: auto !important;
}

.modal-overlay.active {
    display: flex !important;
    animation: fadeIn 0.2s ease-out;
}

.modal-dialog,
.modal-overlay .modal-dialog {
    position: relative !important;
    pointer-events: auto !important;
    /* Fix Bootstrap pointer-events: none on modal-dialog */
    background: #ffffff !important;
    width: 100% !important;
    max-width: 540px !important;
    margin: auto !important;
    border-radius: var(--radius-xl) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-xl) !important;
    overflow: visible !important;
    transform: scale(0.95);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fbfdff;
    position: relative;
    z-index: 2;
    border-top-left-radius: calc(var(--radius-xl) - 1px);
    border-top-right-radius: calc(var(--radius-xl) - 1px);
}

.modal-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-heading);
    margin: 0;
}

.modal-close-btn {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: var(--radius-full) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ef4444 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: var(--transition) !important;
    position: relative !important;
    z-index: 10 !important;
    padding: 0 !important;
}

.modal-close-btn:hover {
    background: #ef4444 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    transform: rotate(90deg) scale(1.05);
}

.modal-body {
    padding: 24px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
}

.modal-footer .btn-secondary,
.modal-footer .btn-cancel,
.modal-footer .btn-light-danger {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.05) !important;
}

.modal-footer .btn-secondary:hover,
.modal-footer .btn-cancel:hover,
.modal-footer .btn-light-danger:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.14) !important;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--tritcal-grey);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease-out;
}

.toast.success {
    background: #0b4522;
    border-left: 4px solid var(--success);
}

.toast.error {
    background: #7f1d1d;
    border-left: 4px solid var(--danger);
}

.toast.info {
    background: #033660;
    border-left: 4px solid var(--primary);
}

/* Mobile Bottom Navigation */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: #ffffff;
    border-top: 1px solid var(--card-border);
    z-index: 95;
    padding: 6px 12px;
    box-shadow: 0 -4px 15px rgba(56, 57, 58, 0.08);
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 600;
    gap: 3px;
    flex: 1;
    padding: 6px 4px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.bottom-nav-item i {
    font-size: 19px;
    color: #64748b;
    transition: var(--transition);
}

.bottom-nav-item.active {
    color: #27282a;
    font-weight: 800;
    background: rgba(56, 57, 58, 0.08);
}

.bottom-nav-item.active i {
    color: #27282a;
    transform: scale(1.15);
}

/* Modern Custom Slim Scrollbar (Desktop/Laptop) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(56, 57, 58, 0.6);
    z-index: 99;
}

/* =========================================
   DESKTOP & LAPTOP ENHANCEMENTS (>= 993px)
   ========================================= */
@media (min-width: 993px) {
    .content-body {
        max-width: 1600px;
        margin: 0 auto;
        width: 100%;
    }

    /* 4-Column Balanced Stat Grid on Desktop */
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        margin-bottom: 28px;
    }

    .stat-card {
        padding: 22px 20px;
        border-radius: var(--radius-lg);
        background: #ffffff;
        border: 1px solid var(--card-border);
        box-shadow: 0 4px 12px -2px rgba(56, 57, 58, 0.05);
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    }

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
        border-color: var(--border-subtle);
    }

    .stat-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
        border-radius: var(--radius-md);
        box-shadow: 0 4px 10px rgba(56, 57, 58, 0.06);
    }

    .stat-value {
        font-size: 18px;
        font-weight: 800;
        letter-spacing: -0.6px;
    }

    /* Desktop Sticky Table Headers & Clean Typography */
    .custom-table th {
        position: sticky;
        top: 0;
        background: #f8fafc;
        z-index: 10;
        padding: 12px 16px;
        font-size: 11.5px;
    }

    .custom-table td {
        padding: 12px 16px;
        font-size: 13px;
    }

    .custom-table tbody tr {
        transition: background-color 0.15s ease;
    }

    .custom-table tbody tr:hover {
        background-color: #f8fafc;
    }

    /* Desktop Compact Inputs & Controls */
    .form-control,
    .form-select {
        height: 35px;
        padding: 5px 11px;
        font-size: 12.5px;
        border-radius: 6px;
    }

    textarea.form-control {
        height: auto;
        min-height: 58px;
        padding: 6px 10px;
    }

    .form-label {
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 2px;
        color: #475569;
    }

    .btn-add-action {
        height: 35px;
        width: 35px;
        min-width: 35px;
        max-width: 35px;
        font-size: 13px;
        border-radius: 6px;
    }

    /* Desktop Compact & Crisp Buttons */
    .btn {
        height: 35px;
        padding: 5px 14px;
        font-size: 12.5px;
        border-radius: 6px;
        gap: 6px;
    }

    .btn-sm {
        height: 28px;
        padding: 3px 10px;
        font-size: 11.5px;
        border-radius: 5px;
        gap: 4px;
    }

    /* Desktop Form Grids - Clean Columns */
    .form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px 16px;
    }

    .card {
        box-shadow: 0 4px 16px -2px rgba(56, 57, 58, 0.05);
        border: 1px solid var(--card-border);
    }

    .card-header {
        padding: 12px 18px;
    }

    .card-body {
        padding: 18px;
    }
}

/* Widescreen Desktop / Large Monitor Enhancement */
@media (min-width: 1400px) {
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 22px;
    }
}

/* =========================================
   MOBILE & TABLET RESPONSIVENESS (<= 992px)
   ========================================= */
@media (max-width: 992px) {
    .desktop-greeting {
        display: none !important;
    }

    .desktop-quick-action {
        display: none !important;
    }

    .sidebar-footer {
        display: none !important;
    }

    .user-pill-info {
        display: none !important;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 1000 !important;
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.35);
    }

    .sidebar.open {
        transform: translateX(0) !important;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(3px);
        z-index: 999;
    }

    .sidebar-backdrop.active {
        display: block !important;
    }

    .sidebar-close-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: var(--radius-full);
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #ffffff;
        font-size: 15px;
        cursor: pointer;
        margin-left: auto;
        transition: var(--transition);
    }

    .sidebar-close-mobile:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .main-wrapper {
        margin-left: 0;
        width: 100%;
        padding-bottom: var(--bottom-nav-height);
    }

    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .bottom-nav {
        display: block;
    }

    .content-body {
        padding: 16px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 14px;
        gap: 12px;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 19px;
    }

    .stat-value {
        font-size: 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .toast-container {
        bottom: 80px;
        left: 16px;
        right: 16px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* =========================================================
   CUSTOM ENTERPRISE SEARCHABLE SELECT (CLEAN ERP THEME)
   ========================================================= */

/* Native select hidden visually but active for HTML5 form handling */
.custom-select-native-hidden {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    pointer-events: none !important;
}

.custom-select-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
    font-family: inherit;
    z-index: 10;
}

.custom-select-wrapper.is-open {
    z-index: 99999 !important;
}

/* Ensure parent containers also escalate z-index when select is open */
.form-group:has(.custom-select-wrapper.is-open),
.form-group.has-open-select,
.input-with-action:has(.custom-select-wrapper.is-open),
.input-with-action.has-open-select,
.form-grid>div:has(.custom-select-wrapper.is-open),
.card:has(.custom-select-wrapper.is-open) {
    position: relative;
    z-index: 99999 !important;
}

.custom-select-trigger {
    width: 100%;
    min-height: 44px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(56, 57, 58, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    outline: none;
}

.custom-select-trigger:hover {
    border-color: var(--border-focus);
    background-color: #fafbfc;
}

.custom-select-wrapper.is-open .custom-select-trigger,
.custom-select-trigger:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3.5px var(--focus-ring);
    background-color: #ffffff;
}

.custom-select-wrapper.is-open .custom-select-trigger {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.custom-select-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.custom-select-label.is-placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.custom-select-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 11.5px;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    flex-shrink: 0;
}

.custom-select-wrapper.is-open .custom-select-arrow {
    transform: rotate(180deg);
    color: var(--tritcal-grey-dark);
}

/* Dropdown Menu Box */
.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 30px -4px rgba(56, 57, 58, 0.16), 0 4px 12px -2px rgba(56, 57, 58, 0.08);
    z-index: 999999 !important;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: top center;
}

.custom-select-wrapper.is-open .custom-select-dropdown {
    display: flex;
    animation: customSelectSlideIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes customSelectSlideIn {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Search Box Container at Top of Dropdown */
.custom-select-search-box {
    padding: 6px 8px;
    background: #f8fafc;
    border-bottom: 1px solid #edf2f7;
    position: relative;
    display: flex;
    align-items: center;
}

.custom-select-search-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 11px;
    pointer-events: none;
}

.custom-select-search-input {
    width: 100%;
    height: 28px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    padding: 0 24px 0 26px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-heading);
    outline: none;
    transition: all 0.15s ease;
    font-family: inherit;
}

.custom-select-search-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--focus-ring);
}

.custom-select-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    font-size: 11.5px;
}

.custom-select-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    color: #64748b;
    font-size: 8.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.custom-select-search-clear:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* Options List */
.custom-select-options-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.custom-select-options-list::-webkit-scrollbar {
    width: 4px;
}

.custom-select-options-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.custom-select-option {
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-heading);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: background-color 0.12s ease, color 0.12s ease, padding-left 0.12s ease;
}

.custom-select-option:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.custom-select-option.is-selected {
    background: #f8fafc;
    color: #27282a;
    font-weight: 700;
    border-left: 3px solid #38393a;
    padding-left: 8px;
}

.custom-option-text {
    flex: 1;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

.custom-option-check {
    font-size: 11px;
    color: #38393a;
    display: none;
    flex-shrink: 0;
}

.custom-select-option.is-selected .custom-option-check {
    display: inline-block;
}

.custom-select-option.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Empty State */
.custom-select-empty {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
}

.custom-select-empty i {
    font-size: 16px;
    opacity: 0.5;
}

/* Disabled State */
.custom-select-wrapper.is-disabled .custom-select-trigger {
    background: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Base Trigger Defaults */
.custom-select-trigger {
    width: 100%;
    min-height: 35px;
    height: 35px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(56, 57, 58, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    outline: none;
}

.custom-select-label {
    flex: 1;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

/* Tablet Layout Grid (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {

    .form-grid,
    .form-grid-3,
    .form-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 14px;
    }
}

/* Mobile Responsiveness (<768px) */
@media (max-width: 767px) {

    .form-grid,
    .form-grid-2,
    .form-grid-3,
    .form-grid-4 {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .col-span-1,
    .col-span-2,
    .col-span-3 {
        grid-column: 1 / -1 !important;
    }

    .form-control,
    .form-select,
    .custom-select-trigger {
        height: 42px !important;
        min-height: 42px !important;
        font-size: 13.5px !important;
        border-radius: var(--radius-sm) !important;
    }

    .custom-select-label {
        font-size: 13.5px !important;
    }

    .btn {
        height: 42px !important;
        font-size: 13.5px !important;
    }

    .btn-add-action {
        height: 42px !important;
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        font-size: 15px !important;
    }
}

/* Report Navigation Tabs */
.report-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #ffffff;
    padding: 6px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.report-tab-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.report-tab-item:hover {
    color: var(--text-heading);
    background: #f8fafc;
}

.report-tab-item.active {
    background: #38393a;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(56, 57, 58, 0.25);
    border-color: #38393a;
}

.report-tab-item.active i {
    color: #f67a3c !important;
}

.report-tab-item .tab-badge {
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.report-tab-item.active .tab-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.report-tab-item:not(.active) .tab-badge-pending {
    background: #fee2e2;
    color: #b91c1c;
}

.report-tab-item:not(.active) .tab-badge-complete {
    background: #dcfce7;
    color: #15803d;
}

.report-tab-item:not(.active) .tab-badge-all {
    background: #f1f5f9;
    color: #475569;
}