@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css');

/* ===================================
   ARDEM-BOT - COMPLETE DARK THEME
   =================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Theme Colors */
    --bg-primary: #0f111a;
    --bg-secondary: #1a1d2e;
    --bg-tertiary: #262b40;
    --bg-hover: #2e3348;

    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #3b82f6;

    /* Text Colors */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Border Colors */
    --border-primary: #334155;
    --border-secondary: #475569;

    /* Shadow */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===================================
   NAVBAR STYLES
   =================================== */

.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.navbar-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 2rem;
}

.navbar-brand a {
    text-decoration: none;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 0.5rem;
    transition: var(--transition-fast);
    cursor: pointer;
    background: none;
    border: none;
    white-space: nowrap;
}

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

.nav-item.active {
    background: var(--accent-primary);
    color: white;
}

.nav-item svg {
    flex-shrink: 0;
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-icon {
    transition: transform var(--transition-fast);
}

.nav-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 180px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
}

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

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: var(--transition-fast);
    border-radius: 0.375rem;
    margin: 0.25rem;
}

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

.dropdown-item.active {
    background: var(--accent-primary);
    color: white;
}

/* Notifications */
.navbar-notifications {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 1rem;
}

.notification-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.notification-dropdown.active .notification-toggle {
    background: var(--bg-hover);
    color: var(--accent-primary);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-danger);
    color: white;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    border: 2px solid var(--bg-secondary);
    animation: notificationPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
}

@keyframes notificationPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

.notification-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 400px;
    max-height: 550px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all var(--transition-fast);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
}

.notification-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.btn-mark-read {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-mark-read:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #5558e3;
}

.btn-mark-read:active {
    transform: scale(0.95);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.notification-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

.notification-empty p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.notification-item {
    display: flex;
    gap: 0.875rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

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

.notification-item:hover {
    background: var(--bg-tertiary);
}

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

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-primary);
}

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

.notification-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    font-size: 1.25rem;
    border: 1px solid var(--border-primary);
}

.notification-item.unread .notification-icon {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

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

.notification-text {
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
}

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

/* User Dropdown */
.navbar-user {
    display: flex;
    align-items: center;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-primary);
}

.user-dropdown-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

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

.user-name {
    font-weight: 500;
    font-size: 0.9375rem;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
}

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

.user-dropdown-header {
    padding: 1rem;
}

.user-dropdown-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.user-dropdown-divider {
    height: 1px;
    background: var(--border-primary);
    margin: 0.5rem 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    border-radius: 0.375rem;
    margin: 0.25rem;
}

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

/* ===================================
   CONTAINER & LAYOUT
   =================================== */

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* ===================================
   DASHBOARD
   =================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-base);
    cursor: pointer;
}

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

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.dashboard-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.dashboard-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ===================================
   PANELS & LISTS
   =================================== */

#panels-list,
#responses-list {
    display: grid;
    gap: 1.5rem;
}

.panel-card,
.response-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: var(--transition-fast);
}

.panel-card:hover,
.response-card:hover {
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-md);
}

.panel-header,
.response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-title,
.response-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-actions,
.response-actions {
    display: flex;
    gap: 0.5rem;
}

.panel-info,
.response-info {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.categories-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.category-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-info {
    flex: 1;
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.category-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

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

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

.btn-primary:hover:not(:disabled) {
    background: #5558e3;
}

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

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

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #0ea574;
}

.btn-warning {
    background: var(--accent-warning);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #dc8b09;
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* ===================================
   MODAL
   =================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal.active,
.modal:target {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    margin: auto;
}

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

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close,
.close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    line-height: 1;
}

.modal-close:hover,
.close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* ===================================
   FORMS
   =================================== */

.form-group {
    margin-bottom: 1.5rem;
}

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

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

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="color"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    transition: var(--transition-fast);
    font-family: inherit;
}

.form-group select[multiple] {
    min-height: 140px;
}

.automod-container {
    display: grid;
    gap: 1.25rem;
}

.automod-intro {
    padding: 0.75rem 1rem;
    border: 1px dashed var(--border-primary);
    border-radius: 0.75rem;
    background: var(--bg-tertiary);
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.automod-intro p {
    margin: 0;
    font-size: 0.95rem;
}

.automod-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.automod-toolbar .toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.automod-toolbar .toolbar-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.automod-search input {
    min-width: 220px;
}

.automod-group {
    display: grid;
    gap: 1rem;
}

.automod-group-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}

.regex-result {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.regex-result.success {
    color: #22c55e;
}

.regex-result.error {
    color: #ef4444;
}

.audit-table {
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--bg-tertiary);
    margin-top: 1rem;
}

.audit-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.audit-table th,
.audit-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-primary);
    text-align: left;
    vertical-align: top;
}

.audit-table th {
    background: var(--bg-secondary);
    font-weight: 600;
}

.audit-table tr:last-child td {
    border-bottom: none;
}

.status-ok {
    color: #22c55e;
}
.automod-section {
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    background: var(--bg-secondary);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.automod-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    flex-wrap: wrap;
}

.automod-header-text h2 {
    margin: 0;
    font-size: 1.1rem;
}

.automod-header-text .section-description {
    margin: 0.25rem 0 0 0;
}

