@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #0072ff;
    --color-primary-hover: #0088ff;
    --color-secondary: #02D982;
    --color-secondary-bright: #02f59a;
    --color-bg-dark: #0a0e1a;
    --color-bg-darker: #060811;
    --color-bg-card: #141824;
    --color-bg-card-hover: #1a1f2e;
    --color-text: #ffffff;
    --color-text-muted: #a0a0a0;
    --color-text-light: #e0e0e0;
    --color-warning: #ffa502;
    --color-danger: #ff4757;
    --color-info: #4a90e2;
    --color-border: rgba(255, 255, 255, 0.12);
    --color-border-strong: rgba(255, 255, 255, 0.22);
    --radius-sm: 0.4rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.2rem;
    --radius-xl: 1.6rem;
    --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 20px rgba(0, 114, 255, 0.4);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --checklist-bg-start: rgba(8, 10, 18, 0.95);
    --checklist-bg-end: rgba(12, 14, 22, 0.92);
    --checklist-border: rgba(255, 255, 255, 0.08);
    --checkbox-border: rgba(255, 255, 255, 0.2);
    --ease-refined: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    background-color: var(--color-bg-dark);
}

body {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg-dark);
    font-size: 16px;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(0, 114, 255, 0.25), transparent 60%),
        radial-gradient(700px 400px at 100% 10%, rgba(2, 217, 130, 0.18), transparent 55%),
        radial-gradient(800px 500px at 50% 110%, rgba(0, 114, 255, 0.16), transparent 60%);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.25;
    z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Chakra Petch', sans-serif;
    color: var(--color-text);
}

p {
    color: var(--color-text-light);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
}

button,
input,
textarea {
    font-family: inherit;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    background: rgba(6, 8, 17, 0.9);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    flex: 1 1 auto;
    min-width: 0;
}

.logo-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-mark {
    width: auto;
    height: 36px;
    max-width: min(50vw, 280px);
    object-fit: contain;
    border-radius: 6px;
}

.board-title {
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.board-title:hover {
    border-color: rgba(0, 114, 255, 0.5);
    background: rgba(0, 114, 255, 0.12);
}

/* Main */
.main {
    padding: clamp(1.5rem, 3vw, 2.75rem);
    min-height: calc(100vh - 72px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: var(--color-bg-card);
    color: var(--color-text);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 114, 255, 0.6);
    box-shadow: var(--shadow-glow), var(--shadow-sm);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border: none;
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-hover), var(--color-secondary-bright));
}

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

.btn-ghost {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: var(--color-text-muted);
}

.btn-ghost:hover {
    color: var(--color-text);
    border-color: var(--color-border);
    box-shadow: none;
}

.btn-danger.btn-ghost {
    color: var(--color-danger);
    border-color: rgba(255, 71, 87, 0.4);
}

.btn-icon {
    padding: 0.3rem 0.65rem;
    font-size: 0.95rem;
    line-height: 1;
    border-radius: var(--radius-sm);
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
}

.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
}

.btn-block {
    width: 100%;
    margin-bottom: 0.5rem;
}

/* Boards Page */
.boards-page {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.boards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.boards-header h2 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.6rem;
}

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

.board-card {
    display: block;
    padding: 1.4rem;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    transition: transform var(--transition-fast), box-shadow var(--transition-normal), border-color var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.board-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 114, 255, 0.4);
}

.board-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.board-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.board-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.board-private {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: var(--color-text-muted);
}

/* Board View */
.board-container {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.roadmap-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(20, 24, 36, 0.98), rgba(6, 8, 17, 0.95));
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    padding: 1.8rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: visible;
    z-index: 20;
    animation: rise 0.6s ease-out both;
}

.roadmap-hero-glow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

.roadmap-hero-glow::after {
    content: "";
    position: absolute;
    inset: auto -10% -35% auto;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at 30% 30%, rgba(0, 114, 255, 0.35), transparent 70%);
    opacity: 0.8;
}

