:root {
    --app-bg: #f4f7fb;
    --surface: rgba(255, 255, 255, 0.96);
    --surface-strong: #ffffff;
    --surface-muted: #f3f6fb;
    --border: rgba(42, 67, 101, 0.1);
    --border-strong: rgba(42, 67, 101, 0.2);
    --text-main: #213043;
    --text-soft: #546274;
    --text-faint: #778597;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --accent-primary: #2156d6;
    --accent-primary-strong: #163ca0;
    --accent-success: #0f9d74;
    --accent-danger: #d13f4c;
    --accent-warning: #f59e0b;
    --workspace-schedule: #2c68d3;
    --workspace-organisation: #1c7d6c;
    --workspace-task: #297d49;
    --workspace-gantt: #6b4ec6;
    --workspace-board: #bc4767;
    --workspace-cost: #be7c25;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(80, 145, 255, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(23, 172, 139, 0.08), transparent 22%),
        linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    padding-left: 0;
    transform-origin: top left;
    scale: 1.0;
    zoom: 0.9;
}

body.hide-financials .cost {
    display: none !important;
}

.app-shell {
    max-width: 1760px;
    margin: 0 auto;
    padding: 24px;
}

.app-header {
    position: relative;
    top: 12px;
    z-index: 20;
    padding: 18px 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    background: rgba(22, 33, 52, 0.92);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
}

.app-header-main {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
    padding-right: 190px;
}

.app-title-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #ffffff;
}

.app-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-title {
    margin: 0;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1;
}

.app-subtitle {
    max-width: 640px;
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 15px;
}

.app-actions {
    display: flex;
    flex: 1 1 760px;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    min-width: 0;
}

.app-brand {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 154px;
    min-width: 0;
    margin: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0;
    pointer-events: none;
}

.app-brand-mark {
    display: block;
    width: 154px;
    height: auto;
    max-height: none;
    object-fit: contain;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.22));
    transform: translateY(-23px);
}

.action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
}

button,
.button-like {
    border: 0;
    font: inherit;
}

