/* dashboard-style.css - Premium Dashboard Theme */

/* ===== GOOGLE FONTS IMPORT ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    /* Primary Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    
    /* Secondary Colors */
    --secondary-color: #8b5cf6;
    --accent-color: #f472b6;
    --accent-gradient: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    
    /* Status Colors */
    --success-color: #10b981;
    --success-light: #34d399;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Dark Theme */
    --dark-bg: #0a0f1a;
    --dark-secondary: #111827;
    --dark-card: #1a1f2e;
    --dark-card-hover: #252b3d;
    --dark-hover: #2d3548;
    --dark-border: rgba(99, 102, 241, 0.15);
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% -20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ===== NAVIGATION ===== */
.navbar {
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--dark-border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-normal);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand h1::before {
    content: '🎲';
    -webkit-text-fill-color: initial;
    font-size: 1.3rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: color .2s, background .2s;
}
.nav-link:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-dropdown {
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--dark-card);
    border-radius: var(--radius-full);
    border: 1px solid var(--dark-border);
    transition: var(--transition-normal);
    cursor: pointer;
    color: var(--text-primary);
    font: inherit;
    line-height: 1;
}

button.user-profile {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--dark-border);
}

.user-profile:hover {
    border-color: var(--primary-color);
    background: var(--dark-card-hover);
}

.user-dropdown.open .user-profile {
    border-color: var(--primary-color);
    background: var(--dark-card-hover);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.user-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.user-arrow {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: transform var(--transition-fast);
}

.user-dropdown.open .user-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    background: rgba(26, 31, 46, 0.98);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display: none;
    z-index: 1100;
}

.user-dropdown.open .user-dropdown-menu {
    display: block;
    animation: dropdownIn 0.18s ease;
}

.user-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-primary);
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.user-dropdown-item:hover {
    background: rgba(99, 102, 241, 0.18);
    color: #ffffff;
}

.user-dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

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

.survey-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(99, 102, 241, 0.6);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(236, 72, 153, 0.28));
    color: #dbeafe;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 0 0 rgba(99, 102, 241, 0.6), 0 0 16px rgba(99, 102, 241, 0.35);
    animation: surveyCtaGlow 1.6s ease-in-out infinite;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.survey-cta-btn:hover {
    transform: translateY(-1px) scale(1.03);
    border-color: rgba(236, 72, 153, 0.85);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25), 0 0 20px rgba(236, 72, 153, 0.4);
}

@keyframes surveyCtaGlow {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.35), 0 0 14px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0), 0 0 24px rgba(236, 72, 153, 0.45);
    }
}

/* ===== BUTTONS ===== */
.btn, .btn-primary, .btn-secondary, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before, .btn-primary::before, .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before, .btn-primary:hover::before, .btn-secondary:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-light);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--dark-border);
    color: var(--text-primary);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 48px 0 80px;
    min-height: calc(100vh - 72px);
    position: relative;
    z-index: 1;
}

/* ===== DASHBOARD HEADER ===== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--dark-border);
}

.dashboard-header > div:first-child {
    flex: 1;
}

.dashboard-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subtitle::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ===== STATS BAR ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.purple { background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%); }
.stat-icon.pink { background: linear-gradient(135deg, rgba(244, 114, 182, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%); }
.stat-icon.green { background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.2) 100%); }
.stat-icon.blue { background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%); }

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

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

/* ===== FEED SECTION ===== */
.feed-section {
    margin-bottom: 48px;
}
.feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.feed-header .section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
}
.feed-tabs {
    display: flex;
    gap: 4px;
    background: var(--dark-secondary);
    border-radius: 10px;
    padding: 3px;
}
.feed-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}
.feed-tab:hover { color: var(--text-primary); }
.feed-tab.active {
    background: var(--primary-color);
    color: #fff;
}

