* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-page: #f4f7fb;
    --bg-surface: #ffffff;
    --bg-soft: #eef3f9;
    --text-main: #0f172a;
    --text-muted: #5b6475;
    --border-color: #d9e2ef;
    --brand-900: #0c2343;
    --brand-700: #153a6b;
    --brand-500: #2563eb;
    --accent-500: #0ea5e9;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --warn-bg: #fef3c7;
    --warn-text: #92400e;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
}

body {
    font-family: Inter, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
}

.navbar {
    background: linear-gradient(90deg, var(--brand-900) 0%, var(--brand-700) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 8px 20px rgba(12, 35, 67, 0.22);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
}

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

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.dashboard {
    display: none;
    animation: fadeIn 0.3s ease;
}

.dashboard.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 4rem;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 12px 30px rgba(12, 35, 67, 0.08);
    border: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 2.8rem;
    color: var(--brand-900);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(90deg, var(--brand-700) 0%, var(--brand-500) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.34);
}

.btn-secondary {
    background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(14, 165, 233, 0.34);
}

.btn-tertiary {
    background: linear-gradient(90deg, #334155 0%, #0f172a 100%);
    color: white;
}

.btn-tertiary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.34);
}

.features {
    margin: 4rem 0;
}

.features h2 {
    text-align: center;
    color: var(--brand-900);
    font-size: 2rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 24px rgba(12, 35, 67, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
    color: var(--brand-700);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.info-section {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 3rem;
    margin: 3rem 0;
    border: 1px solid var(--border-color);
}

.info-section h2 {
    color: var(--brand-900);
    margin-bottom: 2rem;
}

.step-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--brand-700) 0%, var(--brand-500) 100%);
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 1rem;
}

.step h4 {
    color: var(--brand-700);
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-muted);
}

.dashboard-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.tab-button {
    background: transparent;
    color: var(--brand-900);
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-button.active {
    border-bottom-color: var(--brand-500);
    color: var(--brand-500);
}

.tab-button:hover {
    background: var(--bg-soft);
}

.tab-content {
    display: none;
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
    border: 1px solid var(--border-color);
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h3 {
    color: var(--brand-900);
}

.campaigns-list,
.inventory-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.campaign-card,
.inventory-card {
    background: var(--bg-soft);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(12, 35, 67, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.campaign-card:hover,
.inventory-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.campaign-card h4,
.inventory-card h4 {
    color: var(--brand-700);
    margin-bottom: 1rem;
}

.campaign-info,
.inventory-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-paused {
    background: var(--warn-bg);
    color: var(--warn-text);
}

.status-suspended {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.analytics-grid,
.earnings-grid,
.system-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.metric-card h4 {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
}

.form {
    display: grid;
    gap: 1.5rem;
    max-width: 600px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-control {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    color: var(--text-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table thead {
    background: var(--brand-900);
    color: white;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tbody tr:hover {
    background: var(--bg-soft);
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-surface);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    color: var(--brand-900);
    margin-bottom: 1.5rem;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: #000;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.info-item label {
    font-weight: 600;
    color: var(--text-main);
}

.info-item span {
    color: var(--brand-700);
    font-weight: bold;
}

.report-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.report-filters input,
.report-filters button {
    padding: 0.75rem 1rem;
}

.report-content {
    background: var(--bg-soft);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.billing-info {
    background: var(--bg-soft);
    padding: 2rem;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .hero {
        padding: 2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .step-container {
        grid-template-columns: 1fr;
    }

    .dashboard-tabs {
        flex-direction: column;
    }

    .tab-button {
        text-align: left;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .tab-button.active {
        border-bottom: none;
        border-left-color: white;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .admin-table {
        font-size: 0.9rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }
}

.form-group {
    width: 100%;
}

