/* Write your custom css in this file. */

/* =====================================================================
   ALBCRM - Modern gradient design update
   Buttons, cards, sidebar, tables and badges get a soft gradient look.
   Everything here is additive (colors/shadows/radius/transitions only)
   so it never changes layout or breaks existing functionality.
===================================================================== */

:root {
    --grad-primary: linear-gradient(135deg, #7aa2f7 0%, #6690F4 45%, #6610f2 100%);
    --grad-success: linear-gradient(135deg, #22b783 0%, #03d87f 100%);
    --grad-info: linear-gradient(135deg, #22B9FF 0%, #12a4ed 100%);
    --grad-warning: linear-gradient(135deg, #ffcb52 0%, #ff8500 100%);
    --grad-danger: linear-gradient(135deg, #f5325c 0%, #FD397A 100%);
    --grad-default: linear-gradient(135deg, #ffffff 0%, #eef1f9 100%);
    --grad-dark: linear-gradient(135deg, #2b3a55 0%, #1d2c48 100%);
    --grad-soft: linear-gradient(135deg, rgba(102, 144, 244, 0.08) 0%, rgba(102, 16, 242, 0.04) 100%);
    --grad-shine: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 60%);
}

/* ---------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------- */
.btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    border: none;
}

.btn-primary {
    background-image: var(--grad-primary);
    background-color: #6690F4;
    box-shadow: 0 3px 10px rgba(102, 144, 244, 0.35);
}

.btn-success {
    background-image: var(--grad-success);
    background-color: #22b783;
    box-shadow: 0 3px 10px rgba(34, 183, 131, 0.35);
}

.btn-info {
    background-image: var(--grad-info);
    background-color: #22B9FF;
    box-shadow: 0 3px 10px rgba(34, 185, 255, 0.35);
}

.btn-warning {
    background-image: var(--grad-warning);
    background-color: #ffb822;
    box-shadow: 0 3px 10px rgba(255, 184, 34, 0.35);
}

.btn-danger {
    background-image: var(--grad-danger);
    background-color: #f5325c;
    box-shadow: 0 3px 10px rgba(245, 50, 92, 0.35);
}

.btn-default {
    background-image: var(--grad-default);
    box-shadow: 0 2px 6px rgba(29, 44, 72, 0.08);
}

.btn-primary:hover,
.btn-success:hover,
.btn-info:hover,
.btn-warning:hover,
.btn-danger:hover,
.btn-default:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.btn-primary:active,
.btn-success:active,
.btn-info:active,
.btn-warning:active,
.btn-danger:active,
.btn-default:active {
    transform: translateY(0);
    filter: brightness(0.97);
}

.btn.round {
    box-shadow: 0 2px 6px rgba(29, 44, 72, 0.18);
}

/* ---------------------------------------------------------------------
   Cards
--------------------------------------------------------------------- */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(29, 44, 72, 0.06);
}

.card .card-header {
    background-image: var(--grad-soft);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* ---------------------------------------------------------------------
   Sidebar menu
--------------------------------------------------------------------- */
.sidebar-menu > li.active > a,
.sidebar-menu > li > a:hover {
    background-image: linear-gradient(90deg, rgba(102, 144, 244, 0.16) 0%, rgba(102, 144, 244, 0) 100%);
    border-radius: 8px;
}

.sidebar-menu > li.active > a {
    border-left: 3px solid #6690F4;
}

/* ---------------------------------------------------------------------
   Tabs
--------------------------------------------------------------------- */
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    background-image: var(--grad-soft);
    border-radius: 8px 8px 0 0;
}

/* ---------------------------------------------------------------------
   Tables / DataTables
--------------------------------------------------------------------- */
table.dataTable thead th,
table.dataTable thead td {
    background-image: linear-gradient(180deg, #ffffff 0%, #f3f6fd 100%);
    border-bottom: 2px solid #e4e9f5 !important;
    font-weight: 600;
}

table.dataTable tbody tr {
    transition: background-color 0.15s ease;
}

table.dataTable tbody tr:hover {
    background-image: linear-gradient(90deg, rgba(102, 144, 244, 0.06) 0%, rgba(102, 144, 244, 0) 100%);
}

/* Leads & Clients tables - a bit more "modern" spacing/feel */
#lead-table td,
#client-table td,
#lead-table th,
#client-table th {
    vertical-align: middle;
    padding-top: 12px;
    padding-bottom: 12px;
}

.phone-action-buttons span {
    font-weight: 500;
}

.flight-info-cell {
    line-height: 1.5;
    color: #495468;
}

/* ---------------------------------------------------------------------
   Badges / status pills - adds a soft glossy sheen on top of whatever
   background-color is already set (including per-record custom colors),
   without changing the actual color chosen by the user.
--------------------------------------------------------------------- */
.badge {
    background-image: var(--grad-shine);
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* ---------------------------------------------------------------------
   Misc modern touches
--------------------------------------------------------------------- */
.modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(29, 44, 72, 0.18);
}

.modal-header {
    background-image: var(--grad-soft);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

::-webkit-scrollbar-thumb {
    background-image: var(--grad-primary);
    border-radius: 10px;
}

/* =====================================================================
   Integration setup sections (Facebook / Google Ads / WhatsApp) on
   Settings > General
===================================================================== */
.integration-section {
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e7ebf5;
    background-image: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.integration-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.integration-section-header h5 {
    margin: 0;
    font-weight: 700;
}

.integration-facebook .integration-section-header {
    color: #1877F2;
}

.integration-google .integration-section-header {
    color: #ea4335;
}

.integration-whatsapp .integration-section-header {
    color: #25D366;
}

.integration-guide-box {
    background-image: var(--grad-soft);
    border-left: 4px solid #6690F4;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 13px;
}

.integration-guide-box ol {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.integration-guide-box li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.integration-guide-box code {
    background: rgba(29, 44, 72, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
}

.integration-guide-box-ok {
    border-left-color: #0abb87;
    background-image: none;
    background-color: rgba(10, 187, 135, 0.07);
}
.integration-guide-box-ok strong {
    color: #0a9e73;
}
.integration-guide-box-warning {
    border-left-color: #ffb822;
    background-image: none;
    background-color: rgba(255, 184, 34, 0.1);
}
.integration-guide-box-warning strong {
    color: #b9820a;
}

/* =====================================================================
   Calls Configuration tabs (Vicidial / VOIP Generic / Twilio Cloud) on
   Settings > General - switching "Active call provider" jumps to the
   matching tab automatically.
===================================================================== */
.call-config-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #eef1f6;
    margin: 18px 0 20px;
    padding: 0;
    list-style: none;
}
.call-config-tab-item {
    margin-bottom: -2px;
}
.call-config-tab-item > a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #8b98a5;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
}
.call-config-tab-item:hover > a {
    color: #4e5e6a;
}
.call-config-tab-item.active > a {
    color: #6690F4;
    border-bottom-color: #6690F4;
}
.call-config-tab-pane.hide {
    display: none;
}

/* =====================================================================
   WhatsApp Chat page
===================================================================== */
.whatsapp-chat-wrapper {
    display: flex;
    height: 75vh;
    min-height: 500px;
}

.whatsapp-conversations-panel {
    width: 320px;
    flex-shrink: 0;
    border-right: 1px solid #eef1f9;
    display: flex;
    flex-direction: column;
}

.whatsapp-thread-panel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.whatsapp-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-weight: 600;
    background-image: var(--grad-soft);
    border-bottom: 1px solid #eef1f9;
}

.whatsapp-conversations-list {
    flex-grow: 1;
    overflow-y: auto;
}

.whatsapp-conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f3f5fb;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: background-color 0.15s ease;
}

.whatsapp-conversation-item:hover,
.whatsapp-conversation-item.active {
    background-image: linear-gradient(90deg, rgba(102, 144, 244, 0.1) 0%, rgba(102, 144, 244, 0) 100%);
}

.whatsapp-conversation-text {
    min-width: 0;
    flex-grow: 1;
}

.whatsapp-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    font-size: 14px;
    margin-right: 0;
}

.whatsapp-conversation-name {
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.whatsapp-conversation-preview {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.whatsapp-badge-wrap {
    position: absolute;
    top: 12px;
    right: 14px;
}

.whatsapp-unread-badge {
    border-radius: 50px;
}

.whatsapp-thread-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 18px;
    background-image: linear-gradient(180deg, #f7f9fd 0%, #ffffff 100%);
}

.whatsapp-msg-row {
    display: flex;
    margin-bottom: 10px;
}

.whatsapp-msg-in {
    justify-content: flex-start;
}

.whatsapp-msg-out {
    justify-content: flex-end;
}

.whatsapp-msg-bubble {
    max-width: 60%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.4;
}

.whatsapp-msg-in .whatsapp-msg-bubble {
    background: #fff;
    box-shadow: 0 1px 4px rgba(29, 44, 72, 0.12);
    border-bottom-left-radius: 2px;
}

.whatsapp-msg-out .whatsapp-msg-bubble {
    background-image: var(--grad-success);
    color: #fff;
    border-bottom-right-radius: 2px;
}

.whatsapp-msg-time {
    font-size: 10px;
    opacity: 0.65;
    margin-top: 4px;
    text-align: right;
}

.whatsapp-reply-box {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid #eef1f9;
}

.whatsapp-reply-box textarea {
    resize: none;
}

@media (max-width: 767px) {
    .whatsapp-chat-wrapper {
        flex-direction: column;
        height: auto;
    }

    .whatsapp-conversations-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eef1f9;
        max-height: 260px;
    }
}

/* =====================================================================
   Toast notifications - restyled to look like Sonner (white card, subtle
   shadow, colored left accent + icon, bottom-right stack) while still
   using the app's existing real notification system underneath.
===================================================================== */
.app-alert.animate {
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(29, 44, 72, 0.16) !important;
    border-left: 4px solid #6690F4;
    background-color: #fff !important;
    color: #1d2c48 !important;
    padding: 14px 16px !important;
    right: 20px !important;
    bottom: 20px !important;
    min-width: 280px;
}

.app-alert.alert-info {
    background-color: #fff !important;
    color: #1d2c48 !important;
    border-left-color: #22B9FF;
}

.app-alert.alert-success {
    background-color: #fff !important;
    color: #1d2c48 !important;
    border-left-color: #22b783;
}

.app-alert.alert-danger {
    background-color: #fff !important;
    color: #1d2c48 !important;
    border-left-color: #f5325c;
}

.app-alert.alert-warning {
    background-color: #fff !important;
    color: #1d2c48 !important;
    border-left-color: #ffb822;
}

.app-alert .btn-close {
    filter: none !important;
}

/* =====================================================================
   Form focus states - a visible "ring" around the focused field, similar
   to Tailwind's focus:ring utilities, plus support classes for inputs
   with a leading and/or trailing icon.
===================================================================== */
.form-control:focus,
.form-select:focus,
.select2-container--default.select2-container--focus .select2-selection {
    border-color: #6690F4 !important;
    box-shadow: 0 0 0 4px rgba(102, 144, 244, 0.18) !important;
    outline: none !important;
}

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

.input-icon-group .input-icon-leading,
.input-icon-group .input-icon-trailing {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #8a93a6;
    pointer-events: none;
}

.input-icon-group .input-icon-leading {
    left: 12px;
}

.input-icon-group .input-icon-trailing {
    right: 12px;
}

.input-icon-group input.form-control {
    padding-left: 36px;
}

.input-icon-group input.form-control.has-trailing-icon {
    padding-right: 36px;
}

/* =====================================================================
   Responsive grid & card layout utilities
===================================================================== */
.app-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, 1fr);
}

.app-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.app-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1200px) {
    .app-grid,
    .app-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .app-grid,
    .app-grid-2,
    .app-grid-3 {
        grid-template-columns: 1fr;
    }
}

.app-stat-card {
    border-radius: 14px;
    padding: 18px 20px;
    background-image: linear-gradient(145deg, #ffffff 0%, #f7f9fd 100%);
    border: 1px solid #eef1f9;
    box-shadow: 0 2px 10px rgba(29, 44, 72, 0.05);
}

/* =====================================================================
   Leads / Clients stat cards - compact, horizontal (icon left, numbers right),
   stay on one row as long as there is room, then wrap gracefully.
===================================================================== */
.stats-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.stats-grid.stats-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-grid.stats-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .stats-grid,
    .stats-grid.stats-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* the built-in DataTables filter dropdowns: a bit narrower so the filter row wraps less */
@media (max-width: 1300px) {
    .dataTables_wrapper .DTTT_container .w200,
    .dataTables_wrapper .DTTT_container .select2-container {
        width: 165px !important;
    }
}

.stats-grid .app-stat-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    min-height: 0;
    border-left-width: 4px;
    border-left-style: solid;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stats-grid .app-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(29, 44, 72, 0.1);
}

.stat-card-primary {
    border-left-color: #6690F4;
}

.stat-card-info {
    border-left-color: #22B7FF;
}

.stat-card-success {
    border-left-color: #22B983;
}

.stat-card-warning {
    border-left-color: #FFB822;
}

.stat-card-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.stat-card-icon svg {
    width: 16px;
    height: 16px;
}

.stat-card-primary .stat-card-icon {
    background-image: var(--grad-primary);
    color: #fff;
}

.stat-card-info .stat-card-icon {
    background-image: var(--grad-info);
    color: #fff;
}

.stat-card-success .stat-card-icon {
    background-image: var(--grad-success);
    color: #fff;
}

.stat-card-warning .stat-card-icon {
    background-image: var(--grad-warning);
    color: #fff;
}

.stat-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-card-value {
    font-size: 18px;
    font-weight: 700;
    color: #1d2c48;
    line-height: 1.15;
}

.stat-card-label {
    font-size: 11px;
    color: #8a93a6;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================================================================
   Status / group tab bar, sitting right above the leads & clients tables.
   Always a single row: small pills, horizontal scroll if they don't fit.
===================================================================== */
.lead-status-tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid #eef1f9;
    background-image: linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.lead-status-tabs::-webkit-scrollbar {
    height: 4px;
}

.lead-status-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    line-height: 1.4;
    font-weight: 600;
    color: #566080;
    background-color: #f1f4fa;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.lead-status-tab:hover {
    background-color: #e7ecf7;
    color: #1d2c48;
}

.lead-status-tab.active {
    background-image: var(--grad-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(102, 144, 244, 0.35);
}

/* status pills carry the status color as a small dot instead of coloring the whole pill,
   so light colors (yellow, cyan) stay readable */
.lead-status-tab[style*="--tab-color"]::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--tab-color);
    flex-shrink: 0;
}

