/* ============================================
   INLINE STYLES CONSOLIDATED
   Alle inline styles van templates verplaatst naar deze centrale file
   ============================================ */

/* ============================================
   THREAD PAGE STYLES
   Van: templates/forum/thread.twig
   ============================================ */

/* Make thread page wider */
.thread-container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
}

.thread-wrapper {
    max-width: 100%;
    width: 100%;
    padding-bottom: 120px; /* Space for fixed chat input */
}

/* Ensure forum-wrapper doesn't constrain width on thread pages */
.forum-wrapper {
    max-width: 100% !important;
}

/* Make post-author-stats values smaller */
.post-author-stats .stat-value {
    font-size: 12px !important;
}

/* Fix text overflow in post messages - don't override main styles */
.post-message {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: visible;
    width: 100%;
}

/* Ensure all child elements respect boundaries */
.post-message > * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Force text wrapping for inline elements and text */
.post-message p,
.post-message div,
.post-message span {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

/* Ensure images and other media don't overflow */
.post-message img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* BBCode images - resize to 200x200 and make clickable */
.post-message .bbcode-image {
    max-width: 200px !important;
    max-height: 200px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    margin: 8px 0;
}

.post-message .bbcode-image:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Image lightbox overlay */
.image-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
    animation: fadeIn 0.2s ease;
}

.image-lightbox-overlay.show {
    display: flex;
}

.image-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.2s ease;
    z-index: 10001;
}

.image-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* YouTube embed container styling */
.bbcode-media-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 640px; /* Limit max width to reasonable size */
    width: 100%;
    margin: 16px 0;
    background: transparent;
    border-radius: 8px;
}

.bbcode-media-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* Handle headings from SIZE tags */
.post-message h1, .post-message h2, .post-message h3,
.post-message h4, .post-message h5, .post-message h6 {
    margin: 16px 0 8px 0;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-message h1 {
    font-size: 2em;
}

.post-message h2 {
    font-size: 1.75em;
}

.post-message h3 {
    font-size: 1.5em;
}

.post-message h4 {
    font-size: 1.25em;
}

.post-message h5 {
    font-size: 1.1em;
}

.post-message h6 {
    font-size: 1em;
}

/* Handle code blocks and preformatted text */
.post-message pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
}

.post-message code {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    display: inline-block;
}

/* Handle long URLs and links */
.post-message a {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Handle tables if any */
.post-message table {
    max-width: 100%;
    table-layout: auto;
    word-wrap: break-word;
}

.post-message td,
.post-message th {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Thread Tags Styling */
.thread-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 16px 0;
    align-items: center;
}

.thread-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--discord-accent);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.thread-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.thread-tag i {
    font-size: 11px;
    opacity: 0.8;
}

/* VirusTotal Button Styling */
.btn-virustotal {
    background-color: #01b8ff !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    border: none !important;
}

.btn-virustotal:hover {
    background-color: #0178cc !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(1, 184, 255, 0.3);
}

.btn-virustotal:active {
    transform: translateY(0);
}

/* Thread Tag Inline (next to author) */
.thread-tag-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.thread-tag-inline:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.thread-tag-inline i {
    font-size: 11px;
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .thread-container {
        max-width: 100%;
        padding: 0 24px;
    }
}

@media (max-width: 768px) {
    .thread-container {
        padding: 0 16px;
    }
    .post-container {
        flex-direction: column;
    }
    .post-sidebar {
        width: 100%;
    }
}

/* ============================================
   ADMIN API KEYS STYLES
   Van: templates/admin/api_keys.twig
   ============================================ */

/* Alerts */
.api-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid;
    animation: slideIn 0.3s ease;
}

.api-alert-success {
    background: rgba(87, 242, 135, 0.1);
    border-color: #57F287;
    color: #57F287;
}

.api-alert-error {
    background: rgba(237, 66, 69, 0.1);
    border-color: #ED4245;
    color: #ED4245;
}

