/* ============================================
   FrameForge - Modern Design System
   ============================================ */

:root {
    --bg-dark: #0a0a0f;
    --bg-surface: rgba(15, 15, 24, 0.45);
    --bg-card: rgba(13, 17, 28, 0.45);
    --bg-input: rgba(25, 25, 38, 0.45);
    --bg-hover: rgba(35, 35, 52, 0.65);
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgb(99 102 241 / 40%);
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --danger: #ef4444;
    --danger-light: #f87171;
    --text: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-dim: #475569;
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-bright: rgb(99 102 241 / 30%);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --shadow: 0 10px 40px rgb(0 0 0 / 50%);
    --shadow-lg: 0 20px 60px rgb(0 0 0 / 60%);
    --glass-blur: blur(20px);
    --nav-height: 84px;
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   Login Page
   ============================================ */

.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, var(--bg-dark) 70%);
}

.login-container {
    text-align: center;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 380px;
    box-shadow: var(--shadow);
}

.login-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.login-logo span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.login-icon .material-symbols-rounded {
    font-size: 32px;
}

.login-card h1 {
    font-size: 1.5rem;
    margin: 0 0 8px;
}

.login-card>p {
    color: var(--text-secondary);
    margin: 0 0 24px;
}

.login-error {
    background: rgb(239 68 68 / 10%);
    border: 1px solid rgb(239 68 68 / 30%);
    color: #f87171;
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.steam-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: #1b2838;
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.steam-login-btn:hover {
    background: #2a475e;
}

.login-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.login-note .material-symbols-rounded {
    font-size: 16px;
}

.back-home {
    display: inline-block;
    margin-top: 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
}

.back-home:hover {
    color: var(--text);
}

/* ============================================
   Admin Dashboard Layout
   ============================================ */

.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-logo span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}

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

.nav-item.active {
    background: rgb(99 102 241 / 15%);
    color: var(--primary-light);
}

.nav-item .material-symbols-rounded {
    font-size: 20px;
}

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

.nav-item.logout:hover {
    background: rgb(239 68 68 / 10%);
    color: var(--danger);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 240px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
}

.page-title h1 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 600;
}

.page-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.clock {
    font-family: Consolas, monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgb(34 197 94 / 10%);
    border: 1px solid rgb(34 197 94 / 30%);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--success);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: var(--success);
}

.status-dot.warning {
    background: var(--warning);
}

.status-dot.offline {
    background: var(--danger);
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Tab Panels */
.tab-panel {
    display: none;
    padding: 32px;
    flex: 1;
    animation: tabEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-panel.active {
    display: block;
}

@keyframes tabEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* ============================================
   Components
   ============================================ */

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(13, 17, 28, 0.45);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgb(99 102 241 / 10%) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

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

.stat-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgb(99 102 241 / 15%), rgb(6 182 212 / 15%));
    border: 1px solid rgb(99 102 241 / 20%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 24px rgb(99 102 241 / 30%);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Panels */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.panel-row {
    display: flex;
    gap: 24px;
}

.panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-base);
    box-shadow: 0 4px 16px rgb(0 0 0 / 20%);
}

.panel:hover {
    border-color: var(--border-light);
    box-shadow: 0 8px 32px rgb(0 0 0 / 30%);
}

.panel.flex-1 {
    flex: 1;
}

