/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --input-bg: #ffffff;
    --code-bg: #f1f5f9;
    --link-color: #2563eb;
    --link-hover-color: #1d4ed8;
}

/* Dark Mode */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #94a3b8;
    --success-color: #22c55e;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    --background: #0f172a;
    --surface: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --navbar-bg: rgba(30, 41, 59, 0.85);
    --input-bg: #1e293b;
    --code-bg: #334155;
    --link-color: #60a5fa;
    --link-hover-color: #93c5fd;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Links */
a {
    color: var(--link-color);
}

a:hover {
    color: var(--link-hover-color);
}

/* Navbar */
.navbar {
    background-color: var(--navbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.875rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

.logo::before {
    content: '';
    display: inline-block;
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

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

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

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

.btn-secondary:hover {
    background-color: #475569;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

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

.btn-warning:hover {
    background-color: #d97706;
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-icon {
    padding: 0.375rem 0.5rem;
    min-width: unset;
    line-height: 1;
}

.btn-icon-only {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.375rem;
    color: var(--text-secondary);
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-only:hover {
    color: var(--primary-color);
}

.btn-icon-only.btn-icon-danger:hover {
    color: var(--error-color);
}

.btn-icon-only.btn-icon-success:hover {
    color: var(--success-color);
}

.btn-icon-only svg {
    display: block;
}

/* Cards */
.card {
    background-color: var(--surface);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Submission Container (Home Page) */
.submission-container {
    max-width: 600px;
    margin: 0 auto 2rem;
    padding: 2rem;
    background-color: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    padding: 1rem 2rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-button:hover {
    color: var(--primary-color);
}

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

.tab-content {
    display: none;
}

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

.tab-content .help-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 1rem;
    margin-bottom: 1.25rem;
}

.tab-content .btn-primary {
    margin-top: 0;
}

/* Upload Zone */
.upload-zone {
    border: 3px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background-color: var(--background);
    margin-bottom: 1rem;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

.upload-icon {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.file-input {
    display: none;
}

.selected-file {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--surface);
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="url"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.auth-container .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.auth-container .help-text {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-container .help-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-container .help-text a:hover {
    text-decoration: underline;
}

.auth-container .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.auth-container .success-message {
    text-align: center;
    padding: 2rem;
}

.auth-container .success-message .success-icon {
    color: var(--success-color);
    margin-bottom: 1rem;
}

.auth-container .success-message h2 {
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

.auth-container .success-message p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Search */
.search-section {
    margin-bottom: 2rem;
}

.search-form {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.search-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
}

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

.filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

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

.stat-card {
    background-color: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Tables */
.ioc-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.ioc-table {
    width: 100%;
    background-color: var(--surface);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    table-layout: fixed;
}

.ioc-table thead {
    background-color: var(--background);
}

.ioc-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
}

.ioc-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    word-break: break-word;
    overflow-wrap: break-word;
}

.ioc-table tbody tr:hover {
    background-color: var(--background);
}

.submission-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.submission-link:hover {
    text-decoration: underline;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.status-icon svg {
    display: block;
}

.status-icon.status-completed {
    color: var(--success-color);
}

.status-icon.status-processing {
    color: var(--primary-color);
}

.status-icon.status-pending {
    color: var(--warning-color);
}

.status-icon.status-failed {
    color: var(--error-color);
}

.report-icon-link {
    display: inline-flex;
    color: var(--text-secondary);
    text-decoration: none;
}

.report-icon-link:hover {
    color: var(--primary-color);
}

/* Column widths for search results table (5 columns) */
.ioc-table.search-table th:nth-child(1),
.ioc-table.search-table td:nth-child(1) {
    width: 10%; /* Type */
    white-space: nowrap;
}

.ioc-table.search-table th:nth-child(2),
.ioc-table.search-table td:nth-child(2) {
    width: 28%; /* Value */
}

.ioc-table.search-table th:nth-child(3),
.ioc-table.search-table td:nth-child(3) {
    width: 22%; /* Context */
}

.ioc-table.search-table th:nth-child(4),
.ioc-table.search-table td:nth-child(4) {
    width: 8%; /* Report */
    text-align: center;
}

.ioc-table.search-table th:nth-child(5),
.ioc-table.search-table td:nth-child(5) {
    width: 15%; /* Date */
}

.ioc-table.search-table th:nth-child(6),
.ioc-table.search-table td:nth-child(6) {
    width: 17%; /* Actions - room for 3 icons */
    text-align: center;
    white-space: nowrap;
}

/* Column widths for submission detail table (3 columns) */
.ioc-table.detail-table th:nth-child(1),
.ioc-table.detail-table td:nth-child(1) {
    width: 12%; /* Type */
    white-space: nowrap;
}

.ioc-table.detail-table th:nth-child(2),
.ioc-table.detail-table td:nth-child(2) {
    width: 38%; /* Value */
}

.ioc-table.detail-table th:nth-child(3),
.ioc-table.detail-table td:nth-child(3) {
    width: 35%; /* Context */
}

.ioc-table.detail-table th:nth-child(4),
.ioc-table.detail-table td:nth-child(4) {
    width: 15%; /* Actions */
    text-align: center;
    white-space: nowrap;
}

/* Column widths for reports table (7 columns) */
.ioc-table.reports-table th:nth-child(1),
.ioc-table.reports-table td:nth-child(1) { width: 6%; text-align: center; }  /* Type */
.ioc-table.reports-table th:nth-child(2),
.ioc-table.reports-table td:nth-child(2) { width: 35%; } /* Report */
.ioc-table.reports-table th:nth-child(3),
.ioc-table.reports-table td:nth-child(3) { width: 10%; text-align: center; } /* Status */
.ioc-table.reports-table th:nth-child(4),
.ioc-table.reports-table td:nth-child(4) { width: 8%; text-align: center; }  /* IOCs */
.ioc-table.reports-table th:nth-child(5),
.ioc-table.reports-table td:nth-child(5) { width: 15%; } /* Submitted By */
.ioc-table.reports-table th:nth-child(6),
.ioc-table.reports-table td:nth-child(6) { width: 12%; } /* Date */
.ioc-table.reports-table th:nth-child(7),
.ioc-table.reports-table td:nth-child(7) {
    width: 4%;
}  /* Action */

.ioc-table.reports-table th:nth-child(7) {
    text-align: center;
}

.ioc-table.reports-table th:nth-child(7) svg {
    display: inline-block;
    vertical-align: middle;
}

.ioc-table.reports-table td:nth-child(7) {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

/* New row highlight animation */
.ioc-table tbody tr.new-row {
    opacity: 0;
    transform: translateY(-10px);
}

.ioc-table tbody tr.highlight {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, background-color 2s ease-out;
    background-color: rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .ioc-table tbody tr.highlight {
    background-color: rgba(59, 130, 246, 0.15);
}

/* Truncated text with tooltip for long values */
.ioc-value {
    display: block;
    max-width: 100%;
    word-break: break-all;
    overflow-wrap: break-word;
}

.ioc-context {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3em;
    line-height: 1.5em;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-processing {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-url {
    background-color: #e0e7ff;
    color: #3730a3;
}

.badge-file {
    background-color: #fce7f3;
    color: #831843;
}

.badge-ioc-yes {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-ioc-no {
    background-color: #f3f4f6;
    color: #6b7280;
}

.badge-ioc-unknown {
    background-color: #e5e7eb;
    color: #9ca3af;
}

.badge-ioc-screening {
    background-color: #dbeafe;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.spinner-inline {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.processing-message {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.hash-value {
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    background-color: var(--code-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    pointer-events: none;
}

/* Messages/Toasts */
.message {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toast-slide-up 0.3s ease-out;
}

@keyframes toast-slide-up {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.message-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.message-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Submission List */
.submission-list {
    background-color: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.submission-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

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

.submission-item:hover {
    background-color: var(--background);
}

.submission-info h3 {
    margin-bottom: 0.5rem;
}

.submission-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.submission-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Title Card for Submission Detail */
.title-card {
    background-color: var(--surface);
    padding: 1.5rem 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.submission-title {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* Info Cards */
.info-card {
    background-color: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.info-item span {
    color: var(--text-primary);
}

/* Type Filters */
.type-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background-color: var(--surface);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-primary);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Code/Monospace */
.code {
    font-family: 'Courier New', monospace;
    background-color: var(--code-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    word-break: break-all;
    overflow-wrap: break-word;
    display: inline-block;
    max-width: 100%;
}

/* Export Section */
.iocs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.iocs-header h2 {
    margin: 0;
}

.export-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.export-section label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.export-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: var(--surface);
    cursor: pointer;
    min-width: 200px;
}

.export-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.submission-header h1 {
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Footer */
footer {
    background-color: var(--surface);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.social-links svg {
    display: block;
}

/* Admin Styles */
.admin-header {
    margin-bottom: 2rem;
}

.admin-header h1 {
    margin-bottom: 0.5rem;
}

.admin-subtitle {
    color: var(--text-secondary);
}

.admin-section {
    background-color: var(--surface);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.admin-section h2 {
    margin-bottom: 1.5rem;
}

.admin-table.users-table th:nth-child(1) { width: 10%; } /* ID column (wider for UUID) */
.admin-table.users-table th:nth-child(2) { width: 15%; }
.admin-table.users-table th:nth-child(3) { width: 20%; }
.admin-table.users-table th:nth-child(4) { width: 10%; }
.admin-table.users-table th:nth-child(5) { width: 10%; }
.admin-table.users-table th:nth-child(6) { width: 13%; }
.admin-table.users-table th:nth-child(7) { width: 12%; }

/* UUID display styling */
.uuid-display {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: help;
    white-space: nowrap;
}

.uuid-display:hover {
    color: var(--text-primary);
}

.admin-table.invite-table th:nth-child(1) { width: 35%; }
.admin-table.invite-table th:nth-child(2) { width: 25%; }
.admin-table.invite-table th:nth-child(3) { width: 15%; }
.admin-table.invite-table th:nth-child(4) { width: 15%; }
.admin-table.invite-table th:nth-child(5) { width: 10%; }

/* Invite Requests Table */
.admin-table.requests-table th:nth-child(1),
.admin-table.requests-table td:nth-child(1) { width: 40%; } /* Email */
.admin-table.requests-table th:nth-child(2),
.admin-table.requests-table td:nth-child(2) { width: 8%; text-align: center; } /* Status */
.admin-table.requests-table th:nth-child(3),
.admin-table.requests-table td:nth-child(3) { width: 17%; } /* Requested */
.admin-table.requests-table th:nth-child(4),
.admin-table.requests-table td:nth-child(4) { width: 15%; } /* IP Address */
.admin-table.requests-table th:nth-child(5),
.admin-table.requests-table td:nth-child(5) { width: 20%; } /* Actions */

.admin-table code {
    word-break: break-all;
}

.code-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-cell code {
    flex: 1;
    white-space: normal;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    white-space: nowrap;
}

.status-cell {
    white-space: nowrap;
}

.status-icon {
    font-size: 1.2rem;
    line-height: 1;
    margin-right: 0.5rem;
}

.status-icon.status-pending {
    color: #f59e0b;
}

.status-icon.status-submitted {
    color: #10b981;
}

.status-icon.status-ignored {
    color: #6b7280;
}

.submission-link {
    font-size: 1.2rem;
    color: var(--primary-color);
    text-decoration: none;
    line-height: 1;
}

.submission-link:hover {
    color: var(--primary-hover);
}

.access-denied {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.access-denied h2 {
    color: var(--error-color);
    margin-bottom: 1rem;
}

.access-denied p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-small {
    max-width: 400px;
}

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

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.warning-text {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Checkbox styling in forms */
.form-group label input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Admin Dropdown in navbar */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color) !important;
    font-weight: 600;
    cursor: pointer;
}

.nav-dropdown-toggle svg {
    width: 12px;
    height: 12px;
    transition: transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-toggle svg {
    transform: rotate(180deg);
}

.nav-links a.nav-dropdown-toggle:hover {
    background-color: rgba(37, 99, 235, 0.08);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 200;
}

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

.nav-dropdown-menu a {
    display: block;
    padding: 0.625rem 1rem;
    color: var(--text-primary) !important;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 0;
}

.nav-dropdown-menu a:hover {
    background-color: var(--background);
    color: var(--primary-color) !important;
}

/* Invite Code Styles */
.invite-code-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.invite-code-actions .filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.invite-code-actions .filter-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.invite-code-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--background);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.invite-code-display code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 1.1rem;
    color: var(--primary-color);
    word-break: break-all;
    flex: 1;
}

.token-display code {
    font-size: 0.85rem;
}

.code-block {
    display: block;
    background-color: var(--background);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state-small {
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

.loading-inline {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner-small {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.token-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.token-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.token-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.error-text {
    color: var(--error-color);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1rem;
    }

    .logo::before {
        width: 1.5rem;
        height: 1.5rem;
        border-radius: 0.375rem;
    }

    .nav-links {
        gap: 0.125rem;
    }

    .nav-links a {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }

    .search-input-group {
        flex-direction: column;
    }

    .filters {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .submission-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

    .export-section {
        width: 100%;
    }

    .export-select {
        flex: 1;
        min-width: 0;
    }

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

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.theme-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.theme-toggle .icon-sun {
    display: none !important;
}

.theme-toggle .icon-moon {
    display: block !important;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block !important;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none !important;
}

/* Dark Mode Badge Overrides */
[data-theme="dark"] .badge-pending {
    background-color: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .badge-processing {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .badge-completed {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .badge-failed {
    background-color: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

[data-theme="dark"] .badge-url {
    background-color: rgba(129, 140, 248, 0.2);
    color: #a5b4fc;
}

[data-theme="dark"] .badge-file {
    background-color: rgba(244, 114, 182, 0.2);
    color: #f472b6;
}

[data-theme="dark"] .badge-ioc-yes {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .badge-ioc-no {
    background-color: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

[data-theme="dark"] .badge-ioc-unknown {
    background-color: rgba(107, 114, 128, 0.2);
    color: #6b7280;
}

[data-theme="dark"] .badge-ioc-screening {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .status-icon.status-pending {
    color: #fbbf24;
}

[data-theme="dark"] .status-icon.status-submitted {
    color: #4ade80;
}

[data-theme="dark"] .status-icon.status-ignored {
    color: #9ca3af;
}

/* Dark Mode Message Overrides */
[data-theme="dark"] .message-success {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: #22c55e;
}

[data-theme="dark"] .message-error {
    background-color: rgba(248, 113, 113, 0.2);
    color: #f87171;
    border-color: #f87171;
}

[data-theme="dark"] .message-info {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: #3b82f6;
}

/* Dark Mode Form Inputs */
[data-theme="dark"] .form-group input[type="text"],
[data-theme="dark"] .form-group input[type="password"],
[data-theme="dark"] .form-group input[type="email"],
[data-theme="dark"] .form-group input[type="url"],
[data-theme="dark"] .form-control,
[data-theme="dark"] .search-input,
[data-theme="dark"] .filter-select,
[data-theme="dark"] .export-select {
    background-color: var(--input-bg);
    color: var(--text-primary);
}

/* Dark Mode Invite Code Display */
[data-theme="dark"] .invite-code-display code {
    color: #60a5fa;
}

/* IOC Link Styles */
.ioc-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.ioc-link:hover .code {
    background-color: var(--primary-color);
    color: white;
}

.ioc-link:hover {
    text-decoration: none;
}

/* Submission Count Badge (for IOCs appearing in multiple reports) */
.submission-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    margin-left: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background-color: var(--primary-color);
    border-radius: 9999px;
    vertical-align: middle;
}

/* IOC Detail Page Styles */
.ioc-detail-card {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.ioc-value-display {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.ioc-value-large {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    word-break: break-all;
    overflow-wrap: break-word;
    background-color: var(--code-bg);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    flex: 1;
    min-width: 0;
}

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

.reports-section {
    margin-top: 2rem;
}

.reports-section h2 {
    margin-bottom: 1.5rem;
}

/* IOC Reports Table (4 columns) */
.ioc-table.ioc-reports-table th:nth-child(1),
.ioc-table.ioc-reports-table td:nth-child(1) {
    width: 6%;
    text-align: center;
}

.ioc-table.ioc-reports-table th:nth-child(2),
.ioc-table.ioc-reports-table td:nth-child(2) {
    width: 40%;
}

.ioc-table.ioc-reports-table th:nth-child(3),
.ioc-table.ioc-reports-table td:nth-child(3) {
    width: 39%;
}

.ioc-table.ioc-reports-table th:nth-child(4),
.ioc-table.ioc-reports-table td:nth-child(4) {
    width: 15%;
}

/* Responsive IOC stats */
@media (max-width: 768px) {
    .ioc-stats {
        grid-template-columns: 1fr;
    }

    .ioc-value-display {
        flex-direction: column;
    }

    .ioc-value-large {
        width: 100%;
    }
}

/* Related Reports Section */
.related-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-section h2 {
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.loading-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    padding: 1rem 0;
}

.spinner-small {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

/* Related Reports Table (4 columns) */
.ioc-table.related-table th:nth-child(1),
.ioc-table.related-table td:nth-child(1) {
    width: 6%;
    text-align: center;
}

.ioc-table.related-table th:nth-child(2),
.ioc-table.related-table td:nth-child(2) {
    width: 54%;
}

.ioc-table.related-table th:nth-child(3),
.ioc-table.related-table td:nth-child(3) {
    width: 20%;
}

.ioc-table.related-table th:nth-child(4),
.ioc-table.related-table td:nth-child(4) {
    width: 20%;
}

/* Shared IOC count styling */
.shared-ioc-count {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.shared-ioc-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

/* =============================================================================
   RSS Feed Management Styles
   ============================================================================= */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.queue-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.queue-actions .form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-width: 140px;
}

.url-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: var(--error-color);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-left: 0.5rem;
    cursor: help;
}

.submission-link {
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.checkbox-col {
    width: 40px;
    text-align: center;
}

.queue-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

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

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* RSS Feeds Table */
.admin-table.feeds-table th:nth-child(1) { width: 20%; }
.admin-table.feeds-table th:nth-child(2) { width: 30%; }
.admin-table.feeds-table th:nth-child(3) { width: 10%; }
.admin-table.feeds-table th:nth-child(4) { width: 12%; }
.admin-table.feeds-table th:nth-child(5) { width: 8%; }
.admin-table.feeds-table th:nth-child(6) { width: 20%; }

/* RSS Queue Table */
.admin-table.queue-table {
    table-layout: fixed;
}

.admin-table.queue-table th:nth-child(1) { width: 5%; }  /* Checkbox */
.admin-table.queue-table th:nth-child(2) { width: 32%; } /* Title */
.admin-table.queue-table th:nth-child(3) { width: 8%; text-align: center; }  /* IOCs */
.admin-table.queue-table th:nth-child(4) { width: 16%; } /* Feed */
.admin-table.queue-table th:nth-child(5) { width: 13%; } /* Published */
.admin-table.queue-table th:nth-child(6) { width: 8%; text-align: center; }  /* Status (icons) */
.admin-table.queue-table th:nth-child(7) { width: 18%; } /* Actions */

.admin-table.queue-table td:nth-child(3),
.admin-table.queue-table td:nth-child(6) {
    white-space: nowrap;
    overflow: visible;
    text-align: center;
    vertical-align: middle;
}

.admin-table.queue-table td:nth-child(7) {
    white-space: nowrap;
    overflow: visible;
    vertical-align: middle;
}

/* Help text under form fields */
.help-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* IOC Action Buttons (Admin Edit) */
.ioc-actions {
    white-space: nowrap;
}

.ioc-actions .btn {
    margin-right: 0.5rem;
}

.ioc-actions .btn:last-child {
    margin-right: 0;
}

/* Warning Box (Edit IOC Modal) */
.warning-box {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 1rem;
    color: #856404;
}

[data-theme="dark"] .warning-box {
    background-color: #3d3719;
    border-color: #8a6d1f;
    color: #ffc107;
}

/* Danger Warning Box (Global Edit) */
.warning-box-danger {
    background-color: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}

[data-theme="dark"] .warning-box-danger {
    background-color: #4a1f22;
    border-color: #c82333;
    color: #f8d7da;
}

/* Action Icons (Search and IOC views) */
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    margin: 0 0.25rem;
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    text-decoration: none;
}

.action-icon:hover {
    color: #0056b3;
    transform: scale(1.1);
}

.action-icon-danger {
    color: #dc3545;
}

.action-icon-danger:hover {
    color: #c82333;
}

[data-theme="dark"] .action-icon {
    color: #5ba3ff;
}

[data-theme="dark"] .action-icon:hover {
    color: #8dc2ff;
}

[data-theme="dark"] .action-icon-danger {
    color: #ff6b7a;
}

[data-theme="dark"] .action-icon-danger:hover {
    color: #ff8997;
}

/* Button Group and Dropdown (Edit IOC Modal) */
.btn-group {
    position: relative;
    display: inline-flex;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.btn-group .dropdown-toggle {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-group .dropdown-toggle .caret {
    font-size: 0.7rem;
}

.dropdown-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.25rem;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #2a2a2a;
    border-color: #444;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

[data-theme="dark"] .dropdown-menu a {
    color: #e0e0e0;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
}

[data-theme="dark"] .dropdown-menu a:hover {
    background-color: #333;
}

.dropdown-menu a.dropdown-danger {
    color: #dc3545;
}

[data-theme="dark"] .dropdown-menu a.dropdown-danger {
    color: #ff6b7a;
}

.dropdown-menu a.dropdown-danger:hover {
    background-color: #f8d7da;
}

[data-theme="dark"] .dropdown-menu a.dropdown-danger:hover {
    background-color: #4a1f22;
}

/* ============================================================
   Docs Page
   ============================================================ */

.docs-header {
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.docs-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.docs-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.docs-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding-top: 2rem;
}

/* Sidebar */
.docs-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 5rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}

.docs-nav-section h3 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color);
}

.docs-nav-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-nav-section ul ul {
    padding-left: 0.75rem;
}

.docs-nav-link {
    display: block;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.25rem;
    transition: color 0.15s, background-color 0.15s;
}

.docs-nav-link:hover {
    color: var(--text-primary);
    background-color: var(--background);
}

.docs-nav-link.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* Main content */
.docs-content {
    flex: 1;
    min-width: 0;
}

.docs-section {
    margin-bottom: 3.5rem;
    scroll-margin-top: 5rem;
}

.docs-content [id] {
    scroll-margin-top: 5rem;
}

.docs-section > h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.docs-section > h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
}

.docs-section p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

/* Endpoint blocks */
.docs-endpoint {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    scroll-margin-top: 5rem;
}

.docs-endpoint-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.docs-method {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.docs-method.get {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.docs-method.post {
    background-color: #dcfce7;
    color: #166534;
}

.docs-method.delete {
    background-color: #fee2e2;
    color: #991b1b;
}

[data-theme="dark"] .docs-method.get {
    background-color: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

[data-theme="dark"] .docs-method.post {
    background-color: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

[data-theme="dark"] .docs-method.delete {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.docs-path {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: transparent;
    padding: 0;
}

.docs-auth-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    background-color: #fef9c3;
    color: #854d0e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.docs-auth-badge.public {
    background-color: var(--background);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .docs-auth-badge {
    background-color: rgba(234, 179, 8, 0.15);
    color: #fde047;
}

[data-theme="dark"] .docs-auth-badge.public {
    background-color: transparent;
    color: var(--text-secondary);
}

.docs-endpoint p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

/* Parameter / response tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0 1rem;
    font-size: 0.875rem;
}

.docs-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background-color: var(--background);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.docs-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    vertical-align: top;
}

.docs-table code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    background-color: var(--code-bg);
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
}

/* Code blocks with language tabs */
.docs-code-block {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    margin: 0.75rem 0 1rem;
}

.docs-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem 0 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background);
}

.docs-code-tabs {
    display: flex;
}

.docs-code-tab {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}

.docs-code-tab:hover {
    color: var(--text-primary);
}

.docs-code-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.docs-copy-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.15s, background-color 0.15s;
    white-space: nowrap;
}

.docs-copy-btn:hover {
    color: var(--text-primary);
    background-color: var(--border-color);
}

.docs-code-pre {
    margin: 0;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    background-color: var(--surface);
}

.docs-code-pre code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre;
    background: none;
    padding: 0;
}

/* Response example blocks */
.docs-response-block {
    margin: 0.5rem 0 1rem;
}

.docs-response-block h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.docs-response-block pre {
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.875rem 1rem;
    overflow-x: auto;
    margin: 0;
}

.docs-response-block pre code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre;
}

/* Note/callout */
.docs-note {
    background-color: #eff6ff;
    border-left: 3px solid var(--primary-color);
    border-radius: 0 0.375rem 0.375rem 0;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.75rem 0;
}

[data-theme="dark"] .docs-note {
    background-color: rgba(59, 130, 246, 0.1);
}

/* IOC type badges */
.docs-ioc-types {
    margin: 1rem 0 1.5rem;
}

.docs-type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.ioc-type-badge {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.775rem;
    padding: 0.2rem 0.5rem;
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .docs-layout {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .docs-nav-section ul ul {
        display: none;
    }
}