/* Toolbar */
.feed-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.feed-search-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
}
.feed-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.feed-search {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.82rem;
    outline: none;
    transition: border-color .2s;
}
.feed-search:focus { border-color: var(--primary-color); }
.feed-filter-select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--dark-border);
    background: var(--dark-secondary);
    color: var(--text-secondary);
    font-size: 0.78rem;
    cursor: pointer;
    outline: none;
}

/* Tags bar */
.feed-tags-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.feed-tags-bar:empty { display: none; }
.feed-tag-chip {
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-border);
    color: var(--text-muted);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all .2s;
}
.feed-tag-chip:hover, .feed-tag-chip.active {
    background: var(--primary-soft);
    border-color: var(--primary-color);
    color: var(--primary-light);
}

/* Composer */
.feed-composer {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}
.composer-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-light);
    background-size: cover;
    background-position: center;
}
.composer-body {
    flex: 1;
    min-width: 0;
}
.composer-body textarea {
    width: 100%;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 12px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    max-height: 200px;
    outline: none;
    transition: border-color .2s;
}
.composer-body textarea::placeholder { color: var(--text-muted); }
.composer-body textarea:focus { border-color: var(--primary-color); }
.composer-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.composer-type-select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--dark-border);
    background: var(--dark-secondary);
    color: var(--text-secondary);
    font-size: 0.78rem;
    cursor: pointer;
    outline: none;
}
.composer-tags-input {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--dark-border);
    background: var(--dark-secondary);
    color: var(--text-secondary);
    font-size: 0.78rem;
    width: 140px;
    outline: none;
}
.composer-tags-input::placeholder { color: var(--text-muted); }
.composer-image-btn {
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .15s;
}
.composer-image-btn:hover { background: rgba(255,255,255,.05); }
.composer-char-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: auto;
}
.composer-image-preview {
    position: relative;
    margin-top: 10px;
    max-width: 200px;
}
.composer-image-preview img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--dark-border);
}
.composer-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,.7);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-sm {
    padding: 6px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
}
.btn-sm:disabled {
    opacity: 0.4;
    cursor: default;
}

/* New posts indicator */
.feed-new-posts {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    text-align: center;
    background: var(--primary-soft);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-md);
    color: var(--primary-light);
    font-size: 0.82rem;
    cursor: pointer;
    transition: background .2s;
    animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,.3); }
    50% { box-shadow: 0 0 12px 2px rgba(99,102,241,.2); }
}

