﻿/* ==================== FONTS ==================== */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
}

/* ==================== PAGE CONTAINER ==================== */
.users-page {
    width: 100%;
    max-width: none;
    padding: 16px 24px 32px;
    gap: 16px;
    font-family: 'Inter', sans-serif;
    position: relative;
    box-sizing: border-box;
    margin: 0;
    background: #F9FAFB;
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 20px;
    margin-bottom: 16px;
}

.breadcrumb-home-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.breadcrumb-text {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #4B5563;
}

.breadcrumb-arrow {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.breadcrumb-current {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #4B5563;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    margin-bottom: 16px;
}

.page-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.page-title {
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 27px;
    color: #000000;
    margin: 0;
    outline: none;
    border: none;
}

.page-title:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.info-icon {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    cursor: pointer;
}

.page-description {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #6B7280;
    margin: 0;
}

/* ==================== SEARCH/FILTER CONTAINER ==================== */
.search-filter-container {
    background: #FFFFFF;
    border: 0.63px solid rgba(229, 231, 235, 0.5);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: 0px 1px 2px -1px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
}

.filter-section {
    display: flex;
    gap: 24px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 0 200px;
}

.filter-group:first-child {
    flex: 0 0 280px;
}

.filter-label {
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #374151;
}

/* Search Input */
.search-input-wrapper {
    position: relative;
    width: 100%;
    height: 37px;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    opacity: 0.5;
}

.search-input {
    width: 100%;
    height: 37px;
    padding: 4px 12px 4px 32px;
    background: #F9FAFB;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #111827;
    box-sizing: border-box;
}

.search-input::placeholder {
    color: #6B7280;
}

.search-input:focus {
    outline: none;
    border-color: #083050;
    box-shadow: none;
}

.search-input:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Filter Dropdowns */
.filter-dropdown {
    width: 100%;
    height: 37px;
    padding: 4px 32px 4px 12px;
    background-color: #F9FAFB;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #000000;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('/images/Vector.svg');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
    cursor: pointer;
    box-sizing: border-box;
}

.filter-dropdown:focus {
    outline: none;
}

/* ==================== TABLE ==================== */
.users-table {
    background: #FFFFFF;
    border: 0.63px solid rgba(229, 231, 235, 0.5);
    border-radius: 12px;
    box-shadow: 0px 1px 2px -1px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 16px;
}

.table-header {
    display: flex;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
}

.table-header .header-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px;
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #111827;
    cursor: pointer;
    background: #FFFFFF;
    flex: 1;
}

.header-cell:first-child {
    padding-left: 24px;
}

.sort-icon {
    width: 12px;
    height: 12px;
    margin-left: 4px;
    opacity: 0.7;
}

/* Table Body */
.table-body {
    max-height: none;
    overflow: visible;
}

.table-row {
    display: flex;
    align-items: center;
    border-bottom: 0.63px solid #F3F4F6;
    background-color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.table-row:hover {
    background-color: #F9FAFB;
}

.table-row.expanded {
    background-color: #FFFFFF;
}

.table-row:last-child {
    border-bottom: none;
}

.table-cell {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #111827;
    min-height: 41px;
    box-sizing: border-box;
    flex: 1;
}

.table-cell.name-cell {
    font-weight: 500;
    padding-left: 24px;
}

.user-name-text {
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #111827;
}

.arrow-icon {
    width: 10px;
    height: 10px;
    opacity: 0.6;
    margin-right: 12px;
    transition: transform 0.2s ease;
}

/* ==================== EXPANDED ROW ==================== */
.expanded-details {
    display: flex;
    background-color: #FAFBFC;
    border-bottom: 0.63px solid #E5E7EB;
}

.expanded-blue-line {
    width: 3px;
    background-color: #083050;
    flex-shrink: 0;
}

.expanded-inner {
    flex: 1;
    padding: 16px 24px;
}

/* Tab Switcher - Figma style */
.tab-switcher {
    display: inline-flex;
    background: #F3F4F6;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    height: 36px;
    box-sizing: border-box;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px;
    background: transparent;
    border: 0.63px solid transparent;
    border-radius: 12px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 29px;
    box-sizing: border-box;
}

.tab-btn:hover {
    color: #374151;
}

.tab-btn.active {
    background: #FFFFFF;
    /*border: 0.63px solid #000000;*/
    color: #111827;
}

.tab-icon-img {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.tab-btn.active .tab-icon-img {
    opacity: 1;
}

/* ==================== DEVICES LIST ==================== */
.devices-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.device-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    border: 0.63px solid;
}

/* Device Background Colors - Figma style */
.device-bg-1 {
    background: #EFF6FF;
    border-color: #BFDBFE;
}

.device-bg-2 {
    background: #F0FDF4;
    border-color: #BBF7D0;
}

.device-bg-3 {
    background: #FAF5FF;
    border-color: #E9D5FF;
}

.device-icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.device-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #FFFFFF;
    gap: 4px;
}

/* Device pill colors matching card backgrounds */
.device-bg-1 .device-pill {
    background: #2563EB;
}

