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

:root {
    /* Color Palette */
    --primary-color: #bb86fc;
    --primary-variant: #3700b3;
    --secondary-color: #03dac6;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --error-color: #cf6679;
    --on-primary: #000000;
    --on-secondary: #000000;
    --on-background: #ffffff;
    --on-surface: #ffffff;
    --on-error: #000000;
    
    /* Gradients */
    --accent-gradient: linear-gradient(135deg, #6200ee 0%, #bb86fc 100%);
    --glass-background: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Spacing & Borders */
    --border-radius: 12px;
    --sidebar-width: 260px;
    --header-height: 70px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--on-background);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

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

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface-color);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
    text-align: center;
    overflow: hidden;
}

.brand-logo {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Specific size for horizontal navbars */
.nav-marketing .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    white-space: nowrap;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    flex: 1;
    padding: 0 1rem;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    color: rgba(255, 255, 255, 0.7);
    gap: 12px;
}

.menu-item:hover, .menu-item.active {
    background-color: rgba(187, 134, 252, 0.1);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

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

/* Cards & Stats */
.card {
    background-color: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.stat-title {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: #fff;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.2);
}

/* Fix for Select dropdown visibility in Dark Mode */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

select.form-control option {
    background-color: var(--surface-color);
    color: #fff;
    padding: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--on-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(187, 134, 252, 0.4);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success { background: rgba(3, 218, 198, 0.1); color: var(--secondary-color); }
.badge-warning { background: rgba(255, 183, 77, 0.1); color: #ffb74d; }
.badge-error { background: rgba(207, 102, 121, 0.1); color: var(--error-color); }

/* Responsive */
@media (max-width: 992px) {
    .sidebar { width: 80px; }
    .sidebar-header .brand-name, .menu-text { display: none; }
    .sidebar-header { padding: 1rem 0; gap: 0; }
    .brand-logo { width: 40px !important; height: 40px !important; }
    .main-content { margin-left: 80px; }
}