.lead-status-tab.active[style*="--tab-color"]::before {
    background-color: #fff;
}

.lead-status-tab-count {
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    padding: 0 6px;
    font-size: 10.5px;
    line-height: 16px;
    min-width: 18px;
    text-align: center;
}

.lead-status-tab.active .lead-status-tab-count {
    background-color: rgba(255, 255, 255, 0.25);
}

/* =====================================================================
   Sticky table header (works with the existing DataTable/table markup -
   wrap the scroll area in .app-table-scroll for a fixed, always-visible
   header row while scrolling long tables).
===================================================================== */
.app-table-scroll {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: auto;
}

.app-table-scroll table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

table.dataTable tbody tr.selected,
table.dataTable tbody tr.selected td {
    background-image: linear-gradient(90deg, rgba(102, 144, 244, 0.16) 0%, rgba(102, 144, 244, 0.05) 100%) !important;
}

/* =====================================================================
   Bottom navigation bar (mobile only, optional). Add
   <div class="app-bottom-nav">...</div> with a handful of
   .app-bottom-nav-item links to use it on a page.
===================================================================== */
.app-bottom-nav {
    display: none;
}

@media (max-width: 767px) {
    .app-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        background-image: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
        border-top: 1px solid #eef1f9;
        box-shadow: 0 -4px 20px rgba(29, 44, 72, 0.08);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }

    .app-bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        font-size: 11px;
        color: #8a93a6;
        text-decoration: none;
        padding: 6px 2px;
        border-radius: 10px;
    }

    .app-bottom-nav-item.active {
        color: #6690F4;
        background-image: var(--grad-soft);
    }

    /* keep page content from hiding behind the fixed bottom bar */
    body:has(.app-bottom-nav) .main-content {
        padding-bottom: 70px;
    }
}

