@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* =============================================
   CSS Variables & Design Tokens
   ============================================= */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;

    --secondary: #0ea5e9;
    --secondary-light: #38bdf8;
    --secondary-dark: #0284c7;

    --accent: #f59e0b;
    --accent-light: #fbbf24;

    --success: #10b981;
    --success-light: #34d399;
    --success-bg: #ecfdf5;

    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-bg: #fffbeb;

    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-bg: #fef2f2;

    --info: #06b6d4;
    --info-light: #22d3ee;
    --info-bg: #ecfeff;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --gray-950: #020617;

    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --sidebar-width: 260px;
    --header-height: 64px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   Reset & Base
   ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* =============================================
   Layout
   ============================================= */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.sidebar-brand {
    color: white;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.sidebar-brand small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--gray-400);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-500);
    padding: 12px 12px 8px;
    margin-top: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    color: var(--gray-400);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: white;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Sidebar user */
.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    color: white;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-level {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    display: inline-block;
}

.level-LV1 {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.level-LV2 {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
}

.level-LV3 {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    color: var(--gray-300);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--gray-200);
    color: var(--text-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-primary);
    cursor: pointer;
}

/* Page Content */
.page-content {
    padding: 28px;
    flex: 1;
}

/* =============================================
   Cards
   ============================================= */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--primary);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--gray-50);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
}

.stat-card.stat-primary::before {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.stat-card.stat-success::before {
    background: linear-gradient(90deg, var(--success), var(--success-light));
}

.stat-card.stat-warning::before {
    background: linear-gradient(90deg, var(--warning), var(--warning-light));
}

.stat-card.stat-info::before {
    background: linear-gradient(90deg, var(--info), var(--info-light));
}

.stat-card.stat-danger::before {
    background: linear-gradient(90deg, var(--danger), var(--danger-light));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.bg-primary {
    background: var(--primary-50);
    color: var(--primary);
}

.stat-icon.bg-success {
    background: var(--success-bg);
    color: var(--success);
}

.stat-icon.bg-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.stat-icon.bg-info {
    background: var(--info-bg);
    color: var(--info);
}

.stat-icon.bg-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
}

/* =============================================
   Buttons
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

/* =============================================
   Forms
   ============================================= */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group .form-control {
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.input-group .btn {
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    flex-shrink: 0;
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    transition: var(--transition);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-mark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--gray-200);
    border-radius: 6px;
    transition: var(--transition);
}

.checkbox-container:hover input~.checkbox-mark {
    background-color: var(--gray-300);
}

.checkbox-container input:checked~.checkbox-mark {
    background-color: var(--primary);
}

.checkbox-mark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkbox-mark:after {
    display: block;
}

.checkbox-container .checkbox-mark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* =============================================
   Tables
   ============================================= */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.data-table th {
    background: var(--gray-50);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--primary-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.url-cell {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-cell a {
    color: var(--text-primary);
    font-weight: 500;
}

.url-cell a:hover {
    color: var(--primary);
}

/* =============================================
   Badges
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-dark);
}

.badge-success {
    background: var(--success-bg);
    color: #059669;
}

.badge-warning {
    background: var(--warning-bg);
    color: #d97706;
}

.badge-danger {
    background: var(--danger-bg);
    color: #dc2626;
}

.badge-info {
    background: var(--info-bg);
    color: #0891b2;
}

.badge-secondary {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-star {
    background: #fff7ed;
    color: #f97316;
    border: 1px solid #ffedd5;
}

.row-highlight {
    background-color: #fffaf0 !important;
}

.row-highlight:hover {
    background-color: #fff5e6 !important;
}

/* Platform badges */
.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.platform-youtube {
    background: #fee2e2;
    color: #dc2626;
}

.platform-tiktok {
    background: #f3f4f6;
    color: #111827;
}

.platform-facebook {
    background: #dbeafe;
    color: #1d4ed8;
}

.platform-instagram {
    background: #fce7f3;
    color: #be185d;
}

.platform-other {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* =============================================
   Alerts / Toasts
   ============================================= */
.alert {
    padding: 14px 18px;
    border-radius: var(--border-radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

.alert i {
    font-size: 16px;
    margin-top: 1px;
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border-color: var(--success);
}

.alert-danger {
    background: var(--danger-bg);
    color: #991b1b;
    border-color: var(--danger);
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border-color: var(--warning);
}

.alert-info {
    background: var(--info-bg);
    color: #155e75;
    border-color: var(--info);
}

/* =============================================
   Pagination
   ============================================= */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    padding: 16px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary-50);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* =============================================
   Login Page
   ============================================= */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: 50%;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    border-radius: 50%;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-xl);
    padding: 48px 40px;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.6s ease;
}

.login-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.login-title {
    text-align: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    text-align: center;
    color: var(--gray-400);
    font-size: 14px;
    margin-bottom: 32px;
}

.login-card .form-label {
    color: var(--gray-300);
}

.login-card .form-control {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 16px;
}

.login-card .form-control:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.login-card .form-control::placeholder {
    color: var(--gray-500);
}

.login-card .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    margin-top: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--gray-500);
    font-size: 12px;
}

/* =============================================
   Empty State
   ============================================= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    max-width: 360px;
    margin: 0 auto;
}

/* =============================================
   Notes/Comments
   ============================================= */
.notes-row td {
    border-bottom: 2px solid var(--primary-100) !important;
}

.notes-container {
    max-width: 700px;
}

.notes-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 8px;
}

