/* =========================================
   InsureBuyNow - Dashboard (Screenshot Match)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&display=swap');

:root {
    --bg-page: #F9FAFB;
    --bg-white: #ffffff;
    --border-light: #F2F4F7;
    --text-main: #111827;
    --text-gray: #6B7280;
    --brand-teal: #0891B2;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lexend', sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* ---- NAVBAR ---- */
.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    /* keeping a tiny bit of padding for the logo looks better than 0 */
}

.navbar-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

/* ---- CONTAINER ---- */
.container {
    max-width: 100%;
    margin: 0;
    padding: 24px 0 60px;
}


/* ---- HEADER ---- */
.header-section {
    margin-bottom: 24px;
    padding: 0 16px;
    /* keep some padding for header text so it doesn't touch the very edge */
}

.header-section h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}

.header-section p {
    color: #718096;
    font-size: 13px;
    font-weight: 400;
}

/* ---- TOOLBAR ---- */
.toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0 16px;
    /* keep some padding for toolbar */
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative !important;
    width: 280px !important;
    height: 36px !important;
    box-sizing: border-box !important;
}

.search-box svg {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    stroke-width: 2.5;
    transition: all 0.2s ease;
}

.search-box svg:hover {
    color: #4A4EAD;
    transform: translateY(-50%) scale(1.1);
}

.search-input {
    width: 100% !important;
    height: 100% !important;
    border: 1px solid #D0D5DD;
    border-radius: 6px;
    padding: 0 40px 0 12px !important;
    font-size: 13px;
    outline: none;
    background: #fff;
    color: #111827;
    box-sizing: border-box !important;
}

.search-input::placeholder {
    color: #94A3B8;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #D0D5DD;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    color: #333333;
}

.clear-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px !important;
    height: 28px !important;
    background: #F3F4F6 !important;
    color: #94A3B8 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.2s ease;
    z-index: 10;
    line-height: 1;
}

.clear-icon:hover {
    background: #E5E7EB;
    color: #4B5563;
    transform: scale(1.05);
}

.search-box .clear-icon {
    display: none !important;
}

.date-filter {
    position: relative !important;
    height: 36px !important;
    padding-right: 48px !important;
    box-sizing: border-box !important;
}