.device-bg-2 .device-pill {
    background: #16A34A;
}

.device-bg-3 .device-pill {
    background: #9333EA;
}

.device-info-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 11px;
    line-height: 16px;
}

/* IMEI/MOBILE label colors matching device rows */
.device-bg-1 .device-label {
    background: #DBEAFE;
    color: #1E40AF;
}

.device-bg-2 .device-label {
    background: #DCFCE7;
    color: #15803D;
}

.device-bg-3 .device-label {
    background: #F3E8FF;
    color: #7E22CE;
}

.device-value {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #111827;
}

.device-enable-btn {
    margin-left: auto;
    width: 90px;
    height: 37px;
    background: #F0FDF4;
    border: 0.63px solid #B9F8CF;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #00A63E;
    cursor: pointer;
    transition: all 0.15s ease;
}

.device-enable-btn:hover {
    background: #DCFCE7;
}

.device-disable-btn {
    margin-left: auto;
    width: 90px;
    height: 37px;
    background: #FEF2F2;
    border: 0.63px solid #FFC9C9;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #E7000B;
    cursor: pointer;
    transition: all 0.15s ease;
}

.device-disable-btn:hover {
    background: #FEE2E2;
}

.no-devices-message {
    padding: 16px;
    text-align: center;
    font-family: Inter, sans-serif;
    font-size: 14px;
    color: #6B7280;
}

/* ==================== ROLES LIST ==================== */
.roles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.role-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #FFFFFF;
    border: 0.63px solid #E5E7EB;
    border-radius: 8px;
}

.role-icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.role-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: #083050;
    border: 0.63px solid #000000;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #FFFFFF;
    gap: 4px;
}

.role-description {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #111827;
}

.no-roles-message {
    padding: 16px;
    text-align: center;
    font-family: Inter, sans-serif;
    font-size: 14px;
    color: #6B7280;
}

/* ==================== PAGINATION WRAPPER ==================== */
.pagination-wrapper {
    padding: 12px 0 4px;
}

/* ==================== NO RESULTS ==================== */
.no-results {
    padding: 40px 16px;
    text-align: center;
    font-family: Inter, sans-serif;
    font-size: 14px;
    color: #6B7280;
}

/* ==================== TABLE LOADING CONTAINER ==================== */
.table-loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

/* ==================== LEGACY STYLES (kept for compatibility) ==================== */
.crew-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
}

.crew-status-active {
    background-color: #DCFCE7;
    color: #166534;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    text-align: center;
    width: 86px;
}

.crew-status-inactive {
    background-color: #F3F4F6;
    color: #6B7280;
    padding: 7px 13px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 400;
    display: inline-block;
    text-align: center;
    width: 86px;
}

