/* assets/css/dashboard.css - Modern Dashboard Styles */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --sidebar-width: 280px;
    --header-height: 70px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

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

body.dashboard-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-dark) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    flex-shrink: 0;
    overflow-y: auto;
    /* Allow sidebar scroll if content is tall */
    scrollbar-width: none;
    /* Firefox */
}

.sidebar::-webkit-scrollbar {
    display: none;
    /* Safari and Chrome */
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 4px;
    transition: var(--transition);
    position: relative;
    font-size: 14px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(236, 72, 153, 0.1) 100%);
    color: var(--primary-light);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 0 4px 4px 0;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 17px;
}

.nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 50px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-hover);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.user-card:hover {
    background: rgba(99, 102, 241, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    min-height: 100vh;
    padding: 32px;
    transition: var(--transition);
    min-width: 0;
}

/* ===== HEADER ===== */
.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    margin: -32px -32px 32px -32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-left h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.header-left p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

/* ===== NOTIFICATIONS ===== */
.notification-container {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 0 2px var(--bg-dark);
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1010;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

.notification-container.active .notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.mark-read-btn {
    background: none;
    border: none;
    color: var(--primary-light);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}

.mark-read-btn:hover {
    text-decoration: underline;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
    align-items: flex-start;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.05);
}

.notification-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.notification-icon.like {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.notification-icon.comment {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.notification-icon.donation {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.notification-icon.subscription {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.notification-icon.admin {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.4;
    word-break: break-word;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    color: white;
}

.header-btn-secondary {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-btn-secondary:hover {
    background: var(--bg-hover);
    box-shadow: var(--shadow-lg);
}

/* ===== STATS CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(99, 102, 241, 0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.stat-icon.earnings {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.stat-icon.donations {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
}

.stat-icon.supporters {
    background: rgba(236, 72, 153, 0.15);
    color: var(--secondary);
}

.stat-icon.views {
    background: rgba(6, 182, 212, 0.15);
    color: var(--info);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    margin-top: 12px;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* ===== CARDS ===== */
.dash-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.dash-card-action {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.dash-card-action:hover {
    color: var(--secondary);
}

.dash-card-body {
    padding: 24px;
}

/* ===== CHART ===== */
.chart-container {
    height: 300px;
    position: relative;
}

/* ===== DONATIONS TABLE ===== */
.donations-table {
    width: 100%;
}

.donation-row {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.donation-row:last-child {
    border-bottom: none;
}

.donation-row:hover {
    background: rgba(255, 255, 255, 0.02);
    margin: 0 -24px;
    padding: 16px 24px;
}

.donor-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 16px;
    flex-shrink: 0;
}

.donor-info {
    flex: 1;
    min-width: 0;
}

.donor-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.donor-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donation-meta {
    text-align: right;
    flex-shrink: 0;
    margin-left: 16px;
}

.donation-amount {
    font-weight: 700;
    color: var(--success);
    font-size: 1.1rem;
}

.donation-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ===== TOP DONORS ===== */
.top-donor-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-donor-item:last-child {
    border-bottom: none;
}

.top-donor-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 12px;
}

.top-donor-rank.gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e1b4b;
}

.top-donor-rank.silver {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    color: white;
}

.top-donor-rank.bronze {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
}

.top-donor-info {
    flex: 1;
}

.top-donor-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.top-donor-amount {
    font-weight: 700;
    color: var(--success);
}

/* ===== SETTINGS CARD ===== */
.settings-form .form-group {
    margin-bottom: 20px;
}

.settings-form .form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.settings-form .form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.settings-form .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.settings-form textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.btn-save {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.public-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.public-page-link:hover {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

/* ===== ALERT ===== */
.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    body.dashboard-body {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
    }



    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 16px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
        margin: -16px -16px 24px -16px;
    }

    .header-right {
        width: 100%;
    }

    .header-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ===== MOBILE TOGGLE ===== */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    align-items: center;
    justify-content: center;
}

/* ===== OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.dash-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 8px;
}

.lang-btn {
    padding: 6px 12px;
    background: var(--bg-hover);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===== PROFILE SIDEBAR (RIGHT) ===== */
.profile-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    /* Hidden by default */
    width: 320px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1002;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .profile-sidebar {
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-sidebar.active {
    right: 0;
}

.profile-header {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

[data-theme="light"] .profile-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.close-profile {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-profile:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.profile-big-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
}

.profile-role {
    font-size: 0.85rem;
    color: var(--primary-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.profile-menu {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.profile-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(4px);
}

.profile-item i {
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
}

.profile-item-text {
    flex: 1;
    font-weight: 500;
}

.profile-item.danger {
    color: var(--danger);
}

.profile-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.theme-toggle-container {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .theme-toggle-container {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}


/* ===== FEED & POSTS ===== */
.feed-container { max-width: 700px; margin: 0 auto; }

/* ── Link colors inside post content (adapts to theme) ─────────────────────── */
.post-content a,
.post-body a {
    color: #3b9eff;          /* azul vivo, legible en fondos oscuros */
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}
.post-content a:hover,
.post-body a:hover {
    color: #74bcff;          /* más claro al hacer hover */
}
/* Modo claro: volvemos al azul estándar de links */
[data-theme="light"] .post-content a,
[data-theme="light"] .post-body a {
    color: #1a56db;
}
[data-theme="light"] .post-content a:hover,
[data-theme="light"] .post-body a:hover {
    color: #1e40af;
}
/* ─────────────────────────────────────────────────────────────────────────── */

/* ── Images inside post content (Quill-generated HTML) ─────────────────────── */
.post-content img,
.post-body img {
    max-width: 100% !important; /* Nunca desborda el contenedor */
    width: auto !important;
    height: auto !important;    /* Mantiene aspecto original */
    border-radius: 8px;
    display: block !important;
    margin: 12px auto !important; /* Centrada con espacio vertical */
    object-fit: contain;
}
.post-card { background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius-lg); padding: 0; margin-bottom: 24px; position: relative; animation: fadeIn 0.5s ease-out; z-index: 1; }
.post-header { padding: 16px 20px 0 20px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.post-author { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #ec4899); color: white; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 1.1rem; }
.author-info { display: flex; align-items: baseline; gap: 8px; }
.author-info h4 { font-size: 0.95rem; font-weight: 600; margin: 0; color: var(--text-primary); }
.author-info span { font-size: 0.8rem; color: var(--text-muted); }
.post-title { padding: 0 20px; margin-top: 12px; margin-bottom: 4px; font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }
.post-content { padding: 0 20px 16px; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; margin-top: 0; overflow: hidden; word-break: break-word; }
.post-image { width: 100%; height: auto; display: block; border-top: 1px solid rgba(255, 255, 255, 0.05); border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.post-actions { padding: 12px 20px; border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; gap: 20px; }
.action-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 0.9rem; transition: var(--transition); }
.action-btn:hover { color: var(--primary); }
.action-btn.active { color: #ec4899; }
.loading-sentinel { text-align: center; padding: 30px; color: var(--text-muted); }
.post-menu-container { position: relative; }
.post-menu-dropdown { position: absolute; top: 100%; right: 0; background: #1e1e1e; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); width: 200px; z-index: 9999; display: none; flex-direction: column; }
.post-menu-dropdown.active { display: flex; animation: fadeIn 0.2s ease-out; }
.post-menu-item { padding: 12px 16px; color: var(--text-secondary); text-decoration: none; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; transition: var(--transition); background: none; border: none; width: 100%; text-align: left; cursor: pointer; }
.post-menu-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.post-menu-item.danger:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.feed-tabs-container { max-width: 700px; margin: 0 auto 20px auto; }
.feed-tabs { display: flex; gap: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 0; }
.feed-tab { background: none; border: none; color: var(--text-muted); font-size: 1rem; font-weight: 600; padding: 10px 15px; cursor: pointer; position: relative; transition: color 0.3s ease; }
.feed-tab:hover { color: var(--text-primary); }
.feed-tab.active { color: #ec4899; }
.feed-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: #ec4899; border-radius: 2px 2px 0 0; }

/* Global Search Bar */
.search-container { position: relative; margin-right: 15px; display: flex; align-items: center; }
.search-input { background: var(--bg-hover, rgba(255, 255, 255, 0.05)); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; padding: 8px 15px 8px 35px; color: var(--text-primary, #fff); font-size: 0.9rem; width: 220px; transition: all 0.3s ease; }
.search-input:focus { outline: none; border-color: #fbbf24; background: var(--bg-card, #1e1e1e); box-shadow: 0 0 10px rgba(251, 191, 36, 0.2); width: 280px; }
.search-icon { position: absolute; left: 12px; color: var(--text-muted, #9ca3af); font-size: 0.9rem; pointer-events: none; transition: color 0.3s ease; }
.search-input:focus~.search-icon, .search-input:not(:placeholder-shown)~.search-icon { color: #fbbf24; }
.search-dropdown { position: absolute; top: 120%; left: 0; right: 0; background: var(--bg-card, #1e1e1e); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); max-height: 400px; overflow-y: auto; z-index: 9999; padding: 10px 0; }
.search-results p.search-title { padding: 10px 15px 5px; margin: 0; font-size: 0.75rem; color: var(--text-muted, #9ca3af); text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.search-result-item { display: flex; align-items: center; padding: 10px 15px; color: var(--text-primary, #fff); text-decoration: none; transition: background 0.2s; gap: 10px; cursor: pointer; }
.search-result-item:hover { background: var(--bg-hover, rgba(255, 255, 255, 0.05)); }
.search-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #4b5563; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: bold; color: #fff; }
.search-text { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { padding: 15px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* ===== MODALS ===== */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 9999; display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-overlay.active { display: flex; }
.modal-content { background: var(--bg-card); padding: 30px; border-radius: 20px; width: 90%; max-width: 400px; position: relative; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes modalPop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.close-modal-btn { position: absolute; top: 15px; right: 15px; background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; transition: color 0.2s; }
.close-modal-btn:hover { color: var(--text-primary); }
.modal-header { text-align: center; margin-bottom: 20px; }
.modal-header h3 { margin: 0 0 5px 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.modal-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }
.balance-info { background: rgba(255, 255, 255, 0.05); padding: 10px 15px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 0.9rem; }
.balance-amount { font-weight: 700; color: #fbbf24; }
.amount-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.amount-option input { display: none; }
.amount-box { background: var(--bg-hover); border: 2px solid transparent; border-radius: 12px; padding: 15px; text-align: center; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.amount-option input:checked+.amount-box { border-color: #fbbf24; background: rgba(251, 191, 36, 0.1); transform: translateY(-2px); }
.amount-val { font-size: 1.2rem; font-weight: 700; }
.amount-icon { font-size: 0.8rem; color: #fbbf24; margin-top: 5px; }
.input-with-icon { position: relative; }
.input-with-icon i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #fbbf24; }
.input-with-icon input { padding-left: 40px; text-align: center; font-size: 1.1rem; font-weight: 600; }
.modal-actions { margin-top: 25px; }
.btn-submit { width: 100%; background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%); color: black; border: none; padding: 14px; border-radius: 12px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.2s; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(251, 191, 36, 0.4); }

/* Additional Modals (Delete/Report/Block/Edit) */
.btn-cancel { padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: transparent; color: var(--text-primary); cursor: pointer; transition: var(--transition); }
.btn-cancel:hover { background: rgba(255,255,255,0.05); }
.visibility-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.visibility-option input { display: none; }
.visibility-option label { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; background: var(--bg-hover); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius); cursor: pointer; transition: var(--transition); font-size: 0.8rem; text-align: center; }
.visibility-option input:checked + label { border-color: var(--primary); background: rgba(99, 102, 241, 0.1); color: var(--primary-light); }

/* ===== EXPLORE / CREATORS ===== */
.creator-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.creator-card { background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius-lg); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; animation: fadeIn 0.5s ease-out; }
.creator-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); }
.creator-cover { height: 120px; background-color: #333; background-size: cover; background-position: center; position: relative; }
.creator-card-body { padding: 20px; padding-top: 50px; position: relative; text-align: center; flex-grow: 1; display: flex; flex-direction: column; }
.creator-avatar-wrap { position: absolute; top: -40px; left: 50%; transform: translateX(-50%); width: 80px; height: 80px; border-radius: 50%; border: 4px solid var(--bg-card); overflow: hidden; background: linear-gradient(135deg, #6366f1, #ec4899); display: flex; align-items: center; justify-content: center; color: white; font-size: 2rem; font-weight: bold; }
.creator-card h3 { margin: 0 0 10px 0; font-size: 1.25rem; color: var(--text-primary); }
.creator-card p.about { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.join-btn { background: linear-gradient(135deg, var(--primary), #ec4899); color: white; border: none; padding: 10px 20px; border-radius: 50px; font-weight: 600; cursor: pointer; transition: opacity 0.3s; margin-top: auto; text-decoration: none; display: inline-block; }
.join-btn:hover { opacity: 0.9; color: white; }
.join-btn.following { background: transparent; border: 1px solid var(--text-muted); color: var(--text-primary); }
.categories-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 15px; margin-bottom: 25px; scrollbar-width: thin; }
.category-pill { padding: 8px 18px; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 50px; color: var(--text-secondary); font-size: 0.9rem; white-space: nowrap; text-decoration: none; transition: var(--transition); }
.category-pill.active { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; border: none; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }

/* ===== MARKETPLACE / PRODUCTS ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.product-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.05); overflow: hidden; transition: var(--transition); display: flex; flex-direction: column; }
.product-card:hover { border-color: rgba(99, 102, 241, 0.3); box-shadow: var(--shadow-glow); transform: translateY(-4px); }
.product-image { height: 180px; background: var(--bg-hover); display: flex; align-items: center; justify-content: center; font-size: 3.5rem; color: var(--text-muted); position: relative; }
.creator-badge { position: absolute; bottom: 10px; right: 10px; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; color: white; display: flex; align-items: center; gap: 5px; }
.product-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-name { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price { font-size: 1.25rem; font-weight: 700; color: var(--success); margin-bottom: 12px; }
.product-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.product-footer { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 16px; display: flex; justify-content: space-between; align-items: center; }
.btn-buy { background: var(--primary); color: white; border: none; padding: 8px 16px; border-radius: var(--radius); font-weight: 500; cursor: pointer; transition: var(--transition); text-decoration: none; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px; }
.btn-buy:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }
.empty-shop { text-align: center; padding: 60px 24px; background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.05); grid-column: 1 / -1; }
.empty-shop i { font-size: 4rem; color: var(--secondary); opacity: 0.5; margin-bottom: 16px; }

/* ===== BALANCE / FINANCES ===== */
.balance-card { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); border-radius: 20px; padding: 40px; text-align: center; color: white; margin-bottom: 30px; box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3); position: relative; overflow: hidden; }
.balance-card::before { content: ''; position: absolute; top: -40%; right: -10%; width: 300px; height: 300px; background: rgba(255, 255, 255, 0.06); border-radius: 50%; pointer-events: none; }
.balance-amount { font-size: 3.5rem; font-weight: 700; margin: 10px 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.coin-icon { color: #fbbf24; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)); }
.coin-packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.package-card { background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 16px; padding: 28px 22px; text-align: center; transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s; position: relative; overflow: hidden; cursor: pointer; }
.package-card:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: 0 12px 28px rgba(99, 102, 241, 0.18); }
.package-amount { font-size: 1.8rem; font-weight: 700; margin: 14px 0; color: var(--text-primary); }
.package-price { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 18px; }
.best-value::before { content: 'BEST VALUE'; position: absolute; top: 20px; right: -30px; background: #fbbf24; color: #000; padding: 5px 35px; transform: rotate(45deg); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.5px; }
.accounting-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 40px; }
.acct-card { background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 16px; padding: 24px; }
.acct-title { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.acct-value { font-size: 2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 5px; }
.acct-sub { font-size: 0.9rem; color: var(--text-muted); }
.withdraw-section { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.2); border-radius: 16px; padding: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }
.history-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.9rem; }
.history-table th { text-align: left; padding: 10px 14px; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.05); }
.history-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.badge-status { padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.5px; }
.badge-paid { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-pending { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-failed { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-expired { background: rgba(107,114,128,0.15); color: #6b7280; }
.crypto-strip { display: flex; align-items: center; gap: 10px; background: rgba(99, 102, 241, 0.07); border: 1px solid rgba(99, 102, 241, 0.15); border-radius: 12px; padding: 12px 18px; margin-bottom: 28px; font-size: 0.88rem; color: var(--text-muted); }

/* Finance Modal Specifics */
.pulse-ring { width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--primary); margin: 0 auto 16px; animation: pulse-ring-anim 1.4s ease-in-out infinite; }
@keyframes pulse-ring-anim { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.15); } }
.modal-box { background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px; padding: 36px 32px; width: min(440px, 92vw); text-align: center; animation: modalIn 0.25s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-icon { font-size: 3rem; margin-bottom: 16px; }
.btn-proceed { padding: 12px 28px; border-radius: 12px; background: var(--primary); color: white; font-weight: 700; border: none; cursor: pointer; font-size: 0.95rem; transition: background 0.2s, transform 0.15s; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn-proceed:hover { background: var(--secondary); transform: scale(1.03); }
.btn-cancel-modal { padding: 12px 20px; border-radius: 12px; background: transparent; color: var(--text-muted); border: 1px solid rgba(255, 255, 255, 0.1); cursor: pointer; font-size: 0.93rem; transition: all 0.2s; }
.btn-cancel-modal:hover { border-color: var(--danger); color: var(--danger); }

/* ===== CREATIVES ===== */
.creative-section { margin-bottom: 40px; }
.creative-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.creative-card { background: var(--bg-card); border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.05); overflow: hidden; display: flex; flex-direction: column; }
[data-theme="light"] .creative-card { background: #ffffff; border-color: #e2e8f0; }
.preview-area { background: #1e1e1e; padding: 20px; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; }
[data-theme="light"] .preview-area { background: #f1f5f9; }
.preview-transparent { background-color: #ffffff; background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%), linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e0e0e0 75%), linear-gradient(-45deg, transparent 75%, #e0e0e0 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
.creative-img { max-width: 100%; max-height: 200px; object-fit: contain; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.creative-body { padding: 20px; display: flex; flex-direction: column; gap: 15px; flex: 1; }
.creative-title { font-weight: 600; font-size: 1.1rem; color: var(--text-primary); }
.creative-meta { font-size: 0.85rem; color: var(--text-secondary); }
.code-block { background: rgba(0, 0, 0, 0.3); border-radius: 6px; padding: 10px; font-family: monospace; font-size: 0.8rem; color: #10b981; overflow-x: auto; white-space: pre-wrap; word-break: break-all; position: relative; }
[data-theme="light"] .code-block { background: #f8fafc; border: 1px solid #e2e8f0; color: #047857; }
.btn-group { display: flex; gap: 10px; margin-top: auto; }
.creative-action-btn { flex: 1; padding: 8px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.1); background: transparent; color: var(--text-primary); cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.2s; text-decoration: none; }
[data-theme="light"] .creative-action-btn { border-color: #cbd5e1; background: #f8fafc; }
.creative-action-btn:hover { background: rgba(255, 255, 255, 0.05); }
[data-theme="light"] .creative-action-btn:hover { background: #e2e8f0; }
.creative-action-btn.primary { background: var(--primary); border-color: var(--primary); color: white; }
.creative-action-btn.primary:hover { filter: brightness(1.1); }

/* ===== AFFILIATES ===== */
.affiliate-dashboard { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 6; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.affiliate-card { background: var(--bg-card); border-radius: 12px; padding: 24px; border: 1px solid rgba(255, 255, 255, 0.05); text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); transition: transform 0.2s, box-shadow 0.2s; }
.affiliate-card:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2); }
[data-theme="light"] .affiliate-card { border: 1px solid rgba(0, 0, 0, 0.05); background: #ffffff; color: var(--text-primary); }
.affiliate-value { font-size: 2rem; font-weight: 700; color: var(--primary); margin: 10px 0; line-height: 1.2; }
.copy-input-group { display: flex; gap: 10px; margin-top: 10px; }
.copy-input { flex: 1; padding: 10px 15px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1); background: var(--bg-hover); color: var(--text-primary); font-family: inherit; }
[data-theme="light"] .copy-input { background: #e2e8f0; color: #1e293b; border-color: #cbd5e1; }
.dash-card-header { padding: 15px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); display: flex; align-items: center; }
[data-theme="light"] .dash-card-header { border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
.dash-card-title { font-size: 1rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.custom-icon { color: var(--primary); }
.dash-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
@media (max-width: 992px) { .col-6 { grid-column: span 12; } }

/* ===== SHOP & POSTS QUILL OVERRIDES ===== */
.ql-toolbar.ql-snow { border-color: rgba(255, 255, 255, 0.1); background: var(--bg-hover); border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.ql-container.ql-snow { border-color: rgba(255, 255, 255, 0.1); border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); font-family: inherit; font-size: 0.95rem; }
.ql-snow .ql-stroke { stroke: var(--text-secondary); }
.ql-snow .ql-fill, .ql-snow .ql-stroke.ql-fill { fill: var(--text-secondary); }
.ql-snow .ql-picker { color: var(--text-secondary); }
.ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--primary); }
.ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--primary); }
.ql-snow .ql-picker-options { background-color: var(--bg-card); border-color: rgba(255,255,255,0.1); }
.ql-snow .ql-tooltip { background-color: var(--bg-card); border-color: rgba(255,255,255,0.1); color: var(--text-primary); box-shadow: 0 0 5px rgba(0,0,0,0.5); }
.ql-snow .ql-tooltip input[type=text] { background: var(--bg-hover); border: 1px solid rgba(255,255,255,0.1); color: var(--text-primary); }

/* ===== SHOP MANAGEMENT ===== */
.product-type-badge { position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, 0.6); color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; backdrop-filter: blur(4px); }
.btn-icon { width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--bg-hover); border: none; color: var(--text-secondary); cursor: pointer; transition: var(--transition); text-decoration: none; }
.btn-icon:hover { background: var(--primary); color: white; text-decoration: none; }
.btn-icon.danger:hover { background: var(--danger); }
.create-form-header { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.create-section { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.05); padding: 24px; margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.category-select-container { margin-bottom: 20px; padding: 16px; background: var(--bg-hover); border-radius: var(--radius); }
@media (max-width: 768px) { .form-row { grid-template-columns: 1fr; } }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
.alert-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--success); }
.alert-error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--danger); }
.image-preview-container { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.image-preview { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; position: relative; border: 1px solid rgba(255, 255, 255, 0.1); }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ===== POSTS MANAGEMENT ===== */
.posts-grid { display: grid; gap: 20px; }
.visibility-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 500; }
.visibility-badge.public { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.visibility-badge.supporters_only { background: rgba(99, 102, 241, 0.15); color: var(--primary-light); }
.visibility-badge.subscribers_only { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.post-type-actions { display: flex; gap: 10px; margin-bottom: 20px; }
.btn-type { flex: 1; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); color: var(--text-secondary); padding: 12px; border-radius: var(--radius); cursor: pointer; transition: var(--transition); font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-type:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-type.active { background: var(--primary); color: white; border-color: var(--primary); }
.post-tabs-nav { display: flex; gap: 24px; margin-bottom: 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 1px; }
.tab-link { padding-bottom: 12px; color: var(--text-muted); text-decoration: none; font-weight: 500; position: relative; transition: var(--transition); }
.tab-link:hover { color: var(--text-primary); }
.tab-link.active { color: var(--primary-light); }
.tab-link.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--primary); border-radius: 2px; }
.modal-container { background: var(--bg-card); width: 100%; max-width: 600px; border-radius: var(--radius-lg); position: relative; max-height: 90vh; overflow-y: auto; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); margin: 20px; transform: translateY(20px); transition: transform 0.3s ease; }
.modal-overlay.active .modal-container { transform: translateY(0); }
.modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; z-index: 10; padding: 5px; line-height: 1; }
.modal-close:hover { color: var(--text-primary); }

/* ===== MEMBERSHIPS ===== */
.memberships-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.membership-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.05); overflow: hidden; transition: var(--transition); position: relative; }
.membership-card:hover { border-color: rgba(99, 102, 241, 0.3); box-shadow: var(--shadow-glow); transform: translateY(-4px); }
.membership-card.featured { border-color: rgba(245, 158, 11, 0.5); }
.membership-card.featured::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%); }
.membership-header { padding: 24px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.membership-icon { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 1.5rem; color: white; }
.membership-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.membership-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.membership-benefits { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.8; }
.membership-benefits ul { list-style: none; padding: 0; margin: 0; }
.membership-benefits li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.membership-benefits li i { color: var(--success); margin-top: 4px; }
.membership-footer { padding: 16px 24px; border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; justify-content: space-between; align-items: center; }
.subscriber-count { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-muted); }
.subscriber-count i { color: var(--primary-light); }
.empty-memberships { text-align: center; padding: 60px 24px; background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.05); }
.empty-memberships i { font-size: 4rem; color: #fbbf24; opacity: 0.5; margin-bottom: 16px; }
.benefits-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }

/* ===== FOLLOWING ===== */
.following-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.following-creator-card { background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: var(--transition); text-decoration: none; color: inherit; }
.following-creator-card:hover { transform: translateY(-5px); border-color: rgba(99, 102, 241, 0.3); box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.2); }
.creator-avatar-lg { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 16px; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; object-fit: cover; border: 3px solid var(--bg-hover); }
.creator-slug-link { color: var(--primary); font-size: 0.9rem; margin-bottom: 12px; }
.creator-bio-text { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex-grow: 1; }
.creator-stats-row { display: flex; gap: 16px; margin-bottom: 20px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.05); border-bottom: 1px solid rgba(255, 255, 255, 0.05); width: 100%; justify-content: center; }
.btn-unfollow { width: 100%; padding: 10px; border-radius: 8px; background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); font-weight: 500; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-unfollow:hover { background: #ef4444; color: white; }