/* Feed list */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.feed-post {
    display: flex;
    gap: 12px;
    padding: 18px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    transition: border-color .2s;
    position: relative;
}
.feed-post:hover {
    border-color: rgba(99, 102, 241, 0.25);
}
.feed-post.pinned {
    border-color: rgba(245, 158, 11, .35);
    background: linear-gradient(135deg, rgba(245,158,11,.03) 0%, var(--dark-card) 100%);
}
.feed-post .pin-badge {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 0.65rem;
    color: var(--warning-color);
    display: flex;
    align-items: center;
    gap: 4px;
}
.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-light);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.post-body {
    flex: 1;
    min-width: 0;
}
.post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.post-author {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    text-decoration: none;
}
.post-author:hover { color: var(--primary-light); }
.post-author-badge {
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.post-author-badge.master { background: rgba(245,158,11,.15); color: var(--warning-color); }
.post-author-badge.player { background: rgba(59,130,246,.12); color: var(--info-color); }
.post-tag {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 2px 7px;
    border-radius: 6px;
}
.post-tag.update { background: var(--primary-soft); color: var(--primary-light); }
.post-tag.session_recap { background: rgba(16,185,129,.12); color: var(--success-color); }
.post-tag.achievement { background: rgba(245,158,11,.12); color: var(--warning-color); }
.post-tag.looking_for_group { background: rgba(59,130,246,.12); color: var(--info-color); }
.post-tag.open_session { background: rgba(16,185,129,.15); color: #34d399; }
.post-tag.question { background: rgba(168,85,247,.12); color: #c084fc; }
.post-tag.announcement { background: rgba(239,68,68,.12); color: #f87171; }
.post-tag.lore { background: rgba(251,191,36,.12); color: #fbbf24; }
.post-tag.tool_tip { background: rgba(34,211,238,.12); color: #22d3ee; }
.post-tag.bug_report { background: rgba(239,68,68,.08); color: #fb923c; }
.post-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: auto;
}
.post-table-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.post-table-link a { color: var(--primary-light); text-decoration: none; }
.post-table-link a:hover { text-decoration: underline; }
.post-content {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}
.post-image {
    margin-top: 10px;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid var(--dark-border);
    cursor: pointer;
    transition: opacity .15s;
}
.post-image:hover { opacity: .9; }
.post-hashtags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.post-hashtag {
    font-size: 0.7rem;
    color: var(--primary-light);
    cursor: pointer;
    text-decoration: none;
}
.post-hashtag:hover { text-decoration: underline; }

/* Reactions bar */
.post-reactions-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.post-reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 20px;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-border);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all .15s;
}
.post-reaction-badge:hover {
    border-color: var(--primary-color);
}
.post-reaction-badge.reacted {
    background: var(--primary-soft);
    border-color: var(--primary-color);
}
.post-reaction-badge .emoji { font-size: 0.85rem; }
.post-reaction-badge .count { color: var(--text-muted); font-size: 0.7rem; }

/* Post actions */
.post-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,.04);
    padding-top: 10px;
}
.post-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.post-action-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,.05);
}
.post-action-btn.liked, .post-action-btn .active-reaction {
    color: var(--danger-color);
}
.post-action-btn svg { flex-shrink: 0; }
.post-menu-btn {
    margin-left: auto;
    position: relative;
    cursor: pointer;
    user-select: none;
}
.post-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    padding: 4px 0;
    min-width: 160px;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    display: none;
}
.post-menu-dropdown.show { display: block; }
.post-menu-item {
    display: block;
    width: 100%;
    padding: 8px 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}
.post-menu-item:hover { background: rgba(255,255,255,.05); }
.post-menu-item.danger { color: var(--danger-color); }

/* Comments section */
.post-comments-section {
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,.04);
    padding-top: 10px;
}
.post-comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}
.comment-item {
    display: flex;
    gap: 8px;
}
.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(99,102,241,.12);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-light);
    background-size: cover;
    background-position: center;
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-bubble {
    background: var(--dark-secondary);
    border-radius: 12px;
    padding: 8px 12px;
}
.comment-author {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-primary);
    text-decoration: none;
}
.comment-author:hover { color: var(--primary-light); }
.comment-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    padding-left: 4px;
}
.comment-time {
    font-size: 0.68rem;
    color: var(--text-muted);
}
.comment-reply-btn, .comment-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.68rem;
    cursor: pointer;
    padding: 0;
}
.comment-reply-btn:hover { color: var(--primary-light); }
.comment-delete-btn:hover { color: var(--danger-color); }
.comment-replies {
    margin-top: 8px;
    margin-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.comment-show-replies {
    background: none;
    border: none;
    color: var(--primary-light);
    font-size: 0.72rem;
    cursor: pointer;
    padding: 4px 0;
    margin-left: 36px;
}
.comment-show-replies:hover { text-decoration: underline; }
.comment-input-wrap {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.comment-input-wrap .comment-avatar { width: 28px; height: 28px; }
.comment-input {
    flex: 1;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-border);
    border-radius: 20px;
    color: var(--text-primary);
    padding: 8px 14px;
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    resize: none;
    max-height: 100px;
    transition: border-color .2s;
}
.comment-input::placeholder { color: var(--text-muted); }
.comment-input:focus { border-color: var(--primary-color); }
.comment-send-btn {
    background: var(--primary-color);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity .15s;
}
.comment-send-btn:disabled { opacity: .4; cursor: default; }

/* Reactions picker */
.reactions-picker {
    position: fixed;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 24px;
    padding: 6px 8px;
    display: flex;
    gap: 2px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    animation: fadeInScale .15s ease;
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(.9); }
    to { opacity: 1; transform: scale(1); }
}
.reaction-option {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
    transition: transform .15s, background .15s;
}
.reaction-option:hover {
    transform: scale(1.3);
    background: rgba(255,255,255,.08);
}

