@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --dark: #0f172a;
    --sidebar-bg: #1e1e2d;
    --sidebar-hover: #2b2b40;
    --sidebar-text: #a1a5b7;
    --light-bg: #f5f8fa;
    --card-bg: #ffffff;
    --text-main: #3f4254;
    --text-muted: #7e8299;
}

body {
    background-color: var(--light-bg);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
}

/* Scrollbar premium */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* LAYOUT */
.wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 250px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar .brand-logo {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-menu {
    flex-grow: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.menu-item {
    padding: 0 15px;
    margin-bottom: 5px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
}

.menu-link i {
    font-size: 1.15rem;
    margin-right: 12px;
}

.menu-link:hover, .menu-link.active {
    background-color: var(--sidebar-hover);
    color: #fff;
}

/* MAIN CONTENT */
.main-content {
    flex-grow: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* TOPBAR */
.topbar {
    height: 70px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    z-index: 999;
}

.topbar .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* CONTENT CONTAINER */
.content-body {
    padding: 30px;
    flex-grow: 1;
}

/* CARDS */
.card {
    border: none;
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: 0 0 20px 0 rgba(76, 87, 125, 0.04);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #eff2f5;
    padding: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.card-body { padding: 1.5rem; }

/* METRIC CARDS */
.metric-card {
    padding: 20px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0px 4px 20px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin: 10px 0 0 0;
}

.metric-icon {
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-size: 5rem;
    opacity: 0.05;
    color: var(--primary);
}

/* TABLES */
.table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-top: none;
    border-bottom: 1px dashed #e4e6ef;
    padding: 1rem 0.75rem;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
    color: var(--text-main);
    border-bottom: 1px dashed #e4e6ef;
    padding: 1rem 0.75rem;
}

.badge-saas {
    padding: 0.5em 0.85em;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

.btn-primary {
    background-color: var(--primary);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.3);
}

/* RESPONSIVE */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

@media (max-width: 991px) {
    .sidebar { left: -250px; }
    .sidebar.show { left: 0; }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
}