.roadmap-hero > :not(.roadmap-hero-glow) {
    position: relative;
    z-index: 1;
}

.roadmap-intro {
    max-width: 560px;
}

.roadmap-kicker {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}

.roadmap-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.roadmap-subtitle {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.roadmap-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

.board-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.roadmap-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(20, 24, 36, 0.9);
    animation: rise 0.6s ease-out 0.08s both;
}

.legend-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
}

.legend-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.legend-pill {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-light);
}

.legend-pill:nth-child(4n+1) {
    border-color: rgba(0, 114, 255, 0.6);
    color: var(--color-primary);
}

.legend-pill:nth-child(4n+2) {
    border-color: rgba(2, 217, 130, 0.6);
    color: var(--color-secondary);
}

.legend-pill:nth-child(4n+3) {
    border-color: rgba(255, 165, 2, 0.6);
    color: var(--color-warning);
}

.legend-pill:nth-child(4n) {
    border-color: rgba(74, 144, 226, 0.6);
    color: var(--color-info);
}

.legend-hint {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Roadmap Grid */
.roadmap-grid {
    display: grid;
    gap: 1.5rem;
    padding-bottom: 1rem;
}

.roadmap-grid-header {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 0;
    align-items: end;
    position: relative;
}

.stage-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(20, 24, 36, 0.95);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-md);
}

.stage-header-spacer {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.stage-header-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

.stage-header-hint {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.roadmap-header-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
    padding-left: 1rem;
}

.roadmap-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    background: rgba(20, 24, 36, 0.95);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-md);
    position: relative;
    cursor: grab;
    margin-right: 0.75rem;
}

.roadmap-header:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0;
    right: -0.375rem;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 114, 255, 0.15) 20%,
        rgba(2, 217, 130, 0.12) 80%,
        transparent 100%
    );
    opacity: 0.6;
}

.roadmap-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-shadow:
        0 0 20px rgba(0, 114, 255, 0.4),
        0 0 40px rgba(2, 217, 130, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

.roadmap-empty {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--color-border);
    background: rgba(6, 8, 17, 0.6);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.roadmap-grid-body {
    display: grid;
    gap: 1rem;
}

.stage-row {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    animation: rise 0.5s ease-out both;
}

.stage-row:nth-of-type(4n+1) {
    --stage-color: var(--color-primary);
}

.stage-row:nth-of-type(4n+2) {
    --stage-color: var(--color-secondary);
}

.stage-row:nth-of-type(4n+3) {
    --stage-color: var(--color-warning);
}

.stage-row:nth-of-type(4n) {
    --stage-color: var(--color-info);
}

.stage-label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    cursor: grab;
    position: relative;
    background: rgba(20, 24, 36, 0.95);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    border-left: 6px solid var(--stage-color, var(--color-primary));
    padding: 1.1rem 1.2rem;
    min-height: 3.5rem;
    box-shadow: var(--shadow-md);
}

.stage-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
    margin-right: 1.5rem;
}

.stage-label .btn-icon {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
}

.stage-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
}

.stage-color-trigger {
    gap: 0.35rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stage-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--stage-color, var(--color-primary));
    border: 2px solid var(--color-bg-card);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.stage-color-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}

.stage-cells {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
    padding-left: 1rem;
}

.stage-cell {
    background: rgba(20, 24, 36, 0.9);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 0.75rem 0.9rem 0.9rem;
    box-shadow:
        var(--shadow-md),
        inset 0 2px 8px rgba(0, 0, 0, 0.35),
        inset 4px 0 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    min-height: 160px;
    position: relative;
    margin-right: 0.75rem;
}

.stage-cell::before {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    top: 0.7rem;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--stage-color, var(--color-primary)), transparent);
    opacity: 0.7;
    box-shadow: 0 1px 3px rgba(0, 114, 255, 0.3);
}