/* Feed empty & loading */
.feed-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}
.feed-loading {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}
.feed-sentinel {
    height: 1px;
}

@media (max-width: 768px) {
    .feed-composer { flex-direction: column; }
    .composer-avatar { width: 36px; height: 36px; }
    .composer-footer { flex-wrap: wrap; }
    .composer-tags-input { width: 100%; }
    .post-time { margin-left: 0; }
    .feed-toolbar { flex-direction: column; }
    .feed-search-wrap { min-width: 0; }
    .feed-header { flex-direction: column; align-items: flex-start; }
}

/* ===== TABLES GRID ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
}

.view-options {
    display: flex;
    gap: 8px;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

/* ===== TABLE CARD ===== */
.table-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}

.table-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-normal);
}

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

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

.table-card-banner {
    height: 120px;
    background: linear-gradient(135deg, var(--dark-secondary) 0%, var(--dark-card) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-card-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

.table-card-banner .banner-icon {
    font-size: 3rem;
    opacity: 0.3;
    z-index: 1;
}

.table-card-content {
    padding: 24px;
}

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

.table-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.table-role {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.role-master {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.2) 0%, rgba(236, 72, 153, 0.15) 100%);
    color: #f472b6;
    border: 1px solid rgba(244, 114, 182, 0.3);
}

.role-player {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.role-spectator {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.table-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.table-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--dark-border);
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.table-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-actions {
    display: flex;
    gap: 12px;
}

.table-actions button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-play {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-light) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-manage {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-manage:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    background: var(--dark-card);
    border: 2px dashed var(--dark-border);
    border-radius: var(--radius-xl);
    margin-top: 24px;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== LOADING STATE ===== */
.loading-state {
    text-align: center;
    padding: 80px 24px;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--dark-hover);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

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

.loading-state p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--dark-card) 25%, var(--dark-hover) 50%, var(--dark-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

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

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

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

.modal-content {
    background: var(--dark-card);
    margin: 5vh auto;
    padding: 0;
    border-radius: var(--radius-xl);
    max-width: 560px;
    position: relative;
    border: 1px solid var(--dark-border);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

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

.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-body {
    padding: 32px;
}

.modal-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--dark-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    background: transparent;
    border: none;
}

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

/* Legacy modal support */
.modal-content > .close {
    position: absolute;
    top: 20px;
    right: 20px;
}

.modal-content > h2 {
    padding: 32px 32px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-content > form {
    padding: 24px 32px 32px;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 24px;
}

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

.form-group label .required {
    color: var(--danger-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: var(--dark-secondary);
    border: 2px solid var(--dark-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

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

.form-group select {
    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' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.form-group select option {
    background: var(--dark-card);
    color: var(--text-primary);
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.form-buttons button {
    flex: 1;
    padding: 14px 24px;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: none;
    font-size: 0.95rem;
}

.error-message.show {
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-message::before {
    content: '⚠️';
}

.modal-content-survey {
    max-width: 760px;
}

.survey-form {
    padding: 20px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.survey-block {
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    padding: 14px;
    background: rgba(15, 23, 42, 0.5);
}

.survey-block legend {
    padding: 0 6px;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 600;
}

.survey-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.survey-option input[type="radio"] {
    margin-top: 3px;
}

.survey-textarea {
    width: 100%;
    margin-top: 10px;
    resize: vertical;
    min-height: 72px;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--dark-border);
    background: var(--dark-secondary);
    color: var(--text-primary);
    font-family: inherit;
}

.survey-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.survey-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

/* ===== TABLE DETAILS ===== */
.table-details {
    padding: 30px;
}

.table-details > h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.table-details > .subtitle {
    margin-bottom: 32px;
}

.detail-section {
    margin-bottom: 32px;
}

.detail-section h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
}

.detail-section p {
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section p strong {
    color: var(--text-primary);
    min-width: 160px;
}

/* Members List */
.members-list {
    display: grid;
    gap: 12px;
}

.member-card {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.member-card:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.member-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
}

.member-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

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

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

/* Invite Section */
.invite-section {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.invite-section .btn-primary {
    width: 100%;
}

.invite-link {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.invite-link code {
    color: var(--primary-light);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.invite-link button {
    flex-shrink: 0;
}

/* ===== NOTIFICATION BELL DROPDOWN ===== */
.notif-wrapper {
    position: relative;
}
.notif-bell {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    position: relative;
    transition: color .2s, background .2s;
    display: flex;
    align-items: center;
}
.notif-bell:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--danger-color);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 440px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.notif-dropdown.open {
    display: flex;
}
.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--dark-border);
    flex-shrink: 0;
}
.notif-title {
    font-weight: 600;
    font-size: 0.95rem;
}
.notif-mark-all {
    background: none;
    border: none;
    color: var(--primary-light);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .2s;
}
.notif-mark-all:hover {
    background: rgba(99, 102, 241, 0.1);
}
.notif-list {
    overflow-y: auto;
    flex: 1;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.03);
    transition: background .15s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.notif-item:hover {
    background: var(--dark-card-hover);
}
.notif-item.unread {
    background: rgba(99, 102, 241, 0.05);
}
.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
}
.notif-item {
    position: relative;
    padding-left: 20px;
}
.notif-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary-light);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.notif-content {
    flex: 1;
    min-width: 0;
}
.notif-text {
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text-primary);
}
.notif-text strong {
    font-weight: 600;
}
.notif-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.notif-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.notif-load-more {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    background: none;
    border: none;
    border-top: 1px solid var(--dark-border);
    color: var(--primary-light);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background .2s;
}
.notif-load-more:hover {
    background: rgba(99, 102, 241, 0.08);
}

@media (max-width: 480px) {
    .notif-dropdown {
        width: calc(100vw - 24px);
        right: -60px;
    }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success { border-left: 4px solid var(--success-color); }
.toast.error { border-left: 4px solid var(--danger-color); }
.toast.warning { border-left: 4px solid var(--warning-color); }
.toast.info { border-left: 4px solid var(--info-color); }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
    
    .dashboard-header .btn-large {
        width: 100%;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .nav-brand h1 {
        font-size: 1.25rem;
    }
    
    .nav-user {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }
    
    .main-content {
        padding: 32px 0 60px;
    }
    
    .dashboard-header {
        margin-bottom: 32px;
        padding-bottom: 24px;
    }
    
    .dashboard-header h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .stats-bar {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .tables-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .table-card-banner {
        height: 100px;
    }
    
    .table-card-content {
        padding: 20px;
    }
    
    .modal-content {
        margin: 16px;
        max-width: calc(100% - 32px);
    }
    
    .modal-content > h2 {
        padding: 24px 24px 0;
        font-size: 1.25rem;
    }
    
    .modal-content > form {
        padding: 20px 24px 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .form-buttons button {
        width: 100%;
    }
    
    .empty-state {
        padding: 48px 20px;
    }
    
    .empty-icon {
        font-size: 4rem;
    }
    
    .empty-state h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .user-profile {
        padding: 6px 12px;
    }
    
    .user-name {
        display: none;
    }

    .user-dropdown-menu {
        right: 0;
        left: auto;
        min-width: 160px;
    }

    .survey-cta-btn {
        padding: 5px 10px;
        font-size: 0.72rem;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    .table-card h3 {
        font-size: 1.1rem;
    }
    
    .table-role {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
    
    .table-info {
        flex-direction: column;
        gap: 12px;
    }
    
    .table-actions {
        flex-direction: column;
    }
    
    .table-actions button {
        width: 100%;
    }

    .survey-actions {
        flex-direction: column;
    }

    .survey-actions button {
        width: 100%;
    }
}

/* ===== UTILITIES ===== */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .navbar,
    .btn,
    .modal {
        display: none !important;
    }
}

/* ===== CARD ANIMATIONS ===== */
.table-card {
    animation: cardFadeIn 0.5s ease forwards;
    opacity: 0;
}

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

/* Hover glow effect */
.table-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(99, 102, 241, 0.15) 0%, transparent 50%);
}

.table-card:hover::after {
    opacity: 1;
}

/* Button ripple effect */
.btn-primary, .btn-play, .btn-manage {
    position: relative;
    overflow: hidden;
}

/* Stats counter animation */
.stat-card {
    animation: cardFadeIn 0.5s ease forwards;
    opacity: 0;
}

.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; }

/* Modal animations */
.modal.show {
    display: block;
}

/* Better link styling for invite */
.invite-link {
    word-break: break-all;
}

/* Extra polish for navbar */
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
}

/* ===== SHEET TEMPLATE SELECTOR ===== */
.template-preview {
    margin-top: 0.5rem;
}

.template-preview-card {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

.template-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.template-name {
    font-weight: 600;
    color: var(--text-primary);
}

.template-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.template-badge.official {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.template-badge.public {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.template-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.template-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.template-info-card {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.template-info-card p {
    margin: 4px 0;
    font-size: 0.9rem;
}

/* Template Selector Modal */
.template-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.template-selector-modal {
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.template-selector-modal h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.template-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.template-selector-item {
    background: var(--dark-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-selector-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.template-selector-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.template-selector-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.template-selector-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.template-selector-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== DISCORD INVITE BANNER ===== */
.discord-invite-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    background: url('/assets/system/bg.jpg') center/cover no-repeat;
    position: relative;
    text-decoration: none;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.discord-invite-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.3) 100%);
    z-index: 0;
}

.discord-invite-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(88, 101, 242, 0.35);
}

.discord-invite-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
    z-index: 1;
    flex-shrink: 0;
}

.discord-invite-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.discord-invite-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.discord-invite-sub {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.discord-invite-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1;
    flex-shrink: 0;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    background: #5865F2;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background var(--transition-fast);
    white-space: nowrap;
}

.discord-invite-banner:hover .discord-invite-btn {
    background: #4752c4;
}

@media (max-width: 640px) {
    .discord-invite-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
        gap: 12px;
    }
    
    .discord-invite-info {
        align-items: center;
    }
}

/* ============================================================
   SISTEMA DE PERSONAGEM DO JOGADOR
   ============================================================ */

/* Character section in table details */
.character-section { margin-top: 1.5rem; }

.my-character-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0.75rem;
}

.character-loading {
    text-align: center;
    padding: 24px;
    color: rgba(255,255,255,0.5);
}

/* Character card inside table details */
.char-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.2s;
}
.char-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(168,85,247,0.4);
}
.char-card.active {
    border-color: rgba(168,85,247,0.6);
    box-shadow: 0 0 12px rgba(168,85,247,0.15);
}

.char-card-sprite {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.char-sprite-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}
.char-sprite-placeholder {
    font-size: 28px;
    opacity: 0.5;
}

.char-card-info {
    flex: 1;
    min-width: 0;
}
.char-card-name {
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    margin-bottom: 3px;
}
.char-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}
.char-card-meta span {
    background: rgba(255,255,255,0.06);
    padding: 2px 8px;
    border-radius: 4px;
}
.char-active-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #a855f7;
    background: rgba(168,85,247,0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.char-card-actions {
    flex-shrink: 0;
}
.btn-char-edit {
    padding: 8px 16px;
    background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.4);
    color: #c084fc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-char-edit:hover {
    background: rgba(168,85,247,0.3);
    border-color: #a855f7;
    color: #fff;
}

.char-empty {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.5);
}
.char-empty p { margin: 4px 0; }

/* ============================================================
   MODAL DE EDIÇÃO DE PERSONAGEM
   ============================================================ */

.character-edit-wrapper h2 {
    margin: 0 0 1.25rem;
    font-size: 20px;
}

.character-edit-form .form-group {
    margin-bottom: 14px;
}
.character-edit-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    margin-bottom: 5px;
}
.character-edit-form .form-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.character-edit-form .form-input:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168,85,247,0.15);
}
.character-edit-form select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.character-edit-form select.form-input option {
    background: #1a1a2e;
    color: #fff;
}

