/* Responsiveness */
@media (max-width:960px) {
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 20;
        transform: translateX(-100%);
        box-shadow: var(--shadow-md);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .mobile-nav-toggle {
        display: flex;
    }
    /*
    .stat-grid{grid-template-columns:repeat(2,1fr);}
    .dash-grid{grid-template-columns:1fr;}
    */
}
@media (max-width:900px) {
    .auth-brand-pane { 
        display: none; 
    }
    .auth-mobile-logo { 
        display: flex; 
    }
    .auth-form-pane { 
        padding: 48px 24px; 
    }
}
@media (max-width:640px) {
    .topbar {
        padding: 12px 16px;
        gap: 10px;
    }
    .breadcrumb {
        display: none;
    }
    .search-wrap {
        max-width: none;
    }
    .view-container {
        padding: 18px 16px 50px;
    }
    thead {
        display:none;
    }
    table:not(.timeline-grid), table:not(.timeline-grid) tbody, table:not(.timeline-grid) tr, table:not(.timeline-grid) td {
        display: block;
        width: 100%; 
    }
    tbody tr {
        border-radius: var(--radius-md);
        margin-bottom: 10px;
        border: 1px solid var(--color-border);
        /*border-left: 3px solid var(--rail);*/
        background: var(--color-surface);
    }
    tbody td {
        padding: 6px 14px;
        text-align: left;
    }
    tbody td::before {
        content: attr(data-label);
        display: block;
        font-size: 10.5px;
        color: var(--color-text-secondary);
        text-transform: uppercase;
        letter-spacing: .04em;
        margin-bottom: 2px;
    }
    tbody td:last-of-type {
        padding-bottom: 15px;
    }
    .table-button {
        text-align: right;
        margin-top: 5px;
        margin-bottom: -45px;
    }
    .feed-table-wrapper {
        background: inherit;
        border: none;
    }
	.feed-table-wrapper table {
		background-color: transparent;
	}
	.feed-table-wrapper table td {
		border-bottom: none;
	}
	.feed-table-wrapper table td icon[type='note'] {
		width: 100%;
		display: block;
		height: auto;
		background-image: none;
		pointer-events: none; 
	}
	.feed-table-wrapper table td icon[type='note']::after {
		content: attr(data-text);		
	}
	.feed-table tr th:first-of-type, .feed-table tr td:first-of-type {
		width: 100%;
	}
    .form-grid field, dialog field {
        display: grid;
    }
    .form-grid field input:not([type="submit"]), .form-grid field textarea, .form-grid field select, 
    dialog field input:not([type="submit"]), dialog field textarea, dialog field select, 
	.search-input {
        font-size: 16px;
    }
    /*
    .stat-grid{grid-template-columns:1fr 1fr;gap:10px;}
    .stat-card .stat-value{font-size:22px;}
    .modal-field-grid{grid-template-columns:1fr;}
    .modal-footer{flex-direction:column-reverse;gap:12px;align-items:stretch;}
    .modal-footer-actions{justify-content:flex-end;}
    */
    .PageDate .Datewrap {
        display: block;
        margin-top: 6px;
        margin-bottom: 6px;
        height: 36px;
        line-height: 36px;
    }
	.row-task_prio   td:first-child,
	.row-task_prio-1 td:first-child,
	.row-task_prio-2 td:first-child,
	.row-task_prio-3 td:first-child,
	.row-task_prio-4 td:first-child {
		border-left: none;
	}
	.row-task_prio {
		border-left: 5px solid var(--color-surface-elevated);
	}
	.row-task_prio-1 {
		border-left: 5px solid var(--c-slate);
	}
	.row-task_prio-2 {
		border-left: 5px solid var(--c-teal);
	}
	.row-task_prio-3 {
		border-left: 5px solid var(--c-amber);
	}
	.row-task_prio-4 {
		border-left: 5px solid var(--c-coral);
	}
}
@media (max-width:480px) {
    .theme-toggle-auth { 
        top: 14px; 
        right: 14px; 
    }
    .BtnWrap {
        display: block;
        width: 100%;
        text-align: right;
        margin-top: 12px;
        margin-bottom: 12px;
    }
	.cal-card {
		width: 100%;
		height: 10px;
		overflow: hidden;
		border-left-width: 15px;
	}
	.cal-card span, .cal-card span::before {
		color: transparent !important;
	}
	.board-wrap {
		flex-wrap: wrap;
		width: 100%;
	}
	.board-col {
		width: 100%;
	}
	.body-cols {
		grid-template-columns: none;
	}
	.right-col .stats-strip {
		grid-template-columns: repeat(2, 1fr);
	}
	.stat-grid {
		grid-template-columns: repeat(1, 1fr);
	}
	field-cell input[id$="_a"],
	field-cell input[id$="_u"],
	field-cell input[id$="_c"] { grid-column: span 12; }
	field-cell input[id$="_s"] { grid-column: span 4; }
	field-cell input[id$="_z"] { grid-column: span 8; }
}
/*
@media (max-width:420px) {
    .stat-grid{
        grid-template-columns:1fr 1fr;
    }
}
*/