:root {
    --primary: #0E4C92;
    --primary-dark: #0a3a6e;
    --accent: #F39C12;
    --success: #27AE60;
    --dark: #1F2937;
    --light-bg: #F8FAFC;
    --card-bg: #ffffff;
    --text-primary: #1F2937;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}

[data-theme="dark"] {
    --light-bg: #111827;
    --card-bg: #1F2937;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0,0,0,.3);
}

* { font-family: 'Inter', sans-serif; }

body {
    background-color: var(--light-bg);
    color: var(--text-primary);
    transition: background-color .3s, color .3s;
}

.text-accent { color: var(--accent) !important; }
.text-primary-brand { color: var(--primary) !important; }

/* Navbar */
.navbar-pro {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: .75rem 0;
}

.navbar-pro .navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.navbar-pro .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: .5rem 1rem !important;
    border-radius: 8px;
    transition: all .2s;
}

.navbar-pro .nav-link:hover,
.navbar-pro .nav-link.active {
    color: var(--primary);
    background: rgba(14, 76, 146, .08);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: 8px;
    padding: .5rem 1.25rem;
    transition: all .2s;
}

.btn-accent:hover {
    background: #e08e0b;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary-brand {
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: 8px;
}

.btn-primary-brand:hover {
    background: var(--primary-dark);
    color: #fff;
}

.btn-theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: .4rem .75rem;
    color: var(--text-secondary);
}

/* Hero */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #0a2540 100%);
    color: #fff;
    padding: 5rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?w=1920') center/cover;
    opacity: .15;
}

.hero-content { position: relative; z-index: 1; }

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: .9;
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-image {
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.hero-badge {
    display: inline-block;
    background: rgba(243, 156, 18, .2);
    color: var(--accent);
    padding: .35rem 1rem;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Cards */
.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all .3s;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: .875rem;
    font-weight: 500;
}

.icon-primary { background: rgba(14, 76, 146, .12); color: var(--primary); }
.icon-accent { background: rgba(243, 156, 18, .12); color: var(--accent); }
.icon-success { background: rgba(39, 174, 96, .12); color: var(--success); }
.icon-dark { background: rgba(31, 41, 55, .12); color: var(--dark); }

/* Feature Cards */
.feature-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all .3s;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-card .feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.feature-card h5 { font-weight: 700; margin-bottom: .75rem; }
.feature-card p { color: var(--text-secondary); margin: 0; }

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
}

.page-header h1 { font-weight: 700; margin: 0; }
.page-header p { opacity: .85; margin: .5rem 0 0; }

/* Content Card */
.content-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-card .card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.content-card .card-header-custom h5 {
    margin: 0;
    font-weight: 700;
}

/* Tables */
.table-pro {
    --bs-table-bg: transparent;
}

.table-pro thead th {
    background: rgba(14, 76, 146, .06);
    color: var(--primary);
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    border: none;
    padding: .875rem 1rem;
}

.table-pro tbody td {
    padding: .875rem 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
}

.table-pro tbody tr:hover {
    background: rgba(14, 76, 146, .04);
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border-color: var(--border-color);
    padding: .625rem 1rem;
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 76, 146, .15);
}

.form-label { font-weight: 600; font-size: .875rem; color: var(--text-secondary); }

/* Status Badges */
.badge-status {
    padding: .35rem .75rem;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600;
}

.badge-active { background: rgba(39, 174, 96, .15); color: var(--success); }
.badge-pending { background: rgba(243, 156, 18, .15); color: var(--accent); }
.badge-draft { background: rgba(100, 116, 139, .15); color: var(--text-secondary); }
.badge-completed { background: rgba(14, 76, 146, .15); color: var(--primary); }

/* Footer */
.footer-pro {
    background: var(--dark);
    color: #cbd5e1;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-pro h5, .footer-pro h6 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: #94a3b8; text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--accent); }

.footer-contact { list-style: none; padding: 0; }
.footer-contact li { margin-bottom: .5rem; color: #94a3b8; }

.social-links a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.1);
    border-radius: 8px;
    color: #fff;
    margin-right: .5rem;
    transition: all .2s;
}

.social-links a:hover { background: var(--accent); color: #fff; }

.footer-divider { border-color: rgba(255,255,255,.1); margin: 2rem 0 1rem; }

/* Reference Cards */
.ref-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all .3s;
}

.ref-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.ref-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.ref-card .ref-body { padding: 1.25rem; }

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Toast */
.toast-success {
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: 12px;
}

/* About Section */
.about-section {
    padding: 4rem 0;
}

.value-card {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    height: 100%;
}

.value-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Contact */
.contact-info-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    height: 100%;
}

.map-placeholder {
    background: var(--border-color);
    border-radius: 16px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* Cost Summary */
.cost-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.cost-summary-item {
    background: rgba(14, 76, 146, .06);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.cost-summary-item .label { font-size: .8rem; color: var(--text-secondary); }
.cost-summary-item .value { font-size: 1.25rem; font-weight: 700; color: var(--primary); }

.cost-summary-item.total {
    background: var(--primary);
    color: #fff;
}

.cost-summary-item.total .label,
.cost-summary-item.total .value { color: #fff; }

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-section { padding: 3rem 0; }
}

/* DataTables dark mode */
[data-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .page-link {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-menu {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(14, 76, 146, .15);
}