.automod-header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.automod-toggle-btn {
    border: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.automod-body {
    padding: 1.5rem;
    display: none;
}

.automod-section.is-open .automod-body {
    display: block;
}

.section-help {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    inset: 0;
    background-color: var(--border-primary);
    border-radius: 999px;
    transition: var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: var(--transition-fast);
}

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

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

.automod-hidden-toggle {
    display: none;
}

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

.override-list,
#automod_strike_thresholds_list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.override-row,
.strike-row {
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    background: var(--bg-tertiary);
}

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

.override-row select,
.override-row input,
.override-row textarea,
.strike-row select,
.strike-row input {
    width: 100%;
}

.strike-row {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    align-items: center;
}

.override-field {
    display: grid;
    gap: 0.25rem;
}

.form-group input[type="color"] {
    height: 42px;
    cursor: pointer;
}

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

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.checkbox-label span {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

/* Role Selector */
.role-selector {
    display: grid;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
}

.role-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.role-item:hover {
    background: var(--bg-hover);
}

.role-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.role-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.role-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ===================================
   BADGES
   =================================== */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-primary {
    background: var(--accent-primary);
    color: white;
}

.badge-success {
    background: var(--accent-success);
    color: white;
}

.badge-warning {
    background: var(--accent-warning);
    color: white;
}

.badge-danger {
    background: var(--accent-danger);
    color: white;
}

.badge-info {
    background: var(--accent-info);
    color: white;
}

/* ===================================
   ALERTS & NOTIFICATIONS
   =================================== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ===================================
   LOADING STATES
   =================================== */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.loading-small {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===================================
   EMPTY STATES
   =================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 400px;
}

/* ===================================
   SCROLLBAR STYLING
   =================================== */

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

*::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 5px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--border-secondary);
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE
   =================================== */

@media (max-width: 768px) {
    .navbar-container {
        flex-wrap: wrap;
        height: auto;
        padding: 1rem 1.5rem;
    }

    .navbar-toggle {
        display: flex;
        order: 4;
    }

    .navbar-brand {
        order: 1;
    }

    .navbar-notifications {
        order: 2;
        margin-right: 0.5rem;
        margin-left: 0;
    }

    .navbar-user {
        order: 3;
        margin-left: 0;
    }

    .navbar-nav {
        order: 5;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all var(--transition-base);
        margin-top: 0;
    }

    .navbar-nav.active {
        max-height: 500px;
        opacity: 1;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-primary);
    }

    .nav-item {
        width: 100%;
        justify-content: flex-start;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--bg-hover);
        margin-top: 0.5rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
    }

    .nav-dropdown.active .dropdown-menu {
        max-height: 300px;
    }

    .user-dropdown-toggle {
        padding: 0.5rem;
    }

    .user-name {
        display: none;
    }

    .notification-dropdown-menu {
        width: calc(100vw - 2rem);
        right: -1rem;
        left: auto;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

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

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

    .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-large {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 1.25rem;
    }

    .container {
        padding: 1rem 0.75rem;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* ===================================
   2026 REDESIGN LAYER (GLASS + MOBILE)
   =================================== */

:root {
    --bg-primary: #e8edf5;
    --bg-secondary: rgba(255, 255, 255, 0.58);
    --bg-tertiary: rgba(246, 250, 255, 0.74);
    --bg-hover: rgba(227, 237, 250, 0.82);

    --accent-primary: #0a84ff;
    --accent-secondary: #5ac8fa;
    --accent-success: #24d08e;
    --accent-warning: #f2b74a;
    --accent-danger: #f15d6e;
    --accent-info: #64a2ff;

    --text-primary: #1a2942;
    --text-secondary: #415577;
    --text-muted: #657b9f;

    --border-primary: rgba(164, 186, 224, 0.36);
    --border-secondary: rgba(122, 165, 233, 0.45);

    --shadow-sm: 0 10px 20px rgba(113, 139, 179, 0.16);
    --shadow-md: 0 20px 40px rgba(103, 130, 171, 0.24);
    --shadow-lg: 0 28px 70px rgba(91, 118, 160, 0.26);
    --shadow-xl: 0 36px 90px rgba(80, 109, 156, 0.3);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(163, 197, 248, 0.35) transparent;
}

body {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at 8% 12%, rgba(10, 132, 255, 0.24), transparent 32%),
        radial-gradient(circle at 90% 4%, rgba(90, 200, 250, 0.2), transparent 27%),
        radial-gradient(circle at 70% 86%, rgba(84, 131, 201, 0.2), transparent 34%),
        linear-gradient(145deg, #e8edf5 0%, #dbe6f4 52%, #cfddf2 100%);
    color: var(--text-primary);
    min-height: 100vh;
}

body::before,
body::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: -1;
    border-radius: 999px;
    filter: blur(50px);
}

body::before {
    width: 300px;
    height: 300px;
    top: 12%;
    left: -90px;
    background: rgba(10, 132, 255, 0.16);
}

body::after {
    width: 260px;
    height: 260px;
    right: -70px;
    bottom: 8%;
    background: rgba(90, 200, 250, 0.14);
}

.navbar {
    position: sticky;
    top: 0.9rem;
    width: min(96%, 1580px);
    margin: 0.9rem auto 0;
    border: 1px solid var(--border-primary);
    border-radius: 1.1rem;
    background: linear-gradient(150deg, rgba(10, 21, 40, 0.74), rgba(10, 17, 32, 0.6));
    backdrop-filter: blur(18px) saturate(132%);
    -webkit-backdrop-filter: blur(18px) saturate(132%);
    box-shadow: var(--shadow-lg);
}

.navbar-container {
    max-width: none;
    min-height: 70px;
    height: auto;
}

.brand-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #8be7ff 0%, #38beff 42%, #47efd4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-item {
    border: 1px solid transparent;
    border-radius: 0.8rem;
    color: var(--text-secondary);
}

