* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0f1117;
    --bg-panel: #1a1d27;
    --bg-card: #222535;
    --border: #2d3148;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-teal: #14b8a6;
    --text-primary: #e8eaf0;
    --text-secondary: #9ca3b8;
    --text-muted: #6b7394;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* ============ AUTH SCREEN ============ */
.screen {
    min-height: 100vh;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(ellipse at top, #1a1d27 0%, #0f1117 100%);
}

.auth-box {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.auth-logo {
    font-size: 48px;
    text-align: center;
    margin-bottom: 10px;
}

.auth-title {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #14b8a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 25px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 3px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.auth-tab.active {
    background: var(--accent-blue);
    color: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.settings-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.settings-input:focus {
    border-color: var(--accent-blue);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.auth-btn:hover {
    opacity: 0.9;
}

.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-error {
    color: var(--error);
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
    min-height: 20px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.google-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
}

.google-btn:hover {
    background: var(--border);
}

/* ============ DASHBOARD ============ */
#dashboard-screen {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.sidebar-logo {
    font-size: 32px;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #14b8a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.user-email {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-btn {
    padding: 12px 15px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-btn.active {
    background: var(--bg-card);
    color: var(--accent-blue);
}

.logout-btn {
    margin-top: auto;
    color: var(--error);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: 100vh;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 25px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.page-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 5px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.upload-area.has-file {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.05);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-area h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.upload-area p {
    color: var(--text-muted);
    font-size: 13px;
}

/* API Key Section */
.api-key-section {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.api-key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 14px;
}

.toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.toggle-btn:hover {
    background: var(--bg-card);
}

.api-key-input-group {
    display: flex;
    gap: 10px;
}

.api-key-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.api-key-input:focus {
    border-color: var(--accent-blue);
}

.save-key-btn {
    padding: 10px 18px;
    background: var(--accent-teal);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.save-key-btn:hover {
    opacity: 0.9;
}

.api-key-hint {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 8px;
}

.api-key-hint a {
    color: var(--accent-blue);
}

/* Model Selector */
.model-selector-group {
    margin-top: 15px;
}

.model-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.model-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.model-select:focus {
    border-color: var(--accent-blue);
}

.model-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Interactive Guide */
.guide-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    margin-top: 15px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.guide-toggle-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-blue);
}

.guide-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.guide-toggle-btn.expanded .guide-arrow {
    transform: rotate(180deg);
}

.guide-content {
    margin-top: 12px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    animation: fadeIn 0.3s ease;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 15px;
}

.guide-step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-size: 14px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.guide-link {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.guide-link:hover {
    opacity: 0.9;
}

.guide-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--success);
    font-size: 13px;
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Analysis List */
.analysis-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Analysis Card */
.analysis-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    transition: all 0.2s;
}

.analysis-card:hover {
    border-color: var(--accent-blue);
}

.analysis-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.analysis-card .card-title {
    font-size: 15px;
    font-weight: 600;
}

.analysis-card .card-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.status-pending {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.status-processing {
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.status-done {
    color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.status-error {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.analysis-card .card-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.analysis-card .card-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.card-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.card-btn.view {
    background: var(--accent-blue);
    color: white;
}

.card-btn.delete {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
}

/* ============ ANALYSIS VIEW ============ */
.analysis-view-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 30px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
}

.back-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.analysis-view-header h2 {
    flex: 1;
    font-size: 18px;
}

.analysis-view-actions {
    display: flex;
    gap: 10px;
}

.analysis-content {
    padding: 20px;
    background: white;
    color: #1a1a2e;
    min-height: calc(100vh - 80px);
}

.analysis-content iframe {
    width: 100%;
    height: calc(100vh - 80px);
    border: none;
}

/* Loading */
.loading {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

/* ============ SETTINGS ============ */
.settings-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
}

.settings-card h3 {
    font-size: 16px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.settings-input {
    margin-bottom: 15px;
}

/* ============ PROGRESS OVERLAY ============ */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

.progress-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 35px 40px;
    width: 90%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.progress-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.progress-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-status {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.progress-cancel-btn {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.progress-cancel-btn:hover {
    background: var(--bg-card);
    color: var(--error);
    border-color: var(--error);
}

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
}

.toast.success {
    background: var(--success);
    color: white;
}

.toast.error {
    background: var(--error);
    color: white;
}

.toast.info {
    background: var(--accent-blue);
    color: white;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
        min-width: 220px;
        padding: 15px;
    }

    .main-content {
        padding: 20px;
    }

    .upload-area {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    #dashboard-screen {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        height: auto;
        min-height: auto;
    }

    .sidebar-header {
        margin-bottom: 0;
        gap: 8px;
    }

    .sidebar-logo {
        font-size: 24px;
    }

    .sidebar-header h2 {
        font-size: 16px;
    }

    .sidebar-user {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 2px;
    }

    .nav-btn {
        font-size: 11px;
        padding: 8px 10px;
        text-align: center;
        white-space: nowrap;
    }

    .nav-btn::after {
        display: none;
    }

    .logout-btn {
        margin-top: 0;
    }

    .main-content {
        padding: 15px;
        max-height: none;
    }

    .upload-area {
        padding: 20px;
    }

    .upload-icon {
        font-size: 36px;
    }

    .upload-area h3 {
        font-size: 16px;
    }

    .api-key-input-group {
        flex-direction: column;
    }

    .save-key-btn {
        width: 100%;
    }

    .api-key-section {
        padding: 15px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .analysis-view-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px;
    }

    .analysis-view-header h2 {
        font-size: 16px;
        flex-basis: 100%;
    }

    .analysis-content {
        padding: 10px;
        min-height: calc(100vh - 120px);
    }

    .analysis-content iframe {
        height: calc(100vh - 120px);
    }

    .auth-box {
        padding: 25px;
    }

    .auth-title {
        font-size: 24px;
    }

    .progress-card {
        padding: 25px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 8px 10px;
    }

    .sidebar-logo {
        font-size: 20px;
    }

    .sidebar-header h2 {
        font-size: 14px;
    }

    .nav-btn {
        font-size: 10px;
        padding: 6px 8px;
    }

    .main-content {
        padding: 10px;
    }

    .upload-area {
        padding: 15px;
    }

    .upload-icon {
        font-size: 28px;
    }

    .upload-area h3 {
        font-size: 14px;
    }

    .upload-area p {
        font-size: 12px;
    }

    .api-key-section {
        padding: 12px;
    }

    .api-key-header {
        font-size: 13px;
    }

    .guide-toggle-btn {
        font-size: 12px;
        padding: 10px 12px;
    }

    .guide-content {
        padding: 15px;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .step-content strong {
        font-size: 13px;
    }

    .step-content p {
        font-size: 12px;
    }

    .guide-link {
        font-size: 12px;
        padding: 6px 12px;
    }

    .page-header h1 {
        font-size: 18px;
    }

    .page-header p {
        font-size: 12px;
    }

    .analysis-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .card-actions {
        flex-direction: column;
    }

    .card-btn {
        width: 100%;
        text-align: center;
    }

    .auth-box {
        padding: 20px;
    }

    .auth-title {
        font-size: 22px;
    }

    .auth-subtitle {
        font-size: 12px;
    }

    .form-group input {
        font-size: 13px;
    }

    .auth-btn {
        font-size: 14px;
    }

    .progress-card {
        padding: 20px;
    }

    .progress-icon {
        font-size: 36px;
    }

    .progress-card h3 {
        font-size: 14px;
    }
}

/* ============ AI DECEIVER ============ */
.deceiver-container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    align-items: flex-start;
}

.deceiver-settings {
    width: 320px;
    min-width: 320px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.deceiver-workspace {
    flex: 1;
    display: flex;
    gap: 20px;
    align-items: center;
    align-self: stretch;
}

.deceiver-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    height: 100%;
    min-height: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.deceiver-pane:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pane-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent-blue);
    text-transform: uppercase;
}

.pane-title.output {
    color: var(--accent-teal);
}

.pane-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pane-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.pane-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.deceiver-textarea {
    flex: 1;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    outline: none;
    resize: none;
    font-family: inherit;
}

.deceiver-textarea[readonly] {
    cursor: default;
}

.pane-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Pipeline status badge */
.pipeline-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin: 8px 0 4px 0;
    animation: badgeFadeIn 0.4s ease;
    width: fit-content;
}
@keyframes badgeFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.pipeline-badge.full {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #4ade80;
}
.pipeline-badge.fallback {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fbbf24;
}
.pipeline-badge #deceiver-pipeline-icon {
    font-size: 14px;
    line-height: 1;
}


/* Action button in the middle */
.deceiver-action-pane {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 100%;
}

.deceiver-action-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    outline: none;
}

.deceiver-action-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 25px rgba(20, 184, 166, 0.6);
}

.deceiver-action-btn:active {
    transform: scale(0.95);
}

.deceiver-action-btn.processing {
    animation: deceiver-pulse 2s infinite;
    cursor: not-allowed;
    pointer-events: none;
}

@keyframes deceiver-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Settings elements */
.deceiver-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.mode-toggle-group {
    display: flex;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--border);
}

.mode-toggle-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.mode-toggle-btn.active {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--accent-blue);
    color: white;
}