/* =====================================================================
   Roles > Permissions: granular lead/client action permissions grid
===================================================================== */
.module-action-permissions .module-action-permissions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    background: #f6f8f9;
    border-radius: 10px;
    padding: 12px 15px;
    margin-top: 4px;
}
.module-action-permissions .module-action-permissions-grid > div {
    min-width: 200px;
}
.module-action-permissions h5 {
    color: #4e5e6a;
}

/* =====================================================================
   Facebook lead-ads questionnaire popup
===================================================================== */
.questionnaire-note {
    background: #f6f8f9;
    border-radius: 10px;
    padding: 12px 15px;
}
.questionnaire-note-body p {
    margin-bottom: 8px;
}
.questionnaire-note-body p:last-child {
    margin-bottom: 0;
}

/* =====================================================================
   Team member activity log page (the "Logs" button on Team Members)
===================================================================== */
.member-log-type-badge {
    background: #eef1f6;
    color: #4e5e6a;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    margin-right: 6px;
}

/* =====================================================================
   Leads / Clients activity log popup (the "LOG" button) - scrollable, with
   AJAX "Load More" pagination (10 rows per page) instead of one long list
===================================================================== */
.activity-log-scroll-area {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}
.activity-log-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.activity-log-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 4px;
    border-bottom: 1px solid #eef6f9;
}
.activity-log-item:last-child {
    border-bottom: none;
}
.activity-log-item-head {
    margin-bottom: 6px;
}
.activity-log-item-date {
    margin-left: 8px;
    font-size: 12px;
}
.activity-log-load-more-wrap {
    padding: 14px 0 4px;
}
.activity-log-changes {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    font-size: 13px;
}
.activity-log-changes li {
    margin-bottom: 2px;
}
.activity-log-changes del {
    color: #f5325c;
    text-decoration: line-through;
    margin-right: 6px;
}
.activity-log-changes ins {
    color: #0abb87;
    text-decoration: none;
}
.call-log-provider-badge {
    background: #eef1f6;
    color: #4e5e6a;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
}
.call-log-details {
    font-size: 13px;
    margin-top: 2px;
}
.call-log-details i {
    margin-right: 4px;
}