.panel.flex-2 {
    flex: 2;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.panel-header h2 .material-symbols-rounded {
    font-size: 22px;
    color: var(--primary-light);
    background: rgb(99 102 241 / 10%);
    padding: 6px;
    border-radius: 8px;
}

.badge {
    background: var(--bg-hover);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.action-btn .material-symbols-rounded {
    font-size: 18px;
}

/* Status List */
.status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.status-name {
    flex: 1;
    color: var(--text-secondary);
}

.status-value {
    font-weight: 500;
}

/* Activity */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-list.full {
    max-height: 600px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
}

.activity-item .material-symbols-rounded {
    font-size: 20px;
    color: var(--primary-light);
    margin-top: 2px;
}

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

.activity-info strong {
    display: block;
    text-transform: capitalize;
    font-size: 0.9rem;
}

.activity-info span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-info small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Text Button */
.text-btn {
    background: none;
    border: none;
    color: var(--primary-light);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius);
}

.text-btn:hover {
    background: rgb(99 102 241 / 10%);
}

/* ============================================
   Forms & Inputs
   ============================================ */

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

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

.input-group {
    display: flex;
    gap: 0;
}

.input-group input {
    border-radius: var(--radius) 0 0 var(--radius);
    border-right: none;
}

.input-btn {
    padding: 0 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.input-btn:hover {
    background: var(--primary);
    color: white;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 10%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background: var(--bg-input);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgb(0 0 0 / 30%);
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 16px rgb(99 102 241 / 30%);
}

.btn.primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: 0 6px 24px rgb(99 102 241 / 40%);
}

.btn.success {
    background: rgb(16 185 129 / 12%);
    border-color: rgb(16 185 129 / 30%);
    color: var(--success-light);
}

.btn.success:hover {
    background: rgb(16 185 129 / 20%);
    border-color: rgb(16 185 129 / 50%);
}

.btn.danger {
    background: rgb(239 68 68 / 12%);
    border-color: rgb(239 68 68 / 30%);
    color: var(--danger-light);
}

.btn.danger:hover {
    background: rgb(239 68 68 / 20%);
    border-color: rgb(239 68 68 / 50%);
}

.btn.small {
    padding: 7px 14px;
    font-size: 0.85rem;
}

.btn.full-width {
    width: 100%;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.icon-btn.danger:hover {
    background: rgb(239 68 68 / 15%);
    color: var(--danger);
}

.icon-btn .material-symbols-rounded {
    font-size: 18px;
}

/* Divider */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

/* Drop Zone */
.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
    position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: rgb(99 102 241 / 5%);
}

.drop-zone.has-file {
    border-color: var(--success);
    background: rgb(34 197 94 / 5%);
}

.drop-zone .material-symbols-rounded {
    font-size: 32px;
    color: var(--text-muted);
}

.drop-zone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

#dropLabel {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   Tables
   ============================================ */

.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.table-container {
    overflow: auto;
    max-height: 500px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:hover td {
    background: var(--bg-hover);
}

.data-table code {
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.data-table .actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.store-badge.steam {
    background: #1b2838;
    color: #66c0f4;
}

.store-badge.epic {
    background: #2a2a2a;
    color: white;
}

.store-badge.gog {
    background: #86328a;
    color: white;
}

.store-badge.ubisoft {
    background: #0081d5;
    color: white;
}

.store-badge.ea {
    background: #ff4747;
    color: white;
}

.store-badge.battlenet {
    background: #00aeff;
    color: white;
}

.store-badge.riot {
    background: #eb0029;
    color: white;
}

.loading-cell,
.empty-cell,
.error-cell {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
}

.error-cell {
    color: var(--danger);
}

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

.filter-select {
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.8rem;
}

/* ============================================
   Charts
   ============================================ */

.chart-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 200px;
    padding: 20px 0;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary), var(--accent));
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.3s;
}

.chart-bar:hover {
    opacity: 0.8;
}

.bar-value {
    position: absolute;
    top: -24px;
    font-size: 0.75rem;
    font-weight: 600;
}

