/* ==========================================================================
   Wuduh — وضوح
   الألوان: بنفسجي ماجنتا للخلفيات، أسود دافئ للوحة الدخول، وبرتقالي للتمييز.
   ========================================================================== */

:root {
	--brand-900: #4a0f3b;
	--brand-700: #6a1453;
	--brand-500: #8f1a70;
	--pink: #dc86c6;
	--accent: #f5a13a;
	--dark: #1f1b18;
	--dark-raised: #2a2522;
	--dark-line: #403934;
	--dark-text: #f3eeea;
	--dark-text-soft: #a89e97;
	--ink: #1f1b18;
	--ink-soft: #6b5f66;
	--surface: #f7f3f5;
	--white: #ffffff;
	--line: #e3d9df;
	--danger: #ffb4ab;
	--danger-bg: rgba(255, 107, 94, 0.14);
	--danger-line: #ff6b5e;

	--font-display: "Alexandria", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
	--font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

	--radius-tile: 14px;
	--radius-field: 8px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.7;
	color: var(--ink);
	background: var(--surface);
	direction: rtl;
}

h1,
h2 {
	font-family: var(--font-display);
	line-height: 1.35;
	margin: 0;
}

p {
	margin: 0;
}

a {
	color: inherit;
}

svg {
	display: block;
}

:focus-visible {
	outline: 3px solid var(--pink);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

[hidden] {
	display: none !important;
}

/* خلفية الشاشات الداكنة (الدخول والأقسام) */
body.is-login,
body.is-launcher {
	color: var(--white);
	background:
		radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.09) 0 240px, transparent 241px),
		radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.09) 0 200px, transparent 201px),
		linear-gradient(180deg, var(--brand-700) 0%, var(--brand-500) 100%);
	background-attachment: fixed;
}

/* ---------- شاشة الدخول ---------- */

.login {
	min-height: 100vh;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
}

.login__intro {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 48px clamp(24px, 6vw, 96px);
}

.login__site {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 1.125rem;
	color: var(--accent);
	margin-bottom: 20px;
}

.login__headline {
	font-weight: 700;
	font-size: clamp(1.9rem, 3.6vw, 3.1rem);
	max-width: 14em;
}

.dial {
	width: min(100%, 380px);
	margin-top: 56px;
	fill: none;
	stroke-linecap: round;
}

.dial__track {
	stroke: rgba(255, 255, 255, 0.14);
	stroke-width: 10;
}

.dial__value {
	stroke: var(--accent);
	stroke-width: 10;
	stroke-dasharray: 72 100;
	animation: dial-fill 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.dial__ticks line {
	stroke: rgba(255, 255, 255, 0.45);
	stroke-width: 2;
}

.dial__needle {
	transform-origin: 160px 170px;
	transform: rotate(40deg);
	animation: dial-needle 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.dial__needle line {
	stroke: var(--white);
	stroke-width: 4;
}

.dial__hub {
	fill: var(--white);
}

@keyframes dial-fill {
	from { stroke-dasharray: 0 100; }
}

@keyframes dial-needle {
	from { transform: rotate(-90deg); }
}

.login__panel {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 24px;
	background: var(--dark);
	color: var(--dark-text);
}

.login__form {
	width: 100%;
	max-width: 360px;
	display: grid;
	gap: 18px;
}

.login__title {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 6px;
}

.login__error {
	padding: 10px 14px;
	border-radius: var(--radius-field);
	border-inline-start: 4px solid var(--danger-line);
	background: var(--danger-bg);
	color: var(--danger);
	font-size: 0.9375rem;
}

.login__help {
	font-size: 0.875rem;
	color: var(--dark-text-soft);
}

.field {
	display: grid;
	gap: 6px;
}

.field__label {
	font-size: 0.9375rem;
	font-weight: 500;
}

.field__input {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	font: inherit;
	color: var(--dark-text);
	background: var(--dark-raised);
	border: 1px solid var(--dark-line);
	border-radius: var(--radius-field);
}

.field__input:focus {
	outline: none;
	border-color: var(--pink);
	box-shadow: 0 0 0 3px rgba(220, 134, 198, 0.25);
}

.field__input:-webkit-autofill {
	-webkit-text-fill-color: var(--dark-text);
	box-shadow: 0 0 0 100px var(--dark-raised) inset;
}

.check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9375rem;
	color: var(--dark-text-soft);
}

.check input {
	width: 17px;
	height: 17px;
	accent-color: var(--pink);
}

.button {
	height: 48px;
	font: inherit;
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--white);
	background: var(--brand-500);
	border: 0;
	border-radius: var(--radius-field);
	cursor: pointer;
}

