/* ===========================
   1. Base Typography & Layout
   =========================== */
body {
    font-family: 'Inter', 'Nunito', Arial, sans-serif;
    background: #f9fafb;
    color: #222e3a;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: #222e3a;
    font-family: 'Inter', 'Nunito', Arial, sans-serif;
    font-weight: 600;
    margin-top: 0;
}

a {
    color: #18acea;
    text-decoration: none;
    transition: color 0.15s;
}

    a:hover, a:focus {
        color: #4fd1c5;
        text-decoration: underline;
    }

.container, .container-fluid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ===========================
   2. Navbar & Header
   =========================== */
nav, .navbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 1.05rem;
    z-index: 100;
}

    nav a, .navbar a {
        color: #222e3a;
        margin-right: 1.2rem;
        font-weight: 500;
        transition: color 0.15s;
    }

        nav a:last-child, .navbar a:last-child {
            margin-right: 0;
        }

        nav a:hover, .navbar a:hover, nav a.active, .navbar a.active {
            color: #18acea;
            text-decoration: underline;
        }

    .navbar .app-logo {
        height: 36px;
        width: auto;
        border-radius: 6px;
        margin-right: 0.5rem;
    }

    .navbar .app-title {
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: 0.01em;
    }

/* ===========================
   3. Cards & Shadows
   =========================== */
.card, .main-content-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
}

.card-header {
    background: #f4f6fa;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 1rem 1rem 0 0;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.2rem 1.5rem;
}

.shadow-sm {
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* ===========================
   4. Buttons
   =========================== */
.btn, .btn-modern {
    background: #18acea;
    color: #fff;
    border: none;
    border-radius: 0.7rem;
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(24,172,234,0.07);
}

    .btn:hover, .btn:focus, .btn-modern:hover, .btn-modern:focus {
        background: #4fd1c5;
        color: #222e3a;
    }

.btn-outline-primary {
    background: #fff;
    color: #18acea;
    border: 1.5px solid #18acea;
}

    .btn-outline-primary:hover, .btn-outline-primary:focus {
        background: #18acea;
        color: #fff;
    }

.btn-danger, .btn-outline-danger {
    background: #e53e3e;
    color: #fff;
    border: none;
}

.btn-outline-danger {
    background: #fff;
    color: #e53e3e;
    border: 1.5px solid #e53e3e;
}

    .btn-outline-danger:hover, .btn-outline-danger:focus {
        background: #e53e3e;
        color: #fff;
    }

.add-btn {
    background: #4fd1c5;
    color: #222e3a;
}

    .add-btn:hover, .add-btn:focus {
        background: #18acea;
        color: #fff;
    }
/* Example custom button style */
.btn-modern.add-btn {
    background: #4fd1c5;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    padding: 0.6rem 1.4rem;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(79,209,197,0.13);
    transition: background 0.15s, box-shadow 0.15s;
}

    .btn-modern.add-btn:hover, .btn-modern.add-btn:focus {
        background: #18acea;
        color: #fff;
        box-shadow: 0 4px 16px rgba(24,172,234,0.18);
        text-decoration: none;
    }

/* ===========================
   5. Forms
   =========================== */
.form-control, input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="date"], input[type="tel"], select, textarea {
    border: 1.5px solid #d1d5db;
    border-radius: 0.7rem;
    padding: 0.55rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    background: #f9fafb;
    color: #222e3a;
    margin-bottom: 0.7rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

    .form-control:focus, input:focus, select:focus, textarea:focus {
        border-color: #18acea;
        outline: none;
        background: #fff;
    }

label, .form-label {
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #222e3a;
}

.large-label {
    font-size: 1.08rem;
}

.large-rounded {
    border-radius: 1.2rem;
    font-size: 1.08rem;
    padding: 0.7rem 1.2rem;
}

/* ===========================
   6. Tables
   =========================== */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

th, td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

th {
    background: #f4f6fa;
    font-weight: 600;
    color: #222e3a;
}

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

.table-hover tbody tr:hover {
    background: #f1f3f7;
}

.table-sm th, .table-sm td {
    padding: 0.4rem 0.7rem;
    font-size: 0.97em;
}

/* ===========================
   7. Utility Classes
   =========================== */
.text-center {
    text-align: center !important;
}

.text-muted {
    color: #718096 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

.d-flex {
    display: flex !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.gap-1 {
    gap: 0.5rem !important;
}

.gap-2 {
    gap: 1rem !important;
}

.gap-3 {
    gap: 1.5rem !important;
}

.nxv-gap-075 {
    gap: 0.75rem !important;
}

.stretched-link {
    position: absolute;
    inset: 0;
    z-index: 10;
    text-indent: -9999px;
    background: transparent;
}

    .stretched-link:focus {
        outline: 2px solid #4fd1c5;
    }

.nxv-text-white {
    color: #fff !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    background-clip: initial !important;
    text-fill-color: initial !important;
}

.nxv-text-black {
    color: #222e3a !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    background-clip: initial !important;
    text-fill-color: initial !important;
}

/* ===========================
   8. Cards for Insights
   =========================== */
.insight-card {
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .insight-card:hover {
        transform: translateY(-4px) scale(1.03);
        box-shadow: 0 8px 32px rgba(79,209,197,0.13), 0 1.5px 8px rgba(0,0,0,0.07);
        z-index: 2;
    }

/* ===========================
   9. Universal Search
   =========================== */
.universal-search-container {
    position: relative;
    display: inline-block;
    margin-left: 2rem;
}

#universal-search {
    width: 260px;
    border-radius: 1.2rem;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
}

#universal-search-results {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.7rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    z-index: 100;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}

.universal-search-container.active #universal-search-results {
    display: block;
}

.search-section {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f1f3f7;
}

    .search-section:last-child {
        border-bottom: none;
    }

/* ===========================
   10. Mobile Styles
   =========================== */
@media (max-width: 900px) {
    .container, .container-fluid {
        padding: 1rem 0.5rem;
    }

    .card, .main-content-card {
        padding: 1rem 0.7rem;
    }

    nav, .navbar {
        padding: 0.5rem 0.7rem;
    }

    .universal-search-container {
        margin-left: 0.5rem;
    }
}

@media (max-width: 600px) {
    .container, .container-fluid {
        padding: 0.5rem 0.2rem;
    }

    .card, .main-content-card {
        padding: 0.7rem 0.3rem;
    }

    nav, .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .universal-search-container {
        width: 100%;
        margin-left: 0;
    }

    #universal-search {
        width: 100%;
    }
}

/* ===========================
   11. Dispatch Mobile Field Service
   =========================== */
.header {
    background: #18acea;
    color: #fff;
    padding: 1rem;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
}

.case-list {
    padding: 1rem;
}

.case-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px #0001;
    margin-bottom: 1.2rem;
    padding: 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: box-shadow 0.2s;
    position: relative;
}

