/**
 * UI Components - Light theme
 */

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.card:hover {
    border-color: #e5e7eb;
    box-shadow: none;
    transform: none;
}

.card-header {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
}

.card-body {
    padding: var(--spacing-md) 0;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.625rem 1.25rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: normal;
    border-radius: var(--radius-md);
    border: 1px solid #d1d5db;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    box-sizing: border-box;
}

.btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn:active:not(:disabled) {
    background: #f3f4f6;
    border-color: #6b7280;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    border: 1px solid var(--accent-blue);
}

.btn-primary:hover:not(:disabled) {
    background: #0052a3;
    border-color: #0052a3;
    transform: none;
    box-shadow: none;
}

.btn-primary:active:not(:disabled) {
    background: #003d7a;
    border-color: #003d7a;
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid #d1d5db;
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: none;
}

.btn-secondary:active:not(:disabled) {
    background: #f3f4f6;
    border-color: #6b7280;
}

/* Add/Create Button */
.btn-add,
.btn-create {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-add:hover,
.btn-create:hover {
    background: #4b5563;
    transform: none;
    box-shadow: none;
    color: white;
    text-decoration: none;
}

.btn-add:active,
.btn-create:active {
    background: #374151;
    transform: none;
    box-shadow: none;
}

.btn-add:focus,
.btn-create:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.3);
}

.btn-add svg,
.btn-create svg {
    transition: transform 0.2s ease;
    width: 14px;
    height: 14px;
}

.btn-add:hover svg,
.btn-create:hover svg {
    transform: none;
}

.btn-add.btn-sm,
.btn-create.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    height: 2rem;
}

.btn-add.btn-sm svg,
.btn-create.btn-sm svg {
    width: 14px;
    height: 14px;
}

.btn-success {
    background: #10b981;
    border: 1px solid #10b981;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
    border-color: #059669;
}

.btn-danger {
    background: #ef4444;
    border: 1px solid #ef4444;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-sm.btn-icon {
    padding: 0.5rem;
    min-width: 32px;
    width: 32px;
    height: 32px;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-icon {
    padding: 0.625rem;
    aspect-ratio: 1;
    min-width: 40px;
}

.btn-icon svg {
    display: block;
}

/* Sync and Export Buttons */
.btn-sync {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
    border: 1px solid rgba(0, 102, 204, 0.2);
}

.btn-sync:hover:not(:disabled) {
    background: rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.3);
    color: #0052a3;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

.btn-sync:active:not(:disabled) {
    background: rgba(0, 102, 204, 0.2);
}

.btn-export {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.btn-export:hover:not(:disabled) {
    background: rgba(107, 114, 128, 0.15);
    border-color: rgba(107, 114, 128, 0.3);
    color: #4b5563;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.1);
}

.btn-export:active:not(:disabled) {
    background: rgba(107, 114, 128, 0.2);
}

.btn-send {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn-send:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #16a34a;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.btn-send:active:not(:disabled) {
    background: rgba(34, 197, 94, 0.2);
}

/* Input */
.input,
.textarea,
.select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-base);
}

.select {
    padding-right: 2rem;
    cursor: pointer;
}

.input:hover:not(:focus),
.textarea:hover:not(:focus),
.select:hover:not(:focus) {
    border-color: #9ca3af;
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: var(--bg-card);
}

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

.textarea {
    min-height: 100px;
    resize: vertical;
}

.input-group {
    margin-bottom: var(--spacing-md);
}

.label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.input-error {
    border-color: #ef4444;
}

.error-message {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.8125rem;
    color: #dc2626;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    background: var(--bg-card);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
}

.table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    font-weight: 600;
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.table tbody tr {
    transition: none;
    background: var(--bg-card);
}

.table tbody tr:hover {
    background: var(--bg-card);
}