/* Sprite Section */
.char-edit-sprite-section {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
}
.char-edit-sprite-box {
    width: 128px;
    height: 128px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.char-edit-sprite-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}
.char-edit-sprite-placeholder {
    font-size: 40px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    line-height: 1.3;
}
.char-edit-sprite-actions {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* SpriteMaker Button */
.btn-spritemaker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border: none;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s;
    box-shadow: 0 2px 12px rgba(168,85,247,0.3);
}
.btn-spritemaker:hover {
    background: linear-gradient(135deg, #6d28d9, #9333ea);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(168,85,247,0.4);
}

/* Grid 2x2 */
.char-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Responsive */
@media (max-width: 640px) {
    .char-edit-sprite-section {
        flex-direction: column;
        align-items: center;
    }
    .char-edit-grid {
        grid-template-columns: 1fr;
    }
    .char-card {
        flex-direction: column;
        text-align: center;
    }
    .char-card-meta {
        justify-content: center;
    }
}

/* ========================================================
   MOBILE LANDSCAPE — Dashboard compacto sem rolagem
   Aplica-se via body.mobile (device-detect.js)
   Desktop permanece inalterado.
   ======================================================== */

/* --- Navbar compacto --- */
body.mobile .navbar .container {
    padding-top: 6px;
    padding-bottom: 6px;
    gap: 8px;
}
body.mobile .nav-brand h1 {
    font-size: 1rem;
}
body.mobile .nav-brand h1::before {
    font-size: 1rem;
}
body.mobile .nav-user {
    gap: 8px;
}
body.mobile .user-profile {
    padding: 4px 10px;
    gap: 6px;
}
body.mobile .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
}
body.mobile .user-name {
    font-size: 0.8rem;
}
body.mobile .survey-cta-btn {
    padding: 3px 8px;
    font-size: 0.65rem;
}
body.mobile .btn-secondary[onclick*="superadmin"] {
    padding: 4px 8px;
    font-size: 0.75rem;
}
body.mobile .btn-secondary svg {
    width: 14px;
    height: 14px;
}