.case-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
}

.case-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #18acea;
    flex: 1;
}

.case-status {
    display: inline-block;
    padding: 0.2em 0.9em;
    border-radius: 1em;
    font-size: 0.92em;
    font-weight: 500;
    color: #fff;
    background: #6c757d;
    margin-left: 0.5em;
    min-width: 80px;
    text-align: center;
}

    .case-status.Open {
        background: #18acea;
    }

    .case-status.EnRoute, .case-status['En Route'] {
        background: #ffc107;
        color: #222;
    }

    .case-status.OnSite, .case-status['On Site'] {
        background: #198754;
    }

    .case-status.Completed {
        background: #6c757d;
    }

.case-meta {
    font-size: 0.97em;
    color: #444;
}

.case-actions {
    display: flex;
    gap: 1em;
    margin-top: 0.5em;
}

.case-action-btn {
    flex: 1;
    background: #f1f3f7;
    border: none;
    border-radius: 6px;
    padding: 0.5em 0;
    color: #18acea;
    font-weight: 500;
    font-size: 1em;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s;
}

    .case-action-btn:active {
        background: #e2e6ea;
    }

.case-link {
    display: block;
    margin-top: 0.5em;
    color: #18acea;
    text-decoration: none;
    font-weight: 500;
    font-size: 1em;
    text-align: right;
}

.no-cases {
    text-align: center;
    color: #888;
    margin-top: 2em;
    font-size: 1.1em;
}

/* ===========================
   12. Miscellaneous
   =========================== */
.section-header {
    font-size: 1.15rem;
    font-weight: 600;
    color: #18acea;
    margin-top: 1.5rem;
    margin-bottom: 0.7rem;
}

.sticky-attachments {
    position: sticky;
    top: 1.5rem;
}

::-webkit-scrollbar {
    width: 8px;
    background: #f4f6fa;
}

::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #cbd5e1;
    }

/* ===========================
   13. NexVolt Brand Colors & Gradients
   =========================== */
