/*
 * =============================================================================
 * DIBLANCO PREMIER FINANCIAL OS
 * Module: Bookkeeping
 * Component: tenant-workspace-bookkeeping.css
 * Source File: public/tenant-workspace-bookkeeping.css
 * Marker: DIBLANCO-PUBLIC-TENANT-WORKSPACE-BOOKKEEPING-CSS-4C964AA36E3D
 * Governance Marker: DIBLANCO-OFFICIAL-PROPRIETARY-SOURCE-HEADER
 * Version: 2026.11
 *
 * Purpose:
 * Provide an authorized production component of DiBlanco Premier Financial OS.
 *
 * Security Scope:
 * - Server-side authorization where applicable
 * - Strict tenant and client isolation where applicable
 * - Fail-closed validation
 * - No secrets, credentials, tokens, or PII in source comments or logs
 * - Unauthorized cross-tenant and cross-client access is prohibited
 *
 * Copyright (c) 2026 DiBlanco Premier Tax & Accounting Inc.
 * All rights reserved.
 *
 * This source code is proprietary and confidential property of
 * DiBlanco Premier Tax & Accounting Inc. Unauthorized copying, modification,
 * disclosure, distribution, reverse engineering, sublicensing, publication,
 * execution, or reuse, in whole or in part, is strictly prohibited without
 * prior written authorization from DiBlanco Premier Tax & Accounting Inc.
 * =============================================================================
 */
/*
 * TENANT-WORKSPACE-BOOKKEEPING-B4E-2A
 */

body.twb-modal-open {
	overflow: hidden;
}

.twb-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(2, 16, 38, 0.72);
	backdrop-filter: blur(8px);
}

.twb-dialog {
	width: min(1180px, 100%);
	max-height: calc(100dvh - 48px);
	overflow: hidden;
	border: 1px solid rgba(148, 163, 184, 0.45);
	border-radius: 24px;
	background: #f8fafc;
	box-shadow: 0 30px 80px rgba(2, 16, 38, 0.42);
}

.twb-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	padding: 24px;
	color: #ffffff;
	background:
		linear-gradient(135deg, #071f46 0%, #0d3f91 58%, #1d5fce 100%);
}

.twb-header h2 {
	margin: 5px 0;
	font-size: clamp(1.6rem, 3vw, 2.35rem);
	font-weight: 900;
}

.twb-header p {
	margin: 0;
	color: #dbeafe;
}

.twb-eyebrow {
	color: #fdba74 !important;
	font-size: 0.72rem;
	font-weight: 900;
	letter-spacing: 0.17em;
	text-transform: uppercase;
}

.twb-close {
	display: grid;
	width: 42px;
	height: 42px;
	flex: 0 0 auto;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 12px;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.12);
	font-size: 1.7rem;
	cursor: pointer;
}

.twb-content {
	max-height: calc(100dvh - 178px);
	overflow: auto;
	padding: 22px;
}

.twb-status {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 18px;
}

.twb-status > div {
	padding: 18px;
	border: 1px solid #dbe5f0;
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(15, 47, 99, 0.07);
}

.twb-status span {
	display: block;
	color: #64748b;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.twb-status strong {
	display: block;
	margin-top: 8px;
	color: #0f2f63;
	font-size: 1.7rem;
	font-weight: 900;
}

.twb-panel {
	overflow: hidden;
	border: 1px solid #dbe5f0;
	border-radius: 20px;
	background: #ffffff;
	box-shadow: 0 12px 30px rgba(15, 47, 99, 0.08);
}

.twb-panel-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 20px;
	border-bottom: 1px solid #e2e8f0;
}

.twb-panel-heading h3 {
	margin: 0;
	color: #0f2f63;
	font-size: 1.2rem;
	font-weight: 900;
}

.twb-panel-heading p {
	margin: 5px 0 0;
	color: #64748b;
	font-size: 0.9rem;
}

.twb-refresh {
	border: 0;
	border-radius: 12px;
	padding: 11px 16px;
	color: #ffffff;
	background: #f97316;
	font-weight: 900;
	cursor: pointer;
}

.twb-message {
	min-height: 24px;
	padding: 12px 20px 0;
	color: #475569;
	font-size: 0.86rem;
	font-weight: 700;
}

.twb-message[data-tone="success"] {
	color: #047857;
}

.twb-message[data-tone="error"] {
	color: #b91c1c;
}

.twb-table-wrap {
	overflow-x: auto;
	padding: 16px 20px 20px;
}

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

.twb-table th,
.twb-table td {
	padding: 13px 12px;
	border-bottom: 1px solid #e2e8f0;
	text-align: left;
	white-space: nowrap;
}

.twb-table th {
	color: #475569;
	background: #f8fafc;
	font-size: 0.74rem;
	font-weight: 900;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.twb-table td {
	color: #1e293b;
	font-size: 0.9rem;
}

.twb-empty {
	margin: 0 20px 20px;
	padding: 28px;
	border: 1px dashed #94a3b8;
	border-radius: 16px;
	text-align: center;
	background: #f8fafc;
}

.twb-empty strong {
	color: #0f2f63;
}

.twb-empty p {
	max-width: 700px;
	margin: 8px auto 0;
	color: #64748b;
	font-size: 0.9rem;
}

@media (max-width: 820px) {
	.twb-overlay {
		padding: 0;
	}

	.twb-dialog {
		width: 100%;
		height: 100dvh;
		max-height: 100dvh;
		border: 0;
		border-radius: 0;
	}

	.twb-content {
		max-height: calc(100dvh - 130px);
		padding: 14px;
	}

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

	.twb-panel-heading {
		align-items: stretch;
		flex-direction: column;
	}

	.twb-refresh {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.twb-header {
		padding: 18px;
	}

	.twb-status {
		grid-template-columns: 1fr;
	}

	.twb-status > div {
		padding: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.twb-overlay,
	.twb-dialog,
	.twb-refresh,
	.twb-close {
		scroll-behavior: auto;
		transition: none;
	}
}

/*
 * TENANT-WORKSPACE-BOOKKEEPING-B4F-2A
 * Docked, resizable Tenant Workspace panel.
 */

body.twb-panel-open {
	overflow: auto;
}

body.twb-panel-open:not(.twb-panel-expanded):not(.twb-panel-collapsed) {
	--twb-active-panel-width: var(--twb-panel-width, 560px);
}

body.twb-panel-expanded {
	overflow: hidden;
}

.twb-overlay {
	--twb-panel-width: 560px;
	position: fixed;
	inset: 0 0 0 auto;
	z-index: 10000;
	display: block;
	width: min(
		var(--twb-panel-width),
		75vw
	);
	height: 100dvh;
	padding: 0;
	background: transparent;
	backdrop-filter: none;
	pointer-events: none;
}

.twb-dialog {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100dvh;
	max-height: 100dvh;
	overflow: hidden;
	border: 0;
	border-left: 1px solid #cbd5e1;
	border-radius: 0;
	background: #f8fafc;
	box-shadow: -18px 0 48px rgba(2, 16, 38, 0.22);
	pointer-events: auto;
}

.twb-resize-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -5px;
	z-index: 3;
	width: 10px;
	cursor: col-resize;
	touch-action: none;
	pointer-events: auto;
}

.twb-resize-handle::after {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 4px;
	width: 2px;
	content: "";
	background: transparent;
	transition: background 160ms ease;
}

.twb-resize-handle:hover::after,
.twb-resize-handle:focus-visible::after {
	background: #f97316;
}

.twb-header {
	min-height: 132px;
	padding: 20px;
}

.twb-header h2 {
	font-size: clamp(1.35rem, 2vw, 2rem);
}

.twb-window-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.twb-window-button,
.twb-close {
	display: grid;
	width: 40px;
	height: 40px;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.32);
	border-radius: 11px;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.12);
	font-size: 1.25rem;
	font-weight: 900;
	cursor: pointer;
}

