:root {
    --bg-dark: #0b0c10;
    --dot: rgba(255, 255, 255, 0.08);
    --card: #ffffff;
    --card-soft: #f8fafc;
    --border: #e5e7eb;
    --text: #0f172a;
    --muted: #6b7280;
    --blue: #2563eb;
    --blue-soft: #eff6ff;
    --red: #ef4444;
    --red-soft: #fef2f2;
    --amber: #f59e0b;
    --amber-soft: #fffbeb;
    --green: #22c55e;
    --purple: #8b5cf6;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: var(--text);
    min-height: 100vh;
    background-color: var(--bg-dark);
    background-image: radial-gradient(var(--dot) 1px, transparent 1px);
    background-size: 14px 14px;
    padding: 24px 32px 64px;
}

.icon { width: 16px; height: 16px; vertical-align: -2px; }

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #e5e7eb;
    margin-bottom: 16px;
}

.toolbar-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.toolbar-brand .icon { width: 18px; height: 18px; }

.view-switcher { display: flex; gap: 6px; background: rgba(255,255,255,0.08); border-radius: 8px; padding: 4px; }

.switch-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 28px; border: 0; border-radius: 6px;
    background: transparent; color: #9ca3af; cursor: pointer;
}
.switch-btn.active { background: #ffffff; color: #111827; }
.switch-btn:hover { color: #f9fafb; }
.switch-btn.active:hover { color: #111827; }

.view.hidden { display: none; }

.wb-card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    overflow: hidden;
}

.wb-card-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    padding: 18px 20px 10px;
}

.wb-card-header h1 { margin: 0; font-size: 18px; }
.wb-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.btn {
    border: 1px solid var(--border);
    background: #fff; color: var(--text);
    padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 12px;
}
.btn:hover { background: #f9fafb; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #f3f4f6; }
.btn-sm { padding: 4px 8px; }

/* -------- List View -------- */

.table-wrapper { padding: 0 20px 20px; overflow-x: auto; }

.task-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.task-table th {
    text-align: left; font-size: 11px; letter-spacing: 0.04em; color: var(--muted);
    padding: 10px 12px; background: #f8fafc; border-bottom: 1px solid var(--border);
}
.task-table td { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.task-table tbody tr.task-row:hover { background: #f8fafc; cursor: pointer; }

.col-task { width: 46%; }
.col-assignees { width: 14%; }
.col-priority { width: 12%; }
.col-due { width: 14%; }
.col-status { width: 14%; }

.section-header-row td {
    background: #ffffff; padding: 10px 12px 4px; border-bottom: 1px solid transparent;
}

.section-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
    padding: 4px 8px; cursor: pointer; font-size: 12px; font-weight: 600;
}
.section-toggle:hover { background: #f1f5f9; }

.badge-count {
    display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 999px;
    background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 600; text-align: center;
}

.cell-main { display: flex; align-items: center; gap: 8px; }

.checkbox {
    width: 14px; height: 14px; accent-color: var(--blue); cursor: pointer;
}

.avatar-stack { display: inline-flex; }

.avatar {
    width: 22px; height: 22px; border-radius: 50%;
    color: #fff; font-size: 10px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid #fff; margin-left: -6px;
}
.avatar:first-child { margin-left: 0; }
.avatar-more { background: #e5e7eb; color: #374151; }

.priority-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
}
.priority-low { color: var(--blue); background: var(--blue-soft); }
.priority-medium { color: var(--amber); background: var(--amber-soft); }
.priority-high { color: var(--red); background: var(--red-soft); }

.due-text { font-size: 12px; color: #374151; white-space: nowrap; }
.due-overdue { color: var(--red); font-weight: 600; }
.overdue-label { color: var(--red); font-weight: 600; margin-left: 6px; font-size: 11px; }

.status-pill {
    display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 999px;
    background: #eef2ff; color: #3730a3; white-space: nowrap;
}

/* -------- Kanban -------- */

.kanban-board {
    background: #f3f4f6; padding: 16px; min-height: 520px;
    display: block; overflow: auto;
}

.kanban-columns {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px; align-items: start;
}

.kanban-column {
    background: #e9edf3; border-radius: 10px; min-width: 0; width: auto;
    padding: 10px; flex-shrink: 0;
    display: flex; flex-direction: column;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    min-height: 150px;
}

.column-header {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; font-weight: 600; margin-bottom: 8px;
}
.column-header .title { display: inline-flex; align-items: center; gap: 6px; }
.column-header .section-actions { align-items: center; }
.add-task-btn {
    border: 0; background: transparent; font-size: 16px; line-height: 1;
    cursor: pointer; color: #374151; border-radius: 4px; width: 22px; height: 22px;
}
.add-task-btn:hover { background: rgba(255,255,255,0.7); }

.card-list {
    display: flex; flex-direction: column; gap: 8px; min-height: 80px;
    max-height: 430px; overflow-y: auto; padding-right: 3px;
    transition: background .15s ease, box-shadow .15s ease;
}
.card-list.drag-over {
    background: rgba(37, 99, 235, .08); border-radius: 8px;
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .24);
}
.drag-placeholder {
    min-height: 64px; border: 2px dashed #60a5fa; border-radius: 8px;
    background: rgba(219, 234, 254, .65); flex-shrink: 0;
}

.task-card {
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    padding: 10px 12px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.task-card.dragging { outline: 2px solid var(--blue); outline-offset: -2px; opacity: 0.9; }
.task-card.dragging { opacity: .35; transform: rotate(1deg); }
.task-card.done { opacity: 0.55; }
.card-actions { display: inline-flex; align-items: center; gap: 2px; }
.card-edit-btn {
    border: 0; background: transparent; cursor: pointer; color: #94a3b8;
    border-radius: 4px; line-height: 1; padding: 3px;
}
.card-edit-btn:hover { background: #eef2f7; color: #334155; }

.tag-chip {
    display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px;
    border-radius: 999px; margin-bottom: 6px;
}
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-blue { background: var(--blue-soft); color: var(--blue); }
.tag-purple { background: #f3e8ff; color: var(--purple); }

.card-title { font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.card-desc {
    font-size: 11px; color: var(--muted); margin: 0 0 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-footer {
    display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted);
}
.card-footer .meta { display: inline-flex; align-items: center; gap: 4px; }

.progress {
    flex: 1; height: 4px; background: #e5e7eb; border-radius: 999px; overflow: hidden;
}
.progress-bar { height: 100%; background: var(--blue); }

.drop-hint {
    font-size: 11px; color: #9ca3af; text-align: center; padding: 24px 8px;
    border: 1px dashed #d1d5db; border-radius: 8px;
}

.add-column-btn {
    border: 1px dashed #d1d5db; background: transparent; color: #6b7280;
    border-radius: 10px; padding: 12px 14px; margin-top: 12px;
    cursor: pointer; font-size: 13px;
    white-space: nowrap; flex-shrink: 0;
}
.add-column-btn:hover { background: rgba(255,255,255,0.6); }

/* -------- Task Panel -------- */

.overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    display: flex; align-items: stretch; justify-content: flex-end;
    z-index: 40;
}
.overlay.hidden { display: none; }

.panel {
    width: 420px; background: #fff; height: 100%; overflow-y: auto;
    box-shadow: -8px 0 24px rgba(0,0,0,0.2);
    display: flex; flex-direction: column;
}

.panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font-size: 15px; }

.panel-body { padding: 16px; font-size: 13px; }
.panel-body label { display: block; font-size: 11px; color: var(--muted); margin: 12px 0 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.panel-body input[type="text"], .panel-body textarea, .panel-body select, .panel-body input[type="date"] {
    width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
}
.panel-body textarea { resize: vertical; min-height: 80px; }

.subtask-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid #f1f5f9;
}
.subtask-item .checkbox { flex-shrink: 0; margin-top: 2px; }
.subtask-main { flex: 1; min-width: 0; }
.subtask-title { font-size: 13px; font-weight: 650; cursor: pointer; }
.subtask-title:hover { color: var(--blue); }
.subtask-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.subtask-actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.subtask-edit-btn, .subtask-delete-btn {
    border: 1px solid var(--border); background: #fff; border-radius: 8px;
    padding: 4px 8px; font-size: 11px; cursor: pointer;
}
.subtask-edit-btn:hover, .subtask-delete-btn:hover { background: #f1f5f9; }
.subtask-delete-btn { color: var(--red); }
.subtask-desc { font-size: 12px; color: #475569; margin-top: 3px; line-height: 1.5; }
.subtask-meta { display: flex; align-items: center; gap: 10px; margin-top: 5px; font-size: 11px; color: var(--muted); }
.subtask-assignee { display: inline-flex; align-items: center; gap: 5px; }

.subtask-editor {
    margin-top: 10px; padding: 10px; border: 1px solid #bfdbfe;
    border-radius: 10px; background: #f8fbff;
    margin-top: 10px; padding: 10px; border: 1px solid #bfdbfe;
    border-radius: 10px; background: #f8fbff;
}
.subtask-editor-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: #1e293b; }
}
.subtask-editor input, .subtask-editor textarea, .subtask-editor select {
    width: 100%; border: 1px solid var(--border); border-radius: 10px;
    padding: 10px; font-size: 13px; background: #fff;
}
.subtask-editor textarea { min-height: 90px; }
.subtask-editor-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.subtask-editor-grid label { margin-top: 0; }

.assignee-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.assignee-chip {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid var(--border); background: #f8fafc; color: var(--text);
    border-radius: 999px; padding: 5px 8px 5px 5px; font-size: 13px; cursor: pointer;
}
.assignee-chip:hover { background: #f1f5f9; }
.remove-chip { color: var(--muted); font-size: 15px; line-height: 1; }

.mention-search { position: relative; }
.mention-search input {
    width: 100%; border: 1px solid var(--border); border-radius: 12px;
    padding: 11px 12px; font-size: 14px;
}
.assignee-results {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto;
}
.assignee-result {
    display: flex; align-items: center; gap: 10px; width: 100%;
    border: 0; background: transparent; padding: 10px 12px; text-align: left;
    cursor: pointer; font-size: 13px;
}
.assignee-result:hover { background: #f1f5f9; }
.assignee-result .result-name { display: block; font-weight: 600; }
.assignee-result .result-email { display: block; color: var(--muted); font-size: 11px; }
.assignee-result.assigned { background: #f8fafc; cursor: default; opacity: .7; }
.assignee-result .result-state { display: inline-block; margin-left: 8px; font-size: 10px; color: var(--blue); font-weight: 700; }

.description-section .v-desc { font-size: 15px; line-height: 1.75; }
.description-section textarea { min-height: 180px; font-size: 15px; line-height: 1.75; }
.description-section { min-height: 240px; }

.comment-item { padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.comment-meta { font-size: 11px; color: var(--muted); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }

.assignee-pill { display: inline-flex; align-items: center; gap: 6px; margin: 2px 4px 2px 0; font-size: 12px; }

.footer-actions { display: flex; gap: 8px; margin-top: 16px; }

/* -------- Auth -------- */

.auth-screen {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.auth-screen.hidden { display: none; }

.auth-card {
    width: 400px; background: #ffffff; border-radius: 14px;
    padding: 28px; box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.auth-brand {
    display: flex; align-items: center; gap: 8px;
    color: var(--blue); font-weight: 700; margin-bottom: 16px;
}

.auth-card h1 { margin: 0 0 4px; font-size: 22px; }
.auth-sub { margin: 0 0 16px; color: var(--muted); font-size: 13px; }

.auth-qr-message {
    display: grid; gap: 6px; padding: 14px; border: 1px solid #bfdbfe;
    border-radius: 10px; background: #eff6ff; color: #1e3a8a; font-size: 13px;
}
.erp-auth-qr {
    width: min(280px, 100%); aspect-ratio: 1; justify-self: center;
    background: #fff; padding: 8px; border-radius: 8px; image-rendering: pixelated;
}

.auth-tabs { display: flex; gap: 4px; background: #f1f5f9; border-radius: 8px; padding: 4px; margin-bottom: 16px; }

.auth-tab {
    flex: 1; border: 0; background: transparent; padding: 8px;
    border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted);
}
.auth-tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

.auth-form label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.auth-form input {
    width: 100%; padding: 9px 10px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 13px;
}

.btn-primary {
    width: 100%; margin-top: 16px; padding: 9px 10px; border: 0; border-radius: 8px;
    background: var(--blue); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { background: #1d4ed8; }

.auth-error { color: var(--red); font-size: 12px; margin: 12px 0 0; }
.auth-error.hidden { display: none; }
.auth-hint { margin: 16px 0 0; font-size: 12px; color: var(--muted); }
.auth-hint code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; }

.hidden { display: none !important; }

/* -------- App layout + Sidebar -------- */

.app { display: flex; gap: 20px; align-items: stretch; }
.app.hidden { display: none; }

.sidebar {
    width: 250px; flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    display: flex; flex-direction: column;
    padding: 12px;
    position: sticky; top: 24px; align-self: flex-start;
    max-height: calc(100vh - 48px);
}

.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    color: #e5e7eb; padding: 4px 6px 10px;
}
.sidebar-brand { font-weight: 700; font-size: 13px; letter-spacing: 0.02em; }
.sidebar-header .btn { color: #e5e7eb; font-size: 16px; }
.sidebar-header .btn:hover { background: rgba(255,255,255,0.1); }

.wb-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }

.wb-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: 6px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
    color: #cbd5e1; font-size: 13px;
}
.wb-item:hover { background: rgba(255,255,255,0.08); }
.wb-item.active { background: rgba(37,99,235,0.25); color: #fff; }

.wb-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wb-actions { display: none; gap: 2px; }
.wb-item:hover .wb-actions { display: inline-flex; }

.wb-actions button {
    border: 0; background: transparent; color: #94a3b8; cursor: pointer;
    border-radius: 4px; width: 20px; height: 20px; font-size: 12px; line-height: 1;
}
.wb-actions button:hover { background: rgba(255,255,255,0.15); color: #fff; }

.sidebar-bottom {
    border-top: 1px solid rgba(255,255,255,0.08); padding-top: 10px; margin-top: 10px;
}
.sidebar-bottom .btn { color: #cbd5e1; }
.sidebar-bottom .btn:hover { background: rgba(255,255,255,0.08); }

.me-chip {
    display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px;
    color: #e5e7eb; font-size: 13px;
}
.me-chip .meta { display: flex; flex-direction: column; line-height: 1.2; }
.me-chip .meta .email { font-size: 11px; color: #94a3b8; }

.main { flex: 1; min-width: 0; }

/* -------- Small buttons & section controls -------- */

.section-actions { display: inline-flex; gap: 4px; margin-left: 6px; }

.btn-xs {
    border: 0; background: transparent; color: #9ca3af; cursor: pointer;
    border-radius: 4px; width: 18px; height: 18px; font-size: 11px; line-height: 1;
}
.btn-xs:hover { background: #e5e7eb; color: #111827; }

.assignee-picker { display: flex; flex-direction: column; gap: 4px; }
.assignee-picker label { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 0; }

.btn-danger {
    background: var(--red); border-color: var(--red); color: #fff;
}
.btn-danger:hover { background: #dc2626; }

/* -------- In-app Modal -------- */

.overlay-center { align-items: center; justify-content: center; z-index: 60; }
#modal-overlay { z-index: 100; }

.modal {
    width: min(420px, calc(100vw - 32px)); background: #ffffff; border-radius: 18px;
    padding: 24px; box-shadow: 0 24px 70px rgba(15,23,42,0.28);
    border: 1px solid rgba(148,163,184,.25);
    animation: modal-enter .16s ease-out;
}

@keyframes modal-enter {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-title { margin: 0 0 7px; font-size: 18px; letter-spacing: -.01em; }
.modal-desc { margin: 0 0 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.modal-desc.hidden { display: none; }

.modal-input {
    width: 100%; padding: 11px 12px; border: 1px solid var(--border);
    border-radius: 10px; font-size: 13px; margin: 6px 0 16px;
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.modal-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.modal-input.hidden { display: none; }

.modal-list { margin: 0 0 10px; }
.modal-list.hidden { display: none; }
.member-search-result {
    display: flex; flex-direction: column; width: 100%; padding: 8px 10px;
    border: 0; border-bottom: 1px solid var(--border); background: #fff;
    text-align: left; cursor: pointer;
}
.member-search-result:hover { background: #eff6ff; }
.member-search-result strong { font-size: 13px; color: var(--text); }
.member-search-result span { font-size: 11px; color: var(--muted); }
.modal-list .member-row {
    display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 0;
}

.modal-error { color: var(--red); font-size: 12px; margin: 0 0 8px; }
.modal-error.hidden { display: none; }

.admin-modal {
    width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
    background: #fff; border-radius: 18px; padding: 22px;
    box-shadow: 0 24px 70px rgba(15,23,42,.28);
}
.admin-modal .panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-modal .panel-header h2 { margin: 0; font-size: 18px; }
.admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.admin-form input, .admin-form select { min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.admin-form .btn { margin-top: 0; }
.admin-form #admin-submit-btn { grid-column: 2; }
.admin-form #admin-cancel-edit { grid-column: 1; }
.admin-users { display: grid; gap: 7px; }
.admin-table-head, .admin-user-row { display: grid; grid-template-columns: 1fr 80px 80px 80px; gap: 12px; align-items: center; }
.admin-table-head { color: var(--muted); font-size: 11px; text-transform: uppercase; padding: 0 10px 6px; }
.admin-user-row { border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; font-size: 13px; }
.admin-user-row strong, .admin-user-row small { display: block; }
.admin-user-row small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.admin-role-display, .admin-status-display { font-size: 13px; }
.admin-actions { display: flex; gap: 6px; justify-content: flex-end; }
.admin-edit-btn, .admin-delete-btn { padding: 5px 8px; font-size: 14px; }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions .btn { width: auto; margin: 0; }
.modal-danger .modal-title { color: var(--red); }

/* -------- Panel view/edit + card actions -------- */

.field-static {
    font-size: 13px; padding: 8px 10px; background: var(--card-soft);
    border: 1px solid var(--border); border-radius: 8px; color: var(--text);
    min-height: 34px; display: flex; align-items: center;
}
.field-static.desc { align-items: flex-start; white-space: pre-wrap; }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.card-top.no-labels { margin-bottom: -5px; }

.card-actions { display: inline-flex; gap: 2px; flex-shrink: 0; }

.card-btn { padding: 2px 5px; font-size: 10px; border-radius: 4px; }

.chip-bare { margin-bottom: 0; }

/* -------- Panel view mode -------- */

.v-line { padding: 2px 0 8px; font-size: 13px; color: var(--text); }
.v-line b { display: block; font-size: 15px; font-weight: 600; }
.v-line p { margin: 0; color: #334155; line-height: 1.5; }
.v-line .v-meta { display: inline-flex; gap: 6px; flex-wrap: wrap; }

.empty-hint { color: var(--muted); font-size: 12px; margin: 2px 0 6px; }

.card-edit-btn {
    border: 0; background: transparent; color: #94a3b8; cursor: pointer;
    border-radius: 4px; width: 20px; height: 20px; font-size: 11px; line-height: 1;
}
.card-edit-btn:hover { background: #eef2f7; color: #111827; }

.overlay.fullscreen {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}
.overlay.fullscreen .panel {
    width: 100vw;
    margin: 0;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 28px 80px rgba(0,0,0,0.55);
}
.overlay.fullscreen .panel-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    position: sticky; top: 0; z-index: 2;
}
.overlay.fullscreen .panel-body {
    padding: 20px max(28px, calc((100vw - 1080px) / 2)) 36px;
    max-width: none;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
}

.panel-view, .panel-edit { font-size: 13px; }
.view-section {
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbfdff;
}
.view-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--muted); margin-bottom: 6px; font-weight: 700;
}
.view-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px; margin-top: 10px;
}
.view-grid > div {
    padding: 8px 10px;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    background: #fff;
}
.view-labels { display: flex; gap: 6px; margin-bottom: 8px; }
.v-line b { font-size: 19px; line-height: 1.3; font-weight: 700; }
.v-desc { margin: 0; color: #334155; line-height: 1.7; white-space: pre-wrap; }
.muted { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }

.view-section input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    background: #fff;
}

.panel-edit > label,
.panel-edit .view-grid label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
    font-weight: 700;
}

.panel-edit > input,
.panel-edit > textarea,
.panel-edit .view-grid input,
.panel-edit .view-grid select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 14px;
    background: #fff;
}

.panel-edit > input { font-size: 22px; font-weight: 650; }
.panel-edit > textarea { min-height: 110px; line-height: 1.6; margin-bottom: 18px; }

@media (max-width: 1100px) {
    .kanban-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .overlay.fullscreen { padding: 0; }
    .overlay.fullscreen .panel { width: 100vw; height: 100vh; border-radius: 0; max-height: 100vh; }
    .overlay.fullscreen .panel-body { padding: 20px; }
    .view-grid { grid-template-columns: 1fr; }
    .kanban-columns { grid-template-columns: minmax(240px, 1fr); }
    .admin-form, .admin-table-head, .admin-user-row { grid-template-columns: 1fr; }
}