/* =====================================================================
   Global click-to-call popup (SIP.js / Vicidial WebRTC)
   redesigned as a real centered modal (with backdrop) instead of a small
   corner widget, per request - bigger, more visible, feels like a popup.
===================================================================== */
.app-call-popup {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 25, 35, 0.55);
    padding: 20px;
}
.app-call-popup.hide {
    display: none;
}
.app-call-popup-box {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    padding: 40px 36px;
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 420px;
    animation: appCallPopupIn .25s ease;
}
@keyframes appCallPopupIn {
    from { opacity: 0; transform: scale(.92); }
    to { opacity: 1; transform: scale(1); }
}
.app-call-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    border: none;
    background: transparent;
    color: #8b98a5;
    cursor: pointer;
}
.app-call-popup-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #eef6f9;
    color: #6690F4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}
.app-call-popup-avatar svg {
    width: 36px;
    height: 36px;
}
.app-call-popup-name {
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 4px;
    word-break: break-word;
}
.app-call-popup-provider {
    font-size: 12px;
    color: #8b98a5;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.app-call-popup-status {
    font-size: 15px;
    margin-bottom: 6px;
}
.app-call-popup-duration {
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    margin-bottom: 20px;
}
.app-call-popup-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 14px;
}
.app-call-popup-actions .btn.round {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.app-call-popup-actions .btn.round svg {
    width: 22px;
    height: 22px;
}

/* =====================================================================
   Sign in page: true vertical+horizontal centering, nicer card
   note: the .scrollable-page wrapper only exists when the "enable_footer"
   setting is on, so this centers both with and without it.
===================================================================== */
body:has(.form-signin) {
    background-color: #eef1f8;
}
/* case: footer disabled -> .form-signin is a direct child of body */
body:has(> .form-signin) {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* case: footer enabled -> .scrollable-page wraps .form-signin */
.scrollable-page:has(> .form-signin) {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.form-signin {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    animation: signinFadeIn .4s ease;
}
.form-signin .card {
    border: none;
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(30, 40, 60, 0.14);
    overflow: hidden;
}
.form-signin .card-header {
    border-bottom: none;
    background: #ffffff;
    padding-top: 30px;
}
.form-signin .card-body {
    padding: 10px 30px 30px;
}
.form-signin .form-control {
    border-radius: 10px;
    height: 44px;
}
.form-signin .btn {
    border-radius: 10px;
}
@keyframes signinFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 767px) {
    body:has(> .form-signin),
    .scrollable-page:has(> .form-signin) {
        padding: 30px 0;
    }
    .form-signin {
        width: 92%;
        max-width: 420px;
    }
}

/* =====================================================================
   Add/Edit Lead & Client forms - split into nicer, clearly separated
   sections (general info vs flight info)
===================================================================== */
.form-section {
    border-radius: 12px;
    padding: 16px 18px 4px;
    margin-bottom: 18px;
    background: #f9fafc;
    border: 1px solid #eef1f6;
}
.form-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #4e5e6a;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e9f0;
}
.form-section-general {
    background: #f9fafc;
}
.form-section-flight {
    background: linear-gradient(135deg, #eef6ff 0%, #f5faff 100%);
    border: 1px solid #dfeeff;
}
.form-section-flight .form-section-header {
    color: #2f6fd6;
    border-bottom-color: #dfeeff;
}
.form-section-body .form-group:last-child {
    margin-bottom: 10px;
}

/* =====================================================================
   Flight info popup (the "flight" icon on leads & clients)
===================================================================== */
.flight-info-icon {
    transform: rotate(45deg);
}
.flight-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid #eef1f9;
}
.flight-info-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}
.flight-info-header-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: var(--grad-primary);
    color: #fff;
    transform: rotate(45deg);
    flex-shrink: 0;
}
.flight-info-popup-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.flight-info-popup-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid #f3f5fb;
}
.flight-info-popup-list li:last-child {
    border-bottom: none;
}
.flight-info-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}
.flight-info-badge-in {
    background-image: var(--grad-success);
}
.flight-info-badge-out {
    background-image: var(--grad-warning);
}
.flight-info-badge-destination {
    background-image: var(--grad-info);
}
.flight-info-badge-time {
    background-image: var(--grad-primary);
}
.flight-info-badge-companion {
    background-image: linear-gradient(135deg, #836af9 0%, #a389ff 100%);
}
.flight-info-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.flight-info-text strong {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: #8a93a6;
    font-weight: 600;
}
.flight-info-text span {
    font-size: 14px;
    color: #1d2c48;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================================================================
   Initials avatar (circle with first letters) - "Leads Contact" column
===================================================================== */
.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
    vertical-align: middle;
}
.lead-contact-cell {
    display: inline-flex;
    align-items: center;
}

/* =====================================================================
   Phone / WhatsApp quick action buttons (leads & clients list, and the
   call popup trigger) - grouped nicely inside one pill-shaped container
===================================================================== */
.phone-action-buttons .phone-quick-actions {
    background: #f6f8f9;
    border-radius: 20px;
    padding: 3px 6px;
    gap: 4px;
}
.phone-action-buttons .phone-quick-actions .btn.round {
    margin: 0;
}
.phone-action-buttons .phone-number-hidden {
    font-style: italic;
}

/* =====================================================================
   Leads / Clients table polish
===================================================================== */
#lead-table.dataTable,
#client-table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 8px;
}
#lead-table.dataTable tbody tr,
#client-table.dataTable tbody tr {
    background: linear-gradient(180deg, #ffffff 0%, #eef1f7 100%);
    border: none !important;
    box-shadow: none !important;
    transition: background .15s ease;
}
#lead-table.dataTable tbody tr:hover,
#client-table.dataTable tbody tr:hover {
    background: linear-gradient(180deg, #ffffff 0%, #e4eaf7 100%);
}
#lead-table.dataTable tbody tr td,
#client-table.dataTable tbody tr td {
    border: none !important;
    box-shadow: none !important;
    padding-top: 12px;
    padding-bottom: 12px;
}
#lead-table.dataTable tbody tr td:first-child,
#client-table.dataTable tbody tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
#lead-table.dataTable tbody tr td:last-child,
#client-table.dataTable tbody tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* round icon buttons (Call, WhatsApp, Log, Flight, Send Email, Edit, Delete) -
   a little more presence/polish: soft shadow, gentle lift on hover */