/* --- Container geral --- */
body.mobile .container {
    padding: 0 10px;
}
body.mobile .main-content {
    padding: 8px 0 12px;
}

/* --- Storage bar --- */
body.mobile #storageBar {
    margin-bottom: 4px !important;
    font-size: 10px;
}

/* --- Dashboard Header (título + botão lado a lado, compacto) --- */
body.mobile .dashboard-header {
    flex-direction: row;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    gap: 12px;
}
body.mobile .dashboard-header h1 {
    font-size: 1.1rem;
    margin-bottom: 0;
}
body.mobile .subtitle {
    font-size: 0.75rem;
    display: none; /* esconde subtítulo para ganhar espaço */
}
body.mobile .dashboard-header .btn-large,
body.mobile .dashboard-header .btn-primary {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
    white-space: nowrap;
}
body.mobile .dashboard-header .btn-large svg,
body.mobile .dashboard-header .btn-primary svg {
    width: 14px;
    height: 14px;
}

/* --- Stats Bar (4 em linha, ultra-compacto) --- */
body.mobile .stats-bar {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}
body.mobile .stat-card {
    padding: 8px;
    gap: 6px;
    border-radius: 8px;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
body.mobile .stat-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    border-radius: 6px;
}
body.mobile .stat-info h3 {
    font-size: 1rem;
    margin-bottom: 0;
}
body.mobile .stat-info p {
    font-size: 0.6rem;
    line-height: 1.2;
}

