:root {
    --primary-red: #DC3545;
    --primary-white: #FFFFFF;
    --primary-black: #000000;
    --dark-gray: #212529;
    --light-gray: #F8F9FA;
    --border-gray: #DEE2E6;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--primary-black);
    padding-top: 76px; /* Account for fixed navbar */
}

/* Navigation Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: var(--primary-black) !important;
}

.navbar-brand {
    color: var(--primary-white) !important;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: var(--primary-white) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-red) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--dark-gray) 100%);
    color: var(--primary-white);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="%23DC3545" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Buttons */
.btn-danger {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.btn-outline-light {
    border-width: 2px;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Cards */
.card {
    border: none;
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

.card-header {
    background-color: var(--primary-red);
    color: var(--primary-white);
    border: none;
    font-weight: 600;
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid var(--border-gray);
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 8px;
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.table thead th {
    background-color: var(--primary-red);
    color: var(--primary-white);
    border: none;
    font-weight: 600;
    padding: 15px;
}

.table tbody tr:hover {
    background-color: rgba(220, 53, 69, 0.05);
}

/* Alerts */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    border-radius: 10px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    border-radius: 10px;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
    border-radius: 10px;
}

/* Badges */
.badge {
    font-size: 0.8em;
    padding: 8px 12px;
    border-radius: 20px;
}

.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
    color: var(--primary-black);
}

.badge-danger {
    background-color: var(--primary-red);
}

/* Invoice Styles */
.invoice {
    background-color: var(--primary-white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 15px;
    padding: 40px;
    margin: 20px 0;
}

.invoice-header {
    border-bottom: 3px solid var(--primary-red);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.invoice-footer {
    border-top: 2px solid var(--border-gray);
    padding-top: 20px;
    margin-top: 30px;
}

/* Payment Styles */
.payment-card {
    background: linear-gradient(135deg, var(--primary-red) 0%, #c82333 100%);
    color: var(--primary-white);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
}

.payment-form {
    background-color: var(--primary-white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Quote Calculator */
.quote-calculator {
    background-color: var(--light-gray);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
}

.quote-result {
    background-color: var(--primary-red);
    color: var(--primary-white);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

/* Admin Dashboard */
.dashboard-card {
    background: linear-gradient(135deg, var(--primary-white) 0%, var(--light-gray) 100%);
    border-left: 5px solid var(--primary-red);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-red);
}

/* Footer */
footer {
    background-color: var(--primary-black) !important;
    margin-top: 60px;
}

footer h5 {
    color: var(--primary-red);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .btn-lg {
        padding: 10px 25px;
        font-size: 1rem;
    }
    
    .invoice {
        padding: 20px;
        margin: 10px;
    }
    
    .payment-card,
    .payment-form {
        padding: 20px;
        margin: 10px 0;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--primary-white);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .invoice {
        box-shadow: none;
        border: 2px solid var(--primary-black);
    }
    
    body {
        padding-top: 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c82333;
}