.table tbody tr:not(:last-child) td {
    border-bottom: 1px solid #e5e7eb;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Editable name */
.editable-invoice-name {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
    display: inline-block;
    min-width: 100px;
}

.editable-invoice-name:hover {
    background: var(--bg-primary);
    color: var(--accent-blue);
}

.editable-invoice-name:active {
    background: var(--bg-secondary);
}

.inline-edit-input {
    outline: none !important;
    border: 1px solid var(--accent-blue) !important;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1) !important;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.badge > * {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1 1 auto;
}

td .badge:only-child,
th .badge:only-child {
    display: inline-flex;
    width: auto;
}

div[style*="max-width"] .badge:only-child {
    display: flex;
    width: 100%;
}

.badge-primary {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-muted {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Alert */
.alert {
    padding: var(--spacing-md);
    border-radius: 0.375rem;
    margin-bottom: var(--spacing-md);
    border-left: 4px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: #10b981;
    color: #047857;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
    color: #b91c1c;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
    color: #b45309;
}

.alert-info {
    background: rgba(0, 102, 204, 0.1);
    border-left-color: #0066cc;
    color: #0052a3;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: calc(100vw - 40px);
}

.toast-notification {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 320px;
    max-width: 400px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    opacity: 0;
    animation: toastFadeIn 0.3s ease-out forwards;
    position: relative;
}

.toast-notification.toast-exit {
    animation: toastFadeOut 0.3s ease-in forwards;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid;
}

.toast-notification.toast-success .toast-icon {
    border-color: var(--accent-green, #10b981);
    color: var(--accent-green, #10b981);
}

.toast-notification.toast-error .toast-icon {
    border-color: var(--accent-red, #ef4444);
    color: var(--accent-red, #ef4444);
}

.toast-notification.toast-warning .toast-icon {
    border-color: var(--accent-orange, #f59e0b);
    color: var(--accent-orange, #f59e0b);
}

.toast-notification.toast-info .toast-icon {
    border-color: var(--accent-blue, #0066cc);
    color: var(--accent-blue, #0066cc);
}

.toast-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary, #111827);
}

.toast-message {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-muted, #6b7280);
    font-weight: 400;
}

.toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted, #6b7280);
    transition: all 0.2s ease;
    border-radius: 50%;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.toast-close:hover {
    background-color: var(--bg-hover, #f9fafb);
    color: var(--text-primary, #111827);
}

.toast-close svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

@media (max-width: 768px) {
    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast-notification {
        min-width: auto;
        max-width: none;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn var(--transition-base);
}

.modal-overlay.hidden,
#uploadModal.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.modal,
.modal-content {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn var(--transition-base);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content.modal-lg {
    max-width: 720px;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-header .modal-title {
    flex: 0 1 auto;
}

.modal-header button:last-child {
    flex: 0 0 auto;
    margin-left: auto;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted, #9ca3af);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary, #111827);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Progress bar */
.progress {
    height: 8px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent-blue);
    transition: width var(--transition-slow);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: var(--bg-card);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 100;
    padding: 0.25rem 0;
    animation: slideIn var(--transition-base);
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: #f9fafb;
}

.dropdown-item:active {
    background: #f3f4f6;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.25rem 0;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    margin-bottom: var(--spacing-sm);
}

.tooltip:hover::after {
    opacity: 1;
}

/* Form aliases used across views */
.form-input,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-base);
}

.form-input:hover:not(:focus),
.form-textarea:hover:not(:focus) {
    border-color: #9ca3af;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: var(--bg-card);
}

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

select.form-input {
    padding-right: 2rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

/* ============================================
   MOBILE COMPONENT ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .table-wrapper,
    .card .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: -2px;
        margin-right: -2px;
        border-radius: var(--radius-md);
    }

    .table {
        font-size: 0.8rem;
    }
    .table th {
        padding: 0.5rem 0.5rem;
        font-size: 0.7rem;
    }
    .table td {
        padding: 0.5rem 0.5rem;
    }
    .table .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.7rem;
        min-height: 28px;
    }

    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal,
    .modal-content {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    .modal-content.modal-lg {
        max-width: 100% !important;
    }

    .modal-header {
        padding: 0.75rem 1rem;
        position: sticky;
        top: 0;
        background: var(--bg-card);
        z-index: 1;
        flex-shrink: 0;
    }

    .modal-header h3 {
        font-size: 0.95rem;
    }

    .modal-body {
        padding: 0.75rem;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    }

    .modal-footer {
        padding: 0.5rem 0.75rem;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
        position: sticky;
        bottom: 0;
        background: var(--bg-card);
        z-index: 1;
        flex-shrink: 0;
    }

    .form-input,
    .form-textarea,
    .input,
    .textarea,
    .select {
        font-size: 16px;
        padding: 0.6rem 0.75rem;
    }

    select.form-input {
        padding-right: 2rem;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .card-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .tooltip::after {
        display: none;
    }

    .dropdown {
        position: static;
    }

    .btn-add,
    .btn-create {
        width: 100%;
        justify-content: center;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }

    .alert {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* =============================================
   Task Display Modes (user setting on <body>)
   compact  = default (base styles, no overrides)
   expanded = spacious cards, full details
   collapsed = ultra-dense, title only
   ============================================= */

/* Expanded */
body.task-display-expanded .kanban-meist-card {
    padding: 0.75rem 0.95rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-radius: 10px;
}
body.task-display-expanded .kanban-meist-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    width: 100%;
    flex: none;
    line-height: 1.4;
}
body.task-display-expanded .kanban-meist-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.7rem;
}
body.task-display-expanded .kanban-meist-deadline {
    position: static;
    font-size: 0.7rem;
    border-radius: 6px;
    padding: 0.15rem 0.4rem;
}
body.task-display-expanded .kanban-changes-badge {
    min-width: 20px;
    height: 20px;
    font-size: 0.65rem;
}
body.task-display-expanded .kanban-meist-body {
    gap: 0.5rem;
    padding: 0.55rem;
}
body.task-display-expanded .kanban-meist-header {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
}
body.task-display-expanded .kanban-meist-count {
    font-size: 0.78rem;
    padding: 0.18rem 0.55rem;
}

/* Collapsed */
body.task-display-collapsed .kanban-meist-card {
    padding: 0.22rem 0.45rem;
    gap: 0.3rem;
    border-radius: 3px;
    border-color: #eee;
}
body.task-display-collapsed .kanban-meist-card-title {
    font-size: 0.78rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.task-display-collapsed .kanban-meist-avatar {
    display: none;
}
body.task-display-collapsed .kanban-meist-deadline {
    font-size: 0.5rem;
    padding: 0.02rem 0.18rem;
}
body.task-display-collapsed .kanban-changes-badge {
    min-width: 13px;
    height: 13px;
    font-size: 0.45rem;
    padding: 0 0.15rem;
}
body.task-display-collapsed .kanban-meist-body {
    gap: 1px;
    padding: 0.25rem;
}
body.task-display-collapsed .kanban-meist-header {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
}
body.task-display-collapsed .kanban-meist-count {
    font-size: 0.65rem;
    padding: 0.08rem 0.35rem;
}
body.task-display-collapsed .kanban-meist-add {
    padding: 0.2rem;
    font-size: 0.68rem;
}
body.task-display-collapsed .kanban-meist-column {
    min-height: 150px;
}

/* --- Toggle Switch --- */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.toggle-switch input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}
.toggle-switch-track {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.toggle-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}
.toggle-switch input:checked + .toggle-switch-track {
    background: #3b82f6;
}
.toggle-switch input:checked + .toggle-switch-track::after {
    transform: translateX(16px);
}
.toggle-switch input:focus-visible + .toggle-switch-track {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
.toggle-switch-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1;
}



/* Align all KB submenu rows the same (avoid :has() changing only “Settings”) */
.nav-group .nav-submenu .nav-sublink {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.nav-group .nav-submenu .nav-sublink .nav-text {
    flex: 1;
    min-width: 0;
}