.api-alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.api-alert-content {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

/* New API Key Warning Box */
.api-key-warning-box {
    background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
    animation: slideIn 0.3s ease;
}

.api-key-warning-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.api-key-warning-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.api-key-warning-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.api-key-warning-content {
    color: white;
}

.api-key-info-item {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.api-key-info-label {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
}

.api-key-info-value {
    font-size: 16px;
    font-weight: 600;
}

.api-key-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.api-key-code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: white;
    word-break: break-all;
    user-select: all;
}

.api-key-copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.api-key-copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.api-key-warning-text {
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
}

.api-key-env-example {
    margin-top: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
}

.api-key-env-code {
    display: block;
    margin-top: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    word-break: break-all;
}

/* Layout for side-by-side sections */
.api-keys-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    margin-bottom: 32px;
}

.api-create-section {
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.api-list-section {
    min-width: 0;
}

/* Form Styling */
.admin-form {
    background: var(--discord-sidebar);
    border: 1px solid var(--discord-border);
    border-radius: 12px;
    padding: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--discord-text-primary);
}

.form-group .required {
    color: #ED4245;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--discord-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--discord-input-bg);
    color: var(--discord-text-primary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--discord-accent);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.form-control::placeholder {
    color: var(--discord-text-secondary);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--discord-text-secondary);
    font-size: 12px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--discord-accent) 0%, #4752C4 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-success {
    background: linear-gradient(135deg, #57F287 0%, #3BA55D 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(87, 242, 135, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #FEE75C 0%, #F9A61A 100%);
    color: #1a1a1a;
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(254, 231, 92, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ED4245 0%, #C03537 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(237, 66, 69, 0.3);
}

/* API Keys Grid */
.api-keys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.api-key-card {
    background: var(--discord-sidebar);
    border: 1px solid var(--discord-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.api-key-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--discord-accent) 0%, #4752C4 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.api-key-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--discord-accent);
}

.api-key-card:hover::before {
    opacity: 1;
}

.api-key-card-inactive {
    opacity: 0.7;
}

.api-key-card-inactive::before {
    background: linear-gradient(90deg, #72767d 0%, #5a5e66 100%);
}

.api-key-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.api-key-card-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.api-key-card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--discord-accent) 0%, #4752C4 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.api-key-card-inactive .api-key-card-icon {
    background: linear-gradient(135deg, #72767d 0%, #5a5e66 100%);
}

.api-key-card-title-wrapper {
    flex: 1;
    min-width: 0;
}

.api-key-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--discord-text-primary);
    margin: 0 0 6px 0;
    word-break: break-word;
}

.api-key-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.api-key-action-form {
    margin: 0;
    display: inline-block;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--discord-input-bg);
    color: var(--discord-text-primary);
    font-size: 14px;
}

.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-icon-success {
    color: #57F287;
}

.btn-icon-success:hover {
    background: rgba(87, 242, 135, 0.2);
}

.btn-icon-warning {
    color: #FEE75C;
}

.btn-icon-warning:hover {
    background: rgba(254, 231, 92, 0.2);
}

.btn-icon-danger {
    color: #ED4245;
}

.btn-icon-danger:hover {
    background: rgba(237, 66, 69, 0.2);
}

.api-key-card-notes {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--discord-input-bg);
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--discord-text-secondary);
}

.api-key-card-notes i {
    color: #FEE75C;
    flex-shrink: 0;
}

.api-key-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.api-key-info-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.api-key-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.api-key-info-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--discord-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-key-info-label i {
    font-size: 11px;
}

.api-key-info-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-key-code-masked {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: var(--discord-input-bg);
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--discord-accent);
    flex: 1;
    word-break: break-all;
}

.btn-copy-small {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--discord-input-bg);
    color: var(--discord-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-copy-small:hover {
    background: var(--discord-accent);
    color: white;
    transform: scale(1.05);
}

.api-key-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--discord-border);
}

.api-key-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.api-key-meta-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--discord-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-key-meta-label i {
    font-size: 10px;
    width: 14px;
}

.api-key-meta-value {
    font-size: 13px;
    color: var(--discord-text-primary);
    font-weight: 500;
}

.text-muted {
    color: var(--discord-text-secondary);
    font-style: italic;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge i {
    font-size: 6px;
}

.badge-success {
    background: rgba(87, 242, 135, 0.15);
    color: #57F287;
    border: 1px solid rgba(87, 242, 135, 0.3);
}

.badge-danger {
    background: rgba(237, 66, 69, 0.15);
    color: #ED4245;
    border: 1px solid rgba(237, 66, 69, 0.3);
}

.badge-pulse i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Empty State */
.api-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--discord-sidebar);
    border: 1px solid var(--discord-border);
    border-radius: 12px;
}