.date-filter .clear-icon {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.date-filter .clear-icon:hover {
    transform: translateY(-50%) scale(1.05) !important;
}

/* ---- TABLE ---- */
.table-card {
    background: #fff;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    border-left: none;
    border-right: none;
    border-radius: 0;
    overflow-x: auto;
    box-shadow: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 10px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 500;
    color: #718096;
    text-transform: capitalize;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
}

td {
    padding: 10px 20px;
    font-size: 12px;
    color: #4A5568;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

tbody tr:hover {
    background: #F7FAFC;
}

/* ---- CONTENT STYLES ---- */
.id-text {
    color: #333333;
    font-weight: 400;
}

.name-text {
    font-weight: 400;
    color: #333333;
}

.contact-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-main {
    color: #111827;
    font-weight: 400;
}

.contact-sub {
    color: #718096;
    font-size: 11px;
    font-weight: 400;
}

.blue-link {
    background: linear-gradient(135deg, #2F80ED 0%, #7ED321 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
    display: inline-block;
}

.blue-link:hover {
    opacity: 0.8;
}

.tx-id {
    color: #718096 !important;
    font-family: 'Lexend', sans-serif;
    font-size: 12px;
    font-weight: 400;
}

.date-text {
    color: #718096 !important;
    font-size: 11.5px;
    white-space: nowrap;
}

/* ---- FOOTER ---- */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 16px;
    font-size: 12px;
}

.show-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #718096;
}

.page-limit-select {
    height: 30px;
    padding: 0 30px 0 12px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #fff url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 10px;
    appearance: none;
    -webkit-appearance: none;
    font-size: 13px;
    color: #4A5568;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.page-limit-select:hover {
    border-color: #CBD5E0;
    background-position: right 10px center;
}

.page-limit-select:focus {
    border-color: #2F80ED;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #718096;
    text-decoration: none;
    transition: all 0.2s;
}

.page-btn.active {
    background: linear-gradient(135deg, #2F80ED 0%, #7ED321 100%);
    color: #fff;
    border: none;
}

.nav-btn {
    font-size: 18px;
    color: #CBD5E0;
    text-decoration: none;
    padding: 0 4px;
}

.nav-btn.enabled {
    color: #718096;
}

/* ---- MODAL (Simplified) ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #A0AEC0;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close-btn:hover {
    color: #4A5568;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* /* /* /* /* ---- FINAL PREMIUM LIGHT MINIMAL FLATPICKR REDESIGN (REF PIC 1, 2 & 3) ---- */
.flatpickr-calendar {
    background: #ffffff !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1) !important;
    border-radius: 20px !important;
    border: 1px solid #EDF2F7 !important;
    width: 250px !important;
    /* ULTRA-COMPACT WIDTH */
    padding: 8px !important;
    font-family: 'Lexend', sans-serif !important;
    margin-top: 8px !important;
}

/* NUCLEAR HEADER REFITTING: Physical Re-ordering */
.flatpickr-months {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 4px 8px !important;
    position: relative !important;
}

/* 1. THE PILL (Matches Pic 1) */
.flatpickr-month {
    order: 1 !important;
    flex: 1 !important;
    background: #F1F5F9 !important;
    border-radius: 10px !important;
    height: 36px !important;
    /* TIGHTER HEADER */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 10px !important;
    color: #1E293B !important;
    margin-right: 6px !important;
}

/* Cleaning up the Month Dropdown inside the Pill */
.flatpickr-current-month {
    position: static !important;
    width: auto !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    /* SMALLER FONT */
    font-weight: 700 !important;
    padding: 0 !important;
    color: #1E293B !important;
    line-height: 1 !important;
}

.flatpickr-monthDropdown-months {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    color: inherit !important;
    pointer-events: none !important;
    width: auto !important;
    display: inline-block !important;
}

/* Cleaning up the Year Input & Hiding ALL Arrows */
.numInputWrapper {
    width: auto !important;
    margin-left: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    position: relative !important;
}

/* NUCLEAR STRIKE on ALL Flatpickr native arrows */
.numInputWrapper span,
.numInputWrapper span.arrowUp,
.numInputWrapper span.arrowDown {
    display: none !important;
    /* HIDE FLATPICKR CUSTOM ARROWS */
}

input.cur-year {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-weight: 700 !important;
    color: inherit !important;
    width: 38px !important;
    cursor: default !important;
    display: inline-block !important;
    line-height: 1 !important;
    -moz-appearance: textfield !important;
    /* Firefox hide */
}

/* Hide native chrome/safari year arrows */
input.cur-year::-webkit-outer-spin-button,
input.cur-year::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* 2. MINIMAL GROUPED ARROWS (Matches Pic 1) */
.flatpickr-prev-month,
.flatpickr-next-month {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    background: transparent !important;
    border: none !important;
    color: #475569 !important;
    cursor: pointer !important;
    margin-left: 2px !important;
    transition: all 0.2s ease !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    width: 15px !important;
    /* INCREASED ARROW SIZE */
    height: 15px !important;
    stroke-width: 3 !important;
    /* BOLDER ARROWS */
}

.flatpickr-prev-month {
    order: 2 !important;
}

.flatpickr-next-month {
    order: 3 !important;
}

/* In the actual element, there might be arrows inside, ensuring they scale */
.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    width: 13px !important;
    height: 13px !important;
}

/* Weekdays */
.flatpickr-weekdays {
    height: 24px !important;
    margin-bottom: 4px !important;
}

.flatpickr-weekday {
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #94A3B8 !important;
}

/* Days & Selection */
.flatpickr-day {
    border-radius: 8px !important;
    border: 2px solid transparent !important;
    height: 32px !important;
    /* COMPACT DAY SIZE */
    line-height: 28px !important;
    margin: 1px 0 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #475569 !important;
}

.flatpickr-day.selected {
    background: linear-gradient(135deg, #2F80ED 0%, #7ED321 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(47, 128, 237, 0.2) !important;
}

/* --- CUSTOM MONTH GRID OVERLAY --- */
.custom-month-grid {
    position: absolute !important;
    top: 52px !important;
    left: 6px !important;
    right: 6px !important;
    bottom: 6px !important;
    background: #ffffff !important;
    display: none !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(3, 1fr) !important;
    gap: 6px !important;
    padding: 8px 6px !important;
    z-index: 100 !important;
    border-radius: 12px !important;
}

.custom-month-grid.active {
    display: grid !important;
}

.grid-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: transparent !important;
    border: none !important;
    font-size: 11px !important;
    /* COMPACT FONT */
    font-weight: 700 !important;
    color: #475569 !important;
    cursor: pointer;
}

.grid-month:hover {
    background: #F1F5F9 !important;
}

.grid-month.selected {
    background: linear-gradient(135deg, #2F80ED 0%, #7ED321 100%) !important;
    color: #ffffff !important;
}

/* HEADER OVERLAY STATE */
.flatpickr-calendar.overlay-active .flatpickr-monthDropdown-months {
    display: none !important;
}

.flatpickr-calendar.overlay-active input.cur-year {
    font-size: 15px !important;
    margin-left: 0 !important;
}

/* ---- VEHICLE MODAL V4 (ULTIMATE PRECISION MATCH) ---- */
/* ---- VEHICLE MODAL FINAL (ABSOLUTE COMPLIANCE) ---- */
.modal-content.v2 {
    border-radius: 16px !important;
    width: 440px !important;
    max-width: 95vw !important;
    max-height: 85vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border: none !important;
    background: #fff !important;
}

.modal-header.v2 {
    padding: 12px 16px 8px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header.v2 h2 {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1a202c !important;
}

.header-divider {
    height: 1px;
    background: #e2e8f0 !important;
    margin: 0 16px 16px !important;
    display: block !important;
}

.close-circle-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.close-circle-btn:hover {
    background: #f7fafc;
}

.modal-body.v2 {
    padding: 0 16px 16px !important;
    overflow-y: auto !important;
    flex: 1 !important;
}

.modal-body.v2::-webkit-scrollbar {
    width: 4px;
}

.modal-body.v2::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body.v2::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.vehicle-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
    display: block;
}

.vehicle-outer-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.coverage-info-label {
    font-size: 10px;
    font-weight: 600;
    color: #1a202c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 20px 0 12px;
    display: block;
}

.attribute-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.attribute-item {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.attr-label {
    font-size: 9px;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
}

.attr-value {
    font-size: 14px;
    font-weight: 450;
    color: #1a202c;
}