.deceiver-select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.deceiver-select option {
    background: var(--bg-panel);
    color: white;
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.slider-value {
    color: var(--accent-teal);
    font-family: monospace;
}

.deceiver-slider {
    width: 100%;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.deceiver-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-teal);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.5);
    transition: background 0.2s;
}

.deceiver-slider::-webkit-slider-thumb:hover {
    background: var(--accent-blue);
}

/* Diff Rendering Styles */
.diff-container {
    flex: 1;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.diff-added {
    color: #34d399;
    background-color: rgba(6, 78, 59, 0.3);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
}

.diff-deleted {
    color: #f87171;
    background-color: rgba(127, 29, 29, 0.3);
    text-decoration: line-through;
    padding: 2px 4px;
    border-radius: 4px;
}

.diff-equal {
    color: var(--text-primary);
}

/* Show Diff Switch Styling */
.switch-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-switch {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    transition: .4s;
    border-radius: 20px;
}

.slider-switch:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-switch {
    background-color: rgba(20, 184, 166, 0.2);
    border-color: var(--accent-teal);
}

input:checked + .slider-switch:before {
    transform: translateX(14px);
    background-color: var(--accent-teal);
}

/* API Key Alert Banner */
.deceiver-api-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
    padding: 15px;
    color: var(--error);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.deceiver-api-alert a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
}