/* =============================================
   Inline Content Editing
   ============================================= */
.content-cell-wrap {
    position: relative;
}

.content-display {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.content-text {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-primary);
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.btn-edit-content {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 12px;
    flex-shrink: 0;
    opacity: 0;
    transition: var(--transition);
    border-radius: 4px;
}

.content-display:hover .btn-edit-content {
    opacity: 1;
}

.btn-edit-content:hover {
    color: var(--primary);
    background: var(--primary-50);
}

.content-empty {
    display: flex;
    align-items: center;
}

.btn-add-content {
    background: none;
    border: 1.5px dashed var(--gray-300);
    color: var(--gray-400);
    padding: 4px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 11.5px;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-add-content:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.content-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.content-textarea {
    min-height: 50px !important;
    font-size: 12.5px !important;
    padding: 8px 10px !important;
    resize: vertical;
}

.content-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-start;
}

.content-actions .btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

/* =============================================
   Utilities
   ============================================= */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-secondary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-primary {
    color: var(--primary);
}

.font-mono {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-fade-up {
    animation: fadeUp 0.5s ease;
}

/* Staggered animation for children */
.stagger-children>* {
    animation: fadeUp 0.4s ease backwards;
}

.stagger-children>*:nth-child(1) {
    animation-delay: 0ms;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 60ms;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 120ms;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 180ms;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 240ms;
}

/* =============================================
   Modal
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: fadeUp 0.3s ease;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }

    .page-content {
        padding: 16px;
    }

    .card-body {
        padding: 16px;
    }

    .login-card {
        margin: 16px;
        padding: 32px 24px;
    }
}

/* =============================================
   Notifications Styles
   ============================================= */
.btn-notification {
    position: relative;
    cursor: pointer;
    color: var(--gray-400);
    transition: var(--transition);
}

.btn-notification:hover {
    color: var(--primary);
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-sidebar);
}

.notif-dropdown {
    position: absolute;
    bottom: 70px;
    /* Position above user info in sidebar */
    left: 15px;
    width: 280px;
    background: white;
    box-shadow: var(--shadow-xl);
    border-radius: var(--border-radius);
    overflow: hidden;
    z-index: 1000;
    display: none;
    border: 1px solid var(--border-color);
}

.notif-header {
    padding: 12px 15px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header h4 {
    margin: 0;
    font-size: 14px;
    color: var(--gray-800);
}

.notif-body {
    max-height: 350px;
    overflow-y: auto;
}

.notif-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.notif-item:hover {
    background: var(--primary-50);
}

.notif-item.unread {
    background: #fdfefe;
    border-left: 3px solid var(--primary);
}

.notif-message {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.4;
}

.notif-time {
    font-size: 11px;
    color: var(--gray-400);
}

.notif-footer {
    padding: 10px;
    text-align: center;
    background: var(--gray-50);
    border-top: 1px solid var(--border-color);
}

.notif-footer a {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Layout Utilities */
.grid-12 {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.col-8 {
    flex: 8;
    min-width: 300px;
}

.col-4 {
    flex: 4;
    min-width: 250px;
}

@media (max-width: 992px) {

    .col-8,
    .col-4 {
        flex: 1 1 100%;
    }
}