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

:root {
    /* Branding Tokens (overridden by JS per tenant) */
    --brand: #ff4917;
    --brand-hover: #e03b10;
    --brand-glow: rgba(255, 73, 23, 0.25);
    --brand-subtle: rgba(255, 73, 23, 0.08);
    --secondary: #121515;
    --accent: #e03b10;

    /* Surfaces */
    --bg: #0a0a0b;
    --bg-elevated: #111113;
    --bg-surface: #18181b;
    --bg-surface-hover: #1f1f23;
    --bg-input: rgba(255,255,255,0.04);

    /* Borders */
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --border-active: rgba(255,255,255,0.18);

    /* Text */
    --text: #ededed;
    --text-secondary: #888;
    --text-tertiary: #555;
    --text-inverse: #0a0a0b;

    /* Status */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;

    /* Spacing */
    --sidebar-width: 260px;
    --topbar-height: 60px;

    /* Transitions */
    --transition-fast: 120ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ================================================
   LAYOUT
   ================================================ */
.app-layout { display: flex; height: 100vh; }

/* ---- SIDEBAR ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 50;
    transition: transform var(--transition-slow);
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    background: var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 800; font-size: 14px;
    color: white;
    overflow: hidden;
    transition: all var(--transition-base);
}

.sidebar-logo.has-image {
    background: transparent !important;
    width: auto;
    height: 32px;
    max-width: 180px;
    border-radius: 0;
    justify-content: flex-start;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.sidebar-logo.has-image img {
    width: auto;
    height: 100%;
    max-height: 32px;
    border-radius: 0;
}

.sidebar-brand { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-brand small { display: block; font-size: 11px; color: var(--text-tertiary); font-weight: 400; font-family: var(--font-sans); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }

.sidebar-section { margin-bottom: 20px; }
.sidebar-section-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-tertiary); padding: 0 10px; margin-bottom: 6px; }

.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px; font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    user-select: none;
}

.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.sidebar-link.active {
    color: var(--text);
    background: var(--brand-subtle);
}
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px;
    background: var(--brand);
    border-radius: 0 3px 3px 0;
}

.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.6; }
.sidebar-link.active svg { opacity: 1; color: var(--brand); }

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 8px; border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.sidebar-user:hover { background: rgba(255,255,255,0.04); }

.sidebar-avatar {
    width: 32px; height: 32px;
    border-radius: var(--radius-full);
    background: var(--brand-subtle);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: var(--brand);
    overflow: hidden; flex-shrink: 0;
}
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: var(--text-tertiary); }

/* ---- MAIN ---- */
.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
    height: var(--topbar-height);
    padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.topbar-breadcrumb { font-size: 12px; color: var(--text-tertiary); }

.topbar-right { display: flex; align-items: center; gap: 12px; }

/* Notification Bell */
.notification-bell {
    position: relative;
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}
.notification-bell:hover { background: rgba(255,255,255,0.04); border-color: var(--border); color: var(--text); }
.notification-bell svg { width: 20px; height: 20px; }

.notification-badge {
    position: absolute; top: 4px; right: 4px;
    width: 16px; height: 16px;
    background: var(--danger);
    border-radius: var(--radius-full);
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    color: white;
    border: 2px solid var(--bg-elevated);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-badge.hidden { display: none; }

/* Notification Dropdown */
.notification-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 360px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    z-index: 100;
    display: none;
    overflow: hidden;
    animation: dropdown-in var(--transition-base) forwards;
}

.notification-dropdown.show { display: block; }

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.notification-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.notification-dropdown-header h4 { font-size: 14px; font-weight: 600; }
.notification-dropdown-header button { font-size: 12px; color: var(--brand); background: none; border: none; cursor: pointer; }
.notification-dropdown-header button:hover { text-decoration: underline; }

.notification-list { max-height: 320px; overflow-y: auto; }

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.notification-item:hover { background: rgba(255,255,255,0.02); }
.notification-item.unread { border-left: 3px solid var(--brand); }
.notification-item-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.notification-item-message { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.notification-item-time { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }

.notification-empty { padding: 32px 16px; text-align: center; color: var(--text-tertiary); font-size: 13px; }

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

.content-view { display: none; }
.content-view.active { display: block; animation: fade-in var(--transition-base) forwards; }

@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ================================================
   COMPONENTS
   ================================================ */

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: border-color var(--transition-fast);
}
.card:hover { border-color: var(--border-hover); }

.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 600; }
.card-subtitle { font-size: 12px; color: var(--text-tertiary); }

/* KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-fast);
    position: relative; overflow: hidden;
}
.kpi-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.kpi-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 2px; background: linear-gradient(90deg, var(--brand), transparent);
    opacity: 0; transition: opacity var(--transition-base);
}
.kpi-card:hover::after { opacity: 1; }

.kpi-label { font-size: 11px; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.kpi-value { 
    font-family: var(--font-display); 
    font-size: 28px; 
    font-weight: 800; 
    line-height: 1.1; 
    overflow-wrap: break-word; 
    word-wrap: break-word; 
    word-break: break-word;
}
.kpi-value.text-brand { color: var(--brand); }
.kpi-value.text-success { color: var(--success); }
.kpi-value.text-danger { color: var(--danger); }
.kpi-value.text-warning { color: var(--warning); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13px; font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer; border: none;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary { background: var(--brand); color: white; box-shadow: 0 0 16px var(--brand-glow); }
.btn-primary:hover { background: var(--brand-hover); box-shadow: 0 0 24px var(--brand-glow); }

.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-hover); background: rgba(255,255,255,0.03); }

.btn-danger { background: rgba(239,68,68,0.1); color: var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; }
.btn svg { width: 16px; height: 16px; }

/* Tables */
.table-container { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
    padding: 12px 16px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--text-tertiary);
    text-align: left;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}
.data-table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* Badges */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-draft { background: rgba(107,114,128,0.15); color: #9ca3af; }
.badge-published { background: rgba(34,197,94,0.12); color: var(--success); }
.badge-scheduled { background: rgba(245,158,11,0.12); color: var(--warning); }
.badge-archived { background: rgba(107,114,128,0.1); color: #6b7280; }
.badge-active { background: rgba(34,197,94,0.12); color: var(--success); }
.badge-trial { background: rgba(59,130,246,0.12); color: var(--info); }
.badge-suspended { background: rgba(239,68,68,0.12); color: var(--danger); }
.badge-admin { background: var(--brand-subtle); color: var(--brand); }
.badge-gestor { background: rgba(107,114,128,0.15); color: #9ca3af; }

/* Form Inputs */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 13px;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.form-input::placeholder { color: var(--text-tertiary); }
.form-select option { background: var(--bg-surface); }
.form-textarea { resize: vertical; min-height: 80px; }

/* Modals */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    z-index: 200; padding: 20px;
}
.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%; max-width: 520px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0,0,0,0.5);
    animation: modal-in var(--transition-slow) forwards;
}
.modal-lg { max-width: 720px; }

@keyframes modal-in { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-tertiary); cursor: pointer; font-size: 20px; padding: 4px; transition: color var(--transition-fast); }
.modal-close:hover { color: var(--text); }

.modal-body { padding: 24px; max-height: 60vh; overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
    padding: 10px 16px;
    font-size: 13px; font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer; border: none; background: none;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}
.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--text); border-bottom-color: var(--brand); }
.tab .tab-count { margin-left: 6px; font-size: 11px; background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: var(--radius-full); }

/* Toast */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 14px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    min-width: 280px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    animation: toast-in 0.3s ease, toast-out 0.3s ease 3.5s forwards;
    display: flex; align-items: center; gap: 10px;
}
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-info { border-left: 3px solid var(--info); }

@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* Empty state */
.empty-state { padding: 48px 24px; text-align: center; color: var(--text-tertiary); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 16px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Kanban */
.kanban-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kanban-column { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; min-height: 300px; }
.kanban-column-header { display: flex; align-items: center; justify-content: space-between; padding: 8px; margin-bottom: 8px; }
.kanban-column-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kanban-count { font-size: 11px; background: rgba(255,255,255,0.06); padding: 1px 8px; border-radius: var(--radius-full); color: var(--text-tertiary); }

.kanban-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all var(--transition-fast);
}
.kanban-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.kanban-card:active { cursor: grabbing; }

