/* --- Page Header --- */
.page-title {
    color: #1F2937;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.page-subtitle {
    color: #6B7280;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.page-header-text {
    min-width: 0;
}

.page-header-actions {
    flex-shrink: 0;
}

.btn-create-new {
    background-color: #4b75d1;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
    white-space: nowrap;
}

    .btn-create-new:hover {
        background-color: #1D4ED8;
        color: white;
    }

/* --- KPI Summary Cards --- */
.kpi-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.kpi-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6B7280;
}

.status-list {
    font-size: 0.8rem;
    color: #4B5563;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Icon Colors */
.bg-light-green {
    background-color: #ECFDF5;
    color: #10B981;
}

.bg-light-gray {
    background-color: #F3F4F6;
    color: #6B7280;
}

.bg-light-yellow {
    background-color: #FEF3C7;
    color: #F59E0B;
}

.bg-light-red {
    background-color: #FEE2E2;
    color: #EF4444;
}

/* --- Filter Bar --- */
.filter-bar {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.search-wrap {
    position: relative;
    flex: 0 0 300px;
    min-width: 220px;
}

    .search-wrap i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #9CA3AF;
    }

.search-input {
    width: 100%;
    border: 1px solid transparent;
    background-color: #9e9e9e1c;
    border-radius: 8px;
    padding: 8px 12px 8px 36px;
    font-size: 0.85rem;
    color: #4B5563;
    transition: 0.2s;
    box-sizing: border-box;
}

    .search-input:focus {
        background-color: #ffffff;
        border-color: #D1D5DB;
        outline: none;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.filter-select {
    min-width: 150px;
    background-color: #9e9e9e26;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-size: 0.85rem;
    color: #4B5563;
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236B7280'%3E%3Cpath d='M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    cursor: pointer;
    box-sizing: border-box;
}

    .filter-select:hover {
        background-color: #F3F4F6;
    }

/* --- Dealer Registration Cards --- */
.reg-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .reg-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
    }

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.card-top-right {
    min-width: 0;
    flex: 1;
}

.progress-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

    .progress-circle.p-80 {
        background: conic-gradient(#F59E0B 80%, #F3F4F6 0);
    }

    .progress-circle.p-30 {
        background: conic-gradient(#F59E0B 30%, #F3F4F6 0);
    }

    .progress-circle.p-100 {
        border: 4px solid #08875d;
        font-size: 1.5rem;
    }

    .progress-circle.p-60 {
        background: conic-gradient(#dbc730 30%, #F3F4F6 0);
    }

.progress-inner {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-val {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1F2937;
    line-height: 1;
}

.progress-steps {
    font-size: 0.5rem;
    color: #6B7280;
    margin-top: 2px;
}

/* Status Badges */
.badge-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge-custom {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-yellow {
    background-color: #FEF3C7;
    color: #B45309;
}

.badge-green-dashboard {
    background-color: #D1FAE5;
    color: #047857;
}

/* Action Buttons */
.btn-continue-blue {
    background-color: #4970c6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 6px;
    white-space: nowrap;
}

.btn-continue-green {
    background-color: #10B981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
}

.btn-view {
    background-color: white;
    border: 1px solid #E5E7EB;
    color: #4B5563;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 6px;
    white-space: nowrap;
}

.btn-dots {
    background-color: white;
    border: 1px solid #E5E7EB;
    color: #4B5563;
    border-radius: 6px;
    font-size: 1rem;
    padding: 2px 8px;
    line-height: 1;
}

.reg-id {
    display: inline-block;
    background-color: #FEF9C3;
    color: #b45309a8;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 25px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.company-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
    word-break: break-word;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: #4B5563;
    flex-wrap: wrap;
}

    .location-info i {
        color: #6B7280;
        font-size: 0.85rem;
    }

.location-divider {
    color: #D1D5DB;
}

.tags-row {
    border: 1px solid #d9ebde;
    background-color: #f0fdf47d;
    color: #065F46;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: auto;
    color: #4B5563;
    margin-bottom: 20px;
}

.bullet-dot {
    margin: 0 6px;
    color: #D1D5DB;
}

.card-footer-note {
    border: 1px solid #d9ebde;
    background-color: #F0FDF4;
    color: #065F46;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: auto;
}

/* ═══════════════════════════════════════════
   RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════ */

/* --- Tablet --- */
@media (max-width: 991.98px) {
    .filter-bar {
        padding: 12px;
    }

    .search-wrap {
        flex: 1 1 100%;
    }

    .filter-group {
        width: 100%;
        justify-content: flex-start;
    }

    .filter-select {
        flex: 1 1 calc(50% - 10px);
        min-width: 140px;
    }

    .kpi-card {
        padding: 14px;
    }

    .kpi-number {
        font-size: 1.5rem;
    }
}

/* --- Mobile (≤ 575px) --- */
@media (max-width: 575.98px) {

    /* Page header */
    .page-title {
        font-size: 1.15rem;
    }

    .page-subtitle {
        font-size: 0.78rem;
    }

    .page-header-actions {
        width: 100%;
    }

        .page-header-actions .btn-create-new {
            width: 100%;
            font-size: 0.85rem;
            padding: 10px 14px;
        }

    /* KPI cards */
    .kpi-card {
        padding: 12px;
    }

    .kpi-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .kpi-number {
        font-size: 1.35rem;
    }

    .kpi-label {
        font-size: 0.7rem;
    }

    .kpi-subtext {
        font-size: 0.65rem !important;
        padding: 4px 6px !important;
    }

    /* Filter bar */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrap,
    .filter-group {
        width: 100%;
    }

    .filter-group {
        flex-direction: column;
        gap: 8px;
    }

    .filter-select {
        width: 100%;
        min-width: 100%;
    }

    .search-input {
        font-size: 0.8rem;
        padding: 8px 12px 8px 32px;
    }

    /* Dealer card top row */
    .card-top-row {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 16px;
    }

    .card-top-right {
        align-items: stretch !important;
    }

    .badge-group {
        justify-content: flex-start;
    }

    .progress-circle {
        align-self: flex-start;
    }

    .card-action-row {
        justify-content: flex-start !important;
    }

    .btn-continue-blue,
    .btn-view,
    .btn-dots {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    /* Card content */
    .company-name {
        font-size: 0.95rem;
    }

    .location-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 0.7rem;
    }

    .location-divider {
        display: none;
    }

    .tags-row {
        font-size: 0.7rem;
        padding: 8px 12px;
        line-height: 1.8;
    }

    .bullet-dot {
        margin: 0 4px;
    }

    .card-footer-note {
        font-size: 0.7rem;
        padding: 8px 12px;
    }

    /* Modal */
    .modal-dialog {
        margin: 12px;
        max-width: calc(100% - 24px);
    }

    .modal-body {
        padding: 16px;
    }
}