#lead-table .btn.round,
#client-table .btn.round {
    box-shadow: 0 1px 3px rgba(30, 40, 60, 0.10) !important;
    transition: transform .12s ease, box-shadow .12s ease;
}
#lead-table .btn.round:hover,
#client-table .btn.round:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(30, 40, 60, 0.16) !important;
}

/* action icon buttons (Call, WhatsApp, Log, Flight, Send Email) on the leads/clients
   list - forced explicitly white/neutral so they never pick up a stray yellow tint
   from a theme color variable or a native browser focus/tap highlight */
#lead-table td .btn.round,
#client-table td .btn.round,
.phone-quick-actions .btn,
.email-action-cell .btn {
    background-color: #fff !important;
    border: 1px solid #e5e9f0 !important;
    color: #595959 !important;
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
    box-shadow: none !important;
}
#lead-table td .btn.round:hover,
#client-table td .btn.round:hover,
.phone-quick-actions .btn:hover,
.email-action-cell .btn:hover {
    background-color: #f2f4f6 !important;
    border-color: #e5e9f0 !important;
}
#lead-table td .btn.round:focus,
#client-table td .btn.round:focus,
.phone-quick-actions .btn:focus,
.email-action-cell .btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(102, 144, 244, 0.25) !important;
}
/* WhatsApp keeps its brand green - this exception must come after the rules
   above so it isn't overridden by the forced-white rule */
