/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
	--bg: #f6f7fb;
	--panel: #ffffff;
	--text: #0f172a;
	--muted: #64748b;
	--primary: #4f46e5;
	--primary-hover: #4338ca;
	--danger: #e11d48;
	--danger-hover: #be123c;
	--border: #e5e7eb;
	--shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
	--radius: 16px;
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
		"Apple Color Emoji", "Segoe UI Emoji";
	line-height: 1.5;
}

a {
	color: var(--primary);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

hr {
	border: 0;
	border-top: 1px solid var(--border);
	margin: 18px 0;
}

pre {
	margin: 0;
	padding: 14px;
	background: #0b1020;
	color: #e2e8f0;
	border-radius: var(--radius);
	overflow: auto;
	box-shadow: var(--shadow);
}

.container {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 16px;
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(255, 255, 255, 0.78);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--border);
}

.topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
}

.brand {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.brand__title {
	font-weight: 800;
	letter-spacing: 0.2px;
}

.brand__meta {
	color: var(--muted);
	font-size: 13px;
}

.nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
}

.nav__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 12px;
	color: var(--text);
}

.nav__link:hover {
	background: #eef2ff;
	text-decoration: none;
}

.nav__link--active {
	background: #e0e7ff;
	color: var(--primary);
	font-weight: 800;
	text-decoration: none;
}

.app-main {
	padding: 22px 0 28px;
}

.page-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 6px 0 16px;
}

.page-header h1 {
	margin: 0;
	font-size: 24px;
	letter-spacing: -0.01em;
}

.page-header__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.card {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px;
	box-shadow: var(--shadow);
}

.muted {
	color: var(--muted);
}

.btn {
	appearance: none;
	border: 1px solid var(--border);
	background: #ffffff;
	color: var(--text);
	padding: 9px 12px;
	border-radius: 12px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	line-height: 1;
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.btn:hover {
	border-color: #cbd5e1;
	box-shadow: var(--shadow);
	text-decoration: none;
}

.btn--primary {
	background: var(--primary);
	border-color: var(--primary);
	color: #ffffff;
}

.btn--primary:hover {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
}

.btn--danger {
	background: var(--danger);
	border-color: var(--danger);
	color: #ffffff;
}

.btn--danger:hover {
	background: var(--danger-hover);
	border-color: var(--danger-hover);
}

.btn--ghost {
	background: transparent;
}

.btn[disabled],
.btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	box-shadow: none;
}

.inline-form {
	display: inline;
}

.flash {
	margin: 14px 0;
	padding: 10px 12px;
	border-radius: 14px;
	border: 1px solid var(--border);
	border-left-width: 5px;
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.flash--notice {
	background: #ecfdf3;
	border-color: #86efac;
}

.flash--alert {
	background: #fff1f2;
	border-color: #fda4af;
}

.toolbar {
	display: flex;
	gap: 12px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.toolbar form {
	display: flex;
	gap: 10px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.field label {
	display: block;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
	width: 100%;
	padding: 10px 12px;
	border-radius: 14px;
	border: 1px solid var(--border);
	background: #ffffff;
	color: var(--text);
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.form-errors {
	margin: 10px 0;
	color: var(--danger);
	font-weight: 800;
}

.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.form-grid--medium {
	max-width: 720px;
}

.form-grid--wide {
	max-width: 900px;
}

.span-all {
	grid-column: 1 / -1;
}

.help-text {
	color: var(--muted);
	font-size: 12px;
	margin-top: 6px;
}

.form-actions {
	margin-top: 12px;
}

.checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
}

@media (max-width: 720px) {
	.form-grid {
		grid-template-columns: 1fr;
	}
}

input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--primary);
}

.table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
}

.table th,
.table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}

.table th {
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	background: #fafbff;
}

.table tr:last-child td {
	border-bottom: 0;
}

.row-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

.dl {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 10px 14px;
}

.dl dt {
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.dl dd {
	margin: 0;
}

.mt-lg {
	margin-top: 18px;
}

.mb-md {
	margin-bottom: 14px;
}

.h2 {
	margin: 0;
	font-size: 18px;
	letter-spacing: -0.01em;
}

@media (max-width: 640px) {
	.dl {
		grid-template-columns: 1fr;
	}
}