.nav-item:hover {
    background: rgba(100, 153, 230, 0.24);
    border-color: rgba(160, 204, 255, 0.3);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.92), rgba(90, 200, 250, 0.9));
    border-color: rgba(146, 194, 250, 0.62);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(10, 132, 255, 0.3);
}

.dropdown-menu,
.user-dropdown-menu,
.notification-dropdown-menu {
    border: 1px solid var(--border-primary);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 255, 0.92));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.container {
    max-width: 1600px;
    padding: 2.2rem 1.35rem 2.4rem;
}

.container > h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(1.45rem, 2.5vw, 2.1rem);
    letter-spacing: 0.01em;
}

.page-header h1,
.container h2,
.container h3 {
    letter-spacing: 0.01em;
}

.dashboard-card,
.panel-card,
.response-card,
.settings-section,
.settings-preview,
.ticket-card,
.category-tab,
.filter-btn,
.archive-search-section,
.archive-container,
.archive-stats .stat-card,
.stats-config-section,
.chart-container,
.vc-categories-section,
.vc-channels-section,
.vc-logs-section,
.socialstats-table-wrapper,
.socialstats-stats .stat-card,
.automod-toolbar,
.automod-intro,
.automod-section,
.modal-content {
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.72), rgba(244, 249, 255, 0.66)) !important;
    border: 1px solid var(--border-primary) !important;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px) saturate(126%);
    -webkit-backdrop-filter: blur(14px) saturate(126%);
}

.dashboard-card:hover,
.panel-card:hover,
.response-card:hover,
.ticket-card:hover {
    border-color: var(--border-secondary) !important;
    box-shadow: var(--shadow-md);
}

.stat-card,
.vc-stats-overview .stat-card {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.74), rgba(242, 248, 255, 0.67)) !important;
    border: 1px solid var(--border-primary) !important;
}

.btn {
    border: 1px solid transparent;
    border-radius: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, #0a84ff 0%, #5ac8fa 100%);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #379aff 0%, #7ad6ff 100%);
}

.btn-secondary {
    background: rgba(238, 246, 255, 0.86);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(225, 238, 255, 0.92);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="color"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea,
.search-input,
#automodFilter {
    background: rgba(248, 252, 255, 0.95) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.75rem;
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.search-input:focus,
#automodFilter:focus {
    border-color: rgba(131, 211, 255, 0.7) !important;
    box-shadow: 0 0 0 4px rgba(54, 168, 244, 0.18) !important;
}

table {
    background: transparent;
}

th {
    color: var(--text-secondary);
    background: rgba(235, 244, 255, 0.82);
}

td {
    color: var(--text-primary);
}

.modal {
    background: rgba(37, 62, 101, 0.25);
    backdrop-filter: blur(8px);
}

code,
.mono {
    font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 1024px) {
    .navbar {
        top: 0.5rem;
        width: calc(100% - 1rem);
        margin-top: 0.5rem;
    }

    .navbar-container {
        gap: 1rem;
        padding: 0.85rem 1rem;
    }

    .navbar-nav {
        justify-content: flex-start;
    }

    .notification-dropdown-menu {
        width: min(92vw, 420px);
    }
}

@media (max-width: 768px) {
    .navbar {
        top: 0.35rem;
        border-radius: 0.95rem;
    }

    .navbar-container {
        padding: 0.75rem;
    }

    .navbar-nav {
        position: fixed;
        top: 76px;
        left: 0.5rem;
        right: 0.5rem;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        border: 1px solid var(--border-primary);
        border-radius: 0.95rem;
        background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(243, 248, 255, 0.93));
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: var(--shadow-lg);
        padding: 0;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
    }

    .navbar-nav.active {
        margin-top: 0;
        padding: 0.75rem;
        border-top: 1px solid var(--border-primary);
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-dropdown {
        width: 100%;
    }

    .dropdown-menu {
        margin-top: 0.35rem;
        border: 1px solid var(--border-primary);
        border-radius: 0.75rem;
    }

    .container {
        padding: 1.1rem 0.8rem 1.8rem;
    }

    .page-header {
        gap: 0.8rem;
    }

    .page-header h1 {
        font-size: clamp(1.35rem, 5.4vw, 1.72rem);
    }

    .panel-header,
    .response-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .panel-actions,
    .response-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .panel-actions .btn,
    .response-actions .btn {
        flex: 1 1 140px;
    }

    .modal-content {
        border-radius: 0.85rem;
    }
}

@media (max-width: 480px) {
    .navbar-user {
        margin-left: auto;
    }

    .notification-dropdown-menu {
        left: 0;
        right: 0;
        width: auto;
    }

    .dashboard-card,
    .panel-card,
    .response-card,
    .settings-section,
    .stats-config-section,
    .chart-container {
        padding: 1rem !important;
    }

    .btn {
        min-height: 42px;
    }
}

