:root {
    color-scheme: dark;
    --bg: #07101a;
    --bg-soft: #0d1724;
    --panel: rgba(11, 19, 33, 0.9);
    --panel-border: rgba(121, 168, 181, 0.18);
    --text: #e6edf6;
    --text-muted: #98a8be;
    --accent: #7ef2ff;
    --accent-soft: #79a8b5;
    --warm: #ff9c66;
    --success: #5fd5a6;
    --danger: #ff7b7b;
    --display: 'Sora', sans-serif;
    --body: 'Plus Jakarta Sans', sans-serif;
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #eef4fb;
    --bg-soft: #ffffff;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-border: rgba(72, 97, 122, 0.14);
    --text: #162334;
    --text-muted: #5a6a7c;
    --accent: #1db7cf;
    --accent-soft: #557d95;
    --warm: #ff9163;
    --success: #27a97a;
    --danger: #d96868;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--body);
    background:
        radial-gradient(circle at top, rgba(126, 242, 255, 0.18), transparent 22%),
        radial-gradient(circle at 80% 10%, rgba(88, 166, 255, 0.12), transparent 30%),
        radial-gradient(circle at 15% 24%, rgba(255, 156, 102, 0.08), transparent 22%),
        linear-gradient(180deg, #050915 0%, #07101a 48%, #060a13 100%);
    color: var(--text);
    transition: background 0.25s ease, color 0.25s ease;
}

body {
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--display);
    letter-spacing: -0.03em;
}

p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(121, 168, 181, 0.18);
    background: rgba(8, 15, 27, 0.9);
    color: var(--text);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(126, 242, 255, 0.32);
    border-color: rgba(126, 242, 255, 0.42);
}

button {
    cursor: pointer;
    border: 0;
}

code {
    font-family: 'Fira Code', monospace;
    color: var(--accent);
}

.app-shell {
    position: relative;
    min-height: 100vh;
}