.button:hover {
	background: #a82385;
}

/* ---------- الشريط العلوي ---------- */

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px clamp(16px, 4vw, 48px);
	color: var(--white);
}

body.is-module .topbar {
	padding-block: 8px;
	background: var(--brand-900);
}

.topbar__start {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

/* زر كل الأقسام: أيقونة فقط */
.topbar__apps {
	display: grid;
	place-items: center;
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 8px;
}

.topbar__apps:hover {
	background: rgba(255, 255, 255, 0.14);
}

.topbar__apps svg {
	width: 22px;
	height: 22px;
}

.topbar__module {
	min-width: 0;
	padding-inline-start: 14px;
	font-family: var(--font-display);
	font-size: 1.0625rem;
	font-weight: 500;
	line-height: 1.6;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	border-inline-start: 1px solid rgba(255, 255, 255, 0.35);
}

.topbar__module a {
	text-decoration: none;
}

.topbar__brand {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.0625rem;
	text-decoration: none;
}

.topbar__user {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 0.9375rem;
}

.topbar__name {
	opacity: 0.8;
}

.topbar__logout {
	text-underline-offset: 4px;
	white-space: nowrap;
}

.topbar__brand {
	white-space: nowrap;
}

/* ---------- شاشة الأقسام ---------- */

.launcher {
	width: min(100%, 1080px);
	margin: 0 auto;
	padding: 24px clamp(16px, 4vw, 48px) 64px;
}

.search {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 52px;
	padding: 0 18px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.16);
}

.search:focus-within {
	border-color: var(--accent);
}

.search svg {
	width: 22px;
	height: 22px;
	flex: none;
}

.search__input {
	flex: 1;
	min-width: 0;
	height: 100%;
	font: inherit;
	color: var(--white);
	background: transparent;
	border: 0;
	outline: none;
}

.search__input::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

.modules {
	list-style: none;
	margin: 44px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
	gap: 40px 12px;
}

.module {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 4px;
	text-align: center;
	text-decoration: none;
	color: var(--white);
	border-radius: var(--radius-tile);
}

.module__tile {
	position: relative;
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	border-radius: var(--radius-tile);
	color: var(--white);
	/* ظل قطري طويل داخل المربع، مثل أيقونات شاشة التطبيقات */
	background:
		linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.16) 50%),
		var(--tile, var(--brand-500));
	box-shadow: 0 6px 14px rgba(4, 20, 24, 0.35);
	transition: transform 0.15s ease;
}

.module__tile svg {
	width: 40px;
	height: 40px;
}

.module__tile--small {
	width: 40px;
	height: 40px;
	border-radius: 9px;
	box-shadow: none;
}

.module__tile--small svg {
	width: 22px;
	height: 22px;
}

a.module:hover .module__tile {
	transform: translateY(-3px);
}

.module__name {
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.5;
}

.module--soon .module__tile {
	filter: grayscale(0.75);
	opacity: 0.5;
}

.module--soon .module__name {
	opacity: 0.6;
}

.module__soon {
	margin-top: -8px;
	font-size: 0.75rem;
	color: var(--accent);
}

.launcher__empty {
	margin-top: 48px;
	text-align: center;
	opacity: 0.8;
}

/* ---------- صفحة القسم ---------- */

.module-page {
	width: min(100%, 1240px);
	margin: 0 auto;
	padding: 16px clamp(16px, 4vw, 48px) 64px;
}

.empty {
	display: grid;
	justify-items: center;
	gap: 12px;
	padding: 64px 24px;
	text-align: center;
	background: var(--white);
	border: 1px dashed var(--line);
	border-radius: 12px;
}

.empty__icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	color: var(--brand-500);
	background: var(--surface);
}

.empty__icon svg {
	width: 28px;
	height: 28px;
}

.empty__title {
	font-size: 1.25rem;
	font-weight: 700;
}

.empty__text {
	max-width: 46ch;
	color: var(--ink-soft);
}

