/* Edison SaaS Portal - Shared Theme */
/* Matches browser-phone agent.css design language */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Backgrounds */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #18181b;
    --bg-elevated: #1f1f23;
    --bg-hover: #27272a;

    /* Accent */
    --accent-primary: #f59e0b;
    --accent-primary-hover: #fbbf24;
    --accent-primary-muted: rgba(245, 158, 11, 0.15);
    --accent-primary-glow: rgba(245, 158, 11, 0.4);

    /* Status */
    --status-success: #22c55e;
    --status-warning: #f59e0b;
    --status-error: #ef4444;
    --status-info: #3b82f6;

    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-dimmed: #52525b;

    /* Borders */
    --border-primary: #27272a;
    --border-secondary: #3f3f46;

    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    /* RGB variants for transparency support */
    --bg-primary-rgb: 10, 10, 11;
}

/* Light mode overrides */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f4f4f5;
    --bg-elevated: #e4e4e7;
    --bg-hover: #d4d4d8;
    --bg-primary-rgb: 255, 255, 255;

    --accent-primary: #d97706;
    --accent-primary-hover: #b45309;
    --accent-primary-muted: rgba(217, 119, 6, 0.12);
    --accent-primary-glow: rgba(217, 119, 6, 0.25);

    --status-success: #16a34a;
    --status-warning: #d97706;
    --status-error: #dc2626;
    --status-info: #2563eb;

    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #71717a;
    --text-dimmed: #a1a1aa;

    --border-primary: #e4e4e7;
    --border-secondary: #d4d4d8;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-primary-hover);
}

/* ---- Navigation ---- */
.edison-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 48px;
    background: rgba(var(--bg-primary-rgb), 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-primary);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.edison-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.edison-logo span {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
    color: #000;
}

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

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--radius);
}

/* ---- Cards ---- */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--border-secondary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ---- Form Elements ---- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-muted);
}

.form-group input::placeholder {
    color: var(--text-dimmed);
}

/* ---- Tables ---- */
.edison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.edison-table thead {
    background: var(--bg-tertiary);
}

.edison-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-primary);
}

.edison-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-primary);
    color: var(--text-secondary);
}

.edison-table tbody tr:hover {
    background: var(--bg-tertiary);
}

/* ---- Status Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--status-success);
}

.badge-inactive {
    background: rgba(113, 113, 122, 0.15);
    color: var(--text-muted);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--status-warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--status-error);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--status-info);
}

.badge-default {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ---- Stat Cards ---- */
.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius);
    padding: 20px 24px;
}

.stat-card .stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.stat-card .stat-sub {
    font-size: 13px;
    color: var(--text-dimmed);
    margin-top: 4px;
}

/* ---- Section Helpers ---- */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 48px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.section-heading {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
}

/* ---- Footer ---- */
.edison-footer {
    padding: 32px 48px;
    border-top: 1px solid var(--border-primary);
    text-align: center;
    color: var(--text-dimmed);
    font-size: 13px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .edison-nav {
        padding: 12px 20px;
    }

    .section {
        padding: 48px 20px;
    }

    .nav-links {
        gap: 16px;
    }

    .section-heading {
        font-size: 28px;
    }
}

/* ============================================================
   T003 - Outbound Call Center Manager Panel Components
   ============================================================ */

/* ---- Tab Navigation ---- */
.tab-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    padding: 0 48px;
}

.tab-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.tab-nav-item:hover {
    color: var(--text-secondary);
}

.tab-nav-item.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-primary);
}

/* ---- Modal Dialog ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    transform: translateY(16px);
    transition: transform 0.25s;
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
}

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

.modal-content {
    overflow-y: auto;
    flex: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-primary);
    flex-shrink: 0;
}

/* ---- Form Elements (Extended) ---- */
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-muted);
}

.form-input::placeholder {
    color: var(--text-dimmed);
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    padding-right: 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-muted);
}

.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-muted);
}

.form-textarea::placeholder {
    color: var(--text-dimmed);
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row > * {
    flex: 1;
}

.form-hint {
    font-size: 12px;
    color: var(--text-dimmed);
    margin-top: 4px;
}

.form-error .form-input,
.form-error .form-select,
.form-error .form-textarea {
    border-color: var(--status-error);
}

.form-error .form-hint {
    color: var(--status-error);
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #000;
}

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

.page-info {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 8px;
}

/* ---- Filter Bar ---- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    border-color: var(--border-secondary);
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--accent-primary-muted);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.filter-chip .filter-count {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dimmed);
}

.filter-chip.active .filter-count {
    color: var(--accent-primary);
}

/* ---- Progress Bar ---- */
.progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-primary-hover) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-label {
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ---- Action Buttons ---- */
.actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--status-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: var(--status-error);
}

.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--status-success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: var(--status-success);
}

/* ---- Empty State ---- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 360px;
    line-height: 1.6;
}

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-left: 4px solid var(--text-muted);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    font-size: 14px;
    color: var(--text-primary);
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease forwards;
}

.toast-success {
    border-left-color: var(--status-success);
}

.toast-error {
    border-left-color: var(--status-error);
}

.toast-info {
    border-left-color: var(--status-info);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---- Upload Area ---- */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-secondary);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.upload-area:hover {
    border-color: var(--text-muted);
}

.upload-area.dragover {
    border-color: var(--accent-primary);
    background: var(--accent-primary-muted);
    color: var(--accent-primary);
}

.upload-result {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* ---- Sub-tabs (Campaign Detail) ---- */
.sub-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border-bottom: 1px solid var(--border-primary);
}

.sub-tab {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.sub-tab:hover {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.sub-tab.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-bottom-color: var(--accent-primary);
}

/* ---- Rich Text Editor ---- */
.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.rte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

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

.rte-btn.active {
    background: var(--accent-primary-muted);
    color: var(--accent-primary);
}

.rte-content {
    min-height: 200px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.7;
    outline: none;
}

.rte-content:focus {
    border-color: var(--accent-primary);
}

/* ---- Campaign Detail Header ---- */
.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
}

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    font-family: var(--font-sans);
}

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

.detail-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.detail-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---- Responsive: Outbound Manager Components ---- */
@media (max-width: 900px) {
    .tab-nav {
        padding: 0 24px;
        overflow-x: auto;
    }

    .tab-nav-item {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .modal {
        max-width: calc(100% - 32px);
        margin: 16px;
    }

    .detail-header {
        flex-wrap: wrap;
    }

    .detail-status {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .tab-nav {
        padding: 0 16px;
    }

    .tab-nav-item {
        padding: 8px 12px;
        font-size: 12px;
    }

    .modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    .filter-bar {
        gap: 6px;
    }

    .filter-chip {
        padding: 5px 10px;
        font-size: 12px;
    }

    .actions-row {
        flex-wrap: wrap;
    }

    .detail-header {
        padding: 16px 0;
    }

    .detail-title {
        font-size: 20px;
    }

    .empty-state {
        padding: 40px 16px;
    }

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

    .toast {
        width: 100%;
    }

    .upload-area {
        padding: 24px 16px;
    }

    .pagination {
        gap: 4px;
    }

    .page-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* ============================================================
   Theme Toggle
   ============================================================ */
#theme-toggle {
    font-size: 18px;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

#theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