.stage-cell:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0;
    right: -0.375rem;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        180deg,
        rgba(0, 114, 255, 0.08) 0%,
        rgba(2, 217, 130, 0.08) 50%,
        rgba(0, 114, 255, 0.08) 100%
    );
    opacity: 0.5;
    pointer-events: none;
}

/* Subtle alternating column backgrounds */
.roadmap-header:nth-child(odd) {
    background: rgba(20, 24, 36, 0.95);
}

.roadmap-header:nth-child(even) {
    background: rgba(16, 20, 32, 0.95);
}

.stage-cell:nth-child(odd) {
    background: rgba(20, 24, 36, 0.9);
}

.stage-cell:nth-child(even) {
    background: rgba(16, 20, 32, 0.9);
}

.roadmap-empty-state,
.stage-empty {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--color-border);
    background: rgba(6, 8, 17, 0.6);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.2rem 0.15rem 0.5rem;
    min-height: 120px;
    position: relative;
}

.add-card-action {
    margin-top: auto;
    padding: 0.35rem 0.15rem 0;
}

.add-card-button {
    width: 100%;
    justify-content: flex-start;
}

.add-card-form {
    margin-top: auto;
    padding: 0.35rem 0.15rem 0;
}

.add-card-input,
.add-column-input {
    width: 100%;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    background: rgba(10, 14, 26, 0.9);
    border: 1px dashed var(--color-border);
    border-radius: 999px;
    color: var(--color-text);
}

.add-card-input:focus,
.add-column-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.add-column {
    grid-template-columns: 1fr;
    background: rgba(6, 8, 17, 0.6);
    border: 2px dashed var(--color-border);
    justify-content: flex-start;
    padding: 1.25rem;
    box-shadow: none;
}

.add-column-input {
    background: rgba(20, 24, 36, 0.9);
}

/* Cards */
.card {
    background: var(--color-bg-card-hover);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 1.1rem 1rem 0.95rem;
    width: 100%;
    min-width: 0;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-normal), border-color var(--transition-fast);
}

.card::before {
    content: "";
    position: absolute;
    top: -0.45rem;
    left: 1rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--stage-color, var(--color-primary));
    border: 2px solid var(--color-bg-card);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 114, 255, 0.4);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.card-owner-indicator {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(2, 217, 130, 0.22);
}

.card-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 17, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

.modal-large {
    max-width: 860px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.2rem;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
}

.modal-meta {
    margin: 0 0 0.9rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.modal-close {
    background: transparent;
}

.settings-modal-body {
    display: grid;
    gap: 1.5rem;
}

.settings-section {
    background: rgba(10, 14, 26, 0.7);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 1rem;
}

.logo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.logo-preview-img {
    width: auto;
    height: 64px;
    max-width: min(100%, 360px);
    border-radius: 10px;
    object-fit: contain;
}

.favicon-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.favicon-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.favicon-preview img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: rgba(10, 14, 26, 0.85);
    padding: 4px;
}

.settings-section h4 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