/* ---------- عناصر صفحات الأقسام: أزرار، حقول، جداول، لوحات ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	padding: 0 20px;
	font: inherit;
	font-weight: 600;
	color: var(--white);
	background: var(--brand-500);
	border: 0;
	border-radius: var(--radius-field);
	text-decoration: none;
	cursor: pointer;
}

.btn:hover {
	background: var(--brand-700);
}

.input {
	width: 100%;
	height: 42px;
	padding: 0 12px;
	font: inherit;
	color: var(--ink);
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-field);
}

.input:focus {
	outline: none;
	border-color: var(--brand-500);
	box-shadow: 0 0 0 3px rgba(143, 26, 112, 0.18);
}

.input--file {
	height: auto;
	padding: 9px 12px;
}

.back-link {
	display: inline-block;
	margin-bottom: 16px;
	font-size: 0.9375rem;
	color: var(--brand-500);
	text-underline-offset: 4px;
}

.notice {
	padding: 14px 18px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 10px;
}

.notice--error {
	margin-bottom: 20px;
	color: #9c1c13;
	background: #fdeeec;
	border-color: #f1c2bd;
}

.panel {
	margin-bottom: 20px;
	padding: 20px 22px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 12px;
}

.panel__title {
	margin: 0 0 14px;
	font-family: var(--font-display);
	font-size: 1.0625rem;
	font-weight: 700;
}

.panel__subtitle {
	margin: 18px 0 8px;
	font-size: 0.9375rem;
	font-weight: 600;
}

.panel__text {
	max-width: 70ch;
	margin-bottom: 16px;
	color: var(--ink-soft);
}

.panel__note {
	margin-top: 14px;
	font-size: 0.875rem;
	color: var(--ink-soft);
}

.panel__note a {
	color: var(--brand-500);
	font-weight: 600;
}

.panel .btn {
	margin-top: 16px;
}

.list {
	margin: 0;
	padding-inline-start: 20px;
	font-size: 0.9375rem;
}

/* أرقام الملخص */
.stats {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.stats__item {
	flex: 1 1 140px;
	padding: 14px 18px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 12px;
}

.stats--flat {
	margin-bottom: 0;
}

.stats--flat .stats__item {
	background: var(--surface);
}

.stats__value {
	display: block;
	font-family: var(--font-display);
	font-size: 1.625rem;
	font-weight: 700;
	line-height: 1.3;
	font-variant-numeric: tabular-nums;
}

.stats__label {
	font-size: 0.875rem;
	color: var(--ink-soft);
}

/* التصفية */
.filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin-bottom: 16px;
}

.filters__field {
	display: grid;
	gap: 4px;
	flex: 0 1 180px;
}

.filters__field--grow {
	flex: 1 1 280px;
}

.filters__label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--ink-soft);
}

.filters__reset {
	align-self: center;
	font-size: 0.9375rem;
	color: var(--brand-500);
}

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

.upload__field {
	display: grid;
	gap: 4px;
	flex: 1 1 320px;
}

.upload .btn {
	margin-top: 0;
}

/* الجداول */
.table-count {
	margin-bottom: 8px;
	font-size: 0.875rem;
	color: var(--ink-soft);
}

.table-wrap {
	overflow-x: auto;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 12px;
}

.panel .table-wrap {
	border-radius: 8px;
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
	white-space: nowrap;
}

.table th,
.table td {
	padding: 11px 16px;
	text-align: start;
	border-bottom: 1px solid var(--line);
}

.table th {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--ink-soft);
	background: var(--surface);
}

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

.table tbody tr:hover td {
	background: #fbf7f9;
}

.table--compact th,
.table--compact td {
	padding: 8px 14px;
}

.table__link {
	font-weight: 600;
	color: var(--brand-500);
	text-underline-offset: 4px;
}

.table__ltr {
	text-align: right;
}

.badge {
	display: inline-block;
	padding: 2px 10px;
	font-size: 0.8125rem;
	font-weight: 500;
	border-radius: 999px;
	background: var(--surface);
	border: 1px solid var(--line);
}

.badge--late {
	color: #9c1c13;
	background: #fdeeec;
	border-color: #f1c2bd;
}

.badge--soon {
	color: #7a4a00;
	background: #fff3dd;
	border-color: #f2d59c;
}

.pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 18px;
	font-size: 0.9375rem;
}

.pager__link {
	color: var(--brand-500);
	font-weight: 600;
}

.pager__current {
	color: var(--ink-soft);
}

/* ---------- ملف السيارة ---------- */

.sheet {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(31, 27, 24, 0.06);
}

