:root {
    --primary-color: #2563eb;
    --primary-25: rgba(37, 99, 235, 0.25);
    --primary-20: rgba(37, 99, 235, 0.2);
    --primary-10: rgba(37, 99, 235, 0.1);
    --primary-color-3: #1E3A8A;
    --primary-dark: #1e40af;
    --primary-dark-2: #1e429f;
    --primary-light: #3b82f6;
    --primary-light-20: rgba(59, 130, 246, 0.2);
    --primary-light-10: rgba(59, 130, 246, 0.1);
    --primary-ultralight: #eff6ff;
    --secondary-color: #f97316;
    --secondary-05: rgba(249, 115, 22, 0.05);
    --secondary-dark: #ea580c;
    --secondary-light: #fb923c;
    --secondary-light-2: #FDBA74;
    --dark: #1f2a37;
    --light-color: #F3F4F6;
    --text-color: #f8fafc;
    --text-color-dark: #1f2937;
    --text-color-3: #1e293b;
    --text-light: #cbd5e1;
    --text-light-2: #6b7280;
    --text-light-2-20: rgba(107, 114, 128, 0.2);
    --text-light-2-10: rgba(107, 114, 128, 0.1);
    --text-light-3: #64748b;
    --text-lighter: #94a3b8;
    --enterprise: #8B5CF6;
    --residential: #3B82F6;
    --commercial: #10B981;
    --government: #8B5CF6;
    --bg-light: #f9fafb;
    --bg-dark: #0f172a;
    --bg-dark-95: rgba(15, 23, 42, 0.95);
    --bg-dark-50: rgba(15, 23, 42, 0.5);
    --bg-darker: #0a0f1c;
    --bg-card: #1e293b;
    --bg-card-2: #ffffff;
    --sidebar-text: #f1f5f9;
    --white: #ffffff;
    --white-90: rgba(255, 255, 255, 0.9);
    --white-85: rgba(255, 255, 255, 0.85);
    --white-80: rgba(255, 255, 255, 0.8);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-60: rgba(255, 255, 255, 0.6);
    --white-50: rgba(255, 255, 255, 0.5);
    --white-30: rgba(255, 255, 255, 0.3);
    --white-20: rgba(255, 255, 255, 0.2);
    --white-15: rgba(255, 255, 255, 0.15);
    --white-10: rgba(255, 255, 255, 0.1);
    --white-05: rgba(255, 255, 255, 0.05);
    --white-2: #f8f9fa;
    --black: #000000;
    --black-80: rgba(0, 0, 0, 0.8);
    --black-70: rgba(0, 0, 0, 0.7);
    --black-50: rgba(0, 0, 0, 0.5);
    --black-10: rgba(0, 0, 0, 0.1);
    --black-08: rgba(0, 0, 0, 0.08);
    --black-07: rgba(0, 0, 0, 0.07);
    --black-06: rgba(0, 0, 0, 0.06);
    --black-05: rgba(0, 0, 0, 0.05);
    --black-04: rgba(0, 0, 0, 0.04);
    --navy-dark: #0f172a;
    --navy-darker: #0a0f1c;
    --success-color: #10b981;
    --green-20: rgba(16, 185, 129, 0.2);
    --green-10: rgba(16, 185, 129, 0.1);
    --warning-color: #f59e0b;
    --orange-20: rgba(245, 158, 11, 0.2);
    --orange-10: rgba(245, 158, 11, 0.1);
    --danger-color: #ef4444;
    --red-80: rgba(239, 68, 68, 0.8);
    --red-20: rgba(239, 68, 68, 0.2);
    --info-color: #3b82f6;
    --purple-20: rgba(139, 92, 246, 0.2);
    --border-color: #334155;
    --gray-light: #e5e7eb;
    --border-light: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 var(--black-05);
    --shadow-sm-2: 0 1px 3px var(--black-05), 0 1px 2px var(--black-10);
    --shadow: 0 1px 3px 0 var(--black-10), 0 1px 2px 0 var(--black-06);
    --shadow-2: 0 4px 6px var(--black-04), 0 1px 3px var(--black-05);
    --shadow-md: 0 4px 6px -1px var(--black-10), 0 2px 4px -1px var(--black-06);
    --shadow-md-2: 0 10px 15px -3px var(--black-07), 0 4px 6px -2px var(--black-05);
    --shadow-lg: 0 10px 15px -3px var(--black-10), 0 4px 6px -2px var(--black-05);
    --shadow-lg-2: 0 20px 25px -5px var(--black-08), 0 10px 10px -5px var(--black-04);
    --shadow-xl: 0 20px 25px -5px var(--black-10), 0 10px 10px -5px var(--black-04);
    --shadow-xl-2: 0 25px 50px -12px var(--black-10);
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    --transition: all 0.3s ease;
    --transition-2: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1280px;
    --side-padding: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    color: var(--text-light);
    background-color: var(--bg-darker);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.25;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
    letter-spacing: -0.025rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.125rem;
}