/* ===================================
   FULL SHELL REDESIGN (SIDEBAR + GLASS)
   =================================== */

.app-shell-enabled {
    min-height: 100vh;
    overflow-x: hidden;
}

.app-shell-enabled .app-wallpaper {
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image: linear-gradient(rgba(5, 8, 15, 0.5), rgba(6, 10, 17, 0.72)), url('/assets/ardem.png');
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
}

.app-shell-enabled .app-shell-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(28, 46, 78, 0.32);
    backdrop-filter: blur(4px);
    z-index: 1090;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.app-shell-enabled .app-shell-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.app-shell-enabled .app-sidebar {
    position: fixed;
    top: 1.25rem;
    left: 1rem;
    bottom: 1.25rem;
    width: 292px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 0.85rem;
    border-radius: 1.2rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.66), rgba(238, 245, 255, 0.52));
    border: 1px solid rgba(171, 194, 229, 0.48);
    backdrop-filter: blur(23px) saturate(140%);
    -webkit-backdrop-filter: blur(23px) saturate(140%);
    box-shadow: 0 30px 90px rgba(2, 7, 18, 0.58);
}

.app-shell-enabled .sidebar-brand {
    padding: 0.25rem 0.15rem 0.9rem;
}

.app-shell-enabled .brand-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.app-shell-enabled .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(140deg, #0a84ff, #5ac8fa);
}

.app-shell-enabled .brand-text {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: currentColor;
}

.app-shell-enabled .sidebar-nav {
    display: grid;
    gap: 0.35rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.app-shell-enabled .sidebar-section-label {
    margin: 0.65rem 0 0.2rem;
    padding: 0 0.45rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.app-shell-enabled .app-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.66rem 0.75rem;
    border-radius: 0.72rem;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid transparent;
    font-weight: 600;
    transition: all 0.2s ease;
}

.app-shell-enabled .app-sidebar .nav-item:hover {
    color: var(--text-primary);
    background: rgba(63, 102, 164, 0.33);
    border-color: rgba(169, 212, 255, 0.28);
}

.app-shell-enabled .app-sidebar .nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.94), rgba(90, 200, 250, 0.9));
    border-color: rgba(169, 216, 255, 0.9);
    box-shadow: 0 12px 28px rgba(10, 132, 255, 0.28);
}

.app-shell-enabled .sidebar-logout {
    margin-top: auto;
}