/* شريط الأزرار أعلى الملف */
.smart {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start; /* تبدأ من اليمين */
	border-bottom: 1px solid var(--line);
}

.smart__btn {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 1 190px;
	min-height: 60px;
	padding: 8px 18px;
	color: var(--ink);
	text-decoration: none;
	border-inline-end: 1px solid var(--line);
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
}

.smart__btn:hover {
	background: var(--surface);
}

.smart__btn.is-active {
	background: var(--surface);
	border-bottom-color: var(--brand-500);
}

.smart__icon {
	flex: none;
	color: var(--brand-500);
}

.smart__icon svg {
	width: 26px;
	height: 26px;
}

.smart__text {
	display: grid;
	line-height: 1.35;
}

.smart__count {
	font-weight: 700;
	color: var(--brand-500);
	font-variant-numeric: tabular-nums;
}

.smart__label {
	font-size: 0.9375rem;
}

.smart__sub {
	font-size: 0.75rem;
	color: var(--ink-soft);
}

.sheet__body {
	padding: 24px 28px 28px;
}

/* الاسم واللوحة والصورة */
.vhead {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 24px;
	margin-bottom: 28px;
}

.vhead__main {
	min-width: 0;
}

.vhead__name {
	font-size: 1.875rem;
	font-weight: 700;
	color: var(--brand-500);
	line-height: 1.3;
}

.vhead__plate {
	margin-top: 4px;
	font-family: var(--font-display);
	font-size: 1.375rem;
	font-weight: 700;
	text-align: right;
}

.tags {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tags__item {
	padding: 1px 12px;
	font-size: 0.8125rem;
	border: 1px solid var(--ink-soft);
	border-radius: 999px;
}

.tags__item--strong {
	color: var(--white);
	background: var(--brand-500);
	border-color: var(--brand-500);
}

.vhead__photo {
	flex: none;
	width: 150px;
	text-align: center;
}

.vhead__frame {
	display: block;
	width: 150px;
	height: 112px;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface);
}

.vhead__frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.vhead__frame--empty {
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 4px;
	font-size: 0.8125rem;
	color: var(--ink-soft);
}

.vhead__frame--empty svg {
	width: 40px;
	height: 40px;
	opacity: 0.6;
}

.vhead__upload {
	display: flex;
	justify-content: center;
	gap: 14px;
	margin-top: 6px;
}

.linkbtn {
	padding: 0;
	font: inherit;
	font-size: 0.8125rem;
	color: var(--brand-500);
	text-decoration: underline;
	text-underline-offset: 3px;
	background: none;
	border: 0;
	cursor: pointer;
}

.linkbtn--danger {
	color: #9c1c13;
}

.linkbtn:focus-within {
	outline: 3px solid var(--pink);
	outline-offset: 3px;
}

/* البيانات: عمودان، وكل صف عنوان وقيمة */
.groups {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 48px;
}

.group {
	margin-bottom: 26px;
}

.group__title {
	margin: 0 0 10px;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--brand-500);
}

.rows {
	margin: 0;
}

.rows__row {
	display: grid;
	grid-template-columns: 190px minmax(0, 1fr);
}

.rows dt {
	padding: 4px 0;
	padding-inline-end: 12px;
	font-weight: 700;
}

.rows dd {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 0;
	padding: 4px 0;
	padding-inline-start: 12px;
	border-inline-start: 1px solid var(--line);
	overflow-wrap: anywhere;
	font-variant-numeric: tabular-nums;
}

.rows__unit {
	font-size: 0.8125rem;
	color: var(--ink-soft);
}

/* لوحات التفاصيل التي تفتحها الأزرار */
.vpanel {
	scroll-margin-top: 16px;
}

.vpanel__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 14px;
}

.vpanel__title {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--brand-500);
}

.vpanel__back {
	font-size: 0.9375rem;
	color: var(--brand-500);
	text-underline-offset: 4px;
}

/* مع JavaScript: لوحة واحدة ظاهرة. بدونه: كل اللوحات تحت بعضها. */
.js .vpanel:not(.is-active) {
	display: none;
}

html:not(.js) .vpanel {
	margin-bottom: 32px;
}

html:not(.js) .vpanel__back {
	display: none;
}

.vpanel .stats__item {
	background: var(--surface);
}

.vpanel .table-count {
	margin-top: 8px;
}

.table__wrap {
	white-space: normal;
	min-width: 220px;
}