p {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 1.25rem;
}

.p-small {
    font-size: 1.125rem;
}

.p-smaller {
    font-size: 1rem;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

ul,
ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--side-padding);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.margin-0 {
    margin: 0;
}

.max-width-90p {
    max-width: 90%;
}

.max-width-80p {
    max-width: 80%;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Firefox support */
html {
    scrollbar-color: var(--primary-color) transparent;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-dark-95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 100;
    height: 80px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.header.scrolled {
    height: 70px;
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--white);
}

.logo img {
    height: 2.5rem;
    object-fit: contain;
    border-radius: var(--radius);
}

.nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav a:hover:after {
    width: 100%;
}

.nav a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-2);
    border: 2px solid transparent;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--white-20), transparent);
    transition: all 0.6s ease;
}

.btn:hover:before {
    left: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.auth-buttons .btn-outline:hover {
    color: var(--white);
}

.btn-link {
    background-color: transparent;
    color: var(--primary-color);
    padding: 0;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
    background-color: transparent;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background-color: var(--bg-card);
    color: var(--primary-color);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 101;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100dvh;
    overflow-y: auto;
    background-color: var(--bg-dark);
    padding: 5rem 2rem 2rem;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 99;
    transform: translateX(-100%);
    transition: var(--transition-2);
}

.mobile-nav.active {
    transform: translateX(0);
    display: flex;
}

.mobile-nav a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--text-color);
}

/* Section header */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    position: relative;
    z-index: 1;
}

.section-subtitle {
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: var(--white);
    padding: 6rem 0 0;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--white-10), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-grid :first-child {
    grid-column: span 3;
}

.footer-grid :nth-child(2) {
    grid-column: span 2;
}

.footer-grid :nth-child(3) {
    grid-column: span 2;
}

.footer-grid :nth-child(4) {
    grid-column: span 2;
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-column a {
    color: var(--white-70);
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--white);
    transform: translateX(5px);
}

.footer-description {
    color: var(--white-70);
    margin-top: 1.5rem;
    max-width: 400px;
}

.footer-column li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-bottom {
    border-top: 1px solid var(--white-10);
    padding: 2.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white-50);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--white-50);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--black-50);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-2);
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(-30px) scale(0.95);
    transition: var(--transition-2);
    color: var(--text-color);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-dark);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    margin-bottom: 0;
    color: var(--white);
}

.modal-header h3 {
    margin-bottom: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--primary-color);
    background-color: var(--white-10);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-content h4 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.modal-content p {
    margin-bottom: 1.25rem;
    color: var(--text-light);
}

.modal-content a {
    color: var(--text-light);
}

.modal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-content li {
    list-style-type: disc;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    color: var(--text-light);
}

/* Notifications (global) */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: var(--radius);
    color: var(--white);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    gap: 12px;
}

.notification-success {
    background-color: var(--success-color);
}

.notification-error {
    background-color: var(--danger-color);
}

.notification-info {
    background-color: var(--primary-light);
}

.notification-warning {
    background-color: var(--warning-color);
}

.notification-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    margin-left: 8px;
    line-height: 1;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.15;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {

    .summary-card,
    .chart-card,
    .card {
        border: 1px solid var(--text-color);
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    h4 {
        font-size: 1.375rem;
    }

    h5 {
        font-size: 1.125rem;
    }

    h6 {
        font-size: 1rem;
    }

    p {
        font-size: 1.125rem;
    }

    .p-small {
        font-size: 1rem;
    }

    .p-smaller {
        font-size: 0.875rem;
    }

    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    .btn-small {
        padding: 0.45rem 0.85rem;
        font-size: 0.8rem;
    }

    .btn-large {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }

    .nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .auth-buttons {
        margin-top: auto;
        display: flex;
        gap: 1rem;
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

    .auth-buttons a {
        border: 2px solid var(--primary-color);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 12px;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    h5 {
        font-size: 1rem;
    }

    h6 {
        font-size: 0.875rem;
    }

    p {
        font-size: 1rem;
    }

    .p-small {
        font-size: 0.875rem;
    }

    .p-smaller {
        font-size: 0.75rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .btn-small {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    .btn-large {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .mobile-nav {
        padding: 4rem 1.5rem 1.5rem;
    }

    .mobile-nav a {
        padding: 0.75rem 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-description {
        font-size: 1rem;
        margin-top: 1rem;
        margin-bottom: 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal {
        max-height: 90vh;
    }

    .modal-header {
        padding: 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }
}