.nxv-primary {
    color: #18acea !important;
}

.nxv-bg-primary {
    background-color: #18acea !important;
    color: #fff !important;
}

.nxv-border-primary {
    border-color: #18acea !important;
}

.nxv-header-bg-gradient {
    background: linear-gradient(90deg, #222e3a 0%, #888 100%) !important;
    color: #fff !important;
}

/* Buttons */
.btn-nxv, .btn-nxv-primary {
    background: #18acea !important;
    color: #fff !important;
    border: none;
    border-radius: 0.7rem;
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(24,172,234,0.07);
}

    .btn-nxv:hover, .btn-nxv:focus, .btn-nxv-primary:hover, .btn-nxv-primary:focus {
        background: #13b3d6 !important;
        color: #fff !important;
    }
/* Outline style */
.btn-nxv-outline, .btn-nxv-outline-primary {
    background: #fff;
    color: #18acea;
    border: 1.5px solid #18acea;
    border-radius: 0.7rem;
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}

    .btn-nxv-outline:hover, .btn-nxv-outline:focus, .btn-nxv-outline-primary:hover, .btn-nxv-outline-primary:focus {
        background: #18acea;
        color: #fff;
    }
/* For nav links (if needed) */
.nxv-nav-link {
    color: #18acea !important;
    font-weight: 500;
    transition: color 0.15s;
}

    .nxv-nav-link:hover, .nxv-nav-link:focus {
        color: #13b3d6 !important;
        text-decoration: underline;
    }

.nxv-mb-1 {
    margin-bottom: 1rem !important;
}

.nxv-mb-2 {
    margin-bottom: 2rem !important;
}

.nxv-gap-075 {
    gap: 0.75rem !important;
}

.nxv-w-100 {
    width: 100% !important;
}

.nxv-text-center {
    text-align: center !important;
}

.nxv-py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.nxv-brand {
    color: #18acea !important;
}

/* Field Service Mobile Background */
.field-service-bg {
    background: url('/static/nexvoltdotllcmobilebackground.png') no-repeat center center;
    background-size: cover;
    min-height: 100vh;
    width: 100%;
}

/* ===========================
   14. CRM Sidebar & Header
   =========================== */
.sidebar {
    min-width: 70px;
    max-width: 90px;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
}

    .sidebar .nav-link {
        font-size: 0.95rem;
        padding: 0.5rem 0.5rem;
        text-align: center;
        white-space: nowrap;
    }
/* CRM Header Navigation Styles */
.crm-header-navbar {
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    margin-bottom: 0;
    z-index: 100;
}

.crm-header-link {
    color: #222e3a;
    font-weight: 600;
    font-size: 1.08rem;
    padding: 0.4rem 1.2rem;
    border-radius: 1.2rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.01em;
}

    .crm-header-link.active,
    .crm-header-link:hover,
    .crm-header-link:focus {
        background: #e6f7fa;
        color: #18acea;
        text-decoration: none;
    }



.accordion-header, .accordion-button, .accordion-header h2, .accordion-header h3, .accordion-header h4, .accordion-header h5, .accordion-header h6 {
    color: #222e3a !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    background-clip: initial !important;
    text-fill-color: initial !important;
}

/* ===========================
   15. Extended Navbar Styles
   =========================== */
/* Navbar gradient background */
.nxv-header-bg-gradient {
    background: linear-gradient(90deg, #222e3a 0%, #888 100%) !important;
    color: #fff !important;
}

/* Navbar text: white and larger */
.nxv-header-bg-gradient .navbar-brand,
.nxv-header-bg-gradient .navbar-nav .nav-link {
    color: #fff !important;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Hamburger icon color for mobile */
.nxv-header-bg-gradient .navbar-toggler {
    border-color: #fff;
}
.nxv-header-bg-gradient .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.nxv-header-gradient-old {
    background: linear-gradient(90deg, #18acea 0%, #4fd1c5 100%);
    color: #fff !important;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    font-weight: 700;
}

/* Brand gradient for all headers and header-like elements */
h1, h2, h3, h4, h5, h6,
.header,
.nxv-header-gradient {
    background: linear-gradient(90deg, #222e3a 0%, #888 100%);
    color: #fff !important;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    font-weight: 700;
}

/* Navbar gradient background */
.nxv-header-bg-gradient {
    background: linear-gradient(90deg, #222e3a 0%, #888 100%) !important;
    color: #fff !important;
}

/* If you have any other blue gradient classes, update them as well */