/* --- Discord Banner (compacto, inline) --- */
body.mobile .discord-invite-banner {
    padding: 8px 12px;
    margin: 6px 0;
    gap: 10px;
    border-radius: 8px;
    flex-direction: row;
    text-align: left;
}
body.mobile .discord-invite-icon {
    width: 30px;
    height: 30px;
}
body.mobile .discord-invite-label {
    font-size: 0.75rem;
}
body.mobile .discord-invite-sub {
    display: none; /* esconde descrição longa */
}
body.mobile .discord-invite-btn {
    padding: 5px 12px;
    font-size: 0.7rem;
    gap: 4px;
}
body.mobile .discord-invite-btn svg {
    width: 14px;
    height: 14px;
}

/* --- Section Header --- */
body.mobile .section-header {
    margin-bottom: 6px;
}
body.mobile .section-title {
    font-size: 0.9rem;
    gap: 6px;
}
body.mobile .section-title::before {
    width: 3px;
    height: 14px;
}

/* --- Tables Grid (cards horizontais compactos) --- */
body.mobile .tables-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
}
body.mobile .table-card {
    border-radius: 10px;
}
body.mobile .table-card-banner {
    height: 48px;
}
body.mobile .table-card-banner .banner-icon {
    font-size: 1.5rem;
}
body.mobile .table-card-content {
    padding: 10px 12px;
}
body.mobile .table-card-header {
    margin-bottom: 6px;
}
body.mobile .table-card h3 {
    font-size: 0.9rem;
    margin-bottom: 2px;
    line-height: 1.2;
}
body.mobile .table-role {
    padding: 2px 8px;
    font-size: 0.65rem;
}
body.mobile .table-description {
    font-size: 0.75rem;
    margin-bottom: 8px;
    min-height: unset;
    -webkit-line-clamp: 1;
}
body.mobile .table-info {
    gap: 8px;
    padding-top: 8px;
    margin-bottom: 8px;
    font-size: 0.7rem;
}
body.mobile .table-actions {
    gap: 6px;
}
body.mobile .table-actions button {
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
    gap: 4px;
}
body.mobile .table-actions button svg {
    width: 12px;
    height: 12px;
}

