/* Affiliate Pro - Luxury Design System */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Poppins:wght@300;400;600&family=Allura&display=swap');

:root {
    --primary-burgundy: #8B1E2D;
    --secondary-dark-red: #6E0F1C;
    --bg-warm-cream: #FFF7F5;
    --card-soft-blush: #F6EDEE;
    --border-light-grey: #E7DFDF;
    --text-charcoal: #2E2E2E;
    --white: #FFFFFF; /* Added */
    --status-yet-to-contact: #808080;
    --status-contacted: #0000FF;
    --status-estimate-given: #4B0082;
    --status-negotiation: #800080;
    --status-first-payment: #FFA500;
    --status-second-payment: #FF4500;
    --status-final-payment: #FFD700;
    --status-confirmed: #008000;
    --status-cancelled: #FF0000;
    --status-lost: #2F4F4F;
    
    --burgundy-gradient: linear-gradient(135deg, #8B1E2D, #6E0F1C);
    --soft-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.bg-burgundy {
    background: #8B1E2D !important; /* Solid fallback */
    background: var(--burgundy-gradient) !important;
    color: #FFFFFF !important;
}

.logo-container {
    padding: 15px 0;
    margin-bottom: 20px;
    text-align: center;
}

.sidebar-logo {
    max-width: 180px;
    max-height: 80px;
    object-fit: contain;
}

.stats-card.bg-burgundy {
    border: none;
}

.stats-card.bg-burgundy .stats-label,
.stats-card.bg-burgundy .stats-value {
    color: #FFFFFF !important;
}

.stats-card.bg-burgundy .stats-label {
    opacity: 0.8;
}

body {
    background-color: var(--bg-warm-cream);
    color: var(--text-charcoal);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--secondary-dark-red);
}

.accent-script {
    font-family: 'Allura', cursive;
}

/* Card Style */
.premium-card {
    background-color: var(--card-soft-blush);
    border: 1px solid var(--border-light-grey);
    border-radius: 12px;
    box-shadow: var(--soft-shadow);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.premium-card.referDetails{
    background-color: #6F021A;
}
/* Button Logic */
.btn-burgundy {
    background: var(--burgundy-gradient);
    color: #FFFFFF !important;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 30, 45, 0.2);
}

.btn-burgundy:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(139, 30, 45, 0.3);
    color: white;
}

/* Auth Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 450px;
}

/* Form Styling */
.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--secondary-dark-red);
}

.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-light-grey);
    padding: 0.8rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary-burgundy);
    box-shadow: 0 0 0 0.2rem rgba(139, 30, 45, 0.1);
}

/* Verification Code Style */
.verify-code-box {
    background-color: white;
    border: 2px dashed var(--primary-burgundy);
    padding: 5px 15px;
    font-weight: 700;
    letter-spacing: 5px;
    font-family: 'Courier New', Courier, monospace;
    display: inline-block;
    color: var(--primary-burgundy);
    user-select: none;
}

/* Dashboard Shell Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--border-light-grey);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light-grey);
    text-align: center;
}

.sidebar-menu {
    flex-grow: 1;
    padding: 1rem 0;
}

.nav-link {
    color: var(--text-charcoal);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--card-soft-blush);
    color: var(--primary-burgundy);
    border-left: 4px solid var(--primary-burgundy);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-light-grey);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Header */
.top-header {
    height: 70px;
    background: white;
    border-bottom: 1px solid var(--border-light-grey);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.header-search input {
    max-width: 350px;
    background-color: #F8F9FA;
    border: 1px solid var(--border-light-grey);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-light-grey);
    box-shadow: var(--soft-shadow);
}

.stats-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #6c757d;
    font-weight: 700;
    margin-bottom: 5px;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: var(--primary-burgundy);
}

.stats-trend {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
}

/* Tables */
.premium-table thead th {
    background-color: #FDFBFA;
    color: #6C757D;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light-grey);
}

.premium-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.85rem;
}

/* Responsive Sidebar */
@media (max-width: 991px) {
    .sidebar {
        margin-left: -260px;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar.show {
        margin-left: 0;
    }
    .top-header {
        padding: 0 1rem;
    }
    .auth-container {
        padding: 1rem;
    }
    .stats-card {
        padding: 1rem;
    }
    .stats-value {
        font-size: 1.25rem;
    }
    
    /* Overlay for mobile sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
        backdrop-filter: blur(2px);
    }
    .sidebar-overlay.show {
        display: block;
    }
    
    .sidebar-close {
        display: block !important;
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 1.5rem;
        color: var(--primary-burgundy);
        cursor: pointer;
        z-index: 1001;
    }
}

.sidebar-close {
    display: none;
}

/* Mobile Table Adjustments */
@media (max-width: 575px) {
    .premium-table thead th, 
    .premium-table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* Tooltip container */
.tooltip-custom {
    position: relative;
    display: inline-block;
}

/* Tooltip text */
.tooltip-custom .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--text-charcoal);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1001;
    bottom: 125%; /* Position above the button */
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    font-weight: 400;
    pointer-events: none;
}

/* Tooltip arrow */
.tooltip-custom .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-charcoal) transparent transparent transparent;
}

/* Show the tooltip text when hovering over the container */
.tooltip-custom:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.btn-burgundy.disabled {
    opacity: 0.6;
    cursor: default;
    background: #cccccc;
    box-shadow: none;
    transform: none;
}
