﻿:root {
    --body-bg: #f5f7fb;
    --surface-bg: #ffffff;
    --surface-alt: #f8fafc;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent-kpi: #0ea5e9;
    --accent-revenue: #7c3aed;
    --sidebar-bg: #0f172a;
    --sidebar-border: rgba(148, 163, 184, 0.16);
    --card-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--body-bg);
    color: var(--text-color);
}

* {
    box-sizing: border-box;
}

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

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

.btn-theme {
    background-color: var(--primary);
    color: white;
    border: none;
}

.btn-theme:hover,
.btn-theme:focus {
    background-color: var(--primary-dark);
    color: white;
}

.form-control,
.form-select,
.input-group-text {
    border-radius: 0.85rem;
}

.card.theme-card {
    border: none;
    border-radius: 1.2rem;
    box-shadow: var(--card-shadow);
}

.page-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.page-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-transform: uppercase;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--sidebar-bg);
    color: white;
    padding: 1.5rem 1.2rem;
    box-shadow: 4px 0 30px rgba(15, 23, 42, 0.15);
    position: sticky;
    top: 0;
}

.sidebar-brand {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h5 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section li {
    margin-bottom: 0.5rem;
}

.sidebar-section li:last-child {
    margin-bottom: 0;
}

.sidebar-section a {
    display: block;
    text-decoration: none;
    color: #cbd5e1;
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    transition: all 0.15s ease;
}

.sidebar-section a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.sidebar-section a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.sidebar-section-kpi h5 {
    color: #67e8f9;
}

.sidebar-section-revenue h5 {
    color: #c4b5fd;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: var(--surface-bg);
    border-bottom: 1px solid var(--sidebar-border);
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.08);
}

.app-header .page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.app-main {
    flex: 1;
    padding: 1.5rem;
}

.app-footer {
    padding: 0.75rem 1.5rem 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

.app-footer-public {
    background: transparent;
}

.footer-logo {
    height: 34px;
    width: auto;
    object-fit: contain;
    opacity: 0.95;
}

.public-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}

.login-card {
    max-width: 420px;
    width: 100%;
    border-radius: 1.25rem;
    box-shadow: var(--card-shadow);
}

.login-card-header {
    padding: 2rem 1.5rem;
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
    background: linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
    color: white;
}

.login-card-body {
    padding: 1.75rem;
    background: white;
    border-bottom-left-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
}

.login-card-header h3 {
    margin-bottom: 0.5rem;
}

.login-card-header p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.8);
}

.login-card-body .form-label {
    font-weight: 600;
    color: #0f172a;
}

.login-card-body .btn {
    padding: 0.95rem 1.25rem;
    border-radius: 0.85rem;
}

.theme-note {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.content-theme-revenue .page-tag {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.content-theme-kpi .page-tag {
    background: rgba(14, 165, 233, 0.12);
    color: #0ea5e9;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        box-shadow: none;
    }

    .app-layout {
        flex-direction: column;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
