.stedif-os-app,
.stedif-os-auth {
	--stedif-bg: #0f172a;
	--stedif-surface: #ffffff;
	--stedif-muted: #475569;
	--stedif-text: #0f172a;
	--stedif-accent: #0f766e;
	--stedif-accent-2: #134e4a;
	--stedif-danger: #b91c1c;
	--stedif-ok: #166534;
	--stedif-warn: #9a3412;
	--stedif-border: #e2e8f0;
	--stedif-radius: 16px;
	--stedif-safe-bottom: env(safe-area-inset-bottom, 0px);
	--stedif-safe-top: env(safe-area-inset-top, 0px);
	font-family: "Segoe UI", system-ui, sans-serif;
	color: var(--stedif-text);
	box-sizing: border-box;
	max-width: 1120px;
	margin: 0 auto;
	padding: 1rem;
	padding-bottom: calc(1rem + var(--stedif-safe-bottom));
	overflow-x: hidden;
	width: 100%;
}

.stedif-os-app *,
.stedif-os-auth * {
	box-sizing: border-box;
}

.stedif-os-app {
	background: #f8fafc;
	min-height: 100dvh;
	min-height: 100vh;
}

.stedif-os-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	background: var(--stedif-bg);
	color: #fff;
	padding: 1rem 1.25rem;
	padding-top: calc(1rem + var(--stedif-safe-top));
	border-radius: var(--stedif-radius);
}

.stedif-os-kicker {
	margin: 0;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #99f6e4;
}

.stedif-os-header h1 {
	margin: 0.2rem 0 0;
	font-size: 1.25rem;
	line-height: 1.25;
}

.stedif-os-user {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

.stedif-os-role {
	display: block;
	font-weight: 400;
	font-size: 0.8rem;
	color: #cbd5e1;
}

.stedif-os-cards,
.stedif-os-kpi,
.stedif-os-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 1rem 0;
}

.stedif-os-card,
.stedif-os-kpi-card {
	display: block;
	background: #fff;
	border: 1px solid var(--stedif-border);
	border-radius: 14px;
	padding: 1rem;
	text-decoration: none;
	color: inherit;
	min-height: 96px;
	min-width: 0;
}

.stedif-os-card--primary {
	background: #0f766e;
	color: #fff;
	border-color: #0f766e;
}

.stedif-os-card--primary p,
.stedif-os-card--primary h2 {
	color: #fff;
}

.stedif-os-card h2,
.stedif-os-kpi-card h2 {
	margin: 0 0 0.35rem;
	font-size: 1rem;
}

.stedif-os-card p,
.stedif-os-muted {
	margin: 0;
	color: var(--stedif-muted);
	font-size: 0.9rem;
}

.stedif-os-card--primary p {
	color: #ccfbf1;
}

.stedif-os-panel {
	background: #fff;
	border: 1px solid var(--stedif-border);
	border-radius: 16px;
	padding: 1rem;
	margin: 1rem 0;
	min-width: 0;
}

.stedif-os-panel h2 {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
}

.stedif-os-stats {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}

.stedif-os-stats li {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--stedif-border);
	overflow-wrap: anywhere;
}

.stedif-os-btn,
.stedif-os-app button,
.stedif-os-app input,
.stedif-os-app select,
.stedif-os-app textarea {
	min-height: 44px;
	font-size: 1rem;
}

.stedif-os-btn {
	background: var(--stedif-accent);
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 0.7rem 1rem;
	cursor: pointer;
	font-weight: 600;
}

.stedif-os-btn--ghost {
	background: #fff;
	color: var(--stedif-text);
	border: 1px solid var(--stedif-border);
}

.stedif-os-btn--danger {
	background: var(--stedif-danger);
}

.stedif-os-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

.stedif-os-empty {
	color: var(--stedif-muted);
	text-align: center;
	padding: 1.5rem 1rem;
	margin: 0;
}

.stedif-os-status {
	margin: 0.75rem 0;
	padding: 0.75rem;
	border-radius: 10px;
}

.stedif-os-status[data-tone="ok"] {
	background: #ecfdf5;
	color: var(--stedif-ok);
}

.stedif-os-status[data-tone="error"] {
	background: #fef2f2;
	color: var(--stedif-danger);
}

.stedif-os-status[data-tone="warn"] {
	background: #fff7ed;
	color: var(--stedif-warn);
}

.stedif-os-app a:focus-visible,
.stedif-os-app button:focus-visible,
.stedif-os-app input:focus-visible,
.stedif-os-app select:focus-visible,
.stedif-os-auth a:focus-visible,
.stedif-os-auth button:focus-visible,
.stedif-os-auth input:focus-visible {
	outline: 3px solid #5eead4;
	outline-offset: 2px;
}

@media (min-width: 768px) {
	.stedif-os-cards,
	.stedif-os-kpi,
	.stedif-os-actions {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.stedif-os-cards,
	.stedif-os-actions {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 374px) {
	.stedif-os-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.stedif-os-user {
		text-align: left;
	}

	.stedif-os-cards,
	.stedif-os-kpi,
	.stedif-os-actions {
		grid-template-columns: 1fr;
	}
}

@media (orientation: landscape) and (max-height: 500px) {
	.stedif-os-header h1 {
		font-size: 1.05rem;
	}
}