.bar-label {
    position: absolute;
    bottom: -24px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.stats-row.compact {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.mini-stat {
    text-align: center;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius);
}

.mini-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

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

.popular-games {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
}

.game-name {
    font-weight: 500;
}

.game-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   Contributions & Users
   ============================================ */

.contributions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contribution-item {
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

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

.contrib-header strong {
    font-size: 1rem;
}

.contrib-header code {
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.contrib-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.contrib-actions {
    display: flex;
    gap: 8px;
}

.status-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-tag.approved {
    background: rgb(34 197 94 / 15%);
    color: var(--success);
}

.status-tag.rejected {
    background: rgb(239 68 68 / 15%);
    color: var(--danger);
}

.status-tag.pending {
    background: rgb(245 158 11 / 15%);
    color: var(--warning);
}

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

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
}

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

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

.user-info strong {
    display: block;
}

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

.role-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.role-tag.owner {
    background: rgb(168 85 247 / 15%);
    color: #a855f7;
}

.role-tag.admin {
    background: rgb(99 102 241 / 15%);
    color: var(--primary-light);
}

.role-tag.contributor {
    background: rgb(6 182 212 / 15%);
    color: var(--accent);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.pagination button {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-hover);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-state .material-symbols-rounded {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
}

.loading-placeholder {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ============================================
   Toast Notifications
   ============================================ */

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

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 280px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

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

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

.toast .material-symbols-rounded {
    font-size: 20px;
    margin-top: 2px;
}

.toast.success .material-symbols-rounded {
    color: var(--success);
}

.toast.error .material-symbols-rounded {
    color: var(--danger);
}

.toast.info .material-symbols-rounded {
    color: var(--accent);
}

.toast.warning .material-symbols-rounded {
    color: var(--warning);
}

.toast div {
    flex: 1;
}

.toast strong {
    display: block;
    margin-bottom: 2px;
}

.toast p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.toast button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.toast button:hover {
    color: var(--text);
}

/* ============================================
   Responsive
   ============================================ */

@media (width <= 1024px) {
    .panel-row {
        flex-direction: column;
    }

    .panel.flex-1,
    .panel.flex-2 {
        flex: none;
    }
}

@media (width <= 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

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

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

    .mobile-menu-btn {
        display: flex;
    }

    .tab-panel {
        padding: 16px;
    }

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

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

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

    .top-bar-right .clock {
        display: none;
    }

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

    .toast {
        min-width: auto;
    }
}

/* ============================================
   Public Pages (Home, Wiki, Contribute)
   ============================================ */

/* Navigation */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgb(10 10 15 / 90%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.logo span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.nav-links a.active {
    color: var(--primary-light);
    background: rgb(99 102 241 / 10%);
}

/* Navigation Bar */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 18px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgb(10 10 16 / 85%);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 24px rgb(0 0 0 / 30%);
    z-index: 1000;
    transition: all var(--transition-base);
}

.nav-bar:hover {
    background: rgb(10 10 16 / 95%);
    border-bottom-color: var(--border-light);
}

.nav-bar .logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.8px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-bar .logo:hover {
    transform: translateY(-1px);
}

.nav-bar .logo span {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    transition: transform var(--transition-base);
}

.nav-links a:hover {
    color: var(--text);
    background: rgb(255 255 255 / 5%);
}

.nav-links a.active {
    color: var(--primary-light);
    background: rgb(99 102 241 / 10%);
}

.nav-links a.active::before {
    transform: translateX(-50%) scaleX(1);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 60px;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, var(--bg-dark) 70%);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin: 0 0 16px;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 0 32px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgb(99 102 241 / 10%);
    border: 1px solid rgb(99 102 241 / 20%);
    border-radius: 100px;
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    transition: all 0.2s;
}

.badge-pill:hover {
    background: rgb(99 102 241 / 20%);
    transform: translateY(-1px);
}

.badge-pill .material-symbols-rounded {
    font-size: 18px;
}

.cta-group {
    display: flex;
    gap: 12px;
}

.btn-hero {
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-hero.primary {
    background: var(--primary);
    color: white;
}

.btn-hero.primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-hero.secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-hero.secondary:hover {
    background: var(--bg-hover);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 48px 24px;
    margin-top: 80px;
    border-top: 1px solid var(--border);
    background: rgb(10 10 16 / 50%);
    backdrop-filter: var(--glass-blur);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    margin-bottom: 16px;
}

.site-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    padding: 4px 8px;
    border-radius: 6px;
}

.site-footer a:hover {
    color: var(--primary-light);
    background: rgb(99 102 241 / 10%);
}

.footer-copy {
    margin-top: 12px;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ============================================
   Documentation / Wiki
   ============================================ */

/* Documentation styles moved to wiki.css for V5 Evolution */

/* ============================================
   Contribute Page
   ============================================ */

body.contribute-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.contribute-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 120px 24px 60px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2rem;
    margin: 0 0 8px;
}

.page-header p {
    color: var(--text-secondary);
    margin: 0;
}

.contribute-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

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

.form-section h3 {
    font-size: 0.9rem;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover {
    background: var(--primary-light);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Tabs */
.contribute-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
}

.tab-btn {
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text);
    background: var(--bg-hover);
    border-radius: var(--radius) var(--radius) 0 0;
}

.tab-btn.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

/* Tabs */
.contribute-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
}

.tab-btn {
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text);
    background: var(--bg-hover);
    border-radius: var(--radius) var(--radius) 0 0;
}

.tab-btn.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

.direct-add-note {
    background: rgb(99 102 241 / 10%);
    border: 1px solid rgb(99 102 241 / 30%);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.direct-add-note strong {
    color: var(--primary-light);
    display: block;
    margin-bottom: 4px;
}

/* Phase 2 Pro Widgets */
.tier-gold {
    background: linear-gradient(135deg, rgb(255 170 0 / 15%) 0%, rgb(255 120 0 / 5%) 100%) !important;
    border: 1px solid rgb(255 170 0 / 30%) !important;
    position: relative;
    overflow: hidden;
}

.tier-gold::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgb(255 255 255 / 10%) 0%, transparent 70%);
    pointer-events: none;
}

.mini-value.success {
    color: #4ade80 !important;
    text-shadow: 0 0 10px rgb(74 222 128 / 30%);
}

.mini-value.neutral {
    color: var(--text-dim) !important;
}

.bar-list-container h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.success-message {
    display: none;
    text-align: center;
    padding: 24px;
    background: rgb(34 197 94 / 10%);
    border: 1px solid rgb(34 197 94 / 30%);
    border-radius: var(--radius);
    color: var(--success);
}

.success-message.visible {
    display: block;
}