.settings-help {
    margin: 0.45rem 0 0;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* User Settings */
.settings-page {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.settings-panel {
    width: 100%;
    max-width: 1100px;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.settings-header h1 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.6rem;
    margin: 0;
}

.settings-lead {
    margin-top: 0.4rem;
    color: var(--color-text-muted);
}

.settings-table-wrapper {
    overflow-x: auto;
}

.settings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.settings-table th,
.settings-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

.settings-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.invite-link input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
}

.invite-form-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.invite-form-row input {
    width: 72px;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid transparent;
}

.status-success {
    color: #7ee2a8;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
}

.status-warning {
    color: #ffcf84;
    background: rgba(251, 146, 60, 0.14);
    border-color: rgba(251, 146, 60, 0.45);
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Card Detail */
.card-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 1.5rem;
}

.card-title-input {
    font-size: 1.2rem;
    font-weight: 600;
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text);
    width: 100%;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

.card-title-input:focus {
    outline: none;
    border-color: var(--color-border-strong);
    background: rgba(10, 14, 26, 0.8);
}

.card-title-readonly {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.card-section {
    margin-bottom: 1.5rem;
}

.card-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.card-description {
    width: 100%;
    min-height: 110px;
    padding: 0.75rem;
    font-size: 0.9rem;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    resize: vertical;
}

.card-description:focus {
    outline: none;
    border-color: var(--color-primary);
}

.card-description-readonly {
    padding: 0.75rem;
    background: rgba(10, 14, 26, 0.85);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    min-height: 60px;
    white-space: pre-wrap;
}

.card-description-readonly em {
    color: var(--color-text-muted);
}

.card-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-section h5 {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* Color Picker */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}

.color-swatch.selected {
    border-color: var(--color-text);
}

.color-none {
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Checklists */
/* ================================
   Checklist - Brutally Minimal Design
   ================================ */

/* Checklist container - richer background with gradient */
.checklist {
    position: relative;
    background: linear-gradient(135deg, var(--checklist-bg-start), var(--checklist-bg-end));
    border: 1px solid var(--checklist-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Progress bar (top 2px) - elegant progress indicator */
.checklist-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.checklist-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 114, 255, 0.5), rgba(2, 217, 130, 0.5));
    transform-origin: left;
    transition: transform 0.4s var(--ease-refined);
}

/* Header with circular progress */
.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    margin-top: 2px; /* Offset for progress bar */
}

.checklist-header h5 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
}

/* Circular progress indicator */
.checklist-progress-circle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.35);
    font-variant-numeric: tabular-nums;
}

.checklist-progress-circle svg {
    width: 16px;
    height: 16px;
    transform: rotate(-90deg);
}

/* Grid-based item layout for perfect alignment */
.checklist-item {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 8px;
    margin: 0 -8px;
    border-radius: 8px;
    position: relative;
    transition: background 0.15s var(--ease-refined);
}

.checklist-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Custom checkbox with refined styling */
.checklist-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--checkbox-border);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.15s var(--ease-refined);
    flex-shrink: 0;
}

.checklist-item input[type="checkbox"]:hover {
    border-color: rgba(0, 114, 255, 0.5);
}

.checklist-item input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 114, 255, 0.2);
}

.checklist-item input[type="checkbox"]:checked {
    background: linear-gradient(135deg, rgba(0, 114, 255, 0.8), rgba(2, 217, 130, 0.8));
    border-color: transparent;
}

/* SVG checkmark animation - delicate and refined */
.checklist-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 6px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: translate(-50%, -60%) rotate(-45deg);
    animation: checkmark-appear 0.2s var(--ease-refined);
}

@keyframes checkmark-appear {
    0% {
        transform: translate(-50%, -60%) rotate(-45deg) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -60%) rotate(-45deg) scale(1.1);
    }
    100% {
        transform: translate(-50%, -60%) rotate(-45deg) scale(1);
        opacity: 1;
    }
}

/* Item content with refined typography */
.item-content {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    transition: all 0.2s var(--ease-refined);
}

.item-content.completed {
    color: rgba(255, 255, 255, 0.25);
    text-decoration: line-through;
    text-decoration-color: rgba(255, 255, 255, 0.15);
    text-decoration-thickness: 1px;
}

.checklist-item.completed {
    transform: scale(0.98);
    opacity: 0.5;
}

/* Hover-only delete buttons - elegant interaction pattern */
.checklist-item .btn-icon {
    opacity: 0;
    transition: all 0.15s var(--ease-refined);
}

.checklist-item:hover .btn-icon {
    opacity: 1;
}

.checklist-header .btn-icon:hover {
    transform: rotate(90deg);
}

/* Subtle dividers using gradient fade */
.checklist-item:not(:last-of-type)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 32px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
}

/* Form input styling */
.checklist .input-inline {
    margin-top: 12px;
}

