:root {
    --color-bg: #f5f6fa;
    --color-surface: #ffffff;
    --color-surface-elevated: #eef1f8;
    --color-card: #ffffff;
    --color-text: #0f172a;
    --color-muted: #475569;
    --color-border: #d0d7e2;
    --color-icon: #6b7280;
    --modal-bg: #f8fafc;
    --modal-border: rgba(15, 23, 42, 0.08);
    --modal-border-strong: rgba(15, 23, 42, 0.14);
    --modal-text: #0f172a;
    --modal-muted: #475569;
    --modal-input-bg: #ffffff;
    --modal-input-border: #d0d7e2;
    --modal-input-focus: #3c82ff;
    --modal-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
    --modal-primary: #1f6bff;
    --modal-primary-strong: #0f53d5;
    --modal-secondary: rgba(15, 23, 42, 0.04);
}

body[data-theme='dark'] {
    --color-bg: #101218;
    --color-surface: #191c24;
    --color-surface-elevated: #1f2330;
    --color-card: #1b1f2a;
    --color-text: #f8fafc;
    --color-muted: #cbd5f5;
    --color-border: #2e3445;
    --color-icon: #f3f4f6;
    --modal-bg: #0a1326;
    --modal-border: rgba(255, 255, 255, 0.14);
    --modal-border-strong: rgba(255, 255, 255, 0.28);
    --modal-text: #f4f7ff;
    --modal-muted: #d3dcff;
    --modal-input-bg: #121b2f;
    --modal-input-border: #1f2943;
    --modal-input-focus: #4a8dff;
    --modal-shadow: 0 28px 90px rgba(0, 4, 15, 0.65);
    --modal-primary: #1f6bff;
    --modal-primary-strong: #0f53d5;
    --modal-secondary: rgba(255, 255, 255, 0.07);
}

::-webkit-scrollbar {
    height: 8px;
  }
  ::-webkit-scrollbar-thumb {
    background: #e1e1e1;
    border-radius: 4px;
  }
  .kanban-board {
    padding-bottom: 12px;
  }  

body {
    background: var(--color-bg);
    color: var(--color-text);
}


.surface-base {
    background: var(--color-surface);
    color: var(--color-text);
}

.surface-elevated {
    background: var(--color-surface-elevated);
    color: var(--color-text);
}

.surface-card {
    background: var(--color-card);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.text-muted-base {
    color: var(--color-muted);
}

.icon-muted {
    color: var(--color-icon);
}

.input-base {
    width: 100%;
    border-radius: 0.85rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-base::placeholder {
    color: var(--color-muted);
}

.input-base:focus {
    outline: none;
    border-color: #6d8bff;
    box-shadow: 0 0 0 2px rgba(109, 139, 255, 0.25);
}

.filter-date {
    min-height: 3rem;
    padding: 0.85rem 1rem;
    font-size: 1rem;
}

.filter-multi-dropdown {
    position: relative;
    width: 100%;
}

.filter-multi-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
    text-align: left;
}

.filter-multi-label {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-multi-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    max-height: 14rem;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.25);
    padding: 0.35rem 0.4rem;
    display: none;
}

.filter-multi-dropdown.open .filter-multi-menu {
    display: block;
}

.filter-multi-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.5rem;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.filter-multi-item:hover {
    background: var(--color-surface-elevated);
}

.filter-multi-item input {
    accent-color: #2563eb;
}

body[data-theme='dark'] .filter-multi-menu {
    background: #0b1120;
    border-color: #2b3653;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

body[data-theme='dark'] .filter-multi-item:hover {
    background: #11172b;
}

.filter-panel {
    border: 1px solid var(--color-border);
    background: var(--color-surface-elevated);
    color: var(--color-text);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.12);
}

.filter-panel input,
.filter-panel select {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

body[data-theme='dark'] .filter-panel {
    background: #11172b;
    border-color: #1f2b40;
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.65);
}

body[data-theme='dark'] .filter-panel input,
body[data-theme='dark'] .filter-panel select {
    background: #0b1120;
    border-color: #2b3653;
    color: #eff2ff;
}

.dashboard-placeholder,
.dashboard-embed {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
}

body[data-theme='dark'] .dashboard-placeholder,
body[data-theme='dark'] .dashboard-embed {
    background: #11172b;
    border-color: #1f273d;
    color: #f8fafc;
}

.kanban-card:active {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
    background: var(--color-surface);
    transform: scale(0.99);
}

/* Align stats with column name */
.kanban-header .kanban-badge {
    vertical-align: middle;
}

