/* Digital Pipeline — Clearspace UI design system */
html { font-size: 15px; }

body { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif; }

/* Nav */
.nav-link {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem 1rem; border-radius: .625rem;
    font-size: 1rem; color: rgba(255,255,255,.85);
    transition: all .15s ease;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active { color: #fff; background: #3BABFF; font-weight: 500; }

/* Cards / panels */
.card {
    background: #fff; border: 1px solid #e5e7eb;
    border-radius: .875rem; padding: 1.5rem;
}

/* Buttons */
.btn-primary {
    display: inline-flex; align-items: center; gap: .375rem;
    padding: .5625rem 1.125rem; font-size: .875rem; font-weight: 500;
    color: #fff; background: #3BABFF; border-radius: .5rem;
    transition: background .15s; border: none; cursor: pointer; font-family: inherit;
}
.btn-primary:hover { background: #2a9aee; }
.btn-secondary {
    display: inline-flex; align-items: center; gap: .375rem;
    padding: .5625rem 1.125rem; font-size: .875rem; font-weight: 500;
    color: #323D4C; background: #f3f4f6; border: 1px solid #e5e7eb;
    border-radius: .5rem; transition: background .15s; cursor: pointer; font-family: inherit;
}
.btn-secondary:hover { background: #e9eaec; }
.btn-ghost {
    display: inline-flex; align-items: center; gap: .375rem;
    padding: .375rem .75rem; font-size: .875rem; color: #6b7280;
    border-radius: .5rem; cursor: pointer; font-family: inherit; background: none; border: none;
}
.btn-ghost:hover { color: #16191A; background: #f3f4f6; }
.btn-danger {
    color: #F05A5A; background: rgba(240,90,90,.08); border: 1px solid rgba(240,90,90,.2);
    padding: .5625rem 1.125rem; font-size: .875rem; border-radius: .5rem; cursor: pointer;
    font-family: inherit; font-weight: 500;
}

/* Forms */
.input-field {
    display: block; padding: .5625rem .875rem; font-size: .9375rem;
    line-height: 1.5; border: 1px solid #d1d5db; border-radius: .5rem;
    background: #fff; color: #16191A; width: 100%; box-sizing: border-box; font-family: inherit;
}
.input-field:focus { outline: none; border-color: #3BABFF; box-shadow: 0 0 0 3px rgba(59,171,255,.1); }
.form-label { display: block; font-size: .8125rem; font-weight: 500; color: #374151; margin-bottom: .4rem; }

/* Board */
.board-wrap {
    display: flex; gap: 1rem; overflow-x: auto;
    padding-bottom: 1rem; align-items: flex-start;
}
.board-col {
    flex: 0 0 280px; background: #f3f4f6;
    border-radius: .75rem; padding: .75rem;
    max-height: calc(100vh - 220px); display: flex; flex-direction: column;
}
.board-col-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: .25rem .5rem .5rem; font-size: .8125rem; font-weight: 600;
    color: #374151; letter-spacing: -.01em;
}
.board-col-count {
    background: #e5e7eb; color: #6b7280; padding: 0 .5rem;
    border-radius: 9999px; font-size: .7rem; font-weight: 600;
}
.board-col-cards {
    flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem;
    min-height: 60px; padding: .25rem;
}
.kanban-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: .625rem;
    padding: .65rem .75rem; cursor: pointer; transition: box-shadow .15s, transform .05s;
}
.kanban-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.kanban-card.sortable-ghost { opacity: .4; }
.kanban-card.sortable-chosen { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.kanban-card-title { font-size: .875rem; color: #16191A; line-height: 1.35; }
.kanban-card-meta {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    margin-top: .5rem; font-size: .7rem; color: #9ca3af;
}
.kanban-label {
    display: inline-block; padding: .1rem .4rem; border-radius: 4px;
    font-size: .65rem; font-weight: 600; color: #fff; letter-spacing: .02em;
}
.kanban-pr-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 1px 6px; border-radius: 9999px; font-size: .65rem; font-weight: 500;
}
.pr-open { background: #ddf4e1; color: #1a7f37; }
.pr-merged { background: #e7d8f6; color: #6f42c1; }

/* Modal */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 4rem 1rem; z-index: 50; overflow-y: auto;
}
.modal-panel {
    background: #fff; border-radius: 12px; width: 100%; max-width: 760px;
    padding: 2rem; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

/* Timeline */
.timeline-item {
    display: flex; gap: .75rem; padding: .65rem 0;
    border-bottom: 1px solid #f3f4f6; font-size: .875rem;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-avatar {
    width: 28px; height: 28px; border-radius: 50%; background: #e5e7eb;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 600; color: #374151; flex-shrink: 0;
}
.timeline-meta { color: #9ca3af; font-size: .75rem; }
.timeline-body { color: #16191A; white-space: pre-wrap; margin-top: .25rem; }

/* Auth pages */
.alert { display: flex; gap: 8px; padding: 10px 14px; border-radius: 8px; font-size: 14px; align-items: center; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f8fafc; margin: 0; font-family: 'DM Sans', -apple-system, sans-serif; }
.login-container { width: 100%; max-width: 400px; padding: 24px; }
.login-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 36px; }
.login-brand { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.login-subtitle { font-size: 14px; color: #64748b; margin-bottom: 28px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: #334155; }
.login-field input { width: 100%; padding: 10px 14px; font-size: 15px; border: 1px solid #e2e8f0; border-radius: 8px; outline: none; box-sizing: border-box; font-family: inherit; }
.login-field input:focus { border-color: #3BABFF; box-shadow: 0 0 0 3px rgba(59,171,255,.1); }
.login-btn { width: 100%; padding: 10px 16px; font-size: 15px; font-weight: 500; background: #323D4C; color: #fff; border: none; border-radius: 8px; cursor: pointer; margin-top: 8px; font-family: inherit; }
.login-btn:hover { background: #16191A; }
.login-btn-microsoft { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px 16px; font-size: 15px; font-weight: 500; background: #fff; color: #1e293b; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; text-decoration: none; box-sizing: border-box; }
.login-btn-microsoft:hover { background: #f8fafc; }
.login-divider { display: flex; align-items: center; margin: 20px 0; gap: 12px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
.login-divider span { font-size: 12px; color: #94a3b8; text-transform: uppercase; letter-spacing: .07em; }

/* Mention dropdown */
.mention-dropdown {
    position: absolute; background: #fff; border: 1px solid #e5e7eb;
    border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.08);
    max-width: 280px; max-height: 240px; overflow-y: auto; z-index: 100;
}
.mention-item { padding: 6px 10px; cursor: pointer; font-size: 13px; }
.mention-item.active, .mention-item:hover { background: rgba(59,171,255,.1); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