#lead-table td .btn.round.btn-success,
#client-table td .btn.round.btn-success,
.phone-quick-actions .btn.btn-success {
    background-color: #0abb87 !important;
    border-color: #0abb87 !important;
    color: #fff !important;
}

#lead-table td,
#client-table td {
    white-space: nowrap;
}

/* =====================================================================
   Estimates / Invoices table polish - same "floating row" treatment as
   Leads/Clients (vertical gradient, no borders, rounded corners, soft
   lift on hover) for visual consistency across the whole CRM.
===================================================================== */
#monthly-estimate-table.dataTable,
#monthly-invoice-table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 8px;
}
#monthly-estimate-table.dataTable tbody tr,
#monthly-invoice-table.dataTable tbody tr {
    background: linear-gradient(180deg, #ffffff 0%, #eef1f7 100%);
    border: none !important;
    box-shadow: none !important;
    transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
#monthly-estimate-table.dataTable tbody tr:hover,
#monthly-invoice-table.dataTable tbody tr:hover {
    background: linear-gradient(180deg, #ffffff 0%, #e4eaf7 100%);
    box-shadow: 0 6px 18px rgba(29, 44, 72, 0.10) !important;
    transform: translateY(-1px);
}
#monthly-estimate-table.dataTable tbody tr td,
#monthly-invoice-table.dataTable tbody tr td {
    border: none !important;
    box-shadow: none !important;
    padding-top: 12px;
    padding-bottom: 12px;
}
#monthly-estimate-table.dataTable tbody tr td:first-child,
#monthly-invoice-table.dataTable tbody tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
#monthly-estimate-table.dataTable tbody tr td:last-child,
#monthly-invoice-table.dataTable tbody tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}
#monthly-estimate-table .btn.round,
#monthly-invoice-table .btn.round {
    background-color: #fff !important;
    border: 1px solid #e5e9f0 !important;
    box-shadow: 0 1px 3px rgba(30, 40, 60, 0.10) !important;
    transition: transform .12s ease, box-shadow .12s ease;
}
#monthly-estimate-table .btn.round:hover,
#monthly-invoice-table .btn.round:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(30, 40, 60, 0.16) !important;
}
/* status/currency badges - a touch of shine instead of flat color fills */
#monthly-estimate-table .label,
#monthly-invoice-table .label,
#monthly-estimate-table .badge,
#monthly-invoice-table .badge {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(29, 44, 72, 0.12);
}

