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

:root {
    --bg: #0f0f13;
    --surface: #1a1a22;
    --surface2: #22222e;
    --surface3: #2a2a38;
    --border: rgba(255,255,255,0.07);
    --border2: rgba(255,255,255,0.12);
    --text: #f0f0f5;
    --text-muted: #7a7a9a;
    --text-dim: #4a4a6a;
    --accent: #FF6B35;
    --accent2: #ff8c5a;
    --todo: #6B7FFF;
    --inprogress: #FFB830;
    --done: #36D18E;
    --danger: #FF4D6D;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-card: 0 2px 12px rgba(0,0,0,0.3);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.custom-background {
    background-color: #06070c;
    background-image: var(--app-bg-image);
}

body.custom-background::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6,7,12,0.46), rgba(6,7,12,0.74)),
        radial-gradient(circle at top right, rgba(255,107,53,0.18), transparent 34%);
    pointer-events: none;
    z-index: 0;
}

.noise {
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 1000; opacity: 0.4;
}

.header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px;
    background: rgba(26,26,34,0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    gap: 16px;
}

.logo {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Syne', sans-serif;
    font-weight: 800; font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.brand-logo {
    display: block;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-logo-auth {
    width: 40px;
    height: 40px;
}

.brand-logo-header {
    width: 28px;
    height: 28px;
}

.board-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem; font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-muted);
    outline: none;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    cursor: text;
    white-space: nowrap;
}
.board-title:hover, .board-title:focus {
    color: var(--text);
    background: var(--surface2);
}

.header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.board-menu-wrap { position: relative; }
.board-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; padding: 8px; border-radius: 14px; background: rgba(26,26,34,0.98); border: 1px solid var(--border2); box-shadow: var(--shadow); display: none; z-index: 40; }
.board-menu.open { display: block; }
.board-menu-item { width: 100%; border: none; background: transparent; color: var(--text); text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 0.86rem; transition: all 0.2s; }
.board-menu-item:hover { background: var(--surface2); }
.board-menu-item.danger { color: #ff9cae; }
.board-menu-item.danger:hover { background: rgba(255,77,109,0.12); color: #ffd4dc; }

/* ===== BUTTONS ===== */
.btn-primary {
    display: flex; align-items: center; gap: 7px;
    background: var(--accent);
    color: #fff;
    border: none; cursor: pointer;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem; font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,107,53,0.4); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border2);
    cursor: pointer;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem; font-weight: 500;
    transition: all 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border2); background: var(--surface2); }

/* ===== BOARD ===== */
.board {
    display: flex; gap: 20px;
    padding: 28px;
    min-height: calc(100vh - 70px);
    overflow-x: auto;
    align-items: flex-start;
}

/* ===== COLUMNS ===== */
.column {
    flex: 0 0 320px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex; flex-direction: column;
    min-height: 200px;
    transition: all 0.2s;
}

.column.drag-over {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255,107,53,0.2);
}

.column-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
}

.column-title-wrap {
    display: flex; align-items: center; gap: 8px;
}

.column-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot-todo { background: var(--todo); box-shadow: 0 0 8px var(--todo); }
.dot-inprogress { background: var(--inprogress); box-shadow: 0 0 8px var(--inprogress); }
.dot-done { background: var(--done); box-shadow: 0 0 8px var(--done); }

.column-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem; font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.column-count {
    background: var(--surface3);
    color: var(--text-muted);
    font-size: 0.75rem; font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    min-width: 22px;
    text-align: center;
}

.col-add-btn {
    background: transparent; border: none;
    color: var(--text-dim); cursor: pointer;
    padding: 5px; border-radius: 6px;
    transition: all 0.2s;
    display: flex; align-items: center;
}
.col-add-btn:hover { color: var(--text); background: var(--surface3); }

.column-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.column-action-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.column-action-btn:hover {
    color: var(--text);
    background: var(--surface3);
}

.column-action-btn-delete {
    gap: 6px;
    padding: 5px 8px;
    color: rgba(255, 77, 109, 0.88);
    background: rgba(255, 77, 109, 0.08);
}

.column-action-btn-delete span {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
}

.column-action-btn-delete:hover {
    color: var(--danger);
    background: rgba(255, 77, 109, 0.14);
}