.api-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--discord-input-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--discord-text-secondary);
}

.api-empty-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--discord-text-primary);
    margin: 0 0 8px 0;
}

.api-empty-description {
    font-size: 14px;
    color: var(--discord-text-secondary);
    margin: 0;
}

/* Security Notice */
.api-security-notice {
    background: var(--discord-sidebar);
    border: 1px solid var(--discord-border);
    border-radius: 12px;
    padding: 24px;
}

.api-security-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.api-security-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FEE75C 0%, #F9A61A 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #1a1a1a;
}

.api-security-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--discord-text-primary);
    margin: 0;
}

.api-security-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.api-security-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--discord-text-primary);
    line-height: 1.6;
}

.api-security-list li i {
    color: #57F287;
    margin-top: 2px;
    flex-shrink: 0;
}

.api-security-list li strong {
    color: var(--discord-text-primary);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .api-keys-layout {
        grid-template-columns: 1fr;
    }
    .api-create-section {
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .api-keys-grid {
        grid-template-columns: 1fr;
    }
    .api-key-meta-grid {
        grid-template-columns: 1fr;
    }
    .api-key-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .api-key-card-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .api-key-display {
        flex-direction: column;
        align-items: stretch;
    }
    .api-key-copy-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   ADMIN DASHBOARD STYLES
   Van: templates/admin/dashboard.twig
   ============================================ */

.admin-dashboard-container {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    margin-bottom: 32px;
}

.admin-header-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--discord-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-title i {
    color: var(--discord-accent);
}

.admin-subtitle {
    font-size: 14px;
    color: var(--discord-text-secondary);
    margin: 0;
}

/* Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: var(--discord-sidebar);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s ease;
    border: 1px solid var(--discord-border);
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--discord-accent);
}

.stat-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-users .stat-card-icon {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: white;
}

.stat-threads .stat-card-icon {
    background: linear-gradient(135deg, #57F287 0%, #3BA55D 100%);
    color: white;
}

.stat-posts .stat-card-icon {
    background: linear-gradient(135deg, #FEE75C 0%, #F9A61A 100%);
    color: white;
}

.stat-online .stat-card-icon {
    background: linear-gradient(135deg, #ED4245 0%, #C03537 100%);
    color: white;
}

.stat-categories .stat-card-icon {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: white;
}

.stat-forums .stat-card-icon {
    background: linear-gradient(135deg, #57F287 0%, #3BA55D 100%);
    color: white;
}

.stat-card-content {
    flex: 1;
    min-width: 0;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--discord-text-primary);
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 14px;
    color: var(--discord-text-secondary);
    margin-bottom: 8px;
}

.stat-card-change {
    font-size: 12px;
    color: var(--discord-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-card-change i {
    font-size: 10px;
    color: #57F287;
}

/* Admin Sections */
.admin-section {
    margin-bottom: 32px;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--discord-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-section-title i {
    color: var(--discord-accent);
}

.admin-section-link {
    font-size: 14px;
    color: var(--discord-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.admin-section-link:hover {
    color: var(--discord-accent-hover);
}

/* Actions Grid */
.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.admin-action-card {
    background: var(--discord-sidebar);
    border: 1px solid var(--discord-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.admin-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--discord-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.admin-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--discord-accent);
}

.admin-action-card:hover::before {
    transform: scaleX(1);
}

.admin-action-card-featured {
    border-color: var(--discord-accent);
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1) 0%, rgba(88, 101, 242, 0.05) 100%);
}

.action-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--discord-input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--discord-accent);
    flex-shrink: 0;
}

.action-card-content {
    flex: 1;
    min-width: 0;
}

.action-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--discord-text-primary);
    margin: 0 0 4px 0;
}

.action-card-description {
    font-size: 13px;
    color: var(--discord-text-secondary);
    margin: 0;
}

.action-card-arrow {
    color: var(--discord-text-secondary);
    transition: all 0.2s ease;
}

