:root {
	--ct-ink: #172f40;
	--ct-deep: #112c3c;
	--ct-muted: #526575;
	--ct-line: #dbe4ea;
	--ct-background: #f2f5f7;
	--ct-accent: #08776f;
	--ct-accent-dark: #056059;
}

.ct-shell {
	min-height: 100vh;
	font-family: system-ui, "Segoe UI", sans-serif;
	display: grid;
	grid-template-columns: 216px minmax(0, 1fr);
	background: var(--ct-background);
}
.ct-sidebar {
	position: sticky;
	top: 0;
	height: 100vh;
	padding: 24px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	color: #d9e6ed;
	background: var(--ct-deep);
}
.ct-sidebar a { color: inherit; text-decoration: none; }
.ct-brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: white !important; font-weight: 700; }
.ct-brand img { width: 38px; background: white; padding: 4px; border-radius: 8px; }
.ct-sidebar nav { display: grid; gap: 5px; }
.ct-sidebar nav a, .ct-account a { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 8px 12px; border-radius: 8px; }
.ct-sidebar nav a i { width: 16px; }
.ct-sidebar nav a.active { background: #225268 !important; color: white; }
.ct-sidebar nav a:hover, .ct-account a:hover { background: #22495c; color: white; }
.ct-account { margin-top: auto; border-top: 1px solid #385363; padding-top: 10px; overflow-wrap: anywhere; }
.ct-account summary { cursor: pointer; padding: 7px 2px; }
.ct-main { min-width: 0; padding: clamp(15px, 3vw, 44px); }

.clearance-workspace { color: var(--ct-ink); max-width: 1440px; margin-inline: auto; }
.ct-narrow { max-width: 820px; }
.clearance-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.clearance-heading h1 { font-size: clamp(1.65rem, 3.2vw, 2.6rem); margin: 0 0 6px; font-weight: 720; letter-spacing: -.03em; color: var(--ct-ink); }
.clearance-heading p { color: var(--ct-muted); margin: 0; }
.ct-back { display: inline-block; margin-bottom: 14px; color: var(--ct-accent-dark); font-weight: 600; }
.ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ct-button {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	gap: 7px;
	min-height: 40px;
	border: 1px solid #c6d5de;
	border-radius: 8px;
	padding: 7px 13px;
	background: #fff;
	color: var(--ct-ink);
	text-decoration: none;
	font-size: .92rem;
	font-weight: 600;
	white-space: nowrap;
}
.ct-button:hover { color: var(--ct-ink); background: #eaf1f5; }
.ct-button:disabled { cursor: default; opacity: .55; }
.ct-primary { background: var(--ct-accent); border-color: var(--ct-accent); color: #fff; }
.ct-primary:hover { background: var(--ct-accent-dark); color: #fff; }
.ct-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--ct-line); margin-bottom: 18px; }
.ct-tabs a { color: var(--ct-muted); text-decoration: none; padding: 0 2px 10px; font-weight: 600; border-bottom: 2px solid transparent; }
.ct-tabs a.current { color: var(--ct-accent-dark); border-bottom-color: var(--ct-accent); }
.ct-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ct-metrics div { border: 1px solid var(--ct-line); border-radius: 12px; padding: 13px 16px; background: #fff; color: var(--ct-muted); font-size: .9rem; }
.ct-metrics span { display: block; font-size: 1.7rem; font-weight: 700; color: var(--ct-ink); }
.ct-panel { background: #fff; border: 1px solid var(--ct-line); border-radius: 12px; }
.ct-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(153px, 1fr)); gap: 12px; padding: 17px; align-items: end; }
.ct-filters label, .ct-form label { display: block; min-width: 0; font-size: .91rem; font-weight: 600; }
.ct-filters input, .ct-filters select, .ct-form .form-select, .ct-form .form-control { margin-top: 5px; border-color: #bbcdd7; font-family: inherit; }
.ct-results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 17px; border-top: 1px solid var(--ct-line); }
.clearance-workspace h2 { margin: 0; font-size: 1.18rem; font-weight: 700; }
.ct-empty { padding: 34px 18px; text-align: center; border-top: 1px solid var(--ct-line); }
.ct-empty p, .ct-hint { color: var(--ct-muted); margin: 5px 0; font-size: .9rem; }
.ct-table-wrap { overflow-x: auto; }
.ct-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ct-table th { background: #edf3f6; color: #395263; font-size: .8rem; white-space: nowrap; }
.ct-table th, .ct-table td { text-align: left; vertical-align: top; padding: 11px 12px; border-top: 1px solid var(--ct-line); }
.ct-table td { overflow-wrap: anywhere; }
.ct-table td a, .ct-hint a { color: var(--ct-accent-dark); }
.ct-table small { display: block; color: var(--ct-muted); margin-top: 2px; }
.ct-table .ct-area { max-width: 240px; }
.ct-notice-link { font-weight: 700; }
.ct-status { border-radius: 999px; padding: 4px 9px; background: #e3eff7; color: #234e75; font-size: .77rem; font-weight: 700; white-space: nowrap; }
.ct-status-success { background: #d9f0e7; color: #1d6247; }
.ct-status-warn { background: #fff0d4; color: #745019; }
.ct-status-alert { background: #f9e1e3; color: #8d2b35; }
.ct-pagination { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 17px; border-top: 1px solid var(--ct-line); }
.ct-detail, .ct-form { padding: clamp(15px, 3vw, 24px); margin-bottom: 15px; }
.ct-detail h2:not(:first-child) { margin-top: 14px; }
.ct-detail > p { margin: 8px 0; }
.ct-detail-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.ct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ct-full { grid-column: 1 / -1; }
.ct-detail dl { margin: 14px 0 0; }
.ct-detail dt { color: var(--ct-muted); font-size: .86rem; font-weight: 600; }
.ct-detail dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.ct-preline { white-space: pre-line; }
.ct-form fieldset { display: grid; gap: 12px; padding-bottom: 18px; margin-bottom: 17px; border-bottom: 1px solid var(--ct-line); }
.ct-form legend { float: none; width: auto; font-weight: 700; font-size: 1.15rem; margin-bottom: 12px; }
.ct-signature { max-width: 100%; width: 440px; height: auto; border-radius: 8px; border: 1px dashed #8ea5b3; display: block; margin: 7px 0 10px; touch-action: none; background: white; }
.ct-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.ct-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--ct-background); border: 1px solid var(--ct-line); border-radius: 8px; }
.ct-photo-files { padding-inline-start: 0; list-style: none; margin: 0; }
.ct-photo-files li { display: flex; justify-content: space-between; align-items: center; gap: 8px; overflow-wrap: anywhere; padding: 5px 0; }
.ct-recipients { overflow-wrap: anywhere; }

@media (max-width: 850px) {
	.ct-shell { display: block; }
	.ct-sidebar { height: auto; position: static; display: flex; gap: 10px; padding: 11px 16px; }
	.ct-sidebar nav { display: flex; flex-wrap: wrap; }
	.ct-sidebar nav a { min-height: 36px; padding: 6px 9px; font-size: .87rem; }
	.ct-account { padding: 0; border: none; }
	.ct-account summary { font-size: .84rem; }
}

@media (max-width: 650px) {
	.clearance-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
	.ct-metrics { grid-template-columns: repeat(2, 1fr); }
	.ct-grid { grid-template-columns: minmax(0, 1fr); }
	.ct-table, .ct-table tbody { display: block; }
	.ct-table thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
	.ct-table tr { display: block; border-top: 1px solid var(--ct-line); padding: 12px 15px; }
	.ct-table td { display: grid; grid-template-columns: minmax(92px, .55fr) minmax(0, 1fr); gap: 3px 10px; border: none; padding: 5px 0; }
	.ct-table td::before { content: attr(data-label); color: var(--ct-muted); font-weight: 600; grid-row: span 2; }
	.ct-table .ct-area { max-width: none; }
	.ct-status { justify-self: start; }
}