.deceiver-api-alert a:hover {
    text-decoration: underline;
}

/* Responsiveness for Deceiver */
@media (max-width: 1024px) {
    .deceiver-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .deceiver-settings {
        width: 100%;
        min-width: 100%;
    }
    
    .deceiver-workspace {
        flex-direction: column;
    }
    
    .deceiver-action-pane {
        width: 100%;
        height: 60px;
        margin: 10px 0;
    }
    
    .deceiver-pane {
        width: 100%;
        min-height: 350px;
    }
}

/* Deceiver Document Banner */
.deceiver-document-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    animation: bannerFadeIn 0.3s ease;
}
@keyframes bannerFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.deceiver-doc-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.deceiver-doc-icon {
    font-size: 16px;
}
.deceiver-doc-name {
    font-weight: 600;
    color: #e2e8f0;
}
.deceiver-doc-details {
    font-size: 12px;
    color: #94a3b8;
}
.deceiver-doc-close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s;
}
.deceiver-doc-close-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}
.deceiver-textarea:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.15);
}

/* ?? Paragraph Selector Panel ???????????????????????????????????????? */
.para-selector-panel {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    animation: bannerFadeIn 0.3s ease;
}

.para-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    gap: 8px;
    flex-wrap: wrap;
}

.para-selector-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #c7d2fe;
}

.para-selector-icon {
    font-size: 15px;
}

.para-count-badge {
    background: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.para-count-badge.badge--partial {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

.para-count-badge.badge--none {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.para-selector-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.para-bulk-btn {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.para-bulk-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    color: #e0e7ff;
    transform: translateY(-1px);
}
.para-bulk-btn--clear {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}
.para-bulk-btn--clear:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fecaca;
}
.para-bulk-btn--invert {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}
.para-bulk-btn--invert:hover {
    background: rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
}

.para-selector-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}
.para-selector-list::-webkit-scrollbar { width: 4px; }
.para-selector-list::-webkit-scrollbar-track { background: transparent; }
.para-selector-list::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 2px;
}

.para-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(30, 41, 59, 0.5);
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}
.para-card:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(2px);
}
.para-card.para-card--selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.35);
}
.para-card.para-card--skipped {
    opacity: 0.45;
    background: rgba(15, 23, 42, 0.3);
    border-color: rgba(255, 255, 255, 0.04);
}
.para-card.para-card--skipped:hover {
    opacity: 0.7;
    transform: translateX(2px);
}

.para-card-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid rgba(99, 102, 241, 0.5);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    transition: all 0.18s;
    font-size: 11px;
    color: transparent;
}
.para-card--selected .para-card-checkbox {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}
.para-card--skipped .para-card-checkbox {
    border-color: rgba(255, 255, 255, 0.15);
}

.para-card-body {
    flex: 1;
    min-width: 0;
}
.para-card-index {
    font-size: 10px;
    font-weight: 700;
    color: #6366f1;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.para-card--skipped .para-card-index {
    color: #475569;
}
.para-skip-badge {
    background: rgba(100, 116, 139, 0.2);
    color: #64748b;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 9px;
    letter-spacing: 0.3px;
}
.para-card-preview {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.para-card--selected .para-card-preview {
    color: #cbd5e1;
}

/* 📌 Section Divider Header Badges in Paragraph Selector */
.para-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.1));
    border-left: 3px solid #6366f1;
    border-radius: 6px;
    padding: 6px 10px;
    margin: 8px 0 4px 0;
    font-size: 12px;
    font-weight: 700;
    color: #a5b4fc;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.para-section-icon {
    font-size: 13px;
}