.badge--ok {
	color: #14532d;
	background: #e9f7ee;
	border-color: #b7e0c4;
}

/* سجل السيارة: خط زمني من الأقدم إلى اليوم */
.timeline {
	list-style: none;
	margin: 0;
	padding: 0;
}

.timeline__item {
	position: relative;
	padding: 0 22px 20px 0;
	border-inline-start: 2px solid var(--line);
	margin-inline-start: 5px;
	padding-inline-start: 22px;
	padding-inline-end: 0;
}

.timeline__item::before {
	content: "";
	position: absolute;
	inset-inline-start: -7px;
	top: 6px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--white);
	border: 2px solid var(--ink-soft);
}

.timeline__item--created::before,
.timeline__item--updated::before {
	border-color: var(--brand-500);
	background: var(--brand-500);
}

.timeline__item--today {
	padding-bottom: 0;
	border-inline-start-color: transparent;
}

.timeline__item--today::before {
	border-color: var(--accent);
	background: var(--accent);
}

.timeline__date {
	font-size: 0.8125rem;
	color: var(--ink-soft);
	font-variant-numeric: tabular-nums;
}

.timeline__title {
	font-weight: 600;
}

.timeline__changes {
	list-style: none;
	margin: 6px 0 0;
	padding: 8px 12px;
	font-size: 0.875rem;
	background: var(--surface);
	border-radius: 8px;
}

.timeline__field {
	color: var(--ink-soft);
}

.timeline__old {
	text-decoration: line-through;
	color: var(--ink-soft);
}

.timeline__new {
	font-weight: 600;
}

.timeline__meta {
	margin-top: 4px;
	font-size: 0.8125rem;
	color: var(--ink-soft);
}

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

	.smart__btn {
		flex: 1 1 150px;
	}
}

@media (max-width: 560px) {
	.sheet__body {
		padding: 18px 16px 20px;
	}

	.vhead {
		flex-direction: column-reverse;
	}

	.rows__row {
		grid-template-columns: 130px minmax(0, 1fr);
	}

	.vhead__name {
		font-size: 1.5rem;
	}
}

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

/* ---------- قسم المستخدمين: تبويبات، نموذج، جدول الصلاحيات ---------- */

.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--line);
}

.tabs__link {
	padding: 10px 16px;
	margin-bottom: -1px;
	font-weight: 500;
	color: var(--ink-soft);
	text-decoration: none;
	border-bottom: 3px solid transparent;
}

.tabs__link:hover {
	color: var(--ink);
}

.tabs__link.is-current {
	color: var(--brand-500);
	font-weight: 600;
	border-bottom-color: var(--brand-500);
}

.notice--success {
	margin-bottom: 20px;
	color: #14532d;
	background: #e9f7ee;
	border-color: #b7e0c4;
}

.form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 20px;
	max-width: 760px;
}

.form__field {
	display: grid;
	gap: 4px;
	align-content: start;
}

.form__field--wide,
.form__actions {
	grid-column: 1 / -1;
}

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

.form__inline .input {
	flex: 1 1 220px;
	width: auto;
}

.form__hint {
	font-size: 0.8125rem;
	color: var(--ink-soft);
}

.panel .form .btn,
.panel .form__inline .btn {
	margin-top: 0;
}

.btn--ghost {
	color: var(--brand-500);
	background: var(--white);
	border: 1px solid var(--brand-500);
}

.btn--ghost:hover {
	color: var(--white);
	background: var(--brand-500);
}

.perms td {
	white-space: normal;
}

.perms .perms__type {
	width: 150px;
	text-align: center;
}

.perms__group th {
	font-size: 0.875rem;
	color: var(--ink);
	background: #fbf7f9;
}

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

/* ---------- الشاشات الصغيرة ---------- */

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

	.login__intro {
		padding: 36px 24px 28px;
	}

	.dial {
		display: none;
	}

	.login__panel {
		align-items: flex-start;
		padding-top: 36px;
	}
}

@media (max-width: 480px) {
	.modules {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 28px 6px;
	}

	.module__tile {
		width: 64px;
		height: 64px;
	}

	.topbar__name {
		display: none;
	}

	.topbar__start {
		gap: 8px;
	}

	.topbar__module {
		padding-inline-start: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dial__value,
	.dial__needle {
		animation: none;
	}

	.module__tile {
		transition: none;
	}
}