.crew-enabled-button {
    background-color: #083050;
    color: white;
    border: none;
    padding: 7px 20px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.crew-disable-button {
    background-color: #E5E7EB;
    color: #374151;
    border: none;
    padding: 7px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
}
/*.device-row select {
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    min-width: 120px;
}*/

.device-row select {
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 400;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #E5E7EB;
    min-width: 88px;
    color: #374151;
    height: 32px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.device-row > div {
    font-size: 12px;
    font-weight: 400;
    color: #444;
}


.singledevice-row select {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 400;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #E5E7EB;
    color: #374151;
    min-width: 90px;
}

@media (max-width: 768px) {
    .table-cell {
        font-size: 14px;
        padding: 6px 8px;
    }


    .table-row {
        flex-wrap: wrap;
    }
    .role-row,
    .crew-header,
    .modal-row {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }

    .crew-table-container {
        width: 100%;
        margin-left: 0;
    }

    .status-pill {
        margin-left: 0;
        width: auto;
    }
    .search-section,
    .filter-label-row {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .search-input,
    .filter-dropdown,
    .new-config-button {
        margin-left: 0 !important;
        margin-top: 12px !important;
        width: 100%;
    }
    .new-config-button {
        width: 100%;
        margin-left: 0;
        margin-top: 12px;
    }
    .device-row {
        flex-direction: column;
        align-items: flex-start;
    }
    /*.singledevice-details {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        padding-left: 24px;
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;
    }*/

    .imeisingledevice,
    .mobilesingledevice,
    .button-container-singledevice {
        flex: 1 1 0;
        min-width: 180px;
        max-width: 300px;
        margin-left: 0;
        white-space: nowrap;
    }

    .button-container-singledevice {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }


    .imei,
    .multidevicemobile,
    .mobile {
        flex: 1 1 220px;
        font-size: 12px;
        font-weight: 400;
        color: #000000;
    }


    .button-container {
        display: flex;
        justify-content: flex-start;
        flex: 0 0 auto;
    }
    .search-filters {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 12px;
    }

    .filter-label,
    .filter-label + .filter-label {
        width: 100%;
    }
    .device-row,
    .singledevice-row {
        flex-direction: column;
        gap: 12px;
        margin-left: 0;
        width: 100%;
        padding: 12px;
    }

    .device-wrapper,
    .device-card {
        width: 100%;
        margin-left: 0;
        padding: 12px;
    }


    .crew-table-header,
    .crew-table-row {
        grid-template-columns: 1fr;
        text-align: left;
        padding: 12px;
    }

    .crew-table-container {
        margin-left: 0;
        width: 100%;
        overflow-x: auto;
    }


    .role-row {
        margin-left: 0;
        margin-top: 0;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .role-list {
        margin-left: 0;
    }
}


.singledevice-row > div {
    font-size: 12px;
    font-weight: 400;
    color: #444;
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    font-size: 14px;
    font-weight: 400;
    color: #666;
    border-top: 0px solid;
    width: 96%; /* match .user-table */
    box-sizing: border-box;
}

.footer-right {
    display: flex;
    justify-content: flex-end;
    flex-grow: 1;
}

.scroll-top-button {
    background-color: #083050;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.scroll-top-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.scroll-top-icon {
    width: 40px;
    height: 40px;
}

.scroll-top-label {
    margin-top: 6px;
    font-size: 16px;
    color: #333;
}

.red-line-container {
    display: flex;
    gap:-2px;
    padding: 17px 24px;
    align-items: flex-start;
}

.red-line {
    width: 3px;
    height: 67px;
    background-color: red;
    margin-top: -8px;
    margin-bottom: 0px;
    border-radius: 2px;
}

.grey-line {
    width: 3px;
    height: 67px;
    background-color: #cfd4df;
    margin-top: -8px;
    margin-bottom: 0px;
    border-radius: 2px;
}

.device-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 24px;
}

select {
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
}

.device-card {
    /*background-color: #fff;*/
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 11px 30px;
    margin-bottom: 16px;
}

.device-row {
    display: flex;
    flex-wrap: wrap;
    gap: 93px;
    align-items: center;
    justify-content: space-between;
}
.singledevice-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-left: 67px;
    font-size: 14px;
    width: 80%;
    box-sizing: border-box;
}


.singledevice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 92px;
    flex-wrap: wrap;
    width: 83%;
    margin-left: 229px;
    margin-top: -56px;
    padding-bottom: 14px;
}


.device-wrapper {
    margin-left: 23px;
    margin-bottom: 16px;
}


.mobile {
    margin-left: 132px;
    color: gray;
}

.imeisingledevice,
.mobilesingledevice {
    flex: 0 0 auto;
    font-size: 12px;
    color: #000000;
}
.imeisingledevice {
    margin-right: 147px;
}


.button-container-singledevice {
    margin-left: 46%;
}

.multi-device-wrapper {
    padding: 16px 24px;
    background-color: #fdfdfd;
    position: relative;
    margin-top: 12px;
}

.multi-device-line {
    position: absolute;
    left: 24px;
    top: 16px;
    bottom: 16px;
    width: 4px;
    background-color: #ff9800;
    border-radius: 2px;
}

.multi-device-row {
    margin-left: 40px;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

    .multi-device-row select {
        padding: 6px 10px;
        font-size: 12px;
        font-weight: 400;
        border-radius: 4px;
        border: 1px solid #ccc;
        background-color: #f0f0f0;
        min-width: 140px;
    }
.device-row select:disabled {
    border: none;
    cursor: default;
}


.device-info {
    display: flex;
    gap: 24px;
    align-items: center;
    font-size: 13px;
    color: #444;
}



.toggle-button {
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

    .toggle-button:hover {
        background-color: #0d47a1;
    }

.active-line {
    width: 3px;
    height: 67px;
    background-color: #083050; /* your blue */
    margin-top: -8px;
    margin-bottom: 0px;
    border-radius: 2px;
}

.row-light {
    background-color: #F9FAFB;
}

.row-white {
    background-color: #FFFFFF;
}



.imei,
.multidevicemobile,
.status {
    flex: 1 1 220px;
    font-size: 14px;
    color: #444;
}

.label {
    font-weight: 500;
    color: #666;
}

.status-active {
    color: #083050;
    font-weight: 500;
}

.status-inactive {
    color: #999;
    font-weight: 400;
}

.role-container {
    display: flex;
    gap: -2px;
    padding: 17px 24px;
    align-items: flex-start;
/*    margin-left: 43px ;
    margin-top:-71px;*/
}

.role-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 24px;
}

.role-row {
    display: flex;
    /*    align-items: center;
    justify-content: space-between;*/
    /*gap: 80px;*/
    flex-wrap: wrap;
    width: 100%;
    margin-top: -51px;
    margin-left: 97px;
    padding-bottom: 22px;
    margin-bottom: 13px;
}


.role-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: 86px;
    color: #6B7280;
    font-size: 14px;
    font-weight: 400;
}

.role-item {
    line-height: 1.4;
}

.role-dropdown {
    padding: 7px 6px;
    font-size: 12px;
    font-weight: 400;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #E5E7EB;
    min-width: 64px;
    color: #374151;
    cursor: not-allowed;
    height: 32px;
}

.crew-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.crew-table-header div,
.crew-table-row div {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}


/*.crew-table-header div,
.crew-table-row div {
    text-align: left;
}*/

/*.crew-divider {
    height: 1px;
    background-color: #C2C2C2;
    width: 102%;
    margin-left: -14px;
    margin-top: -1px;*/ /* optional tweak */
/*}*/

.status-pill {
    background-color: #DCFCE7;
    color: #166534;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    text-align: center;
    width: 86px;
    /*margin-left: 49px;*/
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #22C55E;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.status-dot-active {
    background-color: #22C55E; 
}

.status-dot-inactive {
    background-color: #6B7280; 
}


.crew-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.crew-dropdown {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 400;
    background-color: #E5E7EB;
    color: #374151;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: not-allowed;
    margin-left: 25px;
}

.new-config-button {
    background-color: white;
    color: #083050;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 400;
    border: 1px solid #083050;
    margin-right: 31px;
    height: 39px;
    /* Responsive positioning */
    margin-left: auto;
    margin-top: 0;
}


.crew-table-container {
    /*box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);*/ /* slightly deeper shadow */
    border-radius: 2px;
    background-color: #fff;
    /*padding: 16px 0px;*/
    width: 95%;
    margin-left: 51px;
    margin-bottom: 41px; /* ✅ adds space below the box */
    border: 1px solid #E5E7EB;
}


.crew-table {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.crew-table-header {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1.5fr 1fr 1fr;
    align-items: center;
    background-color: #F3F4F6;
    color: #6B7280;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
}

.crew-table-row {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1.5fr 1fr 1fr;
    align-items: center;
    background-color: #FFFFFF;
    color: #6B7280;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    padding: 12px 16px;
    border-bottom: 1px solid #E5E7EB;
}

.inline-icon {
    width: 14px;
    height: 14px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* Modal Box */
.modal-box {
    background-color: #fff;
    border-radius: 12px;
    width: 800px;
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    color: #000;
    display: flex;
    flex-direction: column;
}

.modal-content {
    padding: 43px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Modal Header */
.modalheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: -15px;
}

.modalconfigheader {
    font-size: 24px;
    font-weight: 500;
    color: #000000;
    margin-left: -26px;
}
.arrowicon {
    margin-left: -2px;
    height: 16px;
    cursor: pointer;
}
.back {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin-left: 9px;
    cursor: pointer;
}

/* Divider */
.modal-divider {
    height: 1px;
    background-color: #DBDBDB;
    margin: 16px -43px; /* cancels modal-box padding */
}


/* Modal Content */
.modal-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-row {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    padding-top: 18px;
}

.modal-label-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .modal-label-group label {
        font-size: 16px;
        font-weight: 500;
        color: #000;
    }

    .modal-label-group p {
        font-size: 14px;
        font-weight: 300;
        color: #666;
    }

/* Value Display */
.modal-value {
    background-color: #E8EBED;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    color: #636363;
    border: 1px solid #DBDBDB;
    height: 51px;
}

.modal-dropdown {
    background-color: #F8FAFC;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    color: #636363;
    border: 1px solid #DBDBDB;
    height: 51px;
    width: 99%;
    position: relative;
}

/* Search Input */
.modal-search {
    position: relative;
}

    .modal-search input {
        width: 100%;
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid #DBDBDB;
        background-color: #F8FAFC;
        height: 51px;
        color: #636363;
    }

    .modal-search .icon {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
    }

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    margin-top: 4px;
    padding: 0;
    list-style: none;
}

    .dropdown-list li {
        padding: 8px 12px;
        cursor: pointer;
    }

        .dropdown-list li:hover {
            background-color: #f0f0f0;
        }

.search-wrapper {
    position: relative;
}
/*.search-input {
    width: 100%;
    padding: 8px;
    font-size: 14px;
}*/

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    margin-top: 4px;
    padding: 0;
    list-style: none;
}

    .search-results li {
        padding: 8px 12px;
        cursor: pointer;
    }


/* Tags */
.modal-tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag.violet-tag {
    background-color: #F3E8FF;
    color: #6B21A8;
}

.tag.pink-tag {
    background-color: #FFE4E6;
    color: #9F1239;
}


.tag {
    font-size: 14px;
    font-weight: 500;
    padding: 10px 25px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .tag.orange {
        background-color: orange;
    }

    .tag.purple {
        background-color: purple;
    }

    .tag.red {
        background-color: red;
    }

    .tag.gray {
        background-color: gray;
    }

/*    .tag.color-1 {
        background-color: #E8B931;
    }

    .tag.color-2 {
        background-color: #D3C1FF;
    }

    .tag.color-3 {
        background-color: #CC8181;
    }

    .tag.color-4 {
        background-color: #55C355;
    }*/

    .tag.color-1 {
        background-color: #F3E8FF; /* violet */
        color: #6B21A8;
    }

    .tag.color-2 {
        background-color: #FFE4E6; /* pink */
        color: #9F1239;
    }

    .tag.color-3 {
        background-color: #E0F2FE; /* light blue */
        color: #0369A1;
    }

    .tag.color-4 {
        background-color: #FEF9C3; /* pale yellow */
        color: #92400E;
    }


.remove-icon {
    margin-left: 4px;
    cursor: pointer;
    color: inherit; 
    border-radius: 50%;
    padding: 0 6px;
}


/* Profile Type Dropdown (if used) */
.profile-type-wrapper {
    position: relative;
    display: inline-block;
}

.profile-type-select {
    width: 100%;
    appearance: none;
    border: none;
    background-color: transparent;
    font-size: 14px;
    font-weight: 400;
    color: #636363;
    padding-right: 24px;
    cursor: pointer;
    outline: none;
}


/*.icon {
    position: absolute;
    right: 12px;
    width: 16px;
    height: 16px;
    pointer-events: none;
}*/

.dropdown-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 64px;
    height: 50px;
}

.reset-button,
.save-button {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 13.6px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    line-height: 1.4;
    border: 1px solid #083050;
}

.reset-button {
    background-color: white;
    color: #000000;
}

.save-button {
    background-color: #083050;
    color: #fff;
}

.closeicon {
    height: 16px;
    cursor: pointer;
}

.no-results {
    padding: 16px;
    font-size: 14px;
    color: #666;
    text-align: center;
}


.section-switcher-wrapper {
    display: flex;
    align-items: center;
}

.section-switcher {
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 400;
    border-radius: 4px;
    /*border: 1px solid #ccc;*/
    border: none;
    background-color: #E5E7EB;
    min-width: 88px;
    color: #374151;
    height: 32px;
    cursor: pointer;
}
.line-and-dropdown {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-bottom: 12px;
    margin-left: 24px;
    margin-top: 13px;
}
.section-switcher:focus {
    outline: none;
    border-color: #E5E7EB; /* blue border */

    box-shadow: none;
}

@media (min-width: 1367px) {
    .imeisingledevice {
        margin-right: 147px;
    }
}


@media (max-width: 1366px) {
    .users-page {
        max-width: none;
        padding-right: 16px;
    }

    .search-filter-container,
    .users-table,
    .table-loading-container,
    .pagination-wrapper {
        width: 100%;
        margin-right: 0;
    }

    .filter-section {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .filter-group {
        flex: 0 0 180px;
    }

    .filter-group:first-child {
        flex: 0 0 250px;
    }

    .search-input-wrapper,
    .filter-dropdown,
    .search-input,
    .filter-label {
        max-width: none;
    }

    .search-input {
        height: 40px;
        font-size: 14px;
        padding: 8px 12px 8px 36px;
        box-sizing: border-box;
    }

    .filter-dropdown {
        height: 40px;
        font-size: 14px;
    }

    .table-header .header-cell,
    .table-row .table-cell {
        font-size: 14px;
        padding: 10px 12px;
    }

    .tab-switcher {
        margin-bottom: 12px;
    }

    .device-card,
    .role-card {
        padding: 14px;
    }

    .device-enable-btn,
    .device-disable-btn {
        width: 96px;
    }
}

@media (max-width: 768px) {
    /* Search & Filter Section */
    .search-section,
    .filter-label-row {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding: 0 12px;
        box-sizing: border-box;
    }

    .section-switcher {
        font-size: 12px;
        height: 32px;
        width: 100%;
        padding: 6px 10px;
    }

    .search-input-wrapper,
    .filter-dropdown,
    .filter-label {
        width: 100%;
        font-size: 14px;
    }

    .search-input {
        font-size: 14px;
        padding: 8px 12px;
        height: 36px;
        width: 100%;
    }

    .filter-dropdown {
        height: 36px;
        font-size: 14px;
    }

    .new-config-button {
        width: 100%;
        font-size: 14px;
        padding: 8px 12px;
        margin: 12px 0;
    }

    /* Table */
    .user-table {
        width: 100%;
        overflow-x: auto;
    }

    .table-header .table-cell,
    .table-row .table-cell {
        font-size: 14px;
        padding: 8px 6px;
    }

    .table-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        width: 100%;
        padding: 0 12px;
    }

    .footer-right {
        width: 100%;
        justify-content: flex-end;
    }

    /* Modal */
    .modal-box {
        width: 100%;
        max-width: 95vw;
        padding: 0;
    }

    .modal-content {
        padding: 20px;
    }

    .modalconfigheader {
        font-size: 18px;
        margin-left: 0;
    }

    .modal-label-group label {
        font-size: 14px;
    }

    .modal-label-group p {
        font-size: 12px;
    }

    .modal-value,
    .modal-dropdown,
    .modal-search input {
        font-size: 12px;
        height: 40px;
        padding: 6px 10px;
    }

    .modal-actions {
        margin-top: 32px;
        gap: 10px;
        flex-direction: column;
    }

    .save-button,
    .reset-button {
        font-size: 12px;
        padding: 6px 10px;
        width: 100%;
    }

    .tag {
        font-size: 12px;
        padding: 6px 16px;
    }

    /* Crew Table */
    .crew-table-container {
        width: 100%;
        margin: 0 auto;
        overflow-x: auto;
    }

    .crew-table-header,
    .crew-table-row {
        font-size: 12px;
        padding: 8px 10px;
    }

    /* Device & Role Sections */
    .device-row,
    .singledevice-row,
    .role-row {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
        width: 100%;
    }

        .device-row > .imei,
        .device-row > .multidevicemobile,
        .device-row > .status,
        .device-row > .button-container {
            width: 100%;
            font-size: 12px;
        }

    .role-list {
        padding: 0 12px;
        font-size: 13px;
        gap: 8px;
        margin-top: 0;
    }

    .role-row {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .role-container {
        padding: 12px;
        gap: 12px;
    }

    .button-container-singledevice {
        align-self: stretch;
        width: 100%;
    }
}

/* ==================== NEW DESIGN RESPONSIVE STYLES ==================== */

/* Large screens (1200px and above) */
@media (min-width: 1200px) {
    .filter-group {
        flex: 0 0 200px;
    }

    .filter-group:first-child {
        flex: 0 0 280px;
    }
}

/* Medium screens (992px - 1199px) */
@media (max-width: 1199px) {
    .filter-group {
        flex: 0 0 180px;
    }

    .filter-group:first-child {
        flex: 0 0 240px;
    }
    
    .device-card {
        flex-wrap: wrap;
    }
    
    .device-info-group {
        flex: 1 1 auto;
    }
}

/* Tablet screens (768px - 991px) */
@media (max-width: 991px) {
    .filter-section {
        flex-wrap: wrap;
    }
    
    .filter-group {
        flex: 1 1 45%;
    }
    
    .filter-group:first-child {
        flex: 1 1 100%;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .header-cell:last-child,
    .table-cell:last-child {
        display: none;
    }
    
    .device-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .device-enable-btn,
    .device-disable-btn {
        margin-left: 0;
        width: 100%;
    }
    
    .role-card {
        flex-wrap: wrap;
    }
}

/* Mobile screens (below 768px) */
@media (max-width: 767px) {
    .users-page {
        padding: 12px;
    }
    
    .breadcrumb {
        padding: 8px 12px;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .breadcrumb-text,
    .breadcrumb-current {
        font-size: 12px;
    }
    
    .page-header {
        padding: 12px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-description {
        font-size: 13px;
    }
    
    .search-filter-container {
        padding: 12px;
    }
    
    .filter-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-group {
        flex: 1 1 100%;
    }

    .filter-group:first-child {
        flex: 1 1 100%;
    }
    
    .search-input,
    .filter-dropdown {
        width: 100%;
        height: 40px;
    }
    
    .table-header {
        display: none;
    }
    
    .table-row {
        display: flex;
        flex-direction: column;
        padding: 12px;
        gap: 8px;
    }
    
    .table-cell {
        padding: 4px 0;
    }
    
    .name-cell {
        font-weight: 600;
    }
    
    .expanded-inner {
        padding: 12px;
    }
    
    .tab-switcher {
        width: 100%;
        justify-content: center;
    }
    
    .tab-btn {
        flex: 1;
        justify-content: center;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .device-card {
        padding: 12px;
    }
    
    .device-pill {
        font-size: 11px;
    }
    
    .device-info-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .device-label {
        font-size: 10px;
    }
    
    .device-value {
        font-size: 13px;
    }
    
    .device-enable-btn,
    .device-disable-btn {
        width: 100%;
        height: 36px;
        font-size: 13px;
    }
    
    .role-card {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .role-pill {
        font-size: 11px;
    }
    
    .role-description {
        font-size: 13px;
    }
}

/* Small mobile screens (below 480px) */
@media (max-width: 479px) {
    .breadcrumb {
        padding: 6px 8px;
    }
    
    .breadcrumb-home-icon {
        width: 14px;
        height: 14px;
    }
    
    .breadcrumb-text,
    .breadcrumb-current {
        font-size: 11px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .info-icon {
        width: 14px;
        height: 14px;
    }
    
    .tab-btn {
        padding: 4px 8px;
        font-size: 12px;
        gap: 4px;
    }
    
    .tab-icon-img {
        width: 12px;
        height: 12px;
    }
    
    .device-icon-wrapper,
    .role-icon-wrapper {
        width: 24px;
        height: 24px;
    }
    
    .device-icon,
    .role-icon {
        width: 16px;
        height: 16px;
    }
}

/* ==================== TAB PAGINATION ==================== */
.tab-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #E5E7EB;
}

.tab-page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F9FAFB;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-page-btn:hover:not(:disabled) {
    background: #E5E7EB;
    border-color: #9CA3AF;
}

.tab-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tab-page-info {
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: #6B7280;
    min-width: 50px;
    text-align: center;
}

/* ==================== NEW EXPANDED ROW STYLES (Figma Specs) ==================== */

/* Expanded row container */
.expanded-details {
    display: flex;
    background-color: #FAFBFC;
    border-bottom: 0.63px solid #E5E7EB;
    min-height: 360px;
}

.expanded-inner {
    flex: 1;
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* New Tab Switcher - Crews/Devices/Roles */
.tab-switcher-new {
    display: inline-flex;
    gap: 7px;
    margin-bottom: 24px;
    width: 313px;
    height: 33px;
}

.tab-btn-new {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    min-width: 97px;
    height: 33px;
    background: #FFFFFF;
    border: 0.63px solid #D1D5DC;
    border-radius: 7px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.tab-btn-new:hover {
    background: #F9FAFB;
}

.tab-btn-new.active {
    background: #083050;
    border-color: #083050;
    color: #FFFFFF;
    box-shadow: 0px 1px 2px -1px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
}

/* ==================== CREWS TAB CONTENT ==================== */

.crews-content-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Crews Header Row */
.crews-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 36px;
    padding-right: 8px;
    gap: 16px;
}

.crews-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.crews-title {
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #111827;
}

.crews-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 6px;
    background: #E6F0F7;
    border-radius: 9999px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #083050;
}

/* Assign Crew Button */
.assign-crew-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 132px;
    height: 36px;
    background: #083050;
    border: none;
    border-radius: 8px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0px 2px 4px -2px rgba(0, 0, 0, 0.1), 0px 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease;
}

.assign-crew-btn:hover {
    background: #0a3d66;
}

.assign-crew-btn-icon {
    width: 14px;
    height: 14px;
}

/* Crews List */
.crews-list-new {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* Crew Card */
.crew-card-new {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 65px;
    padding: 12px;
    background: #F0FDFA;
    border: 1px solid #96F7E4;
    border-radius: 8px;
    box-sizing: border-box;
}

.crew-icon-wrapper-new {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #CBFBF1;
    border-radius: 6px;
    flex-shrink: 0;
}

.crew-icon-new {
    width: 20px;
    height: 20px;
}

.crew-name-container {
    min-width: 139px;
}

.crew-name-text {
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 21px;
    color: #111827;
}

/* Crew Tags */
.crew-tags-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.crew-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
}

.crew-tag-blue {
    background: #DBEAFE;
    color: #1E40AF;
}

.crew-tag-purple {
    background: #F3E8FF;
    color: #7E22CE;
}

.crew-tag-yellow {
    background: #FFEDD4;
    color: #9A3412;
}

/* Unassign Button */
.crew-unassign-btn {
    margin-left: auto;
    width: 96px;
    height: 39px;
    background: #FEF2F2;
    border: 1px solid #FFC9C9;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #E7000B;
    cursor: pointer;
    transition: all 0.15s ease;
}

.crew-unassign-btn:hover {
    background: #FEE2E2;
}

.no-crews-message {
    padding: 24px;
    text-align: center;
    font-family: Inter, sans-serif;
    font-size: 14px;
    color: #6B7280;
}

/* ==================== ASSIGN CREW MODAL ==================== */

.assign-crew-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.assign-crew-modal {
    width: 560px;
    max-height: 584px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Modal Header */
.assign-crew-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #E5E7EB;
    min-height: 94px;
    box-sizing: border-box;
}

.assign-crew-modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.assign-crew-modal-title {
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 30px;
    color: #111827;
    margin: 0;
}

.assign-crew-modal-subtitle {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 21px;
    color: #6B7280;
    margin: 0;
}

.assign-crew-user-name {
    font-weight: 500;
    color: #111827;
}

.assign-crew-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.assign-crew-modal-close:hover {
    background: #F3F4F6;
}

.assign-crew-modal-close img {
    width: 20px;
    height: 20px;
}

/* Search Container */
.assign-crew-search-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
}

.assign-crew-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 462px;
}

.assign-crew-search-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    opacity: 0.5;
}

.assign-crew-search-input {
    width: 100%;
    height: 40px;
    padding: 8px 12px 8px 40px;
    background: #F9FAFB;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    color: #111827;
    box-sizing: border-box;
}

.assign-crew-search-input::placeholder {
    color: #9CA3AF;
}

.assign-crew-search-input:focus {
    outline: none;
    border-color: #D1D5DC;
    box-shadow: none;
}

.assign-crew-sort-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F9FAFB;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.assign-crew-sort-btn:hover {
    background: #E5E7EB;
}

.assign-crew-sort-btn img {
    width: 16px;
    height: 16px;
}

/* Crew List Container */
.assign-crew-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 346px;
}

/* Crew Row */
.assign-crew-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 62px;
    padding: 12px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.assign-crew-row:hover {
    background: #F9FAFB;
}

.assign-crew-row.selected {
    background: #E6F0F7;
    border-color: #083050;
}

/* Checkbox */
.assign-crew-checkbox {
    width: 20px;
    height: 20px;
    background: #FFFFFF;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.assign-crew-checkbox.checked {
    background: #083050;
    border-color: #083050;
}

.assign-crew-checkbox img {
    width: 12px;
    height: 12px;
}

/* Row Icon */
.assign-crew-row-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    border-radius: 8px;
    flex-shrink: 0;
}

.assign-crew-row-icon.selected {
    background: rgba(8, 48, 80, 0.1);
}

.assign-crew-row-icon img {
    width: 20px;
    height: 20px;
}

/* Row Info */
.assign-crew-row-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.assign-crew-row-name {
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 21px;
    color: #111827;
}

.assign-crew-company-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 9999px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 15px;
    color: #4B5563;
}