@media (max-width: 768px) {
    .column-action-btn-delete span {
        display: none;
    }

    .column-action-btn-delete {
        padding: 5px;
        gap: 0;
    }
}

/* ===== CARDS CONTAINER ===== */
.cards-container {
    padding: 12px;
    display: flex; flex-direction: column; gap: 8px;
    min-height: 40px;
    flex: 1;
}

/* ===== CARDS ===== */
.card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 13px 14px;
    cursor: grab;
    transition: all 0.18s;
    animation: cardIn 0.25s ease forwards;
    position: relative;
    overflow: hidden;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.card::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: var(--card-accent, var(--todo));
}
.card[data-column="todo"]::before { background: var(--todo); }
.card[data-column="inprogress"]::before { background: var(--inprogress); }
.card[data-column="done"]::before { background: var(--done); }

.card:hover {
    border-color: var(--border2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.card.dragging {
    opacity: 0.4;
    cursor: grabbing;
}

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

.card-title {
    font-size: 0.9rem; font-weight: 500;
    line-height: 1.4;
    flex: 1;
}

.card-actions {
    display: flex; gap: 2px;
    opacity: 0; transition: opacity 0.15s;
    flex-shrink: 0;
}
.card:hover .card-actions { opacity: 1; }

.card-btn {
    background: transparent; border: none;
    color: var(--text-dim); cursor: pointer;
    padding: 4px; border-radius: 5px;
    transition: all 0.15s;
    display: flex; align-items: center;
}
.card-btn:hover { color: var(--text); background: var(--surface3); }
.card-btn.delete:hover { color: var(--danger); }

.card-desc {
    font-size: 0.8rem; color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-photo {
    width: 100%;
    height: 132px;
    object-fit: cover;
    border-radius: 12px;
    margin: 4px 0 10px;
    display: block;
    border: 1px solid var(--border);
}

.card-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 2px 0 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.card-checklist-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.74rem;
    color: var(--text-dim);
}

.card-checklist-items {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.card-checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text);
}

.card-checklist-item input {
    margin: 0;
    accent-color: var(--accent);
}

.card-checklist-item.is-done span {
    text-decoration: line-through;
    color: var(--text-dim);
}

.card-footer {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.7rem; font-weight: 600;
    padding: 3px 8px;
    border-radius: 100px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.priority-low { background: rgba(54,209,142,0.12); color: var(--done); }
.priority-medium { background: rgba(255,184,48,0.12); color: var(--inprogress); }
.priority-high { background: rgba(255,77,109,0.12); color: var(--danger); }

.label-badge {
    font-size: 0.7rem; font-weight: 500;
    padding: 3px 8px;
    border-radius: 100px;
    background: rgba(107,127,255,0.12);
    color: var(--todo);
    border: 1px solid rgba(107,127,255,0.2);
}

.card-photo-meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--text-dim);
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
}

.card-date {
    margin-left: auto;
    font-size: 0.68rem;
    color: var(--text-dim);
}

/* ===== ADD CARD INLINE ===== */
.add-card-inline {
    display: flex; align-items: center; gap: 7px;
    width: 100%; padding: 10px 16px;
    background: transparent; border: none;
    color: var(--text-dim); cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.83rem; font-weight: 500;
    border-top: 1px solid var(--border);
    transition: all 0.2s;
    border-radius: 0 0 var(--radius) var(--radius);
}
.add-card-inline:hover { color: var(--text); background: var(--surface2); }

/* ===== AUTH PAGE ===== */
.auth-bg { position: fixed; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255,107,53,0.12) 0%, transparent 70%); }
.auth-grid { position: fixed; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 40%, transparent 100%); }

.auth-container {
    position: relative; z-index: 10;
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 20px;
}

.auth-logo { display: flex; align-items: center; gap: 10px; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; margin-bottom: 36px; }

.auth-tabs { display: flex; background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius); padding: 4px; gap: 4px; margin-bottom: 28px; width: 100%; max-width: 400px; }
.auth-tab { flex: 1; padding: 9px; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 500; background: transparent; border: none; color: var(--text-muted); cursor: pointer; border-radius: 9px; transition: all 0.2s; }
.auth-tab.active { background: var(--surface3); color: var(--text); }