.input-inline:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 114, 255, 0.4);
    box-shadow:
        0 0 0 3px rgba(0, 114, 255, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Reduced motion support - accessibility */
@media (prefers-reduced-motion: reduce) {
    .checklist *,
    .checklist *::before,
    .checklist *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--color-text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.form-row input[type="text"] {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.85rem;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
}

.form-row input[type="color"] {
    width: 40px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.card-delete {
    padding: 0.6rem;
    background: transparent;
    color: var(--color-danger);
    border-color: transparent;
    box-shadow: none;
}

.card-delete:hover {
    background: var(--color-danger);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.card-delete svg {
    width: 20px;
    height: 20px;
    display: block;
}

.btn-save {
    padding: 0.7rem 1.7rem;
    font-size: 1rem;
}

.input-inline {
    width: 100%;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-text);
}

.input-inline:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Dropdown */
.dropdown {
    position: absolute;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    color: #fff;
    margin-bottom: 0.25rem;
}

.dropdown-item:hover {
    opacity: 0.9;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-muted);
}

/* Stage/Roadmap title edit */
.stage-title-edit,
.roadmap-title-edit {
    flex: 1;
}

.stage-title-input,
.roadmap-title-input {
    width: 100%;
    padding: 0.25rem 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    color: var(--color-text);
}

.stage-title-input:focus,
.roadmap-title-input:focus {
    outline: none;
}

/* Sortable Ghost */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    background: rgba(20, 24, 36, 0.8);
}

/* Auth Pages */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px);
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.auth-card h1 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.auth-back {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-back a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.auth-back a:hover {
    color: var(--color-primary);
}

#toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: rgba(34, 197, 94, 0.9);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    animation: toastSlide 3s forwards;
    pointer-events: auto;
}

.toast[data-toast-variant="warning"] {
    background: rgba(255, 165, 2, 0.92);
}

.toast[data-toast-variant="error"] {
    background: rgba(255, 71, 87, 0.92);
}

@keyframes toastSlide {
    0% { transform: translateX(-400px); opacity: 0; }
    15% { transform: translateX(0); opacity: 1; }
    75% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(0); opacity: 0; }
}

/* Header Right */
.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Readonly Board */
.roadmap-grid.readonly .stage-label {
    cursor: default;
}

.roadmap-grid.readonly .roadmap-header {
    cursor: default;
}

.roadmap-grid.readonly .roadmap-title {
    cursor: default;
}

/* Responsive */
@media (max-width: 900px) {
    .roadmap-hero {
        align-items: flex-start;
        padding: 1.5rem;
    }

    .roadmap-actions {
        align-items: flex-start;
        width: 100%;
    }

    .board-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .roadmap-grid-header,
    .stage-row {
        grid-template-columns: 1fr;
    }

    .roadmap-header-row,
    .stage-cells {
        grid-template-columns: 1fr;
    }

    .stage-label {
        cursor: default;
    }

    .stage-label .btn-icon,
    .roadmap-header .btn-icon {
        position: static;
        margin-top: 0.5rem;
    }

    .stage-cell::before {
        display: none;
    }

    /* Disable vertical dividers on mobile */
    .roadmap-header::after,
    .stage-cell:not(:last-child)::after {
        display: none;
    }

    /* Unified backgrounds on mobile */
    .roadmap-header:nth-child(even),
    .stage-cell:nth-child(even) {
        background: rgba(20, 24, 36, 0.95);
    }

    /* Keep depth shadows, add spacing */
    .stage-cell {
        box-shadow:
            var(--shadow-md),
            inset 0 2px 8px rgba(0, 0, 0, 0.35);
        margin-bottom: 1rem;
        margin-right: 0;
    }

    .roadmap-header {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .card-detail-grid {
        grid-template-columns: 1fr;
    }

    .card-detail-sidebar {
        order: -1;
    }

    .boards-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