.app-shell-enabled .navbar {
    position: fixed;
    top: 1.25rem;
    left: 312px;
    right: 1rem;
    width: auto;
    margin: 0;
    z-index: 1080;
    border-radius: 1.05rem;
    border: 1px solid rgba(170, 209, 255, 0.25);
    background: linear-gradient(156deg, rgba(255, 255, 255, 0.67), rgba(238, 245, 255, 0.56));
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.app-shell-enabled .navbar-container {
    min-height: 68px;
    padding: 0.55rem 1rem;
    display: flex;
    justify-content: space-between;
}

.app-shell-enabled .navbar-left,
.app-shell-enabled .navbar-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.app-shell-enabled .topbar-title {
    font-size: 1.03rem;
    font-weight: 700;
    color: var(--text-primary);
}

.app-shell-enabled .navbar-toggle {
    display: none;
}

.app-shell-enabled .navbar-nav,
.app-shell-enabled .navbar-brand,
.app-shell-enabled .nav-dropdown,
.app-shell-enabled .dropdown-menu,
.app-shell-enabled .dropdown-toggle {
    display: none !important;
}

.app-shell-enabled .notification-dropdown-menu {
    right: 0;
    top: calc(100% + 0.65rem);
    width: min(440px, 88vw);
}

.nav-icon {
    width: 1.1rem;
    text-align: center;
    flex: 0 0 1.1rem;
}

.app-shell-enabled .container {
    margin-left: 312px;
    padding-top: 6.9rem;
    padding-right: 1rem;
    padding-left: 1rem;
    max-width: none;
}

.app-shell-enabled .modal {
    z-index: 2500;
}

@media (max-width: 980px) {
    .app-shell-enabled .app-sidebar {
        transform: translateX(-118%);
        transition: transform 0.28s ease;
    }

    .app-shell-enabled .app-sidebar.open {
        transform: translateX(0);
    }

    .app-shell-enabled .navbar {
        left: 0.75rem;
        right: 0.75rem;
        top: 0.75rem;
    }

    .app-shell-enabled .navbar-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 40px;
        height: 40px;
        border: 1px solid rgba(170, 209, 255, 0.26);
        border-radius: 0.65rem;
        background: rgba(17, 32, 57, 0.62);
    }

    .app-shell-enabled .navbar-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: var(--text-primary);
    }

    .app-shell-enabled .container {
        margin-left: 0;
        padding-top: 5.9rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

@media (max-width: 560px) {
    .app-shell-enabled .app-sidebar {
        width: min(90vw, 320px);
        left: 0.5rem;
        top: 0.5rem;
        bottom: 0.5rem;
    }

    .app-shell-enabled .topbar-title {
        font-size: 0.92rem;
        max-width: 38vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-shell-enabled .user-name {
        display: none;
    }

    .app-shell-enabled .notification-dropdown-menu {
        width: min(95vw, 95vw);
    }
}

/* ===================================
   DARK LIQUID OVERRIDE (REFERENCE MATCH)
   =================================== */

:root {
    --bg-primary: #050913;
    --bg-secondary: rgba(15, 22, 35, 0.62);
    --bg-tertiary: rgba(21, 31, 48, 0.72);
    --bg-hover: rgba(46, 66, 97, 0.64);

    --accent-primary: #0a84ff;
    --accent-secondary: #59c7ff;
    --text-primary: #f2f7ff;
    --text-secondary: rgba(213, 229, 255, 0.78);
    --text-muted: rgba(176, 198, 230, 0.62);

    --border-primary: rgba(170, 206, 255, 0.2);
    --border-secondary: rgba(201, 227, 255, 0.33);
    --shadow-sm: 0 10px 24px rgba(1, 8, 17, 0.36);
    --shadow-md: 0 20px 45px rgba(1, 8, 17, 0.44);
    --shadow-lg: 0 28px 70px rgba(1, 7, 16, 0.58);
}

body {
    background:
        radial-gradient(circle at 8% 12%, rgba(18, 114, 230, 0.25), transparent 36%),
        radial-gradient(circle at 92% 8%, rgba(58, 170, 255, 0.16), transparent 30%),
        linear-gradient(145deg, #04070f 0%, #081124 52%, #0b162d 100%);
    color: var(--text-primary);
}

.app-shell-enabled .app-wallpaper {
    background-image:
        linear-gradient(rgba(2, 6, 12, 0.48), rgba(3, 9, 18, 0.76)),
        url('/assets/ardem.png');
    filter: brightness(0.9) saturate(1.06);
}

.app-shell-enabled .app-shell-backdrop {
    background: rgba(4, 10, 22, 0.58);
    backdrop-filter: blur(6px);
}

.app-shell-enabled .app-sidebar {
    background: linear-gradient(162deg, rgba(17, 23, 36, 0.64), rgba(10, 15, 26, 0.52));
    border: 1px solid rgba(187, 218, 255, 0.2);
    box-shadow: 0 32px 90px rgba(1, 7, 17, 0.66);
}

.app-shell-enabled .brand-mark {
    background: linear-gradient(140deg, #0a84ff, #55c8ff);
    color: #ffffff;
}

.app-shell-enabled .app-sidebar .nav-item {
    color: var(--text-secondary);
}

.app-shell-enabled .app-sidebar .nav-item:hover {
    background: rgba(90, 136, 204, 0.23);
    border-color: rgba(187, 218, 255, 0.3);
    color: #ffffff;
}

.app-shell-enabled .app-sidebar .nav-item.active {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.92), rgba(85, 200, 255, 0.86));
    color: #ffffff;
    border-color: rgba(210, 234, 255, 0.55);
    box-shadow: 0 10px 30px rgba(10, 132, 255, 0.35);
}

.app-shell-enabled .navbar {
    background: linear-gradient(155deg, rgba(15, 23, 38, 0.66), rgba(10, 16, 30, 0.52));
    border: 1px solid rgba(185, 217, 255, 0.18);
}

.dropdown-menu,
.user-dropdown-menu,
.notification-dropdown-menu {
    background: linear-gradient(160deg, rgba(15, 23, 40, 0.95), rgba(9, 15, 29, 0.93));
}

.dashboard-card,
.panel-card,
.response-card,
.settings-section,
.settings-preview,
.ticket-card,
.category-tab,
.filter-btn,
.archive-search-section,
.archive-container,
.archive-stats .stat-card,
.stats-config-section,
.chart-container,
.vc-categories-section,
.vc-channels-section,
.vc-logs-section,
.socialstats-table-wrapper,
.socialstats-stats .stat-card,
.automod-toolbar,
.automod-intro,
.automod-section,
.modal-content,
.stat-card,
.vc-stats-overview .stat-card {
    background: linear-gradient(152deg, rgba(18, 28, 46, 0.62), rgba(12, 20, 34, 0.54)) !important;
    border: 1px solid rgba(175, 208, 255, 0.2) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #0a84ff, #55c8ff);
    color: #ffffff;
}

.btn-secondary {
    background: rgba(31, 45, 70, 0.62);
    color: var(--text-primary);
    border: 1px solid rgba(165, 200, 250, 0.24);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(46, 66, 101, 0.72);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="color"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea,
.search-input,
#automodFilter {
    background: rgba(14, 24, 41, 0.7) !important;
    color: var(--text-primary);
    border: 1px solid rgba(166, 201, 250, 0.22) !important;
}

th {
    background: rgba(28, 40, 62, 0.66);
    color: var(--text-secondary);
}

td,
.panel-info,
.response-info,
.category-details,
.vc-info-value,
.steam-chart-note {
    color: var(--text-secondary);
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(80, 129, 204, 0.18);
    color: #9dd8ff;
    border: 1px solid rgba(176, 214, 255, 0.22);
}

.card-icon i {
    font-size: 1.5rem;
}

/* ===================================
   FINE TUNE PASS (DESKTOP + MOBILE + DENSITY)
   =================================== */

.app-shell-enabled .app-sidebar {
    width: 300px;
    top: 1rem;
    bottom: 1rem;
    left: 0.85rem;
    padding: 0.9rem 0.75rem;
    gap: 0.5rem;
}

.app-shell-enabled .sidebar-brand {
    padding: 0.2rem 0.2rem 0.8rem;
}

.app-shell-enabled .sidebar-nav {
    gap: 0.28rem;
    padding-right: 0.1rem;
}

.app-shell-enabled .sidebar-section-label {
    margin: 0.55rem 0 0.15rem;
    font-size: 0.68rem;
}

.app-shell-enabled .app-sidebar .nav-item {
    min-height: 40px;
    padding: 0.58rem 0.68rem;
    border-radius: 0.68rem;
    font-size: 0.89rem;
    gap: 0.55rem;
}

.app-shell-enabled .navbar {
    left: 320px;
    right: 0.9rem;
    top: 1rem;
    min-height: 64px;
}

.app-shell-enabled .navbar-container {
    min-height: 64px;
    padding: 0.5rem 0.85rem;
}

.app-shell-enabled .topbar-title {
    font-size: 0.98rem;
    letter-spacing: 0.01em;
}

.app-shell-enabled .container {
    margin-left: 320px;
    padding-top: 6.4rem;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
    padding-bottom: 1.4rem;
}

.container > h1,
.page-header h1 {
    font-size: clamp(1.25rem, 1.9vw, 1.75rem);
    margin-bottom: 0.95rem;
}

.page-header {
    margin-bottom: 1.2rem;
}

.dashboard-grid {
    gap: 1rem;
}

.dashboard-card,
.panel-card,
.response-card,
.settings-section,
.settings-preview,
.stats-config-section,
.chart-container,
.vc-categories-section,
.vc-channels-section,
.vc-logs-section,
.ticket-card,
.archive-search-section,
.archive-container,
.socialstats-table-wrapper,
.automod-toolbar,
.automod-intro,
.automod-section {
    border-radius: 0.88rem !important;
    padding: 1rem !important;
}

.dashboard-card h3,
.panel-title,
.response-title,
.container h2 {
    font-size: 1.02rem;
}

.dashboard-card p,
.panel-info,
.response-info,
.form-group small {
    font-size: 0.86rem;
}

.card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
}

.card-icon i {
    font-size: 1.2rem;
}

.btn {
    min-height: 38px;
    padding: 0.52rem 0.95rem;
    font-size: 0.88rem;
    border-radius: 0.66rem;
}

.btn-sm {
    min-height: 34px;
    padding: 0.42rem 0.76rem;
    font-size: 0.8rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 0.88rem;
    margin-bottom: 0.38rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="color"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea,
.search-input,
#automodFilter {
    min-height: 40px;
    padding: 0.52rem 0.78rem;
    border-radius: 0.62rem;
    font-size: 0.88rem;
}

.form-group textarea {
    min-height: 88px;
}

table th,
table td {
    padding: 0.62rem 0.68rem;
    font-size: 0.84rem;
}

.modal-content {
    border-radius: 0.9rem !important;
}

@media (max-width: 980px) {
    .app-shell-enabled .app-sidebar {
        width: 292px;
        left: 0.6rem;
        top: 0.6rem;
        bottom: 0.6rem;
        padding: 0.82rem 0.66rem;
    }

    .app-shell-enabled .navbar {
        left: 0.6rem;
        right: 0.6rem;
        top: 0.6rem;
    }

    .app-shell-enabled .navbar-container {
        min-height: 58px;
        padding: 0.4rem 0.6rem;
    }

    .app-shell-enabled .navbar-toggle {
        width: 36px;
        height: 36px;
        border-radius: 0.58rem;
    }

    .app-shell-enabled .container {
        margin-left: 0;
        padding-top: 5.2rem;
        padding-left: 0.62rem;
        padding-right: 0.62rem;
        padding-bottom: 1rem;
    }

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

    .panel-actions .btn,
    .response-actions .btn {
        flex: 1 1 120px;
    }
}

@media (max-width: 560px) {
    .app-shell-enabled .app-sidebar {
        width: min(88vw, 310px);
        border-radius: 0.95rem;
    }

    .app-shell-enabled .topbar-title {
        font-size: 0.84rem;
        max-width: 45vw;
    }

    .app-shell-enabled .navbar-right {
        gap: 0.45rem;
    }

    .notification-toggle,
    .user-dropdown-toggle {
        width: 34px;
        height: 34px;
        min-width: 34px;
        padding: 0;
    }

    .container > h1,
    .page-header h1 {
        font-size: 1.2rem;
    }

    .dashboard-card,
    .panel-card,
    .response-card,
    .settings-section,
    .settings-preview,
    .stats-config-section,
    .chart-container,
    .vc-categories-section,
    .vc-channels-section,
    .vc-logs-section,
    .ticket-card,
    .archive-search-section,
    .archive-container,
    .socialstats-table-wrapper,
    .automod-toolbar,
    .automod-intro,
    .automod-section {
        padding: 0.82rem !important;
        border-radius: 0.8rem !important;
    }

    .btn {
        min-height: 36px;
        font-size: 0.84rem;
    }
}

/* ===================================
   ULTRA FINE TUNE (PIXEL PASS)
   =================================== */

.app-shell-enabled .app-sidebar {
    width: 292px;
    left: 0.8rem;
    top: 0.9rem;
    bottom: 0.9rem;
    padding: 0.78rem 0.66rem;
    border-radius: 1.05rem;
}

.app-shell-enabled .app-sidebar .nav-item {
    min-height: 38px;
    padding: 0.5rem 0.62rem;
    font-size: 0.86rem;
}

.app-shell-enabled .sidebar-section-label {
    font-size: 0.66rem;
    margin-top: 0.5rem;
}

.app-shell-enabled .navbar {
    left: 312px;
    right: 0.8rem;
    top: 0.9rem;
    min-height: 60px;
    border-radius: 0.95rem;
}

.app-shell-enabled .navbar-container {
    min-height: 60px;
    padding: 0.36rem 0.72rem;
}

.app-shell-enabled .topbar-title {
    font-size: 0.92rem;
}

.app-shell-enabled .container {
    margin-left: 312px;
    padding-top: 6.12rem;
    padding-left: 0.82rem;
    padding-right: 0.82rem;
    padding-bottom: 0.92rem;
}

.dashboard-card,
.panel-card,
.response-card,
.settings-section,
.settings-preview,
.stats-config-section,
.chart-container,
.vc-categories-section,
.vc-channels-section,
.vc-logs-section,
.ticket-card,
.archive-search-section,
.archive-container,
.socialstats-table-wrapper,
.automod-toolbar,
.automod-intro,
.automod-section {
    padding: 0.92rem !important;
    border-radius: 0.82rem !important;
}

.btn {
    min-height: 36px;
    padding: 0.48rem 0.82rem;
    font-size: 0.84rem;
    border-radius: 0.62rem;
}

.btn-sm {
    min-height: 32px;
    padding: 0.38rem 0.62rem;
    font-size: 0.77rem;
}

.form-group {
    margin-bottom: 0.88rem;
}

.form-group label {
    margin-bottom: 0.3rem;
    font-size: 0.84rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="color"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea,
.search-input,
#automodFilter {
    min-height: 38px;
    padding: 0.46rem 0.68rem;
    font-size: 0.84rem;
    border-radius: 0.58rem;
}

.form-group textarea {
    min-height: 82px;
}

table th,
table td {
    padding: 0.56rem 0.6rem;
    font-size: 0.8rem;
}

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
}