.twb-window-button:hover,
.twb-close:hover {
	background: rgba(255, 255, 255, 0.22);
}

.twb-window-button:focus-visible,
.twb-close:focus-visible,
.twb-resize-handle:focus-visible {
	outline: 3px solid #fdba74;
	outline-offset: 2px;
}

.twb-content {
	max-height: calc(100dvh - 132px);
	padding: 16px;
}

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

.twb-panel-heading {
	align-items: stretch;
	flex-direction: column;
}

.twb-refresh {
	align-self: flex-start;
}

.twb-is-expanded {
	inset: 0;
	width: 100vw;
	max-width: none;
}

.twb-is-expanded .twb-dialog {
	border-left: 0;
}

.twb-is-expanded .twb-resize-handle {
	display: none;
}

.twb-is-expanded .twb-status {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.twb-is-expanded .twb-panel-heading {
	align-items: center;
	flex-direction: row;
}

.twb-is-collapsed {
	width: 76px;
}

.twb-is-collapsed .twb-dialog {
	background: linear-gradient(
		180deg,
		#071f46 0%,
		#0d3f91 58%,
		#1d5fce 100%
	);
}

.twb-is-collapsed .twb-header {
	height: 100%;
	min-height: 100%;
	align-items: center;
	justify-content: flex-start;
	flex-direction: column;
	padding: 12px;
}

.twb-is-collapsed .twb-header > div:first-child,
.twb-is-collapsed .twb-content,
.twb-is-collapsed .twb-resize-handle,
.twb-is-collapsed [data-twb-expand] {
	display: none;
}

.twb-is-collapsed .twb-window-actions {
	flex-direction: column;
}

.twb-is-collapsed [data-twb-collapse] {
	order: 1;
}

.twb-is-collapsed [data-twb-close] {
	order: 2;
}

@media (max-width: 900px) {
	body.twb-panel-open {
		overflow: hidden;
	}

	.twb-overlay,
	.twb-is-collapsed,
	.twb-is-expanded {
		inset: 0;
		width: 100vw;
		max-width: none;
		height: 100dvh;
	}

	.twb-dialog {
		width: 100%;
		height: 100dvh;
		max-height: 100dvh;
		border: 0;
	}

	.twb-resize-handle,
	[data-twb-collapse] {
		display: none;
	}

	.twb-content {
		max-height: calc(100dvh - 130px);
	}

	.twb-status,
	.twb-is-expanded .twb-status {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.twb-panel-heading,
	.twb-is-expanded .twb-panel-heading {
		align-items: stretch;
		flex-direction: column;
	}
}

@media (max-width: 480px) {
	.twb-status,
	.twb-is-expanded .twb-status {
		grid-template-columns: 1fr;
	}
}

/*
 * TENANT-WORKSPACE-BOOKKEEPING-B4I-2G
 * Read-only client portfolio search and service filters.
 */

.twb-client-toolbar {
	display: grid;
	grid-template-columns:
		minmax(220px, 1fr)
		minmax(170px, 220px);
	gap: 14px;
	align-items: end;
	padding: 18px 20px 0;
}

.twb-client-control {
	display: grid;
	gap: 7px;
	min-width: 0;
}

.twb-client-control label {
	color: #475569;
	font-size: 0.74rem;
	font-weight: 900;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.twb-client-control input,
.twb-client-control select {
	width: 100%;
	min-height: 44px;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	padding: 10px 12px;
	color: #0f172a;
	background: #ffffff;
	font: inherit;
	font-size: 0.9rem;
	outline: none;
}

.twb-client-control input::placeholder {
	color: #94a3b8;
}

.twb-client-control input:hover,
.twb-client-control select:hover {
	border-color: #94a3b8;
}

.twb-client-control input:focus-visible,
.twb-client-control select:focus-visible {
	border-color: #2563eb;
	box-shadow:
		0 0 0 3px rgba(37, 99, 235, 0.18);
}

@media (max-width: 700px) {
	.twb-client-toolbar {
		grid-template-columns: 1fr;
		padding:
			16px
			16px
			0;
	}
}

@media (prefers-color-scheme: dark) {
	.twb-client-control label {
		color: #cbd5e1;
	}

	.twb-client-control input,
	.twb-client-control select {
		border-color: #334155;
		color: #f8fafc;
		background: #0f223b;
	}

	.twb-client-control input::placeholder {
		color: #94a3b8;
	}

	.twb-client-control input:hover,
	.twb-client-control select:hover {
		border-color: #64748b;
	}

	.twb-client-control input:focus-visible,
	.twb-client-control select:focus-visible {
		border-color: #60a5fa;
		box-shadow:
			0 0 0 3px rgba(96, 165, 250, 0.2);
	}
}

@media (prefers-reduced-motion: reduce) {
	.twb-client-control input,
	.twb-client-control select {
		transition: none;
	}
}

/*
 * TENANT-WORKSPACE-BOOKKEEPING-B4I-2H
 * Client activation and Bookkeeping overview dialogs.
 */

.twb-client-action-cell {
	min-width: 180px;
	text-align: right;
}

.twb-client-action,
.twb-client-primary,
.twb-client-secondary,
.twb-client-dialog-close {
	min-height: 40px;
	border-radius: 10px;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.twb-client-action,
.twb-client-primary {
	border: 1px solid #1d4ed8;
	padding: 9px 13px;
	color: #ffffff;
	background: #1d4ed8;
}

.twb-client-secondary {
	border: 1px solid #cbd5e1;
	padding: 9px 13px;
	color: #0f172a;
	background: #ffffff;
}

.twb-client-action:disabled,
.twb-client-primary:disabled,
.twb-client-secondary:disabled {
	cursor: not-allowed;
	opacity: 0.58;
}

.twb-client-dialog-root {
	position: fixed;
	z-index: 2147483000;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 20px;
}

.twb-client-dialog-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.68);
	backdrop-filter: blur(3px);
}

.twb-client-dialog {
	position: relative;
	z-index: 1;
	width: min(720px, 100%);
	max-height: min(88vh, 820px);
	overflow: auto;
	border: 1px solid #dbe3ef;
	border-radius: 18px;
	padding: 22px;
	color: #0f172a;
	background: #ffffff;
	box-shadow:
		0 28px 70px rgba(15, 23, 42, 0.32);
}

.twb-client-dialog-header {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 20px;
}

.twb-client-dialog-header h3 {
	margin: 0;
	font-size: 1.26rem;
}

.twb-client-dialog-header p {
	margin: 6px 0 0;
	color: #64748b;
}

.twb-client-dialog-close {
	width: 40px;
	flex: 0 0 40px;
	border: 1px solid #cbd5e1;
	padding: 0;
	color: #334155;
	background: #ffffff;
	font-size: 1.35rem;
}

.twb-activation-form {
	display: grid;
	gap: 18px;
}

.twb-activation-grid {
	display: grid;
	grid-template-columns:
		repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.twb-activation-control {
	display: grid;
	gap: 7px;
	min-width: 0;
	color: #334155;
	font-size: 0.82rem;
	font-weight: 800;
}

.twb-activation-control input,
.twb-activation-control select {
	width: 100%;
	min-height: 44px;
	border: 1px solid #cbd5e1;
	border-radius: 11px;
	padding: 10px 12px;
	color: #0f172a;
	background: #ffffff;
	font: inherit;
}

.twb-activation-control input:focus-visible,
.twb-activation-control select:focus-visible,
.twb-client-action:focus-visible,
.twb-client-primary:focus-visible,
.twb-client-secondary:focus-visible,
.twb-client-dialog-close:focus-visible {
	outline: 3px solid rgba(37, 99, 235, 0.24);
	outline-offset: 2px;
}

.twb-client-dialog-message {
	min-height: 22px;
	color: #b91c1c;
	font-size: 0.88rem;
	font-weight: 700;
}

.twb-client-dialog-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.twb-overview-grid {
	display: grid;
	grid-template-columns:
		repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.twb-overview-metric {
	display: grid;
	gap: 7px;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 15px;
	background: #f8fafc;
}

.twb-overview-metric span {
	color: #64748b;
	font-size: 0.76rem;
	font-weight: 900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.twb-overview-metric strong {
	color: #0f172a;
	font-size: 1.05rem;
}

.twb-overview-notice {
	margin: 18px 0 0;
	border: 1px solid #fed7aa;
	border-radius: 12px;
	padding: 13px;
	color: #9a3412;
	background: #fff7ed;
	font-size: 0.86rem;
	line-height: 1.55;
}

@media (max-width: 700px) {
	.twb-client-dialog-root {
		padding: 10px;
	}

	.twb-client-dialog {
		max-height: 94vh;
		padding: 17px;
	}

	.twb-activation-grid,
	.twb-overview-grid {
		grid-template-columns: 1fr;
	}

	.twb-client-dialog-actions {
		flex-direction: column-reverse;
	}

	.twb-client-dialog-actions button {
		width: 100%;
	}
}

@media (prefers-color-scheme: dark) {
	.twb-client-dialog {
		border-color: #334155;
		color: #f8fafc;
		background: #0f223b;
	}

	.twb-client-dialog-header p,
	.twb-overview-metric span {
		color: #cbd5e1;
	}

	.twb-client-dialog-close,
	.twb-client-secondary,
	.twb-activation-control input,
	.twb-activation-control select {
		border-color: #475569;
		color: #f8fafc;
		background: #102a48;
	}

	.twb-activation-control {
		color: #e2e8f0;
	}

	.twb-overview-metric {
		border-color: #334155;
		background: #102a48;
	}

	.twb-overview-metric strong {
		color: #f8fafc;
	}

	.twb-overview-notice {
		border-color: #9a3412;
		color: #fed7aa;
		background: #431407;
	}
}

/*
 * TENANT-WORKSPACE-BOOKKEEPING-B4I-2I
 * Persistent, responsive client Bookkeeping workspace.
 */

.twb-client-workspace-root {
	display: grid;
	gap: 16px;
	min-width: 0;
}

.twb-client-workspace-header {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	justify-content: space-between;
	border: 1px solid #dbe3ef;
	border-radius: 18px;
	padding: 18px;
	background:
		linear-gradient(
			135deg,
			rgba(29, 78, 216, 0.1),
			rgba(249, 115, 22, 0.08)
		);
}

.twb-client-workspace-identity {
	min-width: 0;
}

.twb-client-workspace-identity span {
	display: block;
	color: #1d4ed8;
	font-size: 0.75rem;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.twb-client-workspace-identity h3 {
	margin: 5px 0 0;
	overflow-wrap: anywhere;
	color: #0f172a;
	font-size: clamp(1.15rem, 2.2vw, 1.7rem);
}

.twb-client-workspace-identity p {
	margin: 7px 0 0;
	overflow-wrap: anywhere;
	color: #64748b;
	font-size: 0.86rem;
}

.twb-client-workspace-back,
.twb-client-workspace-tab {
	min-height: 44px;
	border-radius: 11px;
	padding: 10px 14px;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.twb-client-workspace-back {
	flex: 0 0 auto;
	border: 1px solid #cbd5e1;
	color: #0f172a;
	background: #ffffff;
}

.twb-client-workspace-nav {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 3px 1px 8px;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.twb-client-workspace-tab {
	flex: 0 0 auto;
	border: 1px solid #1d4ed8;
	color: #ffffff;
	background: #1d4ed8;
}

.twb-client-workspace-content {
	display: grid;
	gap: 16px;
	border: 1px solid #dbe3ef;
	border-radius: 18px;
	padding: 18px;
	background: #ffffff;
}

.twb-client-workspace-section-heading h4 {
	margin: 0;
	color: #0f172a;
	font-size: 1.08rem;
}

.twb-client-workspace-section-heading p {
	margin: 6px 0 0;
	color: #64748b;
	line-height: 1.5;
}

.twb-client-workspace-metrics {
	display: grid;
	grid-template-columns:
		repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.twb-client-workspace-notice {
	border: 1px solid #bfdbfe;
	border-radius: 13px;
	padding: 14px;
	color: #1e3a8a;
	background: #eff6ff;
	font-size: 0.86rem;
	line-height: 1.55;
}

.twb-client-workspace-back:focus-visible,
.twb-client-workspace-tab:focus-visible {
	outline: 3px solid rgba(37, 99, 235, 0.24);
	outline-offset: 2px;
}

@media (max-width: 900px) {
	.twb-client-workspace-metrics {
		grid-template-columns:
			repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.twb-client-workspace-header {
		display: grid;
		grid-template-columns: 1fr;
		padding: 15px;
	}

	.twb-client-workspace-back {
		width: 100%;
	}

	.twb-client-workspace-content {
		padding: 14px;
	}

	.twb-client-workspace-metrics {
		grid-template-columns: 1fr;
	}
}

@media (prefers-color-scheme: dark) {
	.twb-client-workspace-header,
	.twb-client-workspace-content {
		border-color: #334155;
		background: #0f223b;
	}

	.twb-client-workspace-identity h3,
	.twb-client-workspace-section-heading h4 {
		color: #f8fafc;
	}

	.twb-client-workspace-identity p,
	.twb-client-workspace-section-heading p {
		color: #cbd5e1;
	}

	.twb-client-workspace-back {
		border-color: #475569;
		color: #f8fafc;
		background: #102a48;
	}

	.twb-client-workspace-notice {
		border-color: #1d4ed8;
		color: #bfdbfe;
		background: #172554;
	}
}

@media (prefers-reduced-motion: reduce) {
	.twb-client-workspace-nav {
		scroll-behavior: auto;
	}
}

/*
 * TENANT-WORKSPACE-BOOKKEEPING-B4I-2J-5-R1
 * Premium client Overview and client-scoped Chart of Accounts.
 */

.twb-client-workspace-header-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
}

.twb-client-workspace-status {
	display: inline-flex;
	min-height: 36px;
	align-items: center;
	justify-content: center;
	border: 1px solid #bfdbfe;
	border-radius: 999px;
	padding: 7px 12px;
	color: #1e3a8a;
	background: #eff6ff;
	font-size: 0.74rem;
	font-weight: 900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.twb-client-workspace-tab[data-active="false"] {
	border-color: #cbd5e1;
	color: #334155;
	background: #ffffff;
	box-shadow: none;
}

.twb-client-workspace-tab[data-active="true"] {
	border-color: #1d4ed8;
	color: #ffffff;
	background: linear-gradient(
		135deg,
		#1d4ed8,
		#2563eb
	);
	box-shadow: 0 8px 20px rgba(29, 78, 216, 0.2);
}

.twb-client-workspace-metric {
	display: grid;
	gap: 10px;
	min-width: 0;
	min-height: 108px;
	align-content: space-between;
	border: 1px solid #dbe3ef;
	border-radius: 16px;
	padding: 16px;
	background: linear-gradient(
		180deg,
		#ffffff,
		#f8fafc
	);
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.twb-client-workspace-metric[data-tone="blue"] {
	border-top: 4px solid #2563eb;
}

.twb-client-workspace-metric[data-tone="navy"] {
	border-top: 4px solid #0f2745;
}

.twb-client-workspace-metric[data-tone="orange"] {
	border-top: 4px solid #f97316;
}

.twb-client-workspace-metric span {
	color: #64748b;
	font-size: 0.72rem;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.twb-client-workspace-metric strong {
	overflow-wrap: anywhere;
	color: #0f172a;
	font-size: clamp(1.12rem, 2vw, 1.6rem);
	line-height: 1.15;
}

.twb-bookkeeping-overview-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.twb-bookkeeping-card {
	display: grid;
	gap: 12px;
	min-width: 0;
	border: 1px solid #dbe3ef;
	border-radius: 16px;
	padding: 18px;
	background: #ffffff;
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.twb-bookkeeping-card h5,
.twb-bookkeeping-card p {
	margin: 0;
}

.twb-bookkeeping-card h5 {
	color: #0f172a;
	font-size: 0.98rem;
}

.twb-bookkeeping-card p {
	color: #64748b;
	line-height: 1.55;
}

.twb-bookkeeping-checklist {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.twb-bookkeeping-checklist li {
	display: grid;
	grid-template-columns: 27px minmax(0, 1fr);
	gap: 9px;
	align-items: center;
	color: #334155;
	font-size: 0.87rem;
	line-height: 1.45;
}

.twb-bookkeeping-checklist li > span:first-child {
	display: grid;
	width: 25px;
	height: 25px;
	place-items: center;
	border-radius: 999px;
	color: #166534;
	background: #dcfce7;
	font-weight: 900;
}

.twb-bookkeeping-primary-action {
	min-height: 44px;
	border: 1px solid #1d4ed8;
	border-radius: 11px;
	padding: 10px 14px;
	color: #ffffff;
	background: #1d4ed8;
	font: inherit;
	font-weight: 850;
	cursor: pointer;
}

.twb-bookkeeping-primary-action:focus-visible {
	outline: 3px solid rgba(37, 99, 235, 0.24);
	outline-offset: 2px;
}

.twb-bookkeeping-primary-action:disabled {
	opacity: 0.65;
	cursor: progress;
}

.twb-bookkeeping-toolbar {
	display: grid;
	grid-template-columns:
		minmax(220px, 1fr)
		minmax(145px, 0.35fr)
		minmax(145px, 0.35fr)
		auto;
	gap: 10px;
	align-items: center;
}

.twb-bookkeeping-search,
.twb-bookkeeping-filter {
	width: 100%;
	min-height: 44px;
	border: 1px solid #cbd5e1;
	border-radius: 11px;
	padding: 9px 12px;
	color: #0f172a;
	background: #ffffff;
	font: inherit;
}

.twb-bookkeeping-message {
	min-height: 24px;
	border-radius: 10px;
	padding: 10px 12px;
	color: #475569;
	background: #f8fafc;
	font-size: 0.84rem;
	line-height: 1.4;
}

.twb-bookkeeping-message[data-tone="success"] {
	color: #166534;
	background: #f0fdf4;
}

.twb-bookkeeping-message[data-tone="error"] {
	color: #991b1b;
	background: #fef2f2;
}

.twb-bookkeeping-table-wrap {
	max-width: 100%;
	overflow-x: auto;
	border: 1px solid #dbe3ef;
	border-radius: 14px;
	-webkit-overflow-scrolling: touch;
}

.twb-bookkeeping-table {
	width: 100%;
	min-width: 700px;
	border-collapse: collapse;
	background: #ffffff;
}

.twb-bookkeeping-table th,
.twb-bookkeeping-table td {
	padding: 13px 14px;
	border-bottom: 1px solid #e2e8f0;
	text-align: left;
	vertical-align: middle;
}

.twb-bookkeeping-table th {
	color: #334155;
	background: #f8fafc;
	font-size: 0.72rem;
	font-weight: 900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.twb-bookkeeping-table td {
	color: #334155;
	font-size: 0.86rem;
}

.twb-bookkeeping-empty {
	border: 1px dashed #93c5fd;
	border-radius: 15px;
	padding: 24px;
	color: #1e3a8a;
	background: #eff6ff;
	text-align: center;
}

.twb-bookkeeping-empty p {
	margin: 8px auto 0;
	color: #475569;
	line-height: 1.55;
}

@media (max-width: 900px) {
	.twb-bookkeeping-toolbar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.twb-bookkeeping-search {
		grid-column: 1 / -1;
	}
}

@media (max-width: 700px) {
	.twb-client-workspace-header-actions,
	.twb-bookkeeping-overview-grid,
	.twb-bookkeeping-toolbar {
		display: grid;
		grid-template-columns: 1fr;
		width: 100%;
	}

	.twb-bookkeeping-search {
		grid-column: auto;
	}

	.twb-client-workspace-status,
	.twb-bookkeeping-primary-action {
		width: 100%;
	}

	.twb-bookkeeping-table {
		min-width: 640px;
	}
}

@media (prefers-color-scheme: dark) {
	.twb-client-workspace-status {
		border-color: #1d4ed8;
		color: #bfdbfe;
		background: #172554;
	}

	.twb-client-workspace-tab[data-active="false"],
	.twb-client-workspace-metric,
	.twb-bookkeeping-card,
	.twb-bookkeeping-table {
		border-color: #334155;
		color: #e2e8f0;
		background: #102a48;
	}

	.twb-client-workspace-metric strong,
	.twb-bookkeeping-card h5,
	.twb-bookkeeping-checklist li {
		color: #f8fafc;
	}

	.twb-client-workspace-metric span,
	.twb-bookkeeping-card p,
	.twb-bookkeeping-empty p {
		color: #cbd5e1;
	}

	.twb-bookkeeping-search,
	.twb-bookkeeping-filter {
		border-color: #475569;
		color: #f8fafc;
		background: #0f223b;
	}

	.twb-bookkeeping-table th {
		color: #e2e8f0;
		background: #0f223b;
	}

	.twb-bookkeeping-table td {
		border-color: #334155;
		color: #e2e8f0;
	}

	.twb-bookkeeping-empty {
		border-color: #1d4ed8;
		color: #bfdbfe;
		background: #172554;
	}
}

@media (prefers-reduced-motion: reduce) {
	.twb-bookkeeping-primary-action,
	.twb-client-workspace-tab {
		transition: none;
	}
}


/*
 * TENANT-WORKSPACE-BOOKKEEPING-B4I-2K-6C-HIERARCHY
 * Responsive hierarchical Chart of Accounts.
 */

.twb-account-tree-row {
	--twb-account-level: 0;
}

.twb-account-tree-row[data-status="INACTIVE"] {
	opacity: 0.72;
}

.twb-account-code-cell {
	align-items: center;
	display: flex;
	gap: 0.42rem;
	min-width: 8.5rem;
	padding-left: calc(var(--twb-account-level) * 1.35rem);
}

.twb-account-tree-toggle {
	align-items: center;
	background: transparent;
	border: 1px solid rgba(32, 79, 145, 0.22);
	border-radius: 0.42rem;
	color: #164b91;
	cursor: pointer;
	display: inline-flex;
	font-size: 0.95rem;
	height: 1.75rem;
	justify-content: center;
	min-width: 1.75rem;
	padding: 0;
}

.twb-account-tree-toggle:hover,
.twb-account-tree-toggle:focus-visible {
	background: rgba(37, 99, 235, 0.09);
	border-color: #2563eb;
	outline: none;
}

.twb-account-tree-spacer {
	display: inline-block;
	height: 1.75rem;
	min-width: 1.75rem;
}

.twb-account-code {
	color: #102a4c;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.twb-account-name-cell {
	display: grid;
	gap: 0.42rem;
	min-width: 18rem;
}

.twb-account-name-line {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.52rem;
}

.twb-account-parent-badge,
.twb-account-status-active,
.twb-account-status-inactive,
.twb-account-posting-allowed,
.twb-account-posting-blocked {
	border-radius: 999px;
	display: inline-flex;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
	padding: 0.36rem 0.58rem;
	white-space: nowrap;
}

.twb-account-parent-badge {
	background: #e9f1ff;
	color: #164b91;
}

.twb-account-status-active,
.twb-account-posting-allowed {
	background: #e6f7ee;
	color: #11613d;
}

.twb-account-status-inactive {
	background: #edf0f4;
	color: #4d5d70;
}

.twb-account-posting-blocked {
	background: #fff1e7;
	color: #9a4811;
}

.twb-account-row-details {
	align-items: center;
	color: #617085;
	display: flex;
	flex-wrap: wrap;
	font-size: 0.78rem;
	gap: 0.42rem 0.72rem;
}

.twb-account-row-details > span:not(:last-child)::after {
	color: #a3adba;
	content: "•";
	margin-left: 0.72rem;
}

.twb-account-inline-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.46rem;
}

.twb-account-action-primary {
	background: #164b91;
	border: 1px solid #164b91;
	border-radius: 0.52rem;
	color: #ffffff;
	cursor: pointer;
	font-size: 0.76rem;
	font-weight: 700;
	min-height: 2rem;
	padding: 0.38rem 0.68rem;
}

.twb-account-action-primary:hover,
.twb-account-action-primary:focus-visible {
	background: #0f3b77;
	border-color: #0f3b77;
	outline: 2px solid rgba(37, 99, 235, 0.25);
	outline-offset: 2px;
}

.twb-account-action-primary:disabled {
	cursor: not-allowed;
	opacity: 0.48;
}

@media (max-width: 760px) {
	.twb-bookkeeping-table thead {
		display: none;
	}

	.twb-bookkeeping-table,
	.twb-bookkeeping-table tbody,
	.twb-bookkeeping-table tr,
	.twb-bookkeeping-table td {
		display: block;
		width: 100%;
	}

	.twb-bookkeeping-table tr {
		background: #ffffff;
		border: 1px solid rgba(15, 42, 76, 0.12);
		border-radius: 0.8rem;
		box-shadow: 0 0.25rem 0.9rem rgba(15, 42, 76, 0.06);
		margin-bottom: 0.72rem;
		overflow: hidden;
		padding: 0.72rem;
	}

	.twb-bookkeeping-table td {
		border: 0;
		padding: 0.34rem 0;
	}

	.twb-account-code-cell {
		min-width: 0;
		padding-left: calc(
			min(var(--twb-account-level), 4) * 0.8rem
		);
	}

	.twb-account-name-cell {
		min-width: 0;
	}

	.twb-account-inline-actions,
	.twb-account-action-primary {
		width: 100%;
	}

	.twb-account-action-primary {
		min-height: 2.75rem;
	}
}

/*
 * TENANT-WORKSPACE-BOOKKEEPING-B4I-2K-6D-B3
 * Responsive Account Guide and CSV action controls.
 */

.twb-account-guide-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.625rem;
	margin: 0.75rem 0 1rem;
	padding: 0.75rem;
	border: 1px solid rgba(37, 99, 235, 0.16);
	border-radius: 0.875rem;
	background:
		linear-gradient(
			135deg,
			rgba(15, 23, 42, 0.035),
			rgba(37, 99, 235, 0.06)
		);
}

.twb-account-guide-button,
.twb-account-guide-download,
.twb-account-export-button,
.twb-account-guide-use {
	display: inline-flex;
	min-height: 2.625rem;
	align-items: center;
	justify-content: center;
	padding: 0.625rem 0.875rem;
	border: 1px solid transparent;
	border-radius: 0.75rem;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition:
		transform 120ms ease,
		box-shadow 120ms ease,
		border-color 120ms ease,
		background-color 120ms ease;
}

.twb-account-guide-button,
.twb-account-guide-use {
	color: #ffffff;
	background: #1d4ed8;
	box-shadow:
		0 0.375rem 0.875rem rgba(29, 78, 216, 0.18);
}

.twb-account-guide-download {
	color: #ffffff;
	background: #0f172a;
	box-shadow:
		0 0.375rem 0.875rem rgba(15, 23, 42, 0.16);
}

.twb-account-export-button {
	color: #9a3412;
	border-color: rgba(234, 88, 12, 0.28);
	background: rgba(255, 247, 237, 0.96);
}

.twb-account-guide-button:hover,
.twb-account-guide-download:hover,
.twb-account-export-button:hover,
.twb-account-guide-use:hover {
	transform: translateY(-1px);
}

.twb-account-guide-button:focus-visible,
.twb-account-guide-download:focus-visible,
.twb-account-export-button:focus-visible,
.twb-account-guide-use:focus-visible,
.twb-account-guide-controls input:focus-visible,
.twb-account-guide-controls select:focus-visible {
	outline: 3px solid rgba(37, 99, 235, 0.28);
	outline-offset: 2px;
}

.twb-account-guide-dialog {
	width: min(72rem, calc(100vw - 2rem));
	max-height: min(54rem, calc(100vh - 2rem));
}

.twb-account-guide-content {
	display: grid;
	gap: 1rem;
	min-width: 0;
	padding: 1rem;
}

.twb-account-guide-controls {
	display: grid;
	grid-template-columns:
		minmax(15rem, 1.5fr)
		repeat(3, minmax(10rem, 1fr));
	gap: 0.75rem;
	position: sticky;
	top: 0;
	z-index: 2;
	padding: 0.75rem;
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 0.875rem;
	background: rgba(255, 255, 255, 0.97);
	box-shadow:
		0 0.5rem 1.25rem rgba(15, 23, 42, 0.06);
	backdrop-filter: blur(12px);
}

.twb-account-guide-controls input,
.twb-account-guide-controls select {
	width: 100%;
	min-width: 0;
	min-height: 2.75rem;
	padding: 0.625rem 0.75rem;
	border: 1px solid rgba(100, 116, 139, 0.32);
	border-radius: 0.7rem;
	color: #0f172a;
	background: #ffffff;
	font: inherit;
}

.twb-account-guide-summary {
	display: flex;
	min-height: 2.5rem;
	align-items: center;
	padding: 0.625rem 0.875rem;
	border-radius: 0.75rem;
	color: #1e3a8a;
	background: rgba(219, 234, 254, 0.72);
	font-weight: 700;
}

.twb-account-guide-summary[data-tone="error"] {
	color: #991b1b;
	background: rgba(254, 226, 226, 0.86);
}

.twb-account-guide-list {
	display: grid;
	grid-template-columns:
		repeat(2, minmax(0, 1fr));
	gap: 0.875rem;
	max-height: min(34rem, 56vh);
	overflow: auto;
	padding: 0.125rem 0.25rem 0.5rem 0;
	scrollbar-gutter: stable;
}

.twb-account-guide-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 0.875rem;
	background: #ffffff;
	box-shadow:
		0 0.375rem 1rem rgba(15, 23, 42, 0.055);
}

.twb-account-guide-card-identity {
	display: grid;
	gap: 0.3rem;
	min-width: 0;
}

.twb-account-guide-card-identity strong {
	color: #0f172a;
	font-size: 0.98rem;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.twb-account-guide-card-identity span {
	color: #1d4ed8;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.035em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.twb-account-guide-card-identity p {
	margin: 0;
	color: #475569;
	font-size: 0.875rem;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.twb-account-guide-use {
	min-width: 7.25rem;
	white-space: nowrap;
}

[data-theme="dark"] .twb-account-guide-toolbar {
	border-color: rgba(96, 165, 250, 0.22);
	background:
		linear-gradient(
			135deg,
			rgba(15, 23, 42, 0.9),
			rgba(30, 64, 175, 0.22)
		);
}

[data-theme="dark"] .twb-account-guide-controls,
[data-theme="dark"] .twb-account-guide-card {
	border-color: rgba(148, 163, 184, 0.22);
	background: rgba(15, 23, 42, 0.96);
}

[data-theme="dark"] .twb-account-guide-controls input,
[data-theme="dark"] .twb-account-guide-controls select {
	color: #f8fafc;
	border-color: rgba(148, 163, 184, 0.32);
	background: #111827;
}

[data-theme="dark"] .twb-account-guide-card-identity strong {
	color: #f8fafc;
}

[data-theme="dark"] .twb-account-guide-card-identity span {
	color: #93c5fd;
}

[data-theme="dark"] .twb-account-guide-card-identity p {
	color: #cbd5e1;
}

@media (max-width: 68rem) {
	.twb-account-guide-controls {
		grid-template-columns:
			repeat(2, minmax(0, 1fr));
	}

	.twb-account-guide-list {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 44rem) {
	.twb-account-guide-dialog {
		width: calc(100vw - 1rem);
		max-height: calc(100vh - 1rem);
	}

	.twb-account-guide-content {
		padding: 0.75rem;
	}

	.twb-account-guide-controls {
		grid-template-columns: 1fr;
		position: static;
	}

	.twb-account-guide-toolbar {
		display: grid;
		grid-template-columns: 1fr;
	}

	.twb-account-guide-button,
	.twb-account-guide-download,
	.twb-account-export-button {
		width: 100%;
	}

	.twb-account-guide-list {
		max-height: none;
		overflow: visible;
		padding-right: 0;
	}

	.twb-account-guide-card {
		grid-template-columns: 1fr;
		align-items: stretch;
	}

	.twb-account-guide-use {
		width: 100%;
	}
}

@media (max-width: 24rem) {
	.twb-account-guide-content {
		padding: 0.5rem;
	}

	.twb-account-guide-card {
		padding: 0.75rem;
	}

	.twb-account-guide-card-identity strong {
		font-size: 0.92rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.twb-account-guide-button,
	.twb-account-guide-download,
	.twb-account-export-button,
	.twb-account-guide-use {
		transition: none;
	}
}
/*
 * BOOKKEEPING-PART-6-E2-E5-CSV-BANKING-RESPONSIVE
 */

.twb-csv-import-card,
.twb-csv-preview-card {
	margin-top: 1rem;
}

.twb-csv-import-card h3,
.twb-csv-preview-card h3 {
	margin: 0 0 0.5rem;
	color: var(--twb-text, #0f172a);
}

.twb-csv-import-card > p {
	margin: 0 0 1rem;
	color: var(--twb-muted, #475569);
}

.twb-csv-import-toolbar {
	display: grid;
	grid-template-columns:
		minmax(180px, 1fr)
		minmax(220px, 1.4fr)
		auto
		auto;
	gap: 0.75rem;
	align-items: center;
}

.twb-csv-import-toolbar input[type="file"] {
	min-width: 0;
	width: 100%;
}

.twb-csv-preview-card[hidden] {
	display: none !important;
}

.twb-csv-preview-card > .twb-bookkeeping-primary-action {
	margin-bottom: 0.75rem;
}

.twb-csv-import-card .twb-bookkeeping-table-wrap,
.twb-csv-preview-card .twb-bookkeeping-table-wrap {
	margin-top: 0.75rem;
}

.twb-csv-import-card td:last-child {
	white-space: nowrap;
}

@media (max-width: 980px) {
	.twb-csv-import-toolbar {
		grid-template-columns:
			minmax(0, 1fr)
			minmax(0, 1fr);
	}

	.twb-csv-import-toolbar .twb-bookkeeping-primary-action {
		width: 100%;
	}
}

@media (max-width: 640px) {
	.twb-csv-import-toolbar {
		grid-template-columns: 1fr;
	}

	.twb-csv-import-toolbar select,
	.twb-csv-import-toolbar input,
	.twb-csv-import-toolbar button {
		width: 100%;
		min-width: 0;
	}

	.twb-csv-import-card,
	.twb-csv-preview-card {
		padding: 0.875rem;
	}

	.twb-csv-import-card td:last-child {
		white-space: normal;
	}
}

/*
 * =============================================================================
 * DIBLANCO PREMIER FINANCIAL OS
 * Module: Bookkeeping Financial Reports
 * Component: Professional Responsive Financial Reports CSS
 * Purpose: Style authenticated client financial statements for desktop,
 *          tablet, mobile, dark mode, printing and reduced motion.
 * Marker: DIBLANCO-BOOKKEEPING-FINANCIAL-REPORTS-R5B2-R3-CSS
 * Ownership: DiBlanco Premier Tax & Accounting Inc.
 * Confidentiality: Proprietary and confidential.
 * Distribution: Unauthorized copying, disclosure, or reuse is prohibited.
 * Tenant Scope: Active authenticated tenant and validated client.
 * Version: 2026.11
 * =============================================================================
 */

.twb-financial-reports-controls {
	display: grid;
	grid-template-columns: repeat(2, minmax(10rem, 1fr)) repeat(3, auto);
	gap: 0.75rem;
	align-items: center;
	margin: 1rem 0;
	padding: 1rem;
	border: 1px solid var(--twb-border, #dbe4ee);
	border-radius: 1rem;
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(249, 115, 22, 0.04)), var(--twb-surface, #ffffff);
	box-shadow: 0 0.4rem 1.2rem rgba(15, 23, 42, 0.06);
}

.twb-financial-reports-controls input,
.twb-financial-reports-controls select,
.twb-financial-reports-controls button {
	min-width: 0;
	min-height: 2.75rem;
}

.twb-financial-reports-controls input[type="date"],
.twb-financial-report-secondary {
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--twb-border, #cbd5e1);
	border-radius: 0.7rem;
	background: var(--twb-surface, #ffffff);
	color: var(--twb-text, #0f172a);
	font: inherit;
	font-weight: 700;
}

.twb-financial-report-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.twb-financial-report-secondary:hover {
	border-color: #2563eb;
	background: #eff6ff;
	color: #1d4ed8;
	transform: translateY(-1px);
}

.twb-financial-report-open {
	background: linear-gradient(135deg, #1e40af, #2563eb);
	border-color: #1d4ed8;
	color: #ffffff;
}

.twb-financial-report-metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.9rem;
	margin: 1rem 0;
}

.twb-financial-report-metric,
.twb-financial-report-card {
	min-width: 0;
	padding: 1rem;
	border: 1px solid var(--twb-border, #dbe4ee);
	border-radius: 1rem;
	background: var(--twb-surface, #ffffff);
	box-shadow: 0 0.4rem 1rem rgba(15, 23, 42, 0.06);
}

.twb-financial-report-metric {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	overflow: hidden;
}

.twb-financial-report-metric::before {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0.28rem;
	content: "";
	background: #2563eb;
}

.twb-financial-report-metric[data-tone="navy"]::before {
	background: #0f172a;
}

.twb-financial-report-metric[data-tone="orange"]::before {
	background: #f97316;
}

.twb-financial-report-metric[data-tone="success"]::before {
	background: #059669;
}

.twb-financial-report-metric[data-tone="danger"]::before {
	background: #dc2626;
}

.twb-financial-report-metric span {
	color: var(--twb-muted, #475569);
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.035em;
	text-transform: uppercase;
}

.twb-financial-report-metric strong {
	color: var(--twb-text, #0f172a);
	font-size: clamp(1.2rem, 2.2vw, 1.65rem);
	font-variant-numeric: tabular-nums;
}

.twb-financial-report-selector {
	display: flex;
	gap: 0.55rem;
	margin-bottom: 1rem;
	padding: 0.35rem;
	overflow-x: auto;
	border: 1px solid var(--twb-border, #dbe4ee);
	border-radius: 0.9rem;
	background: var(--twb-subtle, #f8fafc);
}

.twb-financial-report-selector-button {
	flex: 0 0 auto;
	padding: 0.6rem 0.95rem;
	border: 1px solid transparent;
	border-radius: 0.65rem;
	background: transparent;
	color: var(--twb-muted, #475569);
	font: inherit;
	font-weight: 800;
	white-space: nowrap;
	cursor: pointer;
}

.twb-financial-report-selector-button[data-active="true"] {
	border-color: #2563eb;
	background: linear-gradient(135deg, #1e40af, #2563eb);
	color: #ffffff;
}

.twb-financial-report-document {
	display: grid;
	gap: 1rem;
	min-width: 0;
}

.twb-financial-report-card .twb-bookkeeping-table-wrap {
	margin: 0;
	border: 1px solid var(--twb-border, #e2e8f0);
	border-radius: 0.75rem;
}

.twb-financial-report-table {
	width: 100%;
	min-width: 35rem;
	border-collapse: separate;
	border-spacing: 0;
}

.twb-financial-report-table td {
	padding: 0.78rem 0.85rem;
	border-bottom: 1px solid var(--twb-border, #e2e8f0);
	color: var(--twb-text, #0f172a);
	font-size: 0.92rem;
}

.twb-financial-report-amount {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	font-weight: 750;
}

.twb-financial-report-total td {
	border-top: 0.14rem solid #94a3b8;
	background: var(--twb-subtle, #f8fafc);
	font-weight: 850;
}

.twb-financial-reports-controls :focus-visible,
.twb-financial-report-selector-button:focus-visible,
.twb-financial-report-open:focus-visible {
	outline: 0.2rem solid rgba(37, 99, 235, 0.28);
	outline-offset: 0.14rem;
}

[data-theme="dark"] .twb-financial-reports-controls,
[data-theme="dark"] .twb-financial-report-metric,
[data-theme="dark"] .twb-financial-report-card {
	border-color: #334155;
	background: #111827;
	color: #e2e8f0;
}

[data-theme="dark"] .twb-financial-report-selector {
	border-color: #334155;
	background: #0f172a;
}

@media (max-width: 70rem) {
	.twb-financial-reports-controls,
	.twb-financial-report-metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 48rem) {
	.twb-financial-reports-controls,
	.twb-financial-report-metrics {
		grid-template-columns: 1fr;
	}

	.twb-financial-reports-controls button {
		width: 100%;
	}

	.twb-financial-report-table {
		min-width: 31rem;
	}
}

@media (max-width: 30rem) {
	.twb-financial-report-table {
		min-width: 28rem;
	}
}

@media print {
	.twb-financial-reports-controls,
	.twb-financial-report-selector,
	.twb-client-workspace-tabs,
	.twb-bookkeeping-message {
		display: none !important;
	}

	.twb-financial-report-metric,
	.twb-financial-report-card {
		border: 1px solid #94a3b8 !important;
		background: #ffffff !important;
		box-shadow: none !important;
		break-inside: avoid;
	}

	.twb-financial-report-table {
		width: 100%;
		min-width: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.twb-financial-report-secondary,
	.twb-financial-report-selector-button,
	.twb-financial-report-open {
		transition: none;
	}
}

/*
 * =============================================================================
 * DIBLANCO PREMIER FINANCIAL OS
 * Module: Bookkeeping Transaction Workflow
 * Component: Responsive Transaction Workflow Actions
 * Purpose: Style secure Note, Post, and Journal Entry controls across phone,
 *          tablet, laptop, desktop, dark mode, and print presentation.
 * Marker: DIBLANCO-BOOKKEEPING-R6C-R4B1-R3-TRANSACTION-ACTIONS-CSS
 * Ownership: DiBlanco Premier Tax & Accounting Inc.
 * Confidentiality: Proprietary and confidential.
 * Distribution: Unauthorized copying, disclosure, or reuse is prohibited.
 * Tenant Scope: Tenant Workspace transaction presentation only.
 * Version: 2026.11
 * =============================================================================
 */

.twb-transaction-workflow-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
	width: 100%;
	padding: 0.55rem;
	border: 1px solid rgba(37, 99, 235, 0.18);
	border-radius: 0.75rem;
	background: rgba(239, 246, 255, 0.72);
}

.twb-transaction-workflow-actions button {
	min-height: 2.25rem;
	padding: 0.48rem 0.78rem;
	border-radius: 0.6rem;
	font-weight: 700;
	white-space: nowrap;
}

.twb-transaction-note-action {
	color: #1e3a8a;
	background: #eff6ff;
	border-color: #93c5fd;
}

.twb-transaction-post-action {
	color: #ffffff;
	background: #1d4ed8;
	border-color: #1d4ed8;
	box-shadow: 0 0.25rem 0.75rem rgba(29, 78, 216, 0.2);
}

.twb-transaction-post-action:hover:not(:disabled) {
	background: #1e40af;
	border-color: #1e40af;
}

.twb-transaction-journal-action {
	color: #7c2d12;
	background: #fff7ed;
	border-color: #fb923c;
}

.twb-transaction-note-indicator {
	display: inline-flex;
	align-items: center;
	min-height: 1.8rem;
	padding: 0.28rem 0.55rem;
	border-radius: 999px;
	color: #475569;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	font-size: 0.75rem;
	font-weight: 700;
}

.twb-transaction-workflow-actions button:disabled {
	cursor: not-allowed;
	opacity: 0.58;
	box-shadow: none;
}

@media (max-width: 760px) {
	.twb-transaction-workflow-actions {
		display: grid;
		grid-template-columns: 1fr;
	}

	.twb-transaction-workflow-actions button {
		width: 100%;
		white-space: normal;
	}
}

@media (prefers-color-scheme: dark) {
	.twb-transaction-workflow-actions {
		background: rgba(15, 23, 42, 0.74);
		border-color: rgba(96, 165, 250, 0.35);
	}

	.twb-transaction-note-action {
		color: #dbeafe;
		background: #1e3a8a;
		border-color: #60a5fa;
	}

	.twb-transaction-journal-action {
		color: #ffedd5;
		background: #7c2d12;
		border-color: #fb923c;
	}

	.twb-transaction-note-indicator {
		color: #e2e8f0;
		background: #0f172a;
		border-color: #475569;
	}
}

@media print {
	.twb-transaction-workflow-actions {
		display: none !important;
	}
}

/*
 * =============================================================================
 * DIBLANCO PREMIER FINANCIAL OS
 * Module: Bookkeeping Transaction Workflow
 * Component: POSTED Transaction Presentation
 * Purpose: Distinguish posted accounting records from pending, categorized,
 *          and excluded transactions in responsive transaction workspaces.
 * Marker: DIBLANCO-BOOKKEEPING-R6C-R4B2-POSTED-PRESENTATION
 * Ownership: DiBlanco Premier Tax & Accounting Inc.
 * Confidentiality: Proprietary and confidential.
 * Distribution: Unauthorized copying, disclosure, or reuse is prohibited.
 * Tenant Scope: Tenant Workspace transaction presentation only.
 * Version: 2026.11
 * =============================================================================
 */

.twb-review-three-colors-legend .posted {
	background: #e8efff;
	border: 1px solid #8eabef;
}

.twb-review-three-colors-legend .posted .swatch {
	background: #285ac7;
}

.twb-csv-preview-card tbody tr[data-review-status="POSTED"] td {
	background: #eaf0ff !important;
	border-color: #8eabef !important;
	color: #1e3a8a !important;
}

.twb-review-status[data-status="POSTED"],
.twb-review-status.is-posted {
	color: #ffffff;
	background: #285ac7;
	border-color: #1e40af;
}

@media (prefers-color-scheme: dark) {
	.twb-csv-preview-card tbody tr[data-review-status="POSTED"] td {
		background: #172554 !important;
		border-color: #3b82f6 !important;
		color: #dbeafe !important;
	}
}