.admin-action-card:hover .action-card-arrow {
    color: var(--discord-accent);
    transform: translateX(4px);
}

/* Activity List */
.admin-activity-list {
    background: var(--discord-sidebar);
    border: 1px solid var(--discord-border);
    border-radius: 12px;
    overflow: hidden;
}

.admin-activity-item {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--discord-border);
    transition: background 0.2s ease;
}

.admin-activity-item:last-child {
    border-bottom: none;
}

.admin-activity-item:hover {
    background: var(--discord-input-bg);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--discord-input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--discord-accent);
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--discord-text-primary);
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--discord-text-secondary);
}

.activity-title a {
    color: var(--discord-text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.activity-title a:hover {
    color: var(--discord-accent);
}

/* Activity Stats */
.admin-activity-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.admin-activity-stat-item {
    background: var(--discord-sidebar);
    border: 1px solid var(--discord-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.activity-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--discord-input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--discord-accent);
    flex-shrink: 0;
}

.activity-stat-content {
    flex: 1;
}

.activity-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--discord-text-primary);
    margin-bottom: 4px;
}

.activity-stat-label {
    font-size: 12px;
    color: var(--discord-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Activity Grid */
.admin-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.admin-activity-column {
    background: var(--discord-sidebar);
    border: 1px solid var(--discord-border);
    border-radius: 12px;
    padding: 20px;
}

.admin-activity-column-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--discord-text-primary);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--discord-border);
}

.admin-activity-column-title i {
    color: var(--discord-accent);
}

.admin-activity-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--discord-text-secondary);
    font-size: 14px;
}

.admin-cache-clear-btn {
    background: linear-gradient(135deg, #ED4245 0%, #C03537 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.admin-cache-clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 66, 69, 0.3);
}

.admin-cache-clear-btn i {
    font-size: 12px;
}

@media (max-width: 768px) {
    .admin-dashboard-container {
        padding: 16px;
    }
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    .admin-actions-grid {
        grid-template-columns: 1fr;
    }
    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* ============================================
   ADMIN MARKETPLACE STYLES
   Van: templates/admin/marketplace.twig
   ============================================ */

.admin-marketplace-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--discord-border);
    margin-bottom: 24px;
}

.marketplace-tab {
    padding: 16px 24px;
    color: var(--discord-text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.marketplace-tab:hover {
    color: var(--discord-text-primary);
    background: var(--discord-hover);
}

.marketplace-tab.active {
    color: var(--discord-accent);
    border-bottom-color: var(--discord-accent);
}

.admin-marketplace-content {
    background: var(--discord-sidebar);
    border-radius: 12px;
    padding: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--discord-border);
}

.admin-table th {
    font-weight: 600;
    color: var(--discord-text-primary);
}

.escalation-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: var(--discord-text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.info-value {
    color: var(--discord-text-primary);
    font-size: 14px;
}

.warning-item .info-value {
    color: #f44336;
    font-weight: 600;
}

.chat-messages-container {
    padding: 16px;
    background: var(--discord-sidebar);
    border-radius: 8px;
}

.chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.message-staff .message-content {
    border-left: 3px solid #4CAF50;
    padding-left: 8px;
}

.staff-badge {
    background: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 6px;
}

.resolution-card {
    border: 2px solid var(--discord-accent);
}

.resolution-description {
    color: var(--discord-text-secondary);
    margin-bottom: 16px;
}

.resolution-buttons {
    display: flex;
    gap: 12px;
}

.btn-resolve-buyer,
.btn-resolve-seller {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-resolve-buyer {
    background: #f44336;
    color: white;
}

.btn-resolve-buyer:hover {
    background: #d32f2f;
}

.btn-resolve-seller {
    background: #4CAF50;
    color: white;
}

.btn-resolve-seller:hover {
    background: #45a049;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--discord-text-secondary);
    text-decoration: none;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--discord-accent);
}

/* ============================================
   ADMIN THREADS STYLES
   Van: templates/admin/threads.twig
   ============================================ */

.admin-threads-container {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}
.admin-header {
    margin-bottom: 24px;
}
.admin-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--discord-text-primary);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-title i {
    color: var(--discord-accent);
}
.admin-subtitle {
    font-size: 14px;
    color: var(--discord-text-secondary);
    margin: 0;
}
.admin-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-alert-success {
    background: rgba(87, 242, 135, 0.1);
    border: 1px solid rgba(87, 242, 135, 0.3);
    color: #57F287;
}
.admin-alert-error {
    background: rgba(237, 66, 69, 0.1);
    border: 1px solid rgba(237, 66, 69, 0.3);
    color: #ED4245;
}
.admin-filters {
    background: var(--discord-sidebar);
    border: 1px solid var(--discord-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.admin-filters-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}
.admin-filter-group {
    display: flex;
    gap: 8px;
}
.admin-form-input,
.admin-form-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--discord-input-bg);
    border: 1px solid var(--discord-border);
    border-radius: 6px;
    color: var(--discord-text-primary);
    font-size: 14px;
    font-family: inherit;
}
.admin-form-input:focus,
.admin-form-select:focus {
    outline: none;
    border-color: var(--discord-accent);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}