.app-shell.has-sidebar .main-content {
    margin-left: 300px;
    transition: margin-left 0.25s ease, padding-top 0.25s ease;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: 300px;
    min-height: 100vh;
    padding: 5.5rem 1.5rem 3rem;
    border-right: 1px solid rgba(121, 168, 181, 0.12);
    background: rgba(5, 10, 19, 0.78);
    box-shadow: 0 22px 56px rgba(3, 8, 20, 0.3);
    backdrop-filter: blur(20px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    transform: translateX(0);
    z-index: 55;
    transition:
        transform 0.25s ease,
        opacity 0.2s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.app-shell.sidebar-collapsed .sidebar {
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
    transform: translateX(calc(-100% - 1rem));
}

.sidebar-toggle-button {
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 70;
    display: inline-grid;
    align-content: center;
    gap: 0.32rem;
    width: 3rem;
    height: 3rem;
    padding: 0.75rem;
    border: 1px solid rgba(121, 168, 181, 0.18);
    border-radius: 1rem;
    background: rgba(8, 15, 27, 0.9);
    box-shadow: 0 14px 30px rgba(3, 8, 20, 0.22);
    backdrop-filter: blur(16px);
}

.sidebar-toggle-button span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.sidebar-toggle-button.is-open span:nth-child(1) {
    transform: translateY(0.4rem) rotate(45deg);
}

.sidebar-toggle-button.is-open span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle-button.is-open span:nth-child(3) {
    transform: translateY(-0.4rem) rotate(-45deg);
}

.sidebar-backdrop {
    display: none;
}

.app-shell.has-sidebar.sidebar-open .main-content {
    padding-top: 2.5rem;
}

.app-shell.has-sidebar.sidebar-collapsed .main-content {
    margin-left: 0;
    padding-top: 5rem;
}

.sidebar-top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-theme-toggle {
    margin-top: 1rem;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-family: var(--display);
}

.brand-mark span {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.95rem;
    background: linear-gradient(135deg, rgba(126, 242, 255, 0.25), rgba(255, 156, 102, 0.2));
    color: white;
    text-transform: lowercase;
}

.sidebar-copy {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.nav-links {
    display: grid;
    gap: 0.45rem;
    margin: 2rem 0;
}

.nav-links a {
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    color: var(--text-muted);
    transition: 0.22s ease;
}

.nav-links a.active,
.nav-links a:hover {
    background: linear-gradient(135deg, rgba(126, 242, 255, 0.12), rgba(255, 156, 102, 0.1));
    color: white;
}

.sidebar-footer {
    display: grid;
    gap: 1rem;
    margin-top: auto;
}

.sidebar-signature {
    margin-top: 0.15rem;
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-muted);
}

.sidebar-signature a {
    color: var(--accent);
}

.user-chip {
    display: grid;
    gap: 0.2rem;
    padding: 1rem;
    border: 1px solid rgba(121, 168, 181, 0.14);
    border-radius: 1.25rem;
    background: rgba(10, 17, 31, 0.85);
}

.user-chip span {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.main-content {
    position: relative;
    overflow: hidden;
    padding: 2.5rem;
    min-width: 0;
}

.public-content {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    width: 100%;
}

.background-glow {
    position: absolute;
    width: 30rem;
    height: 30rem;
    border-radius: 999px;
    filter: blur(90px);
    opacity: 0.18;
    pointer-events: none;
}

.glow-a {
    top: -9rem;
    right: -10rem;
    background: #58a6ff;
}

.glow-b {
    left: -12rem;
    bottom: -12rem;
    background: #ff9c66;
}

.page-shell,
.login-shell {
    position: relative;
    z-index: 1;
}

.page-shell {
    display: grid;
    gap: 1.6rem;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.page-actions,
.form-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-kicker {
    margin-bottom: 0.45rem;
    color: #93f7ff;
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.metrics-grid,
.client-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.panel-card,
.client-card,
.login-card,
.empty-state,
.list-card,
.info-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--panel-border);
    background: linear-gradient(180deg, rgba(10, 17, 34, 0.9), rgba(8, 13, 26, 0.92));
    box-shadow: 0 18px 50px rgba(3, 8, 20, 0.4);
    backdrop-filter: blur(16px);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.metric-card {
    display: grid;
    gap: 0.35rem;
    padding: 1.2rem;
    border-radius: 1.45rem;
}

.metric-card span,
.metric-card small {
    color: var(--text-muted);
}

.metric-card strong {
    font-size: 2rem;
    font-family: var(--display);
}

.content-grid {
    display: grid;
    gap: 1rem;
}

.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-card,
.empty-state,
.login-card,
.info-panel {
    border-radius: 1.6rem;
    padding: 1.5rem;
}

.panel-card h2 {
    margin-bottom: 1rem;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.9rem 1.35rem;
    font-weight: 700;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent), #58a6ff 52%, var(--warm));
    color: #08101d;
}

.ghost-button {
    border: 1px solid rgba(121, 168, 181, 0.2);
    background: rgba(8, 15, 27, 0.66);
    color: var(--text);
}

.ghost-button:hover,
.primary-button:hover {
    transform: translateY(-1px);
}

.theme-toggle {
    gap: 0.65rem;
    min-width: 10.5rem;
    padding-inline: 1rem 1.15rem;
    justify-content: center;
}

.theme-toggle-indicator {
    position: relative;
    width: 2rem;
    height: 1.1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(126, 242, 255, 0.35), rgba(255, 156, 102, 0.35));
}

.theme-toggle-indicator::after {
    content: "";
    position: absolute;
    top: 0.13rem;
    left: 0.14rem;
    width: 0.82rem;
    height: 0.82rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    transition: transform 0.22s ease;
}

.full-width {
    width: 100%;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid label {
    display: grid;
    gap: 0.45rem;
}

.form-grid span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.checkbox-row {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-row input {
    width: auto;
}

.list-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border-radius: 1.2rem;
    margin-bottom: 0.85rem;
}

.static-card {
    cursor: default;
}

.list-card strong,
.client-card strong {
    display: block;
    margin-bottom: 0.35rem;
}

.list-card small,
.client-card small,
.list-meta small {
    color: var(--text-muted);
}

.list-meta {
    display: grid;
    gap: 0.6rem;
    justify-items: end;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-top: 1px solid rgba(121, 168, 181, 0.12);
}

.summary-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.timeline-card {
    display: grid;
    gap: 0.45rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(121, 168, 181, 0.12);
}

.timeline-card:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.client-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.client-card {
    display: grid;
    gap: 0.55rem;
    padding: 1.2rem;
    border-radius: 1.3rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-planned { background: rgba(88, 166, 255, 0.14); color: #9dd8ff; }
.status-active { background: rgba(95, 213, 166, 0.15); color: #98f2c7; }
.status-blocked { background: rgba(255, 123, 123, 0.16); color: #ffb2b2; }
.status-review { background: rgba(255, 156, 102, 0.16); color: #ffd0b6; }
.status-completed { background: rgba(121, 168, 181, 0.18); color: #d6e6ed; }

.table-shell {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.95rem 0.75rem;
    border-bottom: 1px solid rgba(121, 168, 181, 0.12);
    text-align: left;
}

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

.alert {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid transparent;
}

.alert.success {
    background: rgba(95, 213, 166, 0.14);
    border-color: rgba(95, 213, 166, 0.22);
}

.alert.error {
    background: rgba(255, 123, 123, 0.14);
    border-color: rgba(255, 123, 123, 0.22);
}

.request-feedback-banner {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    max-width: min(28rem, calc(100vw - 3rem));
    padding: 0.9rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(121, 168, 181, 0.18);
    background: rgba(8, 15, 27, 0.88);
    box-shadow: 0 12px 30px rgba(3, 8, 20, 0.28);
    backdrop-filter: blur(18px);
    animation: toast-enter 0.22s ease;
}

.request-feedback-banner strong {
    font-size: 0.95rem;
}

.request-feedback-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    background: var(--accent);
}

.request-feedback-banner.is-loading .request-feedback-dot {
    animation: request-pulse 1s ease-in-out infinite;
}

.request-feedback-banner.is-success .request-feedback-dot {
    background: var(--success);
}

.request-feedback-banner.is-error .request-feedback-dot {
    background: var(--danger);
}

button:disabled,
.primary-button:disabled,
.ghost-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.login-card {
    width: min(100%, 560px);
    display: grid;
    gap: 1.5rem;
    margin-inline: auto;
}

.login-card-corporate {
    width: min(100%, 880px);
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.82fr);
    gap: 1.75rem;
    padding: clamp(2rem, 4vw, 2.8rem);
}

.login-card-main {
    display: grid;
    align-content: start;
    gap: 0.9rem;
    padding-right: 0.75rem;
}

.login-brand-image {
    display: block;
    width: min(100%, 440px);
    height: auto;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.login-card-main h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 0.96;
    max-width: 9ch;
    letter-spacing: -0.04em;
}

.login-lead {
    max-width: 32rem;
    font-size: 1.18rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.login-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.4rem;
}

.login-highlights span {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(121, 168, 181, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
}

.login-card-action {
    display: flex;
    align-items: center;
}

.login-action-panel {
    width: 100%;
    display: grid;
    align-content: center;
    gap: 0.9rem;
    padding: 1.45rem;
    border-radius: 1.45rem;
    border: 1px solid rgba(121, 168, 181, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        radial-gradient(circle at top left, rgba(126, 242, 255, 0.08), transparent 38%);
    min-height: 100%;
}

.login-action-panel strong {
    font-family: var(--display);
    font-size: 1.4rem;
    letter-spacing: -0.03em;
}

.login-action-panel p {
    color: var(--text-muted);
    line-height: 1.7;
}

.login-action-panel .alert {
    margin-top: 0.25rem;
}

.login-action-panel .primary-button {
    min-height: 3.5rem;
    font-size: 1rem;
}

.compact-form {
    gap: 1rem;
}

.info-panel {
    display: grid;
    gap: 0.5rem;
}

.hours-chart {
    width: 100%;
    overflow-x: auto;
}

.hours-chart-shell {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
}

.hours-chart-y-axis {
    display: grid;
    align-content: space-between;
    min-height: 420px;
    padding-block: 0.2rem 4.4rem;
}

.hours-chart-y-axis span {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1;
    text-align: right;
}

.hours-chart-stage {
    display: grid;
    min-width: 620px;
}

.hours-chart-plot {
    position: relative;
    min-height: 420px;
    padding: 0 0 4.5rem;
    border-bottom: 1px solid rgba(121, 168, 181, 0.28);
}

.hours-chart-grid-row {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed rgba(121, 168, 181, 0.2);
}

.hours-chart-bar-base {
    fill: rgba(121, 168, 181, 0.08);
    stroke: rgba(121, 168, 181, 0.08);
}

.hours-chart-bars {
    position: relative;
    z-index: 1;
    min-height: 370px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    align-items: end;
    height: 100%;
}

.hours-chart-column {
    display: grid;
    gap: 0.65rem;
    justify-items: center;
    text-align: center;
    align-self: end;
    min-height: 100%;
    width: 100%;
    padding: 0;
    background: transparent;
    color: inherit;
}

.hours-chart-value-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.75rem;
    min-height: 2rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(18, 31, 48, 0.12);
}

.hours-chart-bar-track {
    width: min(100%, 92px);
    min-height: 300px;
    height: 300px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.45rem;
    border-radius: 1.6rem 1.6rem 1rem 1rem;
    background: linear-gradient(180deg, rgba(121, 168, 181, 0.08), rgba(121, 168, 181, 0.02));
    border: 1px solid rgba(121, 168, 181, 0.12);
}

.hours-chart-bar {
    width: 100%;
    min-height: 18px;
    border-radius: 1.2rem 1.2rem 0.75rem 0.75rem;
    box-shadow: 0 18px 30px rgba(18, 31, 48, 0.2);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.hours-chart-column:hover .hours-chart-bar {
    transform: translateY(-4px);
    filter: saturate(1.08);
}

.hours-chart-column.is-selected .hours-chart-bar-track {
    border-color: rgba(126, 242, 255, 0.34);
    box-shadow: 0 0 0 4px rgba(126, 242, 255, 0.08);
}

.hours-chart-column span {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.hours-chart-detail {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 1.2rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(121, 168, 181, 0.14);
    background: linear-gradient(180deg, rgba(8, 15, 27, 0.82), rgba(10, 18, 32, 0.88));
}

.hours-chart-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.hours-chart-detail-head strong {
    display: block;
    margin-bottom: 0.25rem;
}

.hours-chart-detail-head small {
    color: var(--text-muted);
}

.hours-task-list {
    display: grid;
    gap: 0.7rem;
}

.hours-task-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    border: 1px solid rgba(121, 168, 181, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.hours-task-row strong {
    display: block;
    font-size: 0.95rem;
}

.hours-task-row span {
    color: var(--text-muted);
    white-space: nowrap;
}

.hours-chart-bar-0 { fill: #1db7cf; }
.hours-chart-bar-1 { fill: #58a6ff; }
.hours-chart-bar-2 { fill: #ff9c66; }
.hours-chart-bar-3 { fill: #5fd5a6; }
.hours-chart-bar-4 { fill: #9a8cff; }

.hours-chart-value-badge-0 { background: rgba(29, 183, 207, 0.14); color: #0d7282; }
.hours-chart-value-badge-1 { background: rgba(88, 166, 255, 0.14); color: #2c6dbe; }
.hours-chart-value-badge-2 { background: rgba(255, 156, 102, 0.16); color: #b85c30; }
.hours-chart-value-badge-3 { background: rgba(95, 213, 166, 0.16); color: #1f8762; }
.hours-chart-value-badge-4 { background: rgba(154, 140, 255, 0.16); color: #6250c9; }

.empty-state {
    text-align: center;
    display: grid;
    gap: 0.75rem;
    justify-items: center;
}

.flex-link {
    flex: 1;
}

.project-board-panel {
    gap: 1rem;
    background: rgba(4, 8, 16, 0.35) !important;
    border-color: rgba(121, 168, 181, 0.07) !important;
    box-shadow: none !important;
    backdrop-filter: blur(6px) !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
}

.color-field {
    display: grid;
    gap: 0.35rem;
    align-content: start;
}

.color-field span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.color-field input[type="color"] {
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
    min-height: 2.5rem;
    padding: 0.15rem;
    border-radius: 999px;
    border: 1px solid rgba(121, 168, 181, 0.22);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 18px rgba(3, 8, 20, 0.12);
    cursor: pointer;
}

.color-field input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 999px;
}

.color-field input[type="color"]::-webkit-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
}

.color-field input[type="color"]::-moz-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
}

/* ── Kanban board container ──────────────────────────────────────── */
.kanban-board {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    overflow-x: visible;
    overflow-y: visible;
    padding-bottom: 0.75rem;
    min-width: max-content;
}

/* ── Column ──────────────────────────────────────────────────────── */
.kanban-column {
    flex: 0 0 310px;
    width: 310px;
    display: flex;
    flex-direction: column;
    max-height: min(76vh, 940px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #1a1d23;
}

.kanban-column-sortable {
    cursor: default;
}

/* Thin color accent strip at the top of each column */
.kanban-column-accent {
    height: 4px;
    width: 100%;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
}

/* ── Column header ───────────────────────────────────────────────── */
.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 10px 8px 8px;
    flex-shrink: 0;
}

.kanban-column-drag-handle {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    cursor: grab;
    padding: 2px 0;
    user-select: none;
}

.kanban-column-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.kanban-column-badge {
    flex-shrink: 0;
    background: rgba(121, 168, 181, 0.14);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Column edit form (inline, replaces header) */
.kanban-column-edit-form {
    padding: 10px 10px 6px !important;
    flex-shrink: 0;
    gap: 0.65rem !important;
}

/* ── Column context menu (three-dot) ─────────────────────────────── */
.kanban-menu {
    position: relative;
    flex-shrink: 0;
}

.kanban-menu summary {
    list-style: none;
}

.kanban-menu summary::-webkit-details-marker {
    display: none;
}

.kanban-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    touch-action: manipulation;
}

.kanban-menu-button:hover {
    background: rgba(121, 168, 181, 0.12);
    color: var(--text);
}

.kanban-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    min-width: 185px;
    display: grid;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1e2229;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.4);
}

.kanban-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    border-radius: 5px;
    padding: 9px 12px;
    background: transparent;
    color: #e6edf6;
    font-size: 0.82rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.12s ease;
    touch-action: manipulation;
    width: 100%;
}

.kanban-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.kanban-menu-item.danger {
    color: #ff8585;
}

.kanban-menu-item.danger:hover {
    background: rgba(255, 100, 100, 0.12);
}

/* Delete button in edit forms */
.kanban-danger-btn {
    color: var(--danger) !important;
}

/* ── Card list ───────────────────────────────────────────────────── */
.kanban-card-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 8px;
    min-height: 40px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* ── Card ────────────────────────────────────────────────────────── */
.kanban-card {
    position: relative;
    background: #22262e;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    overflow: visible;
    min-width: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kanban-card-sortable {
    cursor: pointer;
}

.kanban-card-sortable:hover {
    border-color: rgba(126, 242, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    background: #272b34;
}

/* Thin color label bar at the top of each card */
.kanban-card-color-bar {
    height: 5px;
    width: 100%;
    border-radius: 7px 7px 0 0;
}

/* Card content area (also the drag handle) */
.kanban-card-content {
    padding: 8px 32px 8px 10px;
    display: grid;
    gap: 6px;
    min-width: 0;
}

.kanban-card-drag-handle {
    cursor: grab;
}

.kanban-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #c9d1d9;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

/* Description – capped with scroll */
.kanban-card-desc {
    font-size: 0.75rem;
    color: rgba(185, 195, 210, 0.7);
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.55;
    max-height: 5.5rem;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Block elements: paragraphs and divs */
.kanban-card-desc p,
.kanban-card-desc div {
    margin: 0 0 0.25rem;
}

.kanban-card-desc p:last-child,
.kanban-card-desc div:last-child {
    margin-bottom: 0;
}

/* Lists */
.kanban-card-desc ul,
.kanban-card-desc ol {
    padding-left: 1.1rem;
    margin: 0.2rem 0 0.3rem;
}

.kanban-card-desc li {
    margin: 0.1rem 0;
    line-height: 1.5;
}

/* Inline formatting — make it visible against the muted base */
.kanban-card-desc strong,
.kanban-card-desc b {
    font-weight: 700;
    color: rgba(230, 237, 246, 0.95);
}

.kanban-card-desc em,
.kanban-card-desc i {
    font-style: italic;
    color: rgba(230, 237, 246, 0.88);
}

.kanban-card-desc u {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kanban-card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
}

.kanban-card-meta small {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.65rem;
    color: rgba(185, 195, 210, 0.55);
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}

/* Pencil icon edit button – shows on hover (always on touch screens) */
.kanban-card-edit-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 16, 28, 0.9);
    border: 1px solid rgba(121, 168, 181, 0.18);
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    touch-action: manipulation;
}

@media (hover: none) {
    .kanban-card-edit-btn {
        opacity: 1;
        pointer-events: auto;
        width: 36px;
        height: 36px;
    }
}

.kanban-card-sortable:hover .kanban-card-edit-btn,
.kanban-card:focus-within .kanban-card-edit-btn {
    opacity: 1;
    pointer-events: auto;
}

.kanban-card-edit-btn:hover {
    background: rgba(126, 242, 255, 0.12);
    color: var(--accent);
    border-color: rgba(126, 242, 255, 0.28);
}



/* ── Drag & drop states ───────────────────────────────────────────── */
.kanban-card-ghost,
.kanban-column-ghost {
    opacity: 0.28;
}

.kanban-card-dragging,
.kanban-column-dragging {
    transform: rotate(1.5deg);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}

.kanban-card-chosen {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    border-color: rgba(126, 242, 255, 0.35) !important;
}

.kanban-column-chosen {
    border-color: rgba(126, 242, 255, 0.35) !important;
}

/* ── Empty column placeholder ────────────────────────────────────── */
.kanban-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 10px 8px;
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    opacity: 0.6;
}

/* ── "Agregar tarjeta" button at bottom of column ────────────────── */
.kanban-add-card-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
    border-radius: 0 0 10px 10px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    touch-action: manipulation;
    flex-shrink: 0;
    min-height: 38px;
    gap: 0;
}

.kanban-add-card-btn .btn-text {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kanban-add-card-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.kanban-add-card-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── New card form (below card list inside column) ───────────────── */
.board-card-form {
    margin: 4px 8px 4px;
    padding: 10px;
    background: #22262e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    flex-shrink: 0;
    display: grid;
    gap: 0.6rem;
    max-height: min(44vh, 480px);
    overflow-y: auto;
    overflow-x: hidden;
}

.board-card-form .rich-editor-surface {
    min-height: 7rem;
    max-height: 200px;
    overflow-y: auto;
}

/* Rich editor inside inline card edit form */
.kanban-card-edit-form .rich-editor-surface {
    min-height: 3.5rem;
    max-height: min(14vh, 130px);
    overflow-y: auto;
}

/* Smaller action buttons inside card forms */
.kanban-card-edit-form .primary-button,
.kanban-card-edit-form .ghost-button,
.board-card-form .primary-button,
.board-card-form .ghost-button {
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    min-height: 26px !important;
    border-radius: 5px !important;
    line-height: 1.2 !important;
}

/* Compact color swatch in card form actions */
.kanban-form-actions .color-inline input[type="color"] {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 1px !important;
    border-radius: 5px !important;
    cursor: pointer;
}

.board-card-form .kanban-form-actions {
    position: sticky;
    bottom: 0;
    padding-top: 6px;
    background: #22262e;
}

/* Inline card edit form — fixed height with internal scroll */
.kanban-card-edit-form {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #22262e;
    border-radius: 8px;
    max-height: min(58vh, 420px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Rich editor surface inside edit form — capped height */
.kanban-card-edit-form .rich-editor-surface {
    min-height: 7rem;
    max-height: 200px;
    overflow-y: auto;
}

/* Sticky action bar — always visible at the bottom of the form */
.kanban-card-edit-form .kanban-form-actions {
    position: sticky;
    bottom: 0;
    background: #22262e;
    padding: 6px 0 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
    z-index: 1;
    flex-wrap: wrap;
}

/* ── "Agregar columna" section at end of board ───────────────────── */
.kanban-add-list {
    flex: 0 0 310px;
    width: 310px;
    align-self: flex-start;
}

.kanban-add-list-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.14);
    border: none;
    color: #e6edf6;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
    touch-action: manipulation;
    white-space: nowrap;
    min-height: 44px;
}

.kanban-add-list-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.kanban-add-list-form {
    background: rgba(13, 22, 37, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

/* ── Scrollbars ──────────────────────────────────────────────────── */
.kanban-board::-webkit-scrollbar {
    height: 6px;
}

.kanban-card-list::-webkit-scrollbar {
    width: 4px;
}

.kanban-board::-webkit-scrollbar-thumb,
.kanban-card-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(121, 168, 181, 0.22);
}

.kanban-board::-webkit-scrollbar-track,
.kanban-card-list::-webkit-scrollbar-track {
    background: transparent;
}

/* ── Compact inputs inside kanban forms ──────────────────────────── */
.kanban-column input:not([type="color"]):not([type="checkbox"]):not([type="hidden"]),
.kanban-add-list input:not([type="color"]):not([type="checkbox"]):not([type="hidden"]) {
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 0.84rem;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.kanban-column input:not([type="color"]):not([type="checkbox"]):not([type="hidden"]):focus,
.kanban-add-list input:not([type="color"]):not([type="checkbox"]):not([type="hidden"]):focus {
    outline: 2px solid rgba(126, 242, 255, 0.28);
    border-color: rgba(126, 242, 255, 0.42);
    background: rgba(255, 255, 255, 0.08);
}

/* ── Column create/edit form layout ─────────────────────────────── */
.kanban-col-form {
    display: grid;
    gap: 8px;
    padding: 10px;
}

/* Footer row: color picker + action buttons side by side */
.kanban-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

/* Inline color picker label */
.color-inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.color-inline span {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.color-inline input[type="color"] {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px !important;
    border-radius: 6px !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Action buttons container in form footer */
.kanban-form-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Inline single-row form (column create / column edit) ───────────── */
.kanban-inline-form {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kanban-inline-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kanban-inline-row input {
    flex: 1;
    min-width: 0;
}

/* Compact submit button inside inline row forms */
.kanban-inline-btn {
    flex-shrink: 0;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    min-height: 32px !important;
    line-height: 1.2 !important;
    white-space: nowrap;
}

/* X close button */
.kanban-inline-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: rgba(185, 195, 210, 0.45);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    touch-action: manipulation;
}

.kanban-inline-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.12);
}

.kanban-inline-close:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Danger delete-column button (bottom of edit form) */
.kanban-delete-col-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 10px;
    margin-top: 2px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 107, 107, 0.75);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-align: left;
}

.kanban-delete-col-btn:hover:not(:disabled) {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.kanban-delete-col-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Column edit form background (matches column) */
.kanban-col-edit-form {
    background: #1a1d23;
}

/* ── Compact buttons inside kanban forms ─────────────────────────── */
/* Override the global pill-buttons (0.9rem padding) with small ones  */
.kanban-column .primary-button,
.kanban-column .ghost-button,
.kanban-add-list .primary-button,
.kanban-add-list .ghost-button {
    padding: 6px 13px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    min-height: 30px;
    line-height: 1.3;
}

/* "Eliminar" button in kanban edit forms — subtle danger style */
.kanban-column .kanban-danger-btn,
.kanban-add-list .kanban-danger-btn {
    color: var(--danger) !important;
    border-color: rgba(255, 123, 123, 0.18) !important;
    background: rgba(255, 123, 123, 0.06) !important;
}

/* Rich editor toolbar buttons inside kanban — also compact */
.kanban-column .rich-editor-button {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 5px;
}

/* ── Rich content (card description preview) ─────────────────────── */
.rich-content,
.rich-content p,
.rich-content li,
.rich-content div,
.rich-content span {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rich-editor {
    display: grid;
    gap: 0.65rem;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.rich-editor-button {
    border: 1px solid rgba(121, 168, 181, 0.18);
    background: rgba(8, 15, 27, 0.58);
    color: var(--text);
    border-radius: 0.9rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.rich-editor-button:hover {
    background: rgba(126, 242, 255, 0.1);
}

.rich-editor-surface {
    min-height: 8rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(121, 168, 181, 0.18);
    background: rgba(8, 15, 27, 0.9);
    color: var(--text);
    border-radius: 1rem;
    line-height: 1.6;
    overflow-y: auto;
}

.rich-editor-surface:focus {
    outline: 2px solid rgba(126, 242, 255, 0.32);
    border-color: rgba(126, 242, 255, 0.42);
}

.rich-editor-surface:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
}

.rich-content p,
.rich-content ul,
.rich-content ol {
    margin: 0 0 0.6rem;
}

.rich-content p:last-child,
.rich-content ul:last-child,
.rich-content ol:last-child {
    margin-bottom: 0;
}

.rich-content ul,
.rich-content ol {
    padding-left: 1.2rem;
}

.rich-content a {
    color: var(--accent);
    text-decoration: underline;
}

@media (max-width: 1180px) {
    .sidebar {
        width: min(300px, calc(100vw - 1rem));
    }

    .app-shell.sidebar-collapsed .sidebar {
        width: min(300px, calc(100vw - 1rem));
        opacity: 1;
        pointer-events: none;
        transform: translateX(calc(-100% - 1rem));
    }

    .metrics-grid,
    .client-grid,
    .two-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        display: block;
        opacity: 0;
        pointer-events: none;
        background: rgba(3, 8, 20, 0.5);
        backdrop-filter: blur(2px);
        z-index: 50;
        transition: opacity 0.22s ease;
    }

    .sidebar-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .app-shell.has-sidebar .main-content,
    .app-shell.has-sidebar.sidebar-collapsed .main-content {
        margin-left: 0;
        padding-top: 4.75rem;
    }
}

@media (max-width: 760px) {
    .main-content {
        padding: 1.25rem;
    }

    .page-header,
    .list-card,
    .summary-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .metrics-grid,
    .client-grid,
    .two-columns {
        grid-template-columns: 1fr;
    }

    .login-card-corporate {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    .login-card-main {
        padding-right: 0;
    }

    .login-card-main h1 {
        max-width: none;
        font-size: clamp(2.2rem, 9vw, 3.2rem);
    }

    .login-brand-image {
        width: min(100%, 360px);
    }

    .sidebar-top {
        align-items: flex-start;
    }

    .kanban-board {
        min-width: unset;
        gap: 12px;
    }

    .project-board-panel {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain !important;
    }

    .kanban-column,
    .kanban-add-list {
        flex: 0 0 calc(100vw - 3rem);
        width: calc(100vw - 3rem);
        max-height: none;
        scroll-snap-align: start;
    }

    .kanban-card-list {
        overflow-y: visible;
    }

    .kanban-menu-button {
        width: 40px;
        height: 40px;
    }

    .kanban-add-card-btn {
        min-height: 44px;
        font-size: 0.875rem;
    }

    .request-feedback-banner {
        top: auto;
        right: 1rem;
        bottom: 1rem;
        left: 1rem;
        max-width: none;
    }

    .hours-chart-detail-head,
    .hours-task-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

:root[data-theme="light"] body {
    background:
        radial-gradient(circle at top, rgba(29, 183, 207, 0.14), transparent 22%),
        radial-gradient(circle at 80% 10%, rgba(94, 157, 236, 0.14), transparent 30%),
        radial-gradient(circle at 15% 24%, rgba(255, 145, 99, 0.12), transparent 22%),
        linear-gradient(180deg, #f9fbff 0%, #edf4fb 48%, #e7eff8 100%);
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
    border-color: rgba(72, 97, 122, 0.18);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

:root[data-theme="light"] input:focus,
:root[data-theme="light"] select:focus,
:root[data-theme="light"] textarea:focus {
    outline-color: rgba(29, 183, 207, 0.22);
    border-color: rgba(29, 183, 207, 0.35);
}

:root[data-theme="light"] .sidebar {
    border-right-color: rgba(72, 97, 122, 0.12);
    background: rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] .sidebar-toggle-button {
    border-color: rgba(72, 97, 122, 0.14);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 28px rgba(38, 68, 104, 0.14);
}

:root[data-theme="light"] .sidebar-toggle-button span {
    background: #162334;
}

:root[data-theme="light"] .sidebar-copy,
:root[data-theme="light"] .user-chip span,
:root[data-theme="light"] p,
:root[data-theme="light"] .list-card small,
:root[data-theme="light"] .client-card small,
:root[data-theme="light"] .list-meta small,
:root[data-theme="light"] th,
:root[data-theme="light"] .form-grid span,
:root[data-theme="light"] .metric-card span,
:root[data-theme="light"] .metric-card small {
    color: var(--text-muted);
}

:root[data-theme="light"] .nav-links a.active,
:root[data-theme="light"] .nav-links a:hover {
    color: #102033;
}

:root[data-theme="light"] .user-chip {
    border-color: rgba(72, 97, 122, 0.14);
    background: rgba(255, 255, 255, 0.82);
}

:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .panel-card,
:root[data-theme="light"] .client-card,
:root[data-theme="light"] .login-card,
:root[data-theme="light"] .empty-state,
:root[data-theme="light"] .list-card,
:root[data-theme="light"] .info-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.98));
    box-shadow: 0 18px 42px rgba(38, 68, 104, 0.12);
}

:root[data-theme="light"] .ghost-button {
    border-color: rgba(72, 97, 122, 0.16);
    background: rgba(255, 255, 255, 0.86);
}

:root[data-theme="light"] .section-kicker {
    color: #198ca2;
}

:root[data-theme="light"] .login-highlights span {
    border-color: rgba(72, 97, 122, 0.14);
    background: rgba(255, 255, 255, 0.9);
    color: #23344a;
}

:root[data-theme="light"] .login-action-panel {
    border-color: rgba(72, 97, 122, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 255, 0.98)),
        radial-gradient(circle at top left, rgba(29, 183, 207, 0.08), transparent 38%);
}

:root[data-theme="light"] .summary-row,
:root[data-theme="light"] .timeline-card,
:root[data-theme="light"] th,
:root[data-theme="light"] td {
    border-color: rgba(72, 97, 122, 0.12);
}

:root[data-theme="light"] .status-planned { background: rgba(88, 166, 255, 0.16); color: #2568a8; }
:root[data-theme="light"] .status-active { background: rgba(39, 169, 122, 0.14); color: #1c7f5b; }
:root[data-theme="light"] .status-blocked { background: rgba(217, 104, 104, 0.14); color: #b34d4d; }
:root[data-theme="light"] .status-review { background: rgba(255, 145, 99, 0.14); color: #b85c30; }
:root[data-theme="light"] .status-completed { background: rgba(85, 125, 149, 0.14); color: #4b667d; }

:root[data-theme="light"] .alert.success {
    background: rgba(39, 169, 122, 0.12);
    border-color: rgba(39, 169, 122, 0.2);
}

:root[data-theme="light"] .alert.error {
    background: rgba(217, 104, 104, 0.12);
    border-color: rgba(217, 104, 104, 0.2);
}

:root[data-theme="light"] .request-feedback-banner {
    border-color: rgba(72, 97, 122, 0.14);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(38, 68, 104, 0.12);
}

/* Light mode: Kanban overrides — fondo blanco, texto negro */
:root[data-theme="light"] .project-board-panel {
    background: rgba(230, 235, 242, 0.55) !important;
    border-color: rgba(72, 97, 122, 0.1) !important;
}

:root[data-theme="light"] .kanban-column {
    border-color: rgba(0, 0, 0, 0.1);
    background: #f1f2f4;
    backdrop-filter: none;
}

:root[data-theme="light"] .kanban-menu-panel {
    border-color: rgba(0, 0, 0, 0.12);
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .kanban-menu-item {
    color: #1a1d23;
}

:root[data-theme="light"] .kanban-menu-button:hover {
    background: rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .kanban-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .kanban-menu-item.danger {
    color: #c0392b;
}

:root[data-theme="light"] .rich-editor-button {
    border-color: rgba(72, 97, 122, 0.14);
    background: rgba(255, 255, 255, 0.9);
}

:root[data-theme="light"] .rich-editor-surface {
    border-color: rgba(72, 97, 122, 0.18);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

:root[data-theme="light"] .board-card-form {
    background: rgba(225, 228, 234, 0.85);
    border-color: rgba(72, 97, 122, 0.14);
}

:root[data-theme="light"] .board-card-form .card-actions {
    background: rgba(225, 228, 234, 0.98);
}

:root[data-theme="light"] .color-field input[type="color"] {
    border-color: rgba(72, 97, 122, 0.16);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 18px rgba(38, 68, 104, 0.12);
}

:root[data-theme="light"] .kanban-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: #1a1d23;
}

:root[data-theme="light"] .kanban-card-sortable:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(29, 183, 207, 0.4);
    background: #fafbfc;
}

:root[data-theme="light"] .kanban-card-title {
    color: #1a1d23;
}

:root[data-theme="light"] .kanban-card-desc {
    color: #4a5568;
}

:root[data-theme="light"] .kanban-card-desc strong,
:root[data-theme="light"] .kanban-card-desc b {
    color: #1a1d23;
}

:root[data-theme="light"] .kanban-card-edit-btn {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.15);
    color: #4a5568;
}

:root[data-theme="light"] .kanban-add-card-btn {
    border-top-color: rgba(0, 0, 0, 0.07);
}

:root[data-theme="light"] .board-card-form {
    background: #f4f5f7;
    border-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .board-card-form .kanban-form-actions {
    background: #f4f5f7;
}

:root[data-theme="light"] .kanban-card-edit-form {
    background: #f4f5f7;
}

:root[data-theme="light"] .kanban-card-edit-form .kanban-form-actions {
    background: #f4f5f7;
    border-top-color: rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .board-card-form .kanban-form-actions {
    background: #f4f5f7;
}

:root[data-theme="light"] .kanban-col-edit-form {
    background: #f1f2f4;
}

:root[data-theme="light"] .kanban-inline-close {
    color: rgba(30, 50, 70, 0.45);
}

:root[data-theme="light"] .kanban-inline-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #1a1d23;
    border-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .kanban-delete-col-btn {
    color: rgba(200, 50, 50, 0.8);
}

:root[data-theme="light"] .kanban-delete-col-btn:hover:not(:disabled) {
    background: rgba(200, 50, 50, 0.08);
    color: #c0392b;
}

:root[data-theme="light"] .kanban-card-title {
    color: #172b4d;
}

:root[data-theme="light"] .kanban-card-desc {
    color: rgba(23, 43, 77, 0.72);
}

:root[data-theme="light"] .kanban-card-meta small {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: rgba(23, 43, 77, 0.5);
}


:root[data-theme="light"] .kanban-add-list-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
    color: #4a5568;
}

:root[data-theme="light"] .kanban-add-list-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1d23;
}

:root[data-theme="light"] .kanban-add-list-form {
    background: #f1f2f4;
    border-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .kanban-card-edit-btn {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(72, 97, 122, 0.2);
}

:root[data-theme="light"] .kanban-card-edit-btn:hover {
    background: rgba(29, 183, 207, 0.1);
    color: var(--accent);
    border-color: rgba(29, 183, 207, 0.3);
}

:root[data-theme="light"] .kanban-empty {
    border-color: rgba(72, 97, 122, 0.2);
}

:root[data-theme="light"] .kanban-add-card-btn:hover:not(:disabled) {
    background: rgba(72, 97, 122, 0.08);
}

:root[data-theme="light"] .kanban-add-list-btn {
    background: rgba(0, 0, 0, 0.12);
    color: #172b4d;
}

:root[data-theme="light"] .kanban-add-list-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #172b4d;
}

:root[data-theme="light"] .kanban-add-list-form {
    background: #e4e9f0;
    border-color: rgba(72, 97, 122, 0.14);
}

:root[data-theme="light"] .kanban-column input:not([type="color"]):not([type="checkbox"]):not([type="hidden"]),
:root[data-theme="light"] .kanban-add-list input:not([type="color"]):not([type="checkbox"]):not([type="hidden"]) {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(72, 97, 122, 0.2);
    color: var(--text);
}

:root[data-theme="light"] .color-inline input[type="color"] {
    border-color: rgba(72, 97, 122, 0.2) !important;
}

:root[data-theme="light"] .hours-chart-detail {
    border-color: rgba(72, 97, 122, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.98));
}

:root[data-theme="light"] .hours-task-row {
    border-color: rgba(72, 97, 122, 0.12);
    background: rgba(255, 255, 255, 0.88);
}

:root[data-theme="light"] .glow-a {
    background: #6bcfe8;
}

:root[data-theme="light"] .glow-b {
    background: #ffbc95;
}

:root[data-theme="light"] .theme-toggle-indicator::after {
    transform: translateX(0.9rem);
    background: rgba(22, 35, 52, 0.92);
}

/* ── Card detail modal ───────────────────────────────────────────── */
.kanban-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
}

.kanban-modal {
    background: #1e2229;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    width: min(580px, 100%);
    max-height: 82vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.kanban-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 18px 18px 12px;
    position: sticky;
    top: 0;
    background: #1e2229;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    z-index: 1;
}

.kanban-modal-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 4px;
}

.kanban-modal-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: #e6edf6;
    line-height: 1.4;
    margin: 0;
}

.kanban-modal-close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: rgba(185, 195, 210, 0.5);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
}

.kanban-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e6edf6;
}

.kanban-modal-body {
    padding: 16px 18px;
    flex: 1;
}

.kanban-modal-desc {
    color: rgba(185, 195, 210, 0.88);
    font-size: 0.9rem;
    line-height: 1.7;
}

.kanban-modal-desc p { margin: 0 0 0.5rem; }
.kanban-modal-desc p:last-child { margin-bottom: 0; }
.kanban-modal-desc ul, .kanban-modal-desc ol { padding-left: 1.2rem; margin: 0.3rem 0; }
.kanban-modal-desc li { margin: 0.2rem 0; }
.kanban-modal-desc strong, .kanban-modal-desc b { color: #e6edf6; font-weight: 700; }

.kanban-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    position: sticky;
    bottom: 0;
    background: #1e2229;
    gap: 8px;
}

.kanban-modal-date {
    font-size: 0.68rem;
    color: rgba(185, 195, 210, 0.45);
    letter-spacing: 0.02em;
}

/* Card content area — pointer cursor to hint it's clickable */
.kanban-card-content {
    cursor: pointer;
}

/* Light mode modal */
:root[data-theme="light"] .kanban-modal {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}

:root[data-theme="light"] .kanban-modal-header,
:root[data-theme="light"] .kanban-modal-footer {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .kanban-modal-title {
    color: #172b4d;
}

:root[data-theme="light"] .kanban-modal-desc {
    color: rgba(23, 43, 77, 0.85);
}

:root[data-theme="light"] .kanban-modal-desc strong,
:root[data-theme="light"] .kanban-modal-desc b {
    color: #172b4d;
}

:root[data-theme="light"] .kanban-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #172b4d;
}

@keyframes request-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.55; }
}

@keyframes toast-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