input,
textarea,
select {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-muted);
}

.modal-theme {
    background: var(--modal-bg);
    color: var(--modal-text);
    border-radius: 24px;
    border: 1px solid var(--modal-border);
    box-shadow: var(--modal-shadow);
}
.modal-theme h5,
.modal-theme h2,
.modal-theme .modal-title {
    color: var(--modal-text);
    font-weight: 700;
    margin: 0;
    font-size: 1.25rem;
    padding-left: 0.35rem;
}
.modal-meta {
    color: var(--modal-muted);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: block;
    padding-left: 0.35rem;
}
.modal-theme label {
    color: var(--modal-muted);
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.35rem;
}
.modal-theme .modal-header,
.modal-theme .modal-footer {
    background: transparent;
    border: none;
    padding-left: 0;
    padding-right: 0;
}
.modal-theme .modal-body {
    color: var(--modal-text);
}
.modal-theme input[type="text"],
.modal-theme input[type="email"],
.modal-theme input[type="number"],
.modal-theme input[type="url"],
.modal-theme input[type="password"],
.modal-theme input[type="color"],
.modal-theme select,
.modal-theme textarea,
.modal-input,
.modal-select {
    width: 100%;
    border-radius: 1.1rem;
    border: 1px solid var(--modal-input-border);
    background: var(--modal-input-bg);
    color: var(--modal-text);
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.modal-theme input[type="color"] {
    padding: 0.25rem;
    height: 2.5rem;
}
.modal-theme input:focus,
.modal-theme select:focus,
.modal-theme textarea:focus,
.modal-input:focus,
.modal-select:focus {
    outline: none;
    border-color: var(--modal-input-focus);
    box-shadow: 0 0 0 2px rgba(60, 130, 255, 0.25);
}
.modal-theme input[type="checkbox"],
.modal-theme input[type="radio"] {
    accent-color: var(--modal-primary);
    background: var(--modal-input-bg);
    border: 1px solid var(--modal-input-border);
}
.modal-field {
    display: flex;
    flex-direction: column;
}
.modal-check,
.modal-theme .modal-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--modal-muted);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0;
}
.modal-theme .btn,
.modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 999px;
    font-weight: 700;
    padding: 0.65rem 1.35rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.modal-theme .btn-primary,
.modal-btn-primary {
    background: linear-gradient(135deg, var(--modal-primary), var(--modal-primary-strong));
    color: #fff;
    border-color: var(--modal-primary-strong);
    box-shadow: 0 12px 30px rgba(15, 83, 213, 0.35);
}
.modal-theme .btn-primary:hover,
.modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(15, 83, 213, 0.45);
}
.modal-theme .btn-secondary,
.modal-btn-secondary {
    background: var(--modal-secondary);
    color: var(--modal-text);
    border-color: var(--modal-border-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.modal-theme .btn-secondary:hover,
.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
}
.modal-theme .btn-danger,
.modal-btn-danger {
    background: linear-gradient(135deg, #ef4444, #c81e1e);
    color: #fff;
    border-color: #c81e1e;
    box-shadow: 0 12px 28px rgba(200, 30, 30, 0.32);
}
.modal-theme .btn-danger:hover,
.modal-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(200, 30, 30, 0.42);
}
.modal-close,
.modal-theme .btn-close {
    background: transparent;
    border: 1px solid transparent;
    color: var(--modal-muted);
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    padding: 0;
    cursor: pointer;
}
.modal-close:hover,
.modal-theme .btn-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--modal-text);
    border-color: var(--modal-border);
}

/* Header logo */
.header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.card-date {
    font-size: 0.8rem;
}

#kanbanHeader {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
}

.filter-toggle-btn {
    position: relative;
    bottom: auto;
    right: auto;
    transform: none;
    z-index: 10;
}

.filter-toggle-btn i {
    color: #0747A6;
}

/* Dark mode button styles */
body[data-theme='dark'] #toggleThemeForm button,
body[data-theme='dark'] .filter-toggle-btn {
    color: #fff;
    border-color: #fff;
}

body[data-theme='dark'] #toggleThemeForm i,
body[data-theme='dark'] .filter-toggle-btn i {
    color: #fff;
}

#filterForm {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
    grid-column: 1 / -1;
}

#filterForm.filters-hidden {
    display: none;
}

#sortPanel {
    margin-top: 0.5rem;
    grid-column: 1 / -1;
}

#filterForm .form-control,
#filterForm .form-select {
    width: 100%;
}

#filterForm .date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