.auth-form { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.auth-note { color: var(--text-muted); font-size: 0.82rem; line-height: 1.5; }
.auth-link { color: var(--accent2); text-decoration: none; font-weight: 600; }
.auth-link:hover { color: var(--accent); }

/* ===== DASHBOARD ===== */
.dash-content { padding: 32px 28px; max-width: 1100px; margin: 0 auto; }
.dash-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.dash-title { font-family: 'Syne', sans-serif; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.dash-sub { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

.boards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.board-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: all 0.18s; position: relative; overflow: hidden; }
.board-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); opacity: 0; transition: opacity 0.2s; }
.board-card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.board-card:hover::before { opacity: 1; }

.board-card-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.board-card-role { font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.04em; display: inline-block; }
.role-owner { background: rgba(255,107,53,0.12); color: var(--accent); }
.role-editor { background: rgba(107,127,255,0.12); color: var(--todo); }
.role-viewer { background: rgba(120,120,160,0.12); color: var(--text-muted); }

.new-board-card { border: 2px dashed var(--border2); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 110px; color: var(--text-dim); transition: all 0.18s; }
.new-board-card:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,107,53,0.04); transform: translateY(-2px); }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 500;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s;
    padding: 20px;
}
.modal-overlay.active {
    opacity: 1; pointer-events: all;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    width: 100%; max-width: 460px;
    max-height: calc(100vh - 40px);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.2s;
}
.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}
.modal.modal-sm { max-width: 400px; }

.modal-confirm {
    background:
        linear-gradient(180deg, rgba(34,34,46,0.98), rgba(24,24,34,0.98)),
        var(--surface);
    border-color: rgba(255,255,255,0.12);
    box-shadow:
        0 24px 80px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.modal-prompt {
    background:
        linear-gradient(180deg, rgba(35,35,48,0.99), rgba(24,24,34,0.98)),
        var(--surface);
    border-color: rgba(255,255,255,0.12);
    box-shadow:
        0 24px 80px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem; font-weight: 700;
}

.modal-confirm-header {
    align-items: flex-start;
}

.modal-confirm-kicker {
    color: rgba(255,255,255,0.48);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}

.modal-close {
    background: transparent; border: none;
    color: var(--text-muted); cursor: pointer;
    padding: 5px; border-radius: 6px;
    transition: all 0.15s; display: flex; align-items: center;
}
.modal-close:hover { color: var(--text); background: var(--surface2); }

.modal-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    min-height: 0;
}
.modal-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-confirm-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02)),
        rgba(255,255,255,0.02);
}

.modal-confirm-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffb6c2;
    background: linear-gradient(180deg, rgba(255,77,109,0.24), rgba(255,77,109,0.12));
    border: 1px solid rgba(255,77,109,0.22);
    box-shadow: 0 8px 24px rgba(255,77,109,0.15);
}