.card-icon i {
    font-size: 1.06rem;
}

@media (max-width: 980px) {
    .app-shell-enabled .app-sidebar {
        width: 286px;
        left: 0.5rem;
        top: 0.5rem;
        bottom: 0.5rem;
        border-radius: 0.9rem;
    }

    .app-shell-enabled .navbar {
        left: 0.5rem;
        right: 0.5rem;
        top: 0.5rem;
        min-height: 56px;
    }

    .app-shell-enabled .navbar-container {
        min-height: 56px;
        padding: 0.34rem 0.54rem;
    }

    .app-shell-enabled .container {
        margin-left: 0;
        padding-top: 4.95rem;
        padding-left: 0.52rem;
        padding-right: 0.52rem;
        padding-bottom: 0.7rem;
    }
}

@media (max-width: 560px) {
    .app-shell-enabled .app-sidebar {
        width: min(86vw, 302px);
    }

    .app-shell-enabled .topbar-title {
        font-size: 0.8rem;
        max-width: 47vw;
    }

    .dashboard-card,
    .panel-card,
    .response-card,
    .settings-section,
    .settings-preview,
    .stats-config-section,
    .chart-container,
    .vc-categories-section,
    .vc-channels-section,
    .vc-logs-section,
    .ticket-card,
    .archive-search-section,
    .archive-container,
    .socialstats-table-wrapper,
    .automod-toolbar,
    .automod-intro,
    .automod-section {
        padding: 0.74rem !important;
        border-radius: 0.72rem !important;
    }

    .btn {
        min-height: 34px;
        font-size: 0.8rem;
    }
}