.icon-action {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 96px;
    min-height: 82px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--text-main);
    background: linear-gradient(180deg, #ffffff 0%, #f0f5fb 100%);
    box-shadow: 0 8px 20px rgba(9, 30, 66, 0.08);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-action:hover {
    transform: translateY(-1px);
    border-color: rgba(67, 102, 193, 0.22);
    box-shadow: 0 12px 28px rgba(9, 30, 66, 0.12);
}

.icon-action:active {
    transform: translateY(0);
}

.icon-action .material-icons {
    font-size: 22px;
}

.icon-action-label {
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}

.icon-action-primary {
    color: #ffffff;
    background: linear-gradient(180deg, #2f71ff 0%, #1d54d6 100%);
}

.icon-action-secondary {
    color: #ffffff;
    background: linear-gradient(180deg, #1b8474 0%, #11675b 100%);
}

.icon-action-ghost {
    color: var(--text-main);
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    border-color: rgba(42, 67, 101, 0.12);
}

.icon-action-pending {
    color: #ffffff;
    background: linear-gradient(180deg, #2cae62 0%, #1f8b4c 100%);
    border-color: rgba(20, 110, 57, 0.4);
    box-shadow: 0 12px 24px rgba(31, 139, 76, 0.22);
}

.icon-action-pending:hover {
    border-color: rgba(20, 110, 57, 0.48);
    box-shadow: 0 14px 28px rgba(31, 139, 76, 0.28);
}

.icon-action-danger {
    color: #ffffff;
    background: linear-gradient(180deg, #eb5b67 0%, #c63f49 100%);
}

.icon-action-compact {
    min-width: 72px;
    min-height: 68px;
    padding: 10px 8px;
    border-radius: 14px;
}

.icon-action-compact .material-icons {
    font-size: 20px;
}

.toolbar-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.toolbar-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 160px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.toolbar-input {
    width: 84px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    text-align: center;
    font-weight: 700;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.dashboard-sidebar {
    position: sticky;
    top: 160px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
}

.sidebar-header {
    margin-bottom: 14px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 18px;
    color: var(--text-main);
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fe 100%);
    text-align: left;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.sidebar-nav-item .material-icons {
    color: var(--accent-primary);
    font-size: 22px;
}

.sidebar-nav-item:hover {
    border-color: rgba(33, 86, 214, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

.sidebar-nav-item.active {
    border-color: rgba(33, 86, 214, 0.24);
    background: linear-gradient(180deg, #edf4ff 0%, #dfeafe 100%);
    box-shadow: 0 10px 24px rgba(33, 86, 214, 0.12);
}

.sidebar-nav-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-copy strong {
    font-size: 14px;
}

.sidebar-nav-copy small {
    color: var(--text-soft);
    line-height: 1.35;
}

.dashboard-main {
    min-width: 0;
}

.workspace-view {
    min-width: 0;
}

.workspace-view[hidden] {
    display: none !important;
}

.workspace-window {
    padding: 16px;
}

.workspace-header {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 22px;
    color: #ffffff;
}

.workspace-header-schedule {
    background: linear-gradient(135deg, var(--workspace-schedule) 0%, #4a8cff 100%);
}

.workspace-header-organisation {
    background: linear-gradient(135deg, var(--workspace-organisation) 0%, #3caf98 100%);
}

.workspace-header-task {
    background: linear-gradient(135deg, var(--workspace-task) 0%, #53ad75 100%);
}

.workspace-header-gantt {
    background: linear-gradient(135deg, var(--workspace-gantt) 0%, #8e73e9 100%);
}

.workspace-header-board {
    background: linear-gradient(135deg, var(--workspace-board) 0%, #de6f8b 100%);
}

.workspace-header-cost {
    background: linear-gradient(135deg, var(--workspace-cost) 0%, #dd9d49 100%);
}

.workspace-heading {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.workspace-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
}

.workspace-copy h2 {
    margin: 0 0 4px;
    font-size: 28px;
}

.workspace-copy p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

.section-label-inverse {
    color: rgba(255, 255, 255, 0.78);
}

.surface-subtle {
    border: 1px solid rgba(42, 67, 101, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f8fd 100%);
}

.surface-panel-muted {
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
}

.toolbar-toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toolbar-toggle-label {
    font-size: 13px;
    font-weight: 600;
}

.toolbar-toggle-note {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.custom-toggle {
    width: 20px;
    height: 20px;
    accent-color: #7eb3ff;
    cursor: pointer;
}

.section-label {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.section-note {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.surface-card,
.surface-panel,
.dashboard-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-strong);
    box-shadow: var(--shadow-card);
}

.surface-panel {
    padding: 22px;
}

.task-manager-toolbar {
    margin-bottom: 18px;
}

.resource-task-container {
    min-height: 120px;
}

.org-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.org-control-input {
    max-width: 280px;
}

.org-control-note {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
}

.org-person-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.org-name-input {
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
}

.org-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(33, 86, 214, 0.08);
}

.org-color-cell {
    display: flex;
    justify-content: center;
}

.org-actions-cell {
    width: 88px;
    text-align: right;
}

.org-actions-cell .icon-action {
    margin-left: auto;
}

.org-delete-button {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    padding: 0;
}

.org-color-input {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.new-resource-row {
    font-weight: 700;
}

.table-wrapper {
    padding: 12px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1040px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--text-soft);
    background: linear-gradient(180deg, #edf4ff 0%, #e2eefc 100%);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tr:nth-child(even) {
    background: rgba(95, 129, 190, 0.05);
}

td[contenteditable="true"] {
    outline: none;
}

td[contenteditable="true"]:focus {
    background: #fefce8;
    box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.25);
}

select,
input,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    background: #f8fbff;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

input[type="range"] {
    padding: 0;
}

#programme-table th:last-child,
#programme-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

.row-actions-cell {
    width: 150px;
}

.row-action-group {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.infograph {
    min-width: 1100px;
    overflow-x: auto;
}

.infograph-gantt {
    min-width: max-content;
}

#gantt-chart,
#orgHierarchyTree {
    display: block;
    width: 100%;
    border-radius: 20px;
}

#gantt-chart {
    border: 1px solid rgba(42, 67, 101, 0.08);
    background: linear-gradient(180deg, #f9fbfe 0%, #f2f6fb 100%);
}

#gantt-tooltip {
    display: none;
    position: absolute;
    min-width: 180px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(16, 24, 40, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    pointer-events: none;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

#gantt-tooltip strong {
    display: block;
    margin-bottom: 6px;
    color: #8dd6ff;
}

#gantt-tooltip .tooltip-meta {
    color: #c5d0dc;
    font-size: 11px;
}

foreignObject {
    overflow: visible;
    white-space: nowrap;
}

.gantt-surface {
    padding: 16px;
}

.gantt-planner {
    min-width: max-content;
}

.gantt-timeline-shell {
    min-width: 0;
}

.board-stage-wrapper {
    padding: 16px;
}

.infograph-board {
    min-width: 0;
}

.board-root {
    min-width: 100%;
}

.board-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(300px, 1fr);
    gap: 16px;
    align-items: start;
    min-width: max-content;
}

.board-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 220px;
    padding: 14px;
    border: 1px solid rgba(42, 67, 101, 0.08);
    border-radius: 24px;
    background: var(--board-column-surface, #f5f8fd);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.board-column-header {
    padding: 14px 16px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--board-column-header, #365fbf) 0%, var(--board-column-accent, #5f8dff) 100%);
}

.board-column-title {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 700;
}

.board-column-count {
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 600;
}

.board-column-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.board-column-empty {
    padding: 18px;
    border: 1px dashed rgba(42, 67, 101, 0.18);
    border-radius: 18px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.board-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 170px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.board-filter select {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(14, 24, 39, 0.3);
    font-weight: 600;
}

.board-card,
.board-card * {
    white-space: normal;
}

.board-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 224px;
    padding: 18px;
    border: 1px solid rgba(31, 41, 55, 0.08);
    border-left: 5px solid var(--board-accent, #5f8dff);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    color: #1f2937;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.board-card > :not(.board-card-actions) {
    position: relative;
    z-index: 1;
}

.board-card-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.board-card-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.board-card-title {
    margin: 0;
    color: #172231;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
}

.board-card-owner {
    margin: 0;
    color: #556579;
    font-size: 12px;
    font-weight: 700;
}

.board-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.board-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.08);
    color: #243447;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.board-badge-primary {
    background: rgba(33, 86, 214, 0.12);
    color: #234c96;
}

.board-badge-alert {
    background: rgba(209, 63, 76, 0.16);
    color: #96273a;
}

.board-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.board-meta-item {
    padding: 10px 12px;
    border-radius: 14px;
    background: #f2f6fb;
}

.board-meta-label {
    display: block;
    font-size: 11px;
    color: #6c7a8a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.board-meta-value {
    display: block;
    color: #172231;
    font-size: 13px;
    font-weight: 700;
}

.board-footer-note {
    margin: 0;
    color: #58677b;
    font-size: 12px;
    line-height: 1.45;
}

.board-card-actions {
    position: absolute;
    inset: 0;
    margin-top: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
}

.board-card-action {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    display: inline-flex;
    align-items: center;
    min-height: 0;
    padding: 18px 14px;
    border: 0;
    border-radius: 0;
    color: var(--board-accent, #5f8dff);
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
    opacity: 0.78;
}

.board-card-action:hover,
.board-card-action:focus-visible {
    color: var(--board-accent, #365fbf);
    background: rgba(44, 104, 211, 0.08);
    outline: none;
    opacity: 1;
}

.board-card-action-left {
    left: 0;
    justify-content: flex-start;
    padding-left: 12px;
}

.board-card-action-right {
    right: 0;
    justify-content: flex-end;
    padding-right: 12px;
}

.gantt-label-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    height: 100%;
    padding: 8px 12px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.25;
}

.gantt-label-inline {
    color: #ffffff;
}

.gantt-label-floating {
    min-height: 54px;
    border: 1px solid rgba(42, 67, 101, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.gantt-owner {
    font-size: 12px;
    font-weight: 700;
}

.gantt-task-name {
    font-size: 13px;
    font-weight: 700;
}

.gantt-meta-line {
    font-size: 11px;
    opacity: 0.85;
}

.gantt-id {
    opacity: 0.8;
    font-weight: 600;
}

.invoice-placeholder,
.empty-state {
    padding: 30px;
    border: 1px dashed rgba(42, 67, 101, 0.25);
    border-radius: 18px;
    color: var(--text-soft);
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
    text-align: center;
}

.invoice-header h2,
.invoice-header h1 {
    margin: 0;
}

.invoice-table {
    min-width: 0;
}

.invoice-table th,
.invoice-table td {
    border-bottom: 0;
}

.invoice-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 10px;
}

.invoice-summary-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.invoice-summary-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.invoice-summary-card strong {
    color: #1d2e43;
    font-size: 24px;
}

.cost-monitoring-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cost-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

.control-group {
    min-width: 280px;
    max-width: 360px;
}

.invoice-container small {
    color: var(--text-faint);
}

.invoice-placeholder-icon {
    display: block;
    margin-bottom: 10px;
    font-size: 48px;
}

.invoice-total {
    color: #207449;
}

.invoice-worker-section {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.invoice-worker-header {
    padding: 10px 12px;
    background: #edf4ff;
    font-weight: 700;
}

.invoice-self-tag {
    color: var(--text-soft);
    font-weight: 600;
}

.invoice-amount {
    text-align: right;
    font-weight: 700;
}

.invoice-row-subtext {
    margin-top: 4px;
    color: var(--text-faint);
    font-size: 11px;
}

#toast-container {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    padding: 12px 18px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.9);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.24);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 999;
}

#toast-container.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

#kanbanBoard
{
    transform-origin: top left;
    scale: 0.7;
}

@media (max-width: 980px) {
    .app-shell {
        padding: 16px;
    }

    .app-header {
        position: static;
        width: 1400px;
    }

    .workspace-header,
    .workspace-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .app-header-main {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 170px;
        grid-template-rows: 150px 150px;
        column-gap: 20px;
        row-gap: 12px;
        padding-right: 0;
    }

    .app-actions {
        display: contents;
    }

    .action-group-primary {
        grid-column: 1;
        grid-row: 1;
        height: 150px;
        align-content: flex-start;
    }

    .action-group-toolbar {
        grid-column: 1 / span 2;
        grid-row: 2;
        height: 150px;
        align-content: stretch;
        max-height: fit-content;
    }

    .app-brand {
        position: static;
        grid-column: 2;
        grid-row: 1;
        width: 154px;
        min-width: 0;
        margin: 0;
        align-self: start;
        justify-self: end;
        padding-top: 0;
        justify-content: flex-end;
        pointer-events: none;
    }

    .app-brand-mark {
        width: 154px;
        transform: translateY(-10px);
    }

    .action-group {
        justify-content: flex-start;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar-nav-item {
        min-width: 220px;
    }

    .action-group,
    .table-actions,
    .button-group {
        justify-content: stretch;
        max-height: fit-content;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0px, 1fr));
    }

    .cost-controls,
    .org-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .icon-action {
        flex: 1 1 120px;
    }

    .invoice-summary-grid,
    .board-meta-grid {
        grid-template-columns: 1fr;
    }

    .gantt-planner {
        min-width: 0;
    }
}

@media print {
    body > *:not(#print-container),
    .app-header {
        display: none !important;
    }
    @page {
        size: A4 landscape;
    }
    

    html,
    body {
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #ffffff !important;
    }

    #board-print-area, #invoice-display {
        background: none;
        border: none;
        transform: scale(0.45);
        transform-origin: top left;
        width: 200%;
        height: 200%;
    }

    #print-container {
        display: block !important;
        width: 100% !important;
        position: static !important;
        overflow: visible !important;

    }

    #print-container .table-wrapper,
    #print-container .infograph,
    #print-container .board-stage-wrapper,
    #print-container .gantt-surface,
    #print-container .infograph-board,
    #print-container .infograph-gantt,
    #print-container .board-root,
    #print-container .gantt-timeline-shell,
    #print-container .gantt-planner {
        overflow: visible !important;
    }
}