.modal-confirm-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-confirm-text {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-confirm-subtext {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

#promptModalInput {
    min-height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
}

/* ===== FORM ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 0.8rem; font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.04em;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-help {
    font-size: 0.76rem;
    color: var(--text-dim);
}

.auth-hint {
    color: #ffb0bf;
    font-size: 0.82rem;
    line-height: 1.45;
}

.check-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer;
}

.check-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

input[type="text"], input[type="email"], input[type="password"], textarea, select {
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 10px 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    resize: none;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
}

input[type="file"] {
    background: var(--surface2);
    border: 1px dashed var(--border2);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    padding: 10px 12px;
    width: 100%;
}

.background-preview {
    position: relative;
    min-height: 180px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border2);
    background:
        linear-gradient(135deg, rgba(255,107,53,0.14), rgba(107,127,255,0.12)),
        var(--surface2);
}

.background-preview img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.background-preview-empty {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
}

.task-photo-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
}

.task-photo-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border2);
    background: var(--surface2);
}

.task-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.task-photo-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 999px;
    background: rgba(10,12,20,0.82);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* ===== TOAST ===== */
.toast {
    position: fixed; bottom: 28px; right: 28px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 12px 18px;
    font-size: 0.85rem; font-weight: 500;
    box-shadow: var(--shadow);
    z-index: 999;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.toast.success { border-left: 3px solid var(--done); }
.toast.info { border-left: 3px solid var(--todo); }
.toast.error { border-left: 3px solid var(--danger); }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.page { min-height: 100vh; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; text-transform: uppercase; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; background: var(--surface2); border: 1px solid var(--border2); border-radius: 100px; }
.members-row { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.members-row .avatar { width: 28px; height: 28px; font-size: 0.7rem; }
.members-inline-list { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.member-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border2); background: var(--surface2); color: var(--text); cursor: pointer; transition: all 0.18s; }
.member-chip:hover, .member-chip.active { border-color: rgba(255,107,53,0.45); background: rgba(255,107,53,0.08); }
.member-avatar-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.member-online-dot { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #5b6479; border: 2px solid rgba(20,22,31,0.95); box-shadow: 0 0 0 1px rgba(255,255,255,0.04); transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
.member-online-dot.is-online { background: #31d48e; box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 0 12px rgba(49,212,142,0.45); }
.member-chip-avatar { border: 2px solid rgba(255,255,255,0.06); }
.member-chip-name { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.82rem; font-weight: 600; }
.members-meta { color: var(--text-dim); font-size: 0.76rem; font-weight: 600; white-space: nowrap; }
.member-popover { position: absolute; top: calc(100% + 8px); right: 0; width: min(320px, calc(100vw - 32px)); padding: 14px; background: rgba(26,26,34,0.98); border: 1px solid var(--border2); border-radius: 16px; box-shadow: var(--shadow); z-index: 30; }
.member-popover-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.member-popover-avatar { width: 38px; height: 38px; font-size: 0.9rem; }
.member-popover-info { min-width: 0; }
.member-popover-name { font-weight: 700; color: var(--text); }
.member-popover-email { color: var(--text-muted); font-size: 0.78rem; overflow-wrap: anywhere; }
.member-presence-text { color: var(--text-dim); font-size: 0.74rem; font-weight: 600; margin-top: 2px; }
.member-popover-role { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.member-role-select, .member-inline-role { min-width: 110px; }
.member-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.member-info { flex: 1; min-width: 0; }
.member-name { font-weight: 600; }
.member-email { color: var(--text-muted); font-size: 0.78rem; overflow-wrap: anywhere; }
.btn-danger { background: rgba(255,77,109,0.12); color: #ff8aa0; border: 1px solid rgba(255,77,109,0.28); cursor: pointer; padding: 9px 12px; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 0.82rem; font-weight: 600; transition: all 0.2s; }
.btn-danger:hover { background: rgba(255,77,109,0.18); border-color: rgba(255,77,109,0.42); color: #ffd2db; }
.btn-danger-solid { background: linear-gradient(135deg, #ff6b57, #ff7e3f); color: #fff; border: none; cursor: pointer; padding: 10px 16px; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 0.84rem; font-weight: 700; transition: all 0.2s; box-shadow: 0 10px 24px rgba(255,107,53,0.28); }
.btn-danger-solid:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(255,107,53,0.34); filter: brightness(1.04); }
.btn-danger-solid:active { transform: translateY(0); }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-loader { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 100px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .board { padding: 16px; gap: 14px; }
    .column { flex: 0 0 280px; }
    .header { padding: 12px 16px; }
    .dash-content { padding: 20px 16px; }
}

/* ===== ADMIN ===== */
.admin-shell {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.admin-panel {
    width: 100%;
    max-width: 1100px;
    background: rgba(26,26,34,0.92);
    border: 1px solid var(--border2);
    border-radius: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
}

.admin-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
}

.admin-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 0;
}

.admin-section {
    padding: 24px;
}

.admin-section + .admin-section {
    border-left: 1px solid var(--border);
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 520px;
    overflow: auto;
}

.admin-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.admin-user-name {
    font-weight: 600;
}

.admin-user-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

.admin-logs-section {
    border-top: 1px solid var(--border);
}

.admin-log-list {
    max-height: 420px;
}

.admin-log {
    padding: 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.admin-log-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-log-title {
    font-weight: 600;
}

.admin-log-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.admin-log-body {
    color: var(--text);
    font-size: 0.92rem;
    margin-top: 8px;
    line-height: 1.45;
}

.admin-log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.admin-log-meta span {
    color: var(--text-muted);
    font-size: 0.76rem;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,0.02);
}

.admin-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 18px;
    border: 1px dashed var(--border2);
    border-radius: 12px;
}

.admin-login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(26,26,34,0.92);
    border: 1px solid var(--border2);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 28px;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-section + .admin-section {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}