/* ===================================
   DENSITY PRESETS
   =================================== */

.density-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem;
    border-radius: 0.65rem;
    background: rgba(28, 41, 66, 0.62);
    border: 1px solid rgba(165, 203, 255, 0.22);
}

.density-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    font-size: 0.74rem;
    line-height: 1;
    padding: 0.36rem 0.5rem;
    cursor: pointer;
}

.density-btn:hover {
    color: var(--text-primary);
    background: rgba(73, 112, 172, 0.26);
}

.density-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.9), rgba(85, 200, 255, 0.82));
}

.density-balanced.app-shell-enabled .app-sidebar {
    width: 292px;
}

.density-compact.app-shell-enabled .app-sidebar {
    width: 282px;
    padding: 0.7rem 0.58rem;
}

.density-compact.app-shell-enabled .app-sidebar .nav-item {
    min-height: 35px;
    padding: 0.44rem 0.56rem;
    font-size: 0.82rem;
}

.density-compact.app-shell-enabled .navbar {
    left: 302px;
    min-height: 56px;
}

.density-compact.app-shell-enabled .navbar-container {
    min-height: 56px;
    padding: 0.3rem 0.6rem;
}

.density-compact.app-shell-enabled .container {
    margin-left: 302px;
    padding-top: 5.8rem;
    padding-left: 0.66rem;
    padding-right: 0.66rem;
}

.density-compact .dashboard-card,
.density-compact .panel-card,
.density-compact .response-card,
.density-compact .settings-section,
.density-compact .settings-preview,
.density-compact .stats-config-section,
.density-compact .chart-container,
.density-compact .vc-categories-section,
.density-compact .vc-channels-section,
.density-compact .vc-logs-section,
.density-compact .ticket-card,
.density-compact .archive-search-section,
.density-compact .archive-container,
.density-compact .socialstats-table-wrapper,
.density-compact .automod-toolbar,
.density-compact .automod-intro,
.density-compact .automod-section {
    padding: 0.72rem !important;
}

