@font-face {
    font-family: 'General Sans';
    src: url('../fonts/GeneralSans-Regular.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'General Sans Semibold';
    src: url('../fonts/GeneralSans-Semibold.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'Nunito Sans';
    src: url('../fonts/NunitoSans-VariableFont.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* CSS Variables */
:root {
    --ezee-navy: #1B365D;
    --ezee-orange: #FB612F;
    --ezee-blue: #0077C8;
    --ezee-white: #FBFBFB;
    --ezee-gray: #75787B;
    --ezee-light-gray: #D9D9D6;
    --ezee-success: #28a745;
    --ezee-warning: #ffc107;
    --ezee-danger: #dc3545;
    --ezee-info: #17a2b8;
}

/* Base Styles */
body {
    font-family: 'Nunito Sans', sans-serif;
    color: var(--ezee-navy);
    background-color: #f8f9fa;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation Styles */
.main-nav {
    background-color: #1B365D;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    padding: 15px 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 20px 15px;
    display: block;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover, 
.nav-link.active {
    background-color: rgba(255,255,255,0.1);
    border-bottom-color: #FB612F;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-link {
    color: #1B365D;
    padding: 12px 15px;
    display: block;
    transition: all 0.3s ease;
}

.dropdown-link:hover {
    background-color: #f5f5f5;
    color: #FB612F;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Header Styles */
.brand-header {
    background-color: var(--ezee-navy);
    padding: 20px;
    border-bottom: 3px solid var(--ezee-orange);
    margin-bottom: 30px;
    color: white;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-mark {
    display: flex;
    margin-right: 15px;
}

.logo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 2px;
}

.logo-dot-orange {
    background: var(--ezee-orange);
}

.logo-dot-gray {
    background: var(--ezee-gray);
}

/* Page Header (Details Page) */
.page-header {
    background: var(--ezee-white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border-left: 4px solid var(--ezee-orange);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--ezee-gray);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--ezee-navy);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb a:hover {
    color: var(--ezee-orange);
}

.page-title {
    margin: 0;
    color: var(--ezee-navy);
    font-family: 'General Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

.referral-id {
    color: var(--ezee-gray);
    font-size: 1rem;
    font-weight: 400;
    margin-top: 5px;
}

/* Search Box */
.search-box {
    background: var(--ezee-white);
    border: 1px solid var(--ezee-light-gray);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.search-container {
    display: flex;
    gap: 10px;
}

.search-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid var(--ezee-light-gray);
    border-radius: 4px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    border-left: 4px solid #1b365d;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.stat-card.active {
    background: linear-gradient(135deg, rgba(27, 54, 93, 0.1) 0%, rgba(27, 54, 93, 0.05) 100%);
    border-left-width: 6px;
}

.stat-card.total {
    border-left-color: #1b365d;
}

.stat-card.eligible {
    border-left-color: #28a745;
}

.stat-card.pending {
    border-left-color: #FF6B00;
}

.stat-card.credits {
    border-left-color: #28a745;
}

.stat-card.ineligible {
    border-left-color: #dc3545;
}

.stat-card h3 {
    margin: 0 0 1rem 0;
    color: #1b365d;
    font-size: 1rem;
    font-weight: 600;
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1b365d;
    margin-bottom: 0.5rem;
}

.stat-card div:last-child {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Filter Header */
.filter-header {
    margin-bottom: 20px;
}

.clear-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--ezee-gray);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.clear-filter-btn:hover {
    background: #5a5d61;
    color: white;
    text-decoration: none;
}

/* Dashboard Sections */
.dashboard-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.dashboard-section h2 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ezee-light-gray);
    display: flex;
    align-items: center;
    font-family: 'General Sans', sans-serif;
}

.dashboard-section h2 i {
    margin-right: 10px;
    color: var(--ezee-orange);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.referral-table {
    font-size: 13px;
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.referral-table th {
    background: #f8f9fa;
    padding: 10px 8px;
    font-weight: 600;
    color: #1B365D;
    border-bottom: 2px solid #dee2e6;
    font-size: 12px;
    white-space: nowrap;
    text-align: left;
}

.referral-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #f1f1f1;
    vertical-align: top;
}

/* Table Column Widths */
.referral-table th:nth-child(1), 
.referral-table td:nth-child(1) {
    width: 18%;
}

.referral-table th:nth-child(2), 
.referral-table td:nth-child(2) {
    width: 15%;
}

.referral-table th:nth-child(3), 
.referral-table td:nth-child(3) {
    width: 10%;
}

.referral-table th:nth-child(4), 
.referral-table td:nth-child(4) {
    width: 10%;
}

.referral-table th:nth-child(5), 
.referral-table td:nth-child(5) {
    width: 17%;
}

.referral-table th:nth-child(6), 
.referral-table td:nth-child(6) {
    width: 10%;
}

.referral-table th:nth-child(7), 
.referral-table td:nth-child(7) {
    width: 12%;
}

.referral-table th:nth-child(8), 
.referral-table td:nth-child(8) {
    width: 8%;
}

/* Customer Details */
.customer-details {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
    line-height: 1.2;
}

.customer-details div {
    margin-bottom: 1px;
}

.customer-details i {
    width: 16px;
    text-align: center;
    margin-right: 5px;
}

/* Eligibility Badges */
.eligibility-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.eligibility-eligible {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--ezee-success);
    border: 1px solid var(--ezee-success);
}

.eligibility-pending {
    background-color: rgba(255, 107, 0, 0.1);
    color: #FF6B00;
    border: 1px solid #FF6B00;
}

.eligibility-not-eligible {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--ezee-danger);
    border: 1px solid var(--ezee-danger);
}

.eligibility-presale {
    background-color: rgba(108, 117, 125, 0.1);
    color: var(--ezee-gray);
    border: 1px solid var(--ezee-gray);
}

.eligibility-credited {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
    border: 2px solid #28a745 !important;
    font-weight: 600;
    animation: subtle-glow 2s ease-in-out infinite alternate;
}

.eligibility-duplicate {
    background-color: rgba(108, 117, 125, 0.1);
    color: var(--ezee-gray);
    border: 1px solid var(--ezee-gray);
}

/* Days Remaining */
.days-remaining {
    font-size: 10px;
    color: #6c757d;
    margin-top: 2px;
    font-style: italic;
}

/* Duplicate Styling */
.duplicate-row {
    opacity: 0.7;
    background-color: rgba(108, 117, 125, 0.05);
}

.duplicate-badge {
    background: var(--ezee-warning);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
}

/* Status Classes for Neighbor Status */
.status-serviceable, .status-active, .status-presale, .status-no-match {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.status-serviceable {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--ezee-success);
    border: 1px solid var(--ezee-success);
}

.status-active {
    background-color: rgba(0, 123, 255, 0.1);
    color: #0062cc;
    border: 1px solid #0062cc;
}

.status-presale {
    background-color: rgba(108, 117, 125, 0.1);
    color: var(--ezee-gray);
    border: 1px solid var(--ezee-gray);
}

.status-no-match {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--ezee-danger);
    border: 1px solid var(--ezee-danger);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'General Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    border: none;
}

.btn i {
    margin-right: 5px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

.btn-primary {
    background-color: var(--ezee-orange);
    color: white;
}

.btn-primary:hover {
    background-color: #e0552a;
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--ezee-white);
    color: var(--ezee-navy);
    border: 1px solid var(--ezee-navy);
}

.btn-secondary:hover {
    background-color: rgba(27, 54, 93, 0.05);
    color: var(--ezee-navy);
    text-decoration: none;
}

.btn-outline-secondary {
    background-color: transparent;
    color: var(--ezee-gray);
    border: 1px solid var(--ezee-gray);
}

.btn-outline-secondary.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Details Page Specific Styles */
.details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.status-overview {
    background: var(--ezee-white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.status-title {
    font-family: 'General Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ezee-navy);
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(27, 54, 93, 0.05);
    border-radius: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ezee-navy);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--ezee-gray);
    margin-top: 5px;
}

.eligibility-checklist {
    background: var(--ezee-white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.checklist-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--ezee-navy);
    font-family: 'General Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    border-left: 3px solid #ddd;
    transition: all 0.2s ease;
}

.checklist-item.passed {
    background: rgba(40, 167, 69, 0.05);
    border-left-color: var(--ezee-success);
}

.checklist-item.failed {
    background: rgba(220, 53, 69, 0.05);
    border-left-color: var(--ezee-danger);
}

.check-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.check-content {
    flex: 1;
}

.check-title {
    font-weight: 600;
    color: var(--ezee-navy);
    margin-bottom: 5px;
}

.check-reason {
    font-size: 0.9rem;
    color: var(--ezee-gray);
}

.action-panel {
    background: var(--ezee-white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
}

.action-header {
    font-family: 'General Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ezee-navy);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-action {
    background: linear-gradient(135deg, var(--ezee-success) 0%, #34ce57 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.primary-action:hover {
    background: linear-gradient(135deg, #218838 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

.primary-action:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary-action {
    background: var(--ezee-danger);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.secondary-action:hover {
    background: #c82333;
    color: white;
    text-decoration: none;
}

.credit-info {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.credit-applied-notice {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    color: var(--ezee-success);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    border: 2px solid rgba(40, 167, 69, 0.2);
    margin-bottom: 20px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.info-card {
    background: var(--ezee-white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid var(--ezee-navy);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--ezee-navy);
    font-family: 'General Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
}

.card-header i {
    color: var(--ezee-orange);
}

.detail-item {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.detail-label {
    font-weight: 600;
    color: var(--ezee-navy);
    min-width: 120px;
    margin-right: 15px;
}

.detail-value {
    flex: 1;
    color: var(--ezee-gray);
}

.detail-value strong {
    color: var(--ezee-navy);
}

.detail-value a {
    color: var(--ezee-blue);
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

.timeline-card {
    background: var(--ezee-white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid var(--ezee-blue);
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 119, 200, 0.05);
    border-radius: 8px;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ezee-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-weight: 600;
    color: var(--ezee-navy);
    margin-bottom: 3px;
}

.timeline-date {
    color: var(--ezee-gray);
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid var(--ezee-success);
    color: var(--ezee-success);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid var(--ezee-danger);
    color: var(--ezee-danger);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 30px;
    color: var(--ezee-gray);
}

.no-results i {
    color: var(--ezee-blue);
    margin-right: 5px;
}

/* Animations */
@keyframes subtle-glow {
    from {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.2);
    }
    to {
        box-shadow: 0 0 10px rgba(40, 167, 69, 0.4);
    }
}

/* Loading Spinner */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--ezee-orange);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .referral-table {
        font-size: 12px;
    }
    
    .referral-table th {
        font-size: 11px;
        padding: 8px 6px;
    }
    
    .customer-details {
        font-size: 10px;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: #1B365D;
        flex-direction: column;
        transition: all 0.5s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        display: none;
    }
    
    .nav-item:hover .dropdown-menu {
        display: block;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .referral-table th, 
    .referral-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .container {
        padding: 15px;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-label {
        min-width: auto;
        margin-right: 0;
    }
}