.admin-table-container {
    background: var(--discord-sidebar);
    border: 1px solid var(--discord-border);
    border-radius: 12px;
    overflow: hidden;
    overflow-x: auto;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table thead {
    background: var(--discord-input-bg);
}
.admin-table th {
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--discord-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--discord-border);
}
.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--discord-border);
    color: var(--discord-text-primary);
    font-size: 14px;
}
.admin-table tbody tr {
    transition: all 0.2s ease;
}
.admin-table tbody tr:hover {
    background: var(--discord-input-bg);
    transform: translateX(2px);
}
.admin-table-empty {
    text-align: center;
    padding: 60px 20px;
}
.admin-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 20px;
}
.admin-empty-state i {
    font-size: 64px;
    color: var(--discord-text-secondary);
    opacity: 0.5;
}
.admin-empty-state p {
    font-size: 16px;
    color: var(--discord-text-secondary);
    margin: 0;
    font-weight: 500;
}
.admin-thread-title {
    max-width: 400px;
}
.thread-link {
    color: var(--discord-text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.thread-link:hover {
    color: var(--discord-accent);
}
.admin-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-user-name {
    font-weight: 500;
    color: var(--discord-text-primary);
}
.admin-forum-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.forum-name {
    font-weight: 500;
    color: var(--discord-text-primary);
}
.category-name {
    font-size: 12px;
    color: var(--discord-text-secondary);
}
.admin-thread-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.admin-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.admin-badge-sticky {
    background: rgba(254, 231, 92, 0.1);
    color: #FEE75C;
}
.admin-badge-locked {
    background: rgba(237, 66, 69, 0.1);
    color: #ED4245;
}
.admin-badge-normal {
    background: var(--discord-input-bg);
    color: var(--discord-text-secondary);
}
.admin-table-actions {
    display: flex;
    gap: 4px;
}
.admin-btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--discord-text-secondary);
    cursor: pointer;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
}
.admin-btn-icon:hover {
    background: var(--discord-hover);
    color: var(--discord-text-primary);
}
.admin-btn-icon-success:hover {
    background: #57F287;
    color: white;
}
.admin-btn-icon-warning:hover {
    background: #FEE75C;
    color: #1e1f22;
}
.admin-btn-icon-info:hover {
    background: var(--discord-accent);
    color: white;
}
.admin-btn-icon-danger:hover {
    background: #ED4245;
    color: white;
}
.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}
.admin-pagination-info {
    font-size: 14px;
    color: var(--discord-text-secondary);
}
.admin-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}
.admin-btn-primary {
    background: var(--discord-accent);
    color: white;
}
.admin-btn-primary:hover {
    background: var(--discord-accent-hover, #4752C4);
}
.admin-btn-secondary {
    background: var(--discord-input-bg);
    color: var(--discord-text-primary);
    border: 1px solid var(--discord-border);
}
.admin-btn-secondary:hover:not(:disabled) {
    background: var(--discord-hover);
    border-color: var(--discord-accent);
}
.admin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
@media (max-width: 768px) {
    .admin-threads-container {
        padding: 16px;
    }
    .admin-filters-form {
        grid-template-columns: 1fr;
    }
    .admin-table {
        font-size: 12px;
    }
    .admin-table th,
    .admin-table td {
        padding: 12px 8px;
    }
}

