/* ============================================
   IPPO Bot - Dashboard Styles (dashboard.css)
   Refonte moderne - style DraftBot
   ============================================ */

/* ============================================
   Layout - Dashboard Body
   ============================================ */

.dashboard-body {
    margin: 0;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   Loading Overlay
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 24px;
    transition: opacity 0.5s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.loading-logo {
    width: 56px;
    height: 56px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.loading-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--orange);
    border-right-color: var(--orange);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* ============================================
   Modal
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header-row h2 {
    font-size: 1.25rem;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-content h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Confirmation modal */
.modal-confirm {
    text-align: center;
    max-width: 400px;
}

.modal-confirm h2 {
    margin-bottom: 8px;
}

.modal-confirm p {
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
}

.modal-icon.warning {
    background: rgba(245, 166, 35, 0.15);
    color: var(--gold);
}

.modal-icon.danger {
    background: rgba(237, 66, 69, 0.15);
    color: #ED4245;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-actions .btn-danger {
    background: #ED4245;
    border-color: #ED4245;
    color: #fff;
}

.modal-actions .btn-danger:hover {
    background: #d63638;
    border-color: #d63638;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: #0c0c12;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 50;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 12px;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 1px;
}

/* Sidebar Header (guild selector) */
.sidebar-header {
    padding: 8px 12px 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.guild-info {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.guild-info:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
}

.guild-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-card);
}

.guild-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.guild-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guild-tier {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.guild-tier.tier-free {
    background: rgba(107, 107, 128, 0.2);
    color: var(--text-muted);
}

.guild-tier.tier-premium {
    background: rgba(255, 140, 0, 0.15);
    color: var(--orange);
}

.chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.chevron.open {
    transform: rotate(180deg);
}

/* Sidebar Navigation */

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

.sidebar-link {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    position: relative;
}

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

.sidebar-link.active {
    background: rgba(255, 140, 0, 0.1);
    color: var(--orange);
    font-weight: 600;
}

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

.sidebar-link svg {
    opacity: 0.4;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}

.sidebar-link.active svg {
    opacity: 1;
}

.sidebar-link:hover svg {
    opacity: 0.7;
}

.sidebar-divider {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 4px 14px;
    margin-top: 16px;
    margin-bottom: 4px;
    font-weight: 700;
    user-select: none;
}

/* Sidebar Footer */

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding: 12px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    padding: 8px 4px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-card);
    border: 2px solid var(--border);
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.logout-link {
    margin-top: 4px;
    color: var(--text-muted) !important;
    font-size: 0.85rem !important;
}

.logout-link:hover {
    color: #ED4245 !important;
    background: rgba(237, 66, 69, 0.08) !important;
}

/* ============================================
   Mobile Header
   ============================================ */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(12, 12, 18, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 45;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.mobile-logo {
    width: 28px;
    height: 28px;
}

/* ============================================
   Dashboard Main Content
   ============================================ */

.dashboard-main {
    margin-left: 260px;
    min-height: 100vh;
    padding: 32px 40px;
    background: var(--bg-primary);
    flex: 1;
    width: calc(100% - 260px);
}

/* Page transitions */
.page-fade-in {
    animation: pageFadeIn 0.3s ease both;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
    color: var(--text-primary);
}

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

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================
   Welcome Banner (Overview)
   ============================================ */

.welcome-banner {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.12) 0%, rgba(255, 140, 0, 0.03) 100%);
    border: 1px solid rgba(255, 140, 0, 0.15);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.welcome-banner-text h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

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

.welcome-banner-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 140, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.welcome-banner-icon img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

/* ============================================
   Quick Actions Grid
   ============================================ */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.quick-action:hover {
    border-color: var(--orange);
    background: rgba(255, 140, 0, 0.05);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.quick-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.quick-action-icon.orange { background: rgba(255, 140, 0, 0.12); color: var(--orange); }
.quick-action-icon.green { background: rgba(46, 125, 50, 0.12); color: #57F287; }
.quick-action-icon.blue { background: rgba(88, 101, 242, 0.12); color: #5865F2; }
.quick-action-icon.purple { background: rgba(155, 89, 182, 0.12); color: #9B59B6; }

.quick-action-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   Stats Grid
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    padding: 20px 22px;
    border-radius: 14px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

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

.stat-card.orange-accent::before { background: var(--orange); }
.stat-card.green-accent::before { background: #57F287; }
.stat-card.blue-accent::before { background: #5865F2; }
.stat-card.red-accent::before { background: #ED4245; }

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-icon.orange { background: rgba(255, 140, 0, 0.12); color: var(--orange); }
.stat-icon.green { background: rgba(87, 242, 135, 0.12); color: #57F287; }
.stat-icon.blue { background: rgba(88, 101, 242, 0.12); color: #5865F2; }
.stat-icon.red { background: rgba(237, 66, 69, 0.12); color: #ED4245; }

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .label {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 4px;
    font-weight: 500;
}

/* ============================================
   Data Table
   ============================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.data-table th {
    text-align: left;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: background 0.15s ease;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ============================================
   Badges
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.badge-success {
    background: rgba(87, 242, 135, 0.12);
    color: #57F287;
}

.badge-warning {
    background: rgba(245, 166, 35, 0.12);
    color: var(--gold);
}

.badge-danger {
    background: rgba(237, 66, 69, 0.12);
    color: #ED4245;
}

.badge-info {
    background: rgba(88, 101, 242, 0.12);
    color: #5865F2;
}

.badge-muted {
    background: rgba(107, 107, 128, 0.12);
    color: var(--text-muted);
}

.badge-premium {
    background: rgba(255, 140, 0, 0.12);
    color: var(--orange);
}

/* ============================================
   Toggle Switch
   ============================================ */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--orange);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ============================================
   Form Elements
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--orange);
    background: rgba(255, 140, 0, 0.03);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    outline: none;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-textarea:focus {
    border-color: var(--orange);
    background: rgba(255, 140, 0, 0.03);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-color-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid var(--border);
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

.form-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%236b6b80' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ============================================
   Button Row
   ============================================ */

.btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================
   Card
   ============================================ */

.card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 24px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    transition: border-color 0.2s ease;
}

.card:hover {
    border-color: var(--border-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================
   Empty State
   ============================================ */

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

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.88rem;
    max-width: 360px;
    margin: 0 auto 20px;
}

/* ============================================
   Server List (Modal)
   ============================================ */

.server-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.server-item {
    display: flex;
    flex-direction: row;
    gap: 14px;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.server-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.server-item.active {
    border-color: var(--orange);
    background: rgba(255, 140, 0, 0.05);
}

.server-item img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-card);
}

.server-item .name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.server-item .members {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   Theme Cards
   ============================================ */

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.theme-card {
    background: var(--bg-card);
    border-radius: 14px;
    border: 2px solid var(--border);
    padding: 22px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.theme-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.theme-card.active {
    border-color: var(--orange);
    box-shadow: 0 0 24px var(--accent-glow);
}

.theme-card .theme-preview {
    height: 80px;
    border-radius: 8px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.theme-card .theme-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.theme-card .theme-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.4;
}

.theme-card .theme-swatches {
    display: flex;
    gap: 8px;
}

.theme-card .theme-swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease;
}

.theme-card:hover .theme-swatch {
    transform: scale(1.1);
}

.theme-card .theme-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.theme-badge.badge-active {
    background: rgba(87, 242, 135, 0.15);
    color: #57F287;
}

.theme-badge.badge-locked {
    background: rgba(255, 140, 0, 0.15);
    color: var(--orange);
}

/* ============================================
   Action Buttons (table inline)
   ============================================ */

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 4px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.action-btn.danger:hover {
    background: rgba(237, 66, 69, 0.1);
    border-color: rgba(237, 66, 69, 0.3);
    color: #ED4245;
}

/* ============================================
   Inline Form (for editing)
   ============================================ */

.inline-form {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-top: 16px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.inline-form h4 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   Toast Notification
   ============================================ */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 280px;
    max-width: 420px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

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

.toast.success .toast-icon {
    background: rgba(87, 242, 135, 0.15);
    color: #57F287;
}

.toast.error .toast-icon {
    background: rgba(237, 66, 69, 0.15);
    color: #ED4245;
}

.toast.success {
    border-left: 3px solid #57F287;
}

.toast.error {
    border-left: 3px solid #ED4245;
}

/* ============================================
   Star Rating (reviews)
   ============================================ */

.stars {
    color: var(--gold);
    letter-spacing: 2px;
    font-size: 1rem;
}

.stars-muted {
    color: var(--text-muted);
}

/* ============================================
   Section Title
   ============================================ */

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    margin-top: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--orange);
    border-radius: 2px;
}

/* ============================================
   Info Row (key-value pairs)
   ============================================ */

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    transition: background 0.2s ease;
}

.info-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.info-row .info-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.info-row .info-value {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   Progress Bars
   ============================================ */

.progress-item {
    margin-bottom: 14px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.progress-labels .progress-label {
    color: var(--text-secondary);
}

.progress-labels .progress-value {
    font-weight: 600;
}

.progress-bar-outer {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   Notice / Alert Box
   ============================================ */

.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.notice-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.notice.info {
    background: rgba(88, 101, 242, 0.08);
    border: 1px solid rgba(88, 101, 242, 0.2);
    color: var(--text-secondary);
}

.notice.warning {
    background: rgba(255, 140, 0, 0.08);
    border: 1px solid rgba(255, 140, 0, 0.2);
    color: var(--text-secondary);
}

.notice.success {
    background: rgba(87, 242, 135, 0.08);
    border: 1px solid rgba(87, 242, 135, 0.2);
    color: var(--text-secondary);
}

/* ============================================
   Embed Preview
   ============================================ */

.embed-preview {
    background: #0f0f16;
    border-radius: 10px;
    padding: 18px;
    border-left: 4px solid var(--orange);
    transition: border-color 0.3s ease;
}

.embed-preview-brand {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.embed-preview-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ============================================
   Welcome Message Card
   ============================================ */

.welcome-msg-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.welcome-msg-card:hover {
    border-color: var(--border-hover);
}

.welcome-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    cursor: pointer;
}

.welcome-msg-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.welcome-msg-header-left h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.welcome-msg-header-left .channel-name {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.welcome-msg-body {
    padding: 0 22px 18px;
}

.welcome-msg-preview {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.02);
    padding: 14px;
    border-radius: 10px;
    border-left: 3px solid var(--orange);
    white-space: pre-wrap;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.5;
}

/* ============================================
   Skeleton Loading
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-stat {
    height: 100px;
    border-radius: 14px;
}

.skeleton-card {
    height: 200px;
    border-radius: 14px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

/* ============================================
   Responsive - Tablet
   ============================================ */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-main {
        padding: 28px 24px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Responsive - Mobile
   ============================================ */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .mobile-header {
        display: flex;
    }

    .dashboard-main {
        margin-left: 0;
        width: 100%;
        padding: 24px 16px;
        padding-top: 72px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .theme-grid {
        grid-template-columns: 1fr;
    }

    .page-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }

    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }

    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile overlay for sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 40;
    }

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

@media (max-width: 480px) {
    .dashboard-main {
        padding: 16px 12px;
        padding-top: 64px;
    }

    .card {
        padding: 18px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .value {
        font-size: 1.4rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.3rem;
    }

    .welcome-banner-text h2 {
        font-size: 1.1rem;
    }
}