/* Utility */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ---- LOGIN PAGE ---- */
.login-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    overflow: auto;
}
.login-container {
    width: 100%; max-width: 400px;
    padding: 40px;
    text-align: center;
}
.login-logo {
    width: 56px; height: 56px;
    margin: 0 auto 24px;
    background: var(--brand);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 800; font-size: 20px; color: white;
    box-shadow: 0 0 32px var(--brand-glow);
}
.login-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.login-subtitle { font-size: 14px; color: var(--text-tertiary); margin-bottom: 32px; }
.login-form .form-group { text-align: left; }
.login-form .btn-primary { width: 100%; justify-content: center; padding: 12px; font-size: 14px; margin-top: 8px; }
.login-error { color: var(--danger); font-size: 13px; margin-top: 12px; display: none; }

/* ---- TOPBAR AVATAR ---- */
.topbar-avatar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: var(--radius-full);
    transition: transform var(--transition-fast);
}
.topbar-avatar-btn:hover { transform: scale(1.05); }

.topbar-avatar {
    width: 34px; height: 34px;
    border-radius: var(--radius-full);
    background: var(--brand-subtle);
    border: 2px solid var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: var(--brand);
    overflow: hidden; flex-shrink: 0;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- PASSWORD TOGGLE ---- */
.password-wrapper { position: relative; }
.password-wrapper .form-input { padding-right: 44px; }
.password-toggle {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 4px;
    display: flex; align-items: center;
    transition: color var(--transition-fast);
}
.password-toggle:hover { color: var(--text-secondary); }
.password-toggle svg { width: 18px; height: 18px; }

/* ---- TRASH / DELETE ACTION ---- */
.btn-trash {
    background: none; border: none;
    color: var(--danger); cursor: pointer;
    padding: 6px; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center;
    transition: background var(--transition-fast);
    opacity: 0.7;
}
.btn-trash:hover { background: rgba(239,68,68,0.1); opacity: 1; }
.btn-trash svg { width: 16px; height: 16px; }

/* ---- UPLOAD PREVIEW ---- */
.upload-preview-area {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0;
}
.upload-preview-img {
    width: 56px; height: 56px;
    border-radius: var(--radius-md);
    object-fit: contain;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    padding: 4px;
}
.upload-preview-img.round { border-radius: var(--radius-full); object-fit: cover; }

/* ---- PROFILE AVATAR LARGE ---- */
.profile-avatar-wrap {
    position: relative;
    width: 90px; height: 90px;
    margin: 0 auto 16px;
}
.profile-avatar-large {
    width: 90px; height: 90px;
    border-radius: var(--radius-full);
    background: var(--brand-subtle);
    border: 3px solid var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 800; font-size: 32px; color: var(--brand);
    overflow: hidden;
}
.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }

.profile-avatar-edit {
    position: absolute;
    bottom: 0; right: 0;
    background: var(--brand);
    border: 2px solid var(--bg-surface);
    border-radius: var(--radius-full);
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.profile-avatar-edit:hover { background: var(--brand-hover); }
.profile-avatar-edit svg { width: 13px; height: 13px; color: white; }

/* ---- BLOG COVER IMAGE ---- */
.blog-cover-banner {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); z-index: 100; }
    .sidebar.open { transform: translateX(0); }
    .topbar { padding: 0 16px; }
    .content-area { padding: 16px; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .kpi-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .kpi-card { padding: 14px 12px; }
    .kpi-value { font-size: 22px; }
    .kanban-board { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .notification-dropdown { width: calc(100vw - 32px); right: -60px; }
}

@media (max-width: 576px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .kpi-grid-3 { grid-template-columns: 1fr; }
    .kpi-card { padding: 16px; }
    .kpi-value { font-size: 24px; }
}

.mobile-menu-btn {
    display: none;
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
    padding: 6px;
}
.mobile-menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 768px) { .mobile-menu-btn { display: flex; } }

.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 90;
}
@media (max-width: 768px) { .sidebar-overlay.show { display: block; } }