/* --- Empty State (compacto) --- */
body.mobile .empty-state {
    padding: 24px 16px;
    border-radius: 12px;
    margin-top: 8px;
}
body.mobile .empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
body.mobile .empty-state h2 {
    font-size: 1rem;
    margin-bottom: 4px;
}
body.mobile .empty-state p {
    font-size: 0.8rem;
    margin-bottom: 16px;
}

/* --- Loading State --- */
body.mobile .loading-state {
    padding: 32px 16px;
}
body.mobile .spinner {
    width: 32px;
    height: 32px;
}

/* --- Modais (fullscreen no mobile) --- */
body.mobile .modal-content {
    margin: 8px;
    max-width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 12px;
}
body.mobile .modal-content > h2 {
    padding: 12px 16px 0;
    font-size: 1rem;
}
body.mobile .modal-content > form {
    padding: 10px 16px 16px;
}
body.mobile .form-group label {
    font-size: 0.8rem;
}
body.mobile .form-group input,
body.mobile .form-group select,
body.mobile .form-group textarea {
    padding: 8px 10px;
    font-size: 0.85rem;
}
body.mobile .form-group small {
    font-size: 0.7rem;
}
body.mobile .form-buttons {
    flex-direction: row;
    gap: 8px;
}
body.mobile .form-buttons button {
    padding: 8px 16px;
    font-size: 0.8rem;
}
