/* === Theme Variables === */
:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-hover: #22253a;
    --border: #2a2d3a;
    --primary: #6c5ce7;
    --primary-hover: #7c6cf7;
    --primary-light: rgba(108,92,231,0.15);
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
    --info: #3498db;
    --text: #e1e1e6;
    --text-muted: #8b8d97;
    --radius: 8px;
    --sidebar-width: 220px;
    --header-height: 56px;
}

[data-theme="light"] {
    --bg: #f0f2f5;
    --surface: #ffffff;
    --surface-hover: #f5f5f5;
    --border: #e0e0e0;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --primary-light: rgba(108,92,231,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* === Layout: Sidebar + Main === */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar (PC) --- */

.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header h1 {
    font-size: 1.1rem;
    white-space: nowrap;
}

.sidebar-header .logo-icon {
    font-size: 1.4rem;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.88rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    color: var(--text);
    background: var(--primary-light);
}

.nav-item.active {
    color: var(--primary);
    background: var(--primary-light);
    border-left-color: var(--primary);
    font-weight: 600;
}

.nav-item .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }
.nav-item .nav-label { flex: 1; }

.sidebar-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* --- Main Content --- */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.top-bar {
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.content-area {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* === Common Components === */

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    background: var(--success);
    color: #fff;
}

.btn-logout {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    background: var(--border);
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-logout:hover { background: var(--danger); color: #fff; }

.theme-toggle {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 1rem;
    background: var(--border);
    border: none;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
    line-height: 1;
}
.theme-toggle:hover { background: var(--primary); color: #fff; }

/* --- Cards --- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.card-header .card-icon { font-size: 1.2rem; }
.card-header h3 { font-size: 1rem; margin: 0; }

.card h3 { margin-bottom: 12px; font-size: 1rem; }

/* --- Quick Action Cards (Dashboard) --- */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.quick-action-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.quick-action-card .qa-icon { font-size: 1.6rem; margin-bottom: 6px; }
.quick-action-card .qa-value { font-size: 1.8rem; font-weight: bold; color: var(--primary); }
.quick-action-card .qa-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* --- Forms --- */

.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-group .help-tip {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-style: italic;
}

input, select, textarea {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
}

textarea { resize: vertical; min-height: 80px; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* --- Buttons --- */

.btn {
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { opacity: 0.9; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: 0.9; }
.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { opacity: 0.9; }
.btn-sm { padding: 4px 12px; font-size: 0.8rem; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-group { display: flex; gap: 8px; margin-top: 12px; }

/* --- Tables --- */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th { color: var(--text-muted); font-weight: 500; }

/* Mobile card version of tables */
.mobile-cards { display: none; }

/* --- Badges --- */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.badge-posted { background: #1a3a2a; color: var(--success); }
.badge-failed { background: #3a1a1a; color: var(--danger); }
.badge-pending { background: #3a3a1a; color: var(--warning); }
.badge-generated { background: #1a2a3a; color: #3498db; }
.badge-x { background: #1a1a2a; color: #1da1f2; }
.badge-threads { background: #2a1a2a; color: #e1306c; }
.badge-bluesky { background: #1a2a3a; color: #0085ff; }
.badge-instagram { background: #3a1a2a; color: #e1306c; background: linear-gradient(135deg, rgba(131,58,180,0.2), rgba(253,29,29,0.2), rgba(252,176,69,0.2)); }
.badge-scraping { background: #1a2a3a; color: #3498db; }
.badge-analyzing { background: #2a1a3a; color: #9b59b6; }
.badge-done { background: #1a3a2a; color: var(--success); }

[data-theme="light"] .badge-posted { background: #d4edda; color: #155724; }
[data-theme="light"] .badge-failed { background: #f8d7da; color: #721c24; }
[data-theme="light"] .badge-pending { background: #fff3cd; color: #856404; }
[data-theme="light"] .badge-generated { background: #d1ecf1; color: #0c5460; }
[data-theme="light"] .badge-x { background: #d1ecf1; color: #1a73b0; }
[data-theme="light"] .badge-threads { background: #f8d7da; color: #c42055; }
[data-theme="light"] .badge-bluesky { background: #d1ecf1; color: #0065cc; }
[data-theme="light"] .badge-done { background: #d4edda; color: #155724; }
[data-theme="light"] .badge-scraping { background: #d1ecf1; color: #0c5460; }
[data-theme="light"] .badge-analyzing { background: #e8d5f5; color: #6a359c; }

/* --- Preview / Grid --- */

.preview-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
    min-height: 60px;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* --- Toggle --- */

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle .slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: 0.2s;
}

.toggle .slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.toggle input:checked + .slider { background: var(--primary); }
.toggle input:checked + .slider::before { transform: translateX(20px); }

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* --- Panel Visibility --- */

.panel { display: none; }
.panel.active { display: block; }

/* === Login Page === */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-title { font-size: 1.5rem; text-align: center; margin-bottom: 8px; }
.login-subtitle { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

.login-error {
    background: #3a1a1a;
    color: var(--danger);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: center;
}

/* === Modal === */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal h3 { margin-bottom: 16px; font-size: 1.1rem; }

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

/* === Stats / Charts === */

.stat-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-card .stat-value { font-size: 2rem; font-weight: bold; color: var(--primary); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

.bar-chart { display: flex; flex-direction: column; gap: 8px; }

.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { width: 100px; font-size: 0.8rem; text-align: right; color: var(--text-muted); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 24px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width 0.3s; min-width: 2px; }
.bar-value { width: 40px; font-size: 0.8rem; color: var(--text-muted); }

.pie-chart { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto; }
.pie-legend { display: flex; justify-content: center; gap: 16px; margin-top: 12px; font-size: 0.8rem; }
.pie-legend-item { display: flex; align-items: center; gap: 6px; }
.pie-legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* === Calendar === */

.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.calendar-header h3 { margin-bottom: 0; }
.calendar-nav { display: flex; gap: 8px; align-items: center; }

.calendar-nav button {
    padding: 4px 12px;
    background: var(--border);
    border: none;
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
}
.calendar-nav button:hover { background: var(--primary); color: #fff; }

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-dow { text-align: center; font-size: 0.75rem; color: var(--text-muted); padding: 8px 0; font-weight: 500; }

.calendar-day {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px;
    min-height: 60px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s;
}
.calendar-day:hover { border-color: var(--primary); }
.calendar-day.empty { background: transparent; border-color: transparent; cursor: default; }
.calendar-day .day-num { color: var(--text-muted); margin-bottom: 4px; }
.calendar-day.today .day-num { color: var(--primary); font-weight: bold; }
.calendar-day .day-dots { display: flex; gap: 3px; flex-wrap: wrap; }
.calendar-day .day-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.calendar-day .day-count { font-size: 0.7rem; color: var(--primary); margin-top: 2px; }

/* === Template Cards === */

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.template-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.template-card:hover { border-color: var(--primary); }
.template-card .template-name { font-weight: bold; margin-bottom: 6px; font-size: 0.9rem; }
.template-card .template-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* === Bulk Post Checkboxes === */

.checkbox-group { display: flex; flex-direction: column; gap: 8px; }
.checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.checkbox-item input[type="checkbox"] { width: auto; cursor: pointer; }

/* === Image Upload Area === */

.image-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.image-upload-area:hover, .image-upload-area.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}

.image-upload-area .upload-icon { font-size: 2rem; margin-bottom: 8px; }
.image-upload-area .upload-text { font-size: 0.85rem; color: var(--text-muted); }
.image-upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.image-preview {
    margin-top: 12px;
    position: relative;
    display: inline-block;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.image-preview .remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Research === */

.research-input-row { display: flex; gap: 12px; align-items: flex-end; }
.research-input-row .form-group { flex: 1; margin-bottom: 0; }
.research-input-row select { max-width: 160px; }

.analysis-section { margin-top: 16px; }

.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }

.analysis-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

.analysis-item .analysis-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.analysis-item .analysis-value { font-size: 0.9rem; line-height: 1.5; white-space: pre-wrap; }
.analysis-full { grid-column: 1 / -1; }

.themes-list { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-tag { display: inline-block; padding: 3px 10px; background: var(--primary); color: #fff; border-radius: 12px; font-size: 0.8rem; }

.scraped-post-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
}
.scraped-post-content { font-size: 0.9rem; margin-bottom: 8px; white-space: pre-wrap; line-height: 1.5; }
.scraped-post-metrics { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-muted); }

.apply-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
}

.apply-preview-row {
    display: grid;
    grid-template-columns: 80px 1fr 30px 1fr;
    gap: 8px;
    align-items: start;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.apply-preview-label { color: var(--text-muted); font-weight: 500; }
.apply-preview-arrow { text-align: center; color: var(--primary); font-weight: bold; }
.apply-preview-old { color: var(--text-muted); text-decoration: line-through; }
.apply-preview-new { color: var(--success); }

/* === Help === */

.help-text { font-size: 0.9rem; line-height: 1.7; color: var(--text); }
.help-text p { margin-bottom: 8px; }
.help-steps { display: flex; flex-direction: column; gap: 16px; }

.help-step { display: flex; gap: 16px; align-items: flex-start; }
.help-step-num { width: 36px; height: 36px; min-width: 36px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1rem; }
.help-step-body { flex: 1; }
.help-step-body strong { display: block; margin-bottom: 4px; font-size: 0.95rem; }
.help-step-body p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

.help-section { display: flex; flex-direction: column; gap: 16px; }
.help-feature h4 { font-size: 0.95rem; color: var(--primary); margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }

.help-feature ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.help-feature li { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; padding-left: 16px; position: relative; }
.help-feature li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.help-feature li strong { color: var(--text); }

.help-faq { display: flex; flex-direction: column; gap: 2px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--bg); cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: background 0.2s; user-select: none; }
.faq-q:hover { background: var(--border); }
.faq-toggle { font-size: 1.2rem; color: var(--text-muted); transition: transform 0.2s; min-width: 20px; text-align: center; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 16px; font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }
.faq-item.open .faq-a { max-height: 500px; padding: 14px 16px; }
.faq-a p { margin-bottom: 8px; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.faq-a li { padding-left: 16px; position: relative; }
.faq-a li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.faq-a li strong { color: var(--text); }
.faq-a code { background: var(--bg); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; font-size: 0.82rem; font-family: 'Courier New', monospace; }

/* === Notification Settings === */

.notif-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-card .notif-info { display: flex; align-items: center; gap: 12px; }
.notif-card .notif-type { font-weight: 600; font-size: 0.9rem; }
.notif-card .notif-detail { font-size: 0.8rem; color: var(--text-muted); }
.notif-card .notif-actions { display: flex; align-items: center; gap: 8px; }

/* === Bottom Navigation (Mobile) === */

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 100;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bottom-nav-inner {
    display: flex;
    min-width: max-content;
}

.bottom-nav-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 14px;
    font-size: 0.68rem;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    transition: color 0.15s;
    gap: 2px;
}

.bottom-nav-item .bnav-icon { font-size: 1.2rem; }
.bottom-nav-item.active { color: var(--primary); }

/* === Responsive === */

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding-bottom: 70px; }
    .bottom-nav { display: block; }
    .content-area { padding: 16px; }

    .grid-2, .grid-3, .stat-cards, .quick-actions { grid-template-columns: 1fr; }
    .analysis-grid { grid-template-columns: 1fr; }
    .apply-preview-row { grid-template-columns: 1fr; gap: 4px; }
    .apply-preview-arrow { display: none; }
    .research-input-row { flex-direction: column; }
    .help-step { flex-direction: column; align-items: center; text-align: center; }
    .template-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

    /* Hide desktop table, show mobile cards */
    .responsive-table table { display: none; }
    .responsive-table .mobile-cards { display: block; }

    .mobile-card {
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 12px;
        margin-bottom: 8px;
    }

    .mobile-card .mc-row {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        font-size: 0.85rem;
    }

    .mobile-card .mc-label { color: var(--text-muted); }
    .mobile-card .mc-actions { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

    .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .quick-actions { grid-template-columns: 1fr 1fr; }
    .template-grid { grid-template-columns: 1fr 1fr; }
}
