:root {
    --sidebar-width: 250px;
    --sidebar-bg: #1a1d23;
    --sidebar-hover: #2a2d35;
    --sidebar-active: #0d6efd;
    --topbar-height: 56px;
    --primary-gradient: linear-gradient(135deg, #0d6efd, #0dcaf0);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f6fa; overflow-x: hidden; }
.wrapper { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 1040;
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand {
    color: #fff; text-decoration: none; font-size: 1.1rem; font-weight: 700;
    display: flex; align-items: center; gap: 10px;
}
.sidebar-brand i { font-size: 1.4rem; color: #0dcaf0; }
.sidebar-toggle { background: none; border: none; color: #fff; cursor: pointer; }
.sidebar-user { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.avatar-circle {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary-gradient); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.avatar-circle-sm { width: 30px; height: 30px; border-radius: 50%;
    background: var(--primary-gradient); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .75rem;
}
.sidebar-nav { list-style: none; padding: 8px 0; flex: 1; }
.sidebar-nav .nav-item { padding: 0 8px; }
.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; color: rgba(255,255,255,.65);
    text-decoration: none; border-radius: 8px;
    transition: all .2s; font-size: .9rem;
}
.sidebar-nav .nav-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--sidebar-active); color: #fff; }
.sidebar-nav .nav-link i { font-size: 1.15rem; width: 20px; text-align: center; }
.sidebar-nav .nav-divider {
    padding: 12px 24px 4px; font-size: .7rem; text-transform: uppercase;
    color: rgba(255,255,255,.35); letter-spacing: 1px;
}
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left .3s ease;
}
.main-content.full-width { margin-left: 0; }
.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    display: flex; align-items: center;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 1030;
}
.container-fluid { max-width: 1400px; }
.card {
    border: none; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08);
    transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.card-header {
    background: none; border-bottom: 1px solid #e9ecef;
    padding: 16px 20px; font-weight: 600;
}
.stat-card {
    border-radius: 12px; padding: 20px;
    color: #fff; position: relative; overflow: hidden;
}
.stat-card .stat-icon {
    position: absolute; right: 16px; top: 16px;
    font-size: 2.5rem; opacity: .2;
}
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; }
.stat-card .stat-label { font-size: .85rem; opacity: .85; }
.stat-card.bg-gradient-primary { background: linear-gradient(135deg, #0d6efd, #6610f2); }
.stat-card.bg-gradient-success { background: linear-gradient(135deg, #198754, #20c997); }
.stat-card.bg-gradient-info { background: linear-gradient(135deg, #0dcaf0, #0d6efd); }
.stat-card.bg-gradient-warning { background: linear-gradient(135deg, #ffc107, #fd7e14); }
.stat-card.bg-gradient-danger { background: linear-gradient(135deg, #dc3545, #fd7e14); }
.stat-card.bg-gradient-secondary { background: linear-gradient(135deg, #6c757d, #495057); }
.table th { font-weight: 600; color: #495057; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.table td { vertical-align: middle; }
.search-box { max-width: 300px; }
.btn-group-actions .btn { padding: 4px 8px; font-size: .8rem; }
.form-label { font-weight: 500; font-size: .85rem; margin-bottom: 4px; }
.required::after { content: '*'; color: #dc3545; margin-left: 2px; }
.sortable-handle { cursor: grab; color: #adb5bd; }
.sortable-handle:active { cursor: grabbing; }
.sortable-ghost { opacity: .4; }
.empty-state { text-align: center; padding: 60px 20px; color: #6c757d; }
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: .3; }
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,.5);
        z-index: 1035; display: none;
    }
    .sidebar-overlay.show { display: block; }
}
.page-title { font-size: 1.5rem; font-weight: 700; color: #212529; }
.subtitle { color: #6c757d; font-size: .9rem; }
.preview-iframe { width: 100%; min-height: 300px; border: 1px solid #dee2e6; border-radius: 8px; }