/* Modal Footer */
.assign-crew-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid #E5E7EB;
    min-height: 73px;
    box-sizing: border-box;
}

.assign-crew-selected-count {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 21px;
    color: #6B7280;
}

.assign-crew-modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.assign-crew-cancel-btn {
    width: 96px;
    height: 40px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 21px;
    color: #083050;
    cursor: pointer;
    transition: all 0.15s ease;
}

.assign-crew-cancel-btn:hover {
    background: #F9FAFB;
}

.assign-crew-confirm-btn {
    width: 103px;
    height: 40px;
    background: #083050;
    border: none;
    border-radius: 8px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 21px;
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0px 2px 4px -2px rgba(0, 0, 0, 0.1), 0px 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease;
}

.assign-crew-confirm-btn:hover:not(:disabled) {
    background: #0a3d66;
}

.assign-crew-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== RESPONSIVE MEDIA QUERIES ==================== */

@media (max-width: 1200px) {
    .expanded-inner {
        padding: 16px;
    }

    .crews-content-container,
    .crews-list-new {
        max-width: 100%;
    }

    .crew-card-new {
        flex-wrap: wrap;
        height: auto;
        min-height: 65px;
    }

    .crew-tags-container {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .tab-switcher-new {
        width: 100%;
        flex-wrap: wrap;
    }

    .tab-btn-new {
        flex: 1;
        min-width: 80px;
    }

    .crews-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        height: auto;
    }

    .assign-crew-btn {
        width: 100%;
    }

    .crew-card-new {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 16px;
    }

    .crew-icon-wrapper-new {
        margin-bottom: 8px;
    }

    .crew-name-container {
        min-width: auto;
        width: 100%;
    }

    .crew-tags-container {
        width: 100%;
        margin-bottom: 12px;
    }

    .crew-unassign-btn {
        margin-left: 0;
        width: 100%;
    }

    /* Modal responsive */
    .assign-crew-modal {
        width: 95vw;
        max-width: 560px;
        max-height: 90vh;
    }

    .assign-crew-modal-header {
        padding: 16px;
    }

    .assign-crew-search-container {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
    }

    .assign-crew-search-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .assign-crew-sort-btn {
        width: 100%;
    }

    .assign-crew-list-container {
        padding: 0 16px 16px 16px;
    }

    .assign-crew-modal-footer {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .assign-crew-modal-actions {
        width: 100%;
    }

    .assign-crew-cancel-btn,
    .assign-crew-confirm-btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .expanded-inner {
        padding: 12px;
    }

    .tab-btn-new {
        padding: 6px 12px;
        font-size: 13px;
    }

    .crews-title {
        font-size: 13px;
    }

    .crew-name-text {
        font-size: 13px;
    }

    .crew-tag {
        font-size: 11px;
        padding: 2px 6px;
    }

    .assign-crew-modal-title {
        font-size: 18px;
    }

    .assign-crew-row {
        padding: 10px;
    }

    .assign-crew-row-name {
        font-size: 13px;
    }
}

/* ==================== CREW OPERATION ALERTS ==================== */

.crew-operation-alert {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 12px;
}

.crew-operation-alert.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.crew-operation-alert.alert-danger {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* Modal alert styling */
.assign-crew-modal-alert {
    width: calc(100% - 48px);
    margin: 0 24px 16px 24px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
}

.assign-crew-modal-alert.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.assign-crew-modal-alert.alert-danger {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* ==================== LOADING STATES ==================== */

.crews-loading,
.assign-crew-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    font-family: Inter, sans-serif;
    font-size: 14px;
    color: #6B7280;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #E5E7EB;
    border-top-color: #083050;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.assign-crew-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-family: Inter, sans-serif;
    font-size: 14px;
    color: #6B7280;
}

/* ==================== COMPANY POPOVER ==================== */

.assign-crew-company-wrapper {
    position: relative;
}

.assign-crew-company-badge {
    cursor: pointer;
    transition: background 0.15s ease;
}

.assign-crew-company-badge:hover {
    background: #E5E7EB;
}

.company-popover {
    position: absolute;
    top: calc(100% + -1px);
    left: 62px;
    width: 109px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0px 4px 6px -4px rgba(0, 0, 0, 0.1), 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 13px;
    z-index: 100;
}

.company-popover-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border-radius: 6px;
}

.company-popover-item:hover {
    background: #F9FAFB;
}

.company-popover-name {
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #111827;
}

.company-popover-code {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: #6B7280;
}

/* Sort button descending state */
.assign-crew-sort-btn.sort-desc img {
    transform: rotate(180deg);
}