#lead-table td:first-child,
#client-table td:nth-child(2) {
    white-space: normal;
    min-width: 140px;
}

#lead-table td .flight-info-cell,
#client-table td .flight-info-cell {
    white-space: normal;
    min-width: 160px;
}

table.dataTable thead th {
    white-space: nowrap;
    font-size: 12.5px;
    text-transform: none;
}

/* the built-in filter row above the table: tighter spacing so it wraps less */
.dataTables_wrapper .DTTT_container {
    margin-right: 8px !important;
}

/* =====================================================================
   DataTables filter row: turn the floated right-side toolbar into a tidy
   flex row that wraps in reading order (search, export, dates, filters)
   instead of floating around in reverse.
===================================================================== */
.datatable-tools .w-filter-right {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px 10px;
}

.datatable-tools .w-filter-right > .DTTT_container,
.datatable-tools .w-filter-right > .dataTables_filter {
    float: none !important;
    margin: 0 !important;
}

.datatable-tools .w-filter-right .dataTables_filter label {
    margin-bottom: 0;
}

/* =====================================================================
   Print: strip every decorative shadow/gradient/rounded-avatar-ring added
   throughout this stylesheet - they add nothing on paper, can render as
   grey smudges depending on the browser's print engine, and waste ink.
   The content/layout itself is untouched, only the decorative polish.
===================================================================== */
@media print {
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    #lead-table.dataTable tbody tr,
    #client-table.dataTable tbody tr,
    .app-stat-card,
    .card,
    .box,
    .app-call-popup-box,
    .form-signin .card {
        background: #fff !important;
        background-image: none !important;
    }
    #lead-table .btn.round,
    #client-table .btn.round,
    .phone-quick-actions .btn,
    .email-action-cell .btn {
        transform: none !important;
    }
}