/* 🤖 Deceiver Live Progress Overlay Modal */
.deceiver-progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}

.deceiver-modal-content {
    background: linear-gradient(135deg, #1e1b4b, #0f172a);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 30px 35px;
    width: 90%;
    max-width: 540px;
    text-align: left;
}

.deceiver-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.deceiver-modal-icon {
    font-size: 36px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 14px;
    padding: 10px;
}
.deceiver-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 4px 0;
}
.deceiver-modal-subtitle {
    font-size: 13px;
    color: #a5b4fc;
    margin: 0;
}

.deceiver-progress-bar-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.deceiver-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #06b6d4, #10b981);
    background-size: 200% 100%;
    animation: gradientMove 2s infinite linear;
    transition: width 0.4s ease;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.deceiver-step-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
}
.deceiver-modal-detail {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============ SMART TRANSLATION ============ */
.translator-container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    align-items: flex-start;
}

.translator-settings {
    width: 320px;
    min-width: 320px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.translator-workspace {
    flex: 1;
    display: flex;
    gap: 20px;
    align-items: center;
    align-self: stretch;
}

@media (max-width: 1024px) {
    .translator-container {
        flex-direction: column;
        align-items: stretch;
    }
    .translator-settings {
        width: 100%;
        min-width: 0;
    }
    .translator-workspace {
        flex-direction: column;
        align-items: stretch;
    }
}

/* === Analytics Dashboard === */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.analytics-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.analytics-card-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.analytics-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.analytics-card-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.analytics-section {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.analytics-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.analytics-feature-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px 0;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.analytics-feature-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 8px;
    padding: 12px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(45, 49, 72, 0.5);
    align-items: center;
}

.analytics-feature-row:last-child {
    border-bottom: none;
}

.analytics-feature-name {
    font-weight: 600;
}

.analytics-stat {
    text-align: center;
}

.analytics-recent-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(45, 49, 72, 0.5);
}

.analytics-recent-row:last-child {
    border-bottom: none;
}

.analytics-feature-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.analytics-feature-badge.analysis { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.analytics-feature-badge.humanization { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.analytics-feature-badge.translation { background: rgba(20, 184, 166, 0.15); color: var(--accent-teal); }

.cache-hit { color: var(--success); }
.cache-miss { color: var(--text-muted); }

.analytics-meta {
    color: var(--text-muted);
    font-size: 12px;
}

.analytics-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.analytics-refresh-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    vertical-align: middle;
}

.analytics-refresh-btn:hover {
    background: var(--bg-card);
}

/* ============================================================ */
/* ADMIN CONTROL PANEL STYLES                                  */
/* ============================================================ */

.admin-nav-btn {
    border-left: 3px solid #a855f7 !important;
}

.admin-tab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color, #334155);
    padding-bottom: 8px;
    overflow-x: auto;
}

.admin-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.admin-tab:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}

.admin-tab.active {
    color: #a855f7;
    background: rgba(168, 85, 247, 0.12);
    font-weight: 600;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

.admin-card {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.admin-desc {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #f1f5f9;
}

.admin-subtext {
    font-size: 12px;
    color: #64748b;
    display: block;
    margin-top: 4px;
}

.admin-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.admin-tag {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-tag button {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.admin-table th, .admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #334155;
    font-size: 13px;
}

.admin-table th {
    color: #94a3b8;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.5);
}

.admin-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-admin { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.badge-user { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

.admin-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.admin-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 18px;
}

.admin-stat-label {
    font-size: 12px;
    color: #94a3b8;
}

.admin-stat-value {
    font-size: 26px;
    font-weight: 700;
    margin: 8px 0 4px 0;
}

.admin-stat-sub {
    font-size: 11px;
    color: #64748b;
}

.admin-key-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Master System Prompts Textareas */
.admin-prompt-textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 10px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12.5px;
    line-height: 1.6;
    padding: 14px 16px;
    margin-top: 8px;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.admin-prompt-textarea:focus {
    outline: none;
    border-color: var(--accent, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.admin-prompt-textarea::placeholder {
    color: #475569;
    font-style: italic;
}

/* Document Repository Filter Active State */
.admin-doc-filter.active {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: var(--accent, #6366f1) !important;
    color: #a5b4fc !important;
    font-weight: 600;
}

/* Admin Tab Bar Scrollable Overflow */
.admin-tab-bar {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
    -webkit-overflow-scrolling: touch;
}

.admin-tab-bar::-webkit-scrollbar {
    height: 4px;
}

.admin-tab-bar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