.density-compact .btn {
    min-height: 33px;
    font-size: 0.79rem;
    padding: 0.4rem 0.66rem;
}

.density-compact .form-group {
    margin-bottom: 0.72rem;
}

.density-compact .form-group input[type="text"],
.density-compact .form-group input[type="number"],
.density-compact .form-group input[type="color"],
.density-compact .form-group input[type="email"],
.density-compact .form-group input[type="password"],
.density-compact .form-group select,
.density-compact .form-group textarea,
.density-compact .search-input,
.density-compact #automodFilter {
    min-height: 34px;
    font-size: 0.8rem;
    padding: 0.38rem 0.56rem;
}

.density-airy.app-shell-enabled .app-sidebar {
    width: 314px;
    padding: 0.95rem 0.82rem;
}

.density-airy.app-shell-enabled .app-sidebar .nav-item {
    min-height: 43px;
    padding: 0.62rem 0.72rem;
    font-size: 0.9rem;
}

.density-airy.app-shell-enabled .navbar {
    left: 334px;
    min-height: 66px;
}

.density-airy.app-shell-enabled .navbar-container {
    min-height: 66px;
    padding: 0.48rem 0.84rem;
}

.density-airy.app-shell-enabled .container {
    margin-left: 334px;
    padding-top: 6.7rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.density-airy .dashboard-card,
.density-airy .panel-card,
.density-airy .response-card,
.density-airy .settings-section,
.density-airy .settings-preview,
.density-airy .stats-config-section,
.density-airy .chart-container,
.density-airy .vc-categories-section,
.density-airy .vc-channels-section,
.density-airy .vc-logs-section,
.density-airy .ticket-card,
.density-airy .archive-search-section,
.density-airy .archive-container,
.density-airy .socialstats-table-wrapper,
.density-airy .automod-toolbar,
.density-airy .automod-intro,
.density-airy .automod-section {
    padding: 1.06rem !important;
}

.density-airy .btn {
    min-height: 39px;
    font-size: 0.87rem;
    padding: 0.52rem 0.88rem;
}

.density-airy .form-group {
    margin-bottom: 1.02rem;
}

.density-airy .form-group input[type="text"],
.density-airy .form-group input[type="number"],
.density-airy .form-group input[type="color"],
.density-airy .form-group input[type="email"],
.density-airy .form-group input[type="password"],
.density-airy .form-group select,
.density-airy .form-group textarea,
.density-airy .search-input,
.density-airy #automodFilter {
    min-height: 40px;
    font-size: 0.87rem;
    padding: 0.5rem 0.74rem;
}

@media (max-width: 980px) {
    .density-switcher {
        display: none;
    }

    .density-compact.app-shell-enabled .container,
    .density-airy.app-shell-enabled .container {
        margin-left: 0;
        padding-top: 4.95rem;
    }
}

/* ===================================
   DASHBOARD LIVE LAYER
   =================================== */

.dashboard-header {
    align-items: flex-start;
    gap: 1rem;
}

.dashboard-header .btn {
    white-space: nowrap;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.dashboard-kpi-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.54));
    padding: 0.95rem 1rem;
}

.dashboard-kpi-card .kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(51, 65, 85, 0.58);
    color: #e2e8f0;
}

.dashboard-kpi-card .kpi-label {
    color: #94a3b8;
    font-size: 0.75rem;
}

.dashboard-kpi-card .kpi-value {
    color: #f8fafc;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.15;
}

.dashboard-kpi-card .kpi-sub {
    color: #94a3b8;
    font-size: 0.72rem;
}

.dashboard-kpi-card.tone-success .kpi-icon {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.14);
}

.dashboard-kpi-card.tone-danger .kpi-icon {
    color: #fb7185;
    background: rgba(251, 113, 133, 0.14);
}

.dashboard-kpi-card.tone-warning .kpi-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.16);
}

.dashboard-kpi-card.tone-info .kpi-icon {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
}

.dashboard-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-panel {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.54));
    padding: 1rem;
    min-height: 270px;
}

.dashboard-panel h2 {
    color: #e2e8f0;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

#dashboardTrendChart {
    width: 100% !important;
    height: 210px !important;
}

.dashboard-list {
    display: grid;
    gap: 0.5rem;
}

.dashboard-list-empty {
    color: #94a3b8;
    padding: 0.5rem 0;
}

.dashboard-list-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.42);
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
}

.dashboard-list-item .list-rank {
    font-size: 0.75rem;
    color: #94a3b8;
}

.dashboard-list-item .list-name {
    color: #e2e8f0;
    font-size: 0.9rem;
}

.dashboard-list-item .list-value {
    font-size: 0.8rem;
    color: #38bdf8;
    font-weight: 700;
}

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

.dashboard-kpi-card .kpi-sub .kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
}

.dashboard-kpi-card .kpi-sub .kpi-delta.up {
    color: #4ade80;
}

.dashboard-kpi-card .kpi-sub .kpi-delta.down {
    color: #fb7185;
}

.dashboard-kpi-card .kpi-sub .kpi-delta.flat {
    color: #94a3b8;
}
