/* ─────────────────────────────────────────────────────────────────────────
   Marketing Hub – App Styles
   ───────────────────────────────────────────────────────────────────────── */

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

:root {
    --bg:         #f1f5f9;
    --surface:    #ffffff;
    --border:     #e2e8f0;
    --sidebar-bg: #0f172a;
    --sidebar-w:  220px;
    --accent:     #6366f1;
    --accent-h:   #4f46e5;
    --success:    #10b981;
    --danger:     #ef4444;
    --text:       #1e293b;
    --muted:      #64748b;
    --radius:     8px;
    --shadow:     0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── App Shell ───────────────────────────────────────────────────────────── */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-icon { font-size: 22px; }
.brand-name { color: #fff; font-weight: 700; font-size: 15px; }

.sidebar-nav { padding: 12px 8px; flex: 1; }

.nav-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.3);
    padding: 14px 10px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 6px;
    color: rgba(255,255,255,.65);
    font-size: 13.5px;
    font-weight: 500;
    transition: all .15s;
    text-decoration: none;
    margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-icon { width: 18px; text-align: center; font-size: 15px; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    border-top: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
}
.user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: rgba(255,255,255,.4); font-size: 11px; text-transform: capitalize; }
.logout-btn {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,.4); font-size: 16px;
    padding: 4px; border-radius: 4px; transition: color .15s;
}
.logout-btn:hover { color: #fff; }

/* ── Main Content ────────────────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 28px 32px;
    max-width: 1100px;
}

/* ── Page Header ─────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-subtitle { color: var(--muted); font-size: 14px; margin-top: 2px; }
.header-actions { display: flex; gap: 8px; flex-shrink: 0; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb span:last-child { color: var(--text); font-weight: 600; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); color: #fff; }

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

.btn-danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }

.btn-sm  { padding: 6px 12px; font-size: 12.5px; }
.btn-xs  { padding: 4px 8px; font-size: 12px; border-radius: 5px; }
.btn-full { width: 100%; }

/* ── Flash Messages ──────────────────────────────────────────────────────── */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}
.flash-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Stats Row ───────────────────────────────────────────────────────────── */
.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    flex: 1;
    box-shadow: var(--shadow);
}
.stat-value { font-size: 32px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Section Title ───────────────────────────────────────────────────────── */
.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
}

/* ── Project Grid ────────────────────────────────────────────────────────── */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.project-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.1); text-decoration: none; }
.project-card-stripe { height: 4px; }
.project-card-body { padding: 16px; }
.project-card-body h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.project-desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.4; }
.project-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.meta-muted { color: #94a3b8; }

/* ── Asset List (recent) ─────────────────────────────────────────────────── */
.asset-list { display: flex; flex-direction: column; gap: 4px; }
.asset-list-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    text-decoration: none; color: inherit;
    transition: background .15s;
}
.asset-list-item:hover { background: #f8fafc; text-decoration: none; }
.asset-type-badge { font-size: 18px; width: 28px; text-align: center; }
.asset-list-info { flex: 1; min-width: 0; }
.asset-list-title { font-weight: 600; font-size: 14px; }
.asset-list-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.asset-list-time { font-size: 12px; color: #94a3b8; flex-shrink: 0; }

/* ── Project Hero ────────────────────────────────────────────────────────── */
.project-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.project-hero h1 { font-size: 20px; margin-bottom: 6px; }
.project-hero p { color: var(--muted); font-size: 14px; }

/* ── Channel Tabs ────────────────────────────────────────────────────────── */
.channel-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.channel-tab {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.channel-tab:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.channel-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.channel-desc-banner {
    background: #eef2ff; border: 1px solid #c7d2fe;
    border-radius: var(--radius); padding: 10px 14px;
    font-size: 13px; color: #3730a3; margin-bottom: 16px;
    font-style: italic;
}

/* ── Asset Grid (project view) ───────────────────────────────────────────── */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.asset-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none; color: inherit;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
    display: block;
}
.asset-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.1); text-decoration: none; }
.asset-card-preview {
    height: 130px;
    background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
    font-size: 42px;
    overflow: hidden;
}
.asset-card-preview.has-image img { width: 100%; height: 100%; object-fit: cover; }
.asset-type-icon { opacity: .4; }
.asset-card-body { padding: 12px; }
.asset-card-body h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 5px; }
.asset-card-meta { display: flex; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.asset-copy-preview { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ── Asset Detail ────────────────────────────────────────────────────────── */
.asset-detail { display: flex; flex-direction: column; gap: 16px; }
.asset-detail-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex; gap: 14px; align-items: flex-start;
    box-shadow: var(--shadow);
}
.asset-detail-type { font-size: 32px; }
.asset-detail-header h1 { font-size: 20px; margin-bottom: 4px; }
.asset-detail-meta { font-size: 13px; color: var(--muted); }

.detail-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.detail-block h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.detail-block-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.detail-block-header h3 { margin-bottom: 0; }

.copytext-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
}
.notes-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 13px;
    color: #92400e;
}
#copy-btn.copied { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }

/* ── File Grid ───────────────────────────────────────────────────────────── */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.file-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex; flex-direction: column;
}
.file-preview { height: 130px; overflow: hidden; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.file-preview img, .file-preview video { width: 100%; height: 100%; object-fit: cover; }
.file-preview-video { background: #0f172a; }
.file-preview-generic { font-size: 14px; font-weight: 800; color: #94a3b8; }
.file-ext { font-size: 20px; color: #94a3b8; font-weight: 800; letter-spacing: 1px; }
.file-info { padding: 8px 10px; flex: 1; }
.file-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 11px; color: var(--muted); margin-top: 2px; }
.file-card .btn { border-radius: 0; border-top: 1px solid var(--border); }

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-body { background: var(--bg); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-wrap { width: 100%; max-width: 380px; padding: 20px; }
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 36px 32px;
    box-shadow: 0 4px 32px rgba(0,0,0,.1);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-icon { font-size: 44px; display: block; margin-bottom: 10px; }
.login-logo h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.login-logo p { color: var(--muted); font-size: 14px; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}
.label-hint { font-weight: 400; color: var(--muted); }
.field input[type=text],
.field input[type=email],
.field input[type=password],
.field select,
.field textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.field textarea { resize: vertical; min-height: 80px; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--border); }
.login-form .form-actions { border-top: none; padding-top: 8px; }

/* Color Picker */
.color-picker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.color-option { cursor: pointer; }
.color-option input { display: none; }
.color-option span {
    display: block; width: 28px; height: 28px;
    border-radius: 50%; border: 2px solid transparent;
    transition: transform .15s;
}
.color-option input:checked + span { border-color: var(--text); transform: scale(1.15); }
.color-option:hover span { transform: scale(1.1); }

/* Checkboxes */
.checkbox-list {
    display: flex; flex-direction: column; gap: 6px;
    max-height: 200px; overflow-y: auto;
    border: 1px solid var(--border); border-radius: 6px;
    padding: 8px 10px;
    background: #fafafa;
}
.checkbox-item {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; font-size: 13px;
}
.checkbox-item input[type=checkbox] { width: 14px; height: 14px; cursor: pointer; flex-shrink: 0; }
.checkbox-item em { color: var(--muted); font-style: normal; font-size: 12px; }

/* Radio Group */
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-item {
    display: flex; align-items: center; gap: 6px;
    background: #f8fafc; border: 1px solid var(--border);
    padding: 6px 12px; border-radius: 6px; cursor: pointer;
    font-size: 13px; transition: all .15s;
}
.radio-item input[type=radio] { display: none; }
.radio-item:has(input:checked) { background: #eef2ff; border-color: var(--accent); color: var(--accent); font-weight: 600; }
.role-hints { margin-top: 10px; background: #f8fafc; border-radius: 6px; padding: 10px 12px; }
.role-hints p { font-size: 12px; color: var(--muted); margin-bottom: 3px; }

/* Upload Zone */
.upload-zone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: border-color .15s, background .15s;
    cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: #eef2ff; }
.upload-zone input[type=file] {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}
.upload-zone-inner { padding: 28px 20px; pointer-events: none; }
.upload-icon { font-size: 36px; display: block; margin-bottom: 8px; }
.upload-zone-inner p { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.upload-hint { font-size: 12px; color: #94a3b8; }

#file-preview-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.file-preview-item {
    display: flex; align-items: center; gap: 8px;
    background: #f8fafc; border: 1px solid var(--border);
    border-radius: 6px; padding: 6px 10px; font-size: 13px;
}
.file-preview-item .file-size { margin-left: auto; color: var(--muted); font-size: 12px; }
.file-preview-item .remove-file { cursor: pointer; color: var(--danger); font-size: 16px; line-height: 1; }

.existing-files { display: flex; flex-direction: column; gap: 4px; }
.existing-file {
    display: flex; align-items: center; justify-content: space-between;
    background: #f8fafc; border: 1px solid var(--border);
    border-radius: 6px; padding: 6px 10px; font-size: 13px;
}
.existing-file em { color: var(--muted); }

/* ── Admin Layout ────────────────────────────────────────────────────────── */
.admin-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 20px;
    align-items: start;
}
.admin-form-card, .admin-list-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.admin-form-card h2, .admin-list-card h2 {
    font-size: 15px; font-weight: 700;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* Item List */
.item-list { display: flex; flex-direction: column; gap: 2px; }
.item-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 8px; border-radius: 6px;
    transition: background .1s;
}
.item-row:hover { background: #f8fafc; }
.item-inactive { opacity: .5; }
.item-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.item-info { flex: 1; min-width: 0; }
.item-title { font-size: 13.5px; font-weight: 600; }
.item-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.item-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* List Group */
.list-group { margin-bottom: 12px; }
.list-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 8px 8px 4px; }

/* User Avatar Small */
.user-avatar-sm {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* Data Table */
.data-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th {
    text-align: left; padding: 8px 10px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: var(--muted);
    border-bottom: 1px solid var(--border);
}
.data-table td { padding: 10px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }
.table-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Badges */
.badge { display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.badge-green { background: #ecfdf5; color: #065f46; }
.badge-grey  { background: #f1f5f9; color: var(--muted); }

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 17px; margin-bottom: 8px; color: var(--text); }
.empty-state p { font-size: 14px; margin-bottom: 16px; }
.empty-state-sm { text-align: center; padding: 24px; color: var(--muted); font-size: 13px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    :root { --sidebar-w: 60px; }
    .brand-name, .nav-section, .sidebar-user .user-info, .sidebar-user .logout-btn { display: none; }
    .nav-item { justify-content: center; padding: 10px; }
    .nav-icon { width: auto; font-size: 18px; }
    .main-content { padding: 20px 16px; }
    .admin-layout { grid-template-columns: 1fr; }
    .form-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .project-grid, .asset-grid { grid-template-columns: 1fr; }
    .stats-row { flex-direction: column; }
    .file-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Board ───────────────────────────────────────────────────────────────── */
.board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    align-items: start;
}

.board-col {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.board-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}
.board-col-icon  { font-size: 18px; }
.board-col-title { font-size: 14px; font-weight: 700; flex: 1; }
.board-col-count {
    background: #e2e8f0; color: var(--muted);
    font-size: 11px; font-weight: 700;
    padding: 2px 7px; border-radius: 10px;
}

.board-cards { padding: 10px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.board-empty { text-align: center; color: #94a3b8; font-size: 13px; padding: 24px 10px; }

/* ── Board Card ──────────────────────────────────────────────────────────── */
.board-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 7px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: box-shadow .15s;
}
.board-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.1); }

.board-card-preview {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #f1f5f9;
}
.board-card-preview img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.preview-more {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(0,0,0,.55); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 2px 7px; border-radius: 10px;
}

.board-card-body { padding: 10px 12px; }
.board-card-title { font-size: 13px; font-weight: 700; margin-bottom: 7px; }

.board-card-copy {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 8px 10px;
    margin-bottom: 8px;
}
.copy-preview {
    font-size: 12px; color: var(--text);
    line-height: 1.5;
    max-height: 72px;
    overflow: hidden;
    margin-bottom: 5px;
}
.copy-btn {
    background: none; border: 1px solid var(--border);
    border-radius: 4px; padding: 3px 8px;
    font-size: 11px; font-weight: 600; cursor: pointer;
    color: var(--accent); transition: all .15s;
}
.copy-btn:hover { background: #eef2ff; }
.copy-btn.copied { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }

.board-card-files { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.file-pill {
    display: flex; align-items: center; gap: 5px;
    background: #f1f5f9; border: 1px solid var(--border);
    border-radius: 5px; padding: 5px 8px;
    text-decoration: none; color: var(--text);
    font-size: 12px; transition: background .15s;
    overflow: hidden;
}
.file-pill:hover { background: #e2e8f0; text-decoration: none; color: var(--text); }
.file-pill span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-pill em { color: var(--muted); font-style: normal; white-space: nowrap; }

.board-card-meta { font-size: 11px; color: #94a3b8; }
.board-card-meta a { color: var(--muted); }

.board-upload-btn {
    margin: 8px 10px 10px;
    width: calc(100% - 20px);
    padding: 8px;
    background: none;
    border: 1.5px dashed #c7d2fe;
    border-radius: 6px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.board-upload-btn:hover { background: #eef2ff; border-color: var(--accent); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal {
    background: var(--surface);
    border-radius: 12px;
    width: 100%; max-width: 520px;
    max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 16px; font-weight: 700;
}
.modal-close {
    background: none; border: none; font-size: 18px;
    cursor: pointer; color: var(--muted); line-height: 1;
    padding: 4px; border-radius: 4px; transition: color .15s;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 8px;
}

/* ── Board Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .board { grid-template-columns: 1fr; }
}
