/* =========================================================
   FIBERINDEX – STYLE.CSS
   Struktur:
   1. Tema / variabler
   2. Base / reset
   3. Layout
   4. Inputs / knapper
   5. Toolbar / topp / bunn
   6. Preview / tabeller / dots
   7. Notater
   8. Modaler
   9. Mapper
   10. Fargekoder
   11. Hjelp
   12. Responsiv
========================================================= */



/* =========================================================
   INSTALL-BANNER
========================================================= */




.install-banner.hidden {
  display: none;
}

.install-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: var(--app-max-width);
  bottom: calc(6.9rem + env(safe-area-inset-bottom, 0px));
  z-index: 9998;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(124, 92, 255, 0.18);
  background: linear-gradient(180deg, rgba(14, 18, 28, 0.98), rgba(11, 14, 22, 0.98));
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: installBannerIn 0.22s ease;
}

.install-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.08) inset;
}

.install-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.install-banner-text {
  min-width: 0;
  flex: 1;
}

.install-banner-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.install-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.install-banner-close {
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.install-banner-close:hover,
.install-banner-close:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: none;
}

.install-banner-btn {
  min-width: 112px;
  height: 42px;
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #4d16e8;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.install-banner-btn:hover,
.install-banner-btn:focus-visible {
  background: #5921f0;
  box-shadow: none;
}

.install-banner-close:active,
.install-banner-btn:active {
  transform: scale(0.98);
}

@keyframes installBannerIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 520px) {
  .install-banner {
    width: calc(100% - 1rem);
    bottom: calc(7.1rem + env(safe-area-inset-bottom, 0px));
    padding: 0.8rem 0.9rem;
  }

  .install-banner-content {
    align-items: center;
    flex-direction: row;
  }

  .install-banner-actions {
    gap: 0.6rem;
  }

  .install-banner-close {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .install-banner-btn {
    min-width: 102px;
    height: 40px;
    padding: 0 16px;
    font-size: 0.98rem;
  }

  .install-banner-text strong {
    font-size: 0.95rem;
  }
}





/* =========================================================
   TEMA / VARIABLER
========================================================= */







:root {
	--bg-app: #0e0e0e;
	--bg-panel: #1e1e1e;
	--bg-surface: #1a1a1a;
	--bg-input: #2a2a2a;
	--bg-soft: #333;
	--bg-button: #444;
	--bg-button-hover: #666;

	--text-main: #fff;
	--text-soft: #ddd;
	--text-muted: #ccc;
	--text-dim: #888;

	--font-ui: 'Segoe UI', sans-serif;
	--font-note: Calibri, sans-serif;
	--font-mono: Consolas, monospace;

	--border-soft: #555;
	--border-strong: #A1A1A1;
	--border-table: #333;
	--border-dot: #444;
	--outline-soft: rgba(255, 255, 255, 0.15);

	--bg-card: #222;
	--bg-card-2: #262626;
	--bg-table: #1a1a1a;
	--bg-table-head: #222;
	--bg-modal: #1f1f1f;
	--bg-floating: #2a2a2a;

	--text-table: #f1f1f1;
	--text-table-head: #ddd;
	--text-label: #ccc;

	--radius-sm: 6px;
	--radius-md: 8px;
	--radius-lg: 12px;
		--app-max-width: 760px;

	--shadow-panel: 0 3px 8px #00000055;
	--shadow-modal: 0 0 20px #000;
	--shadow-modal-soft: 0 0 20px #00000088;
	--shadow-note: 0 2px 4px #00000033;

	--accent-primary-bg:
		linear-gradient(180deg, rgba(108, 68, 236, 0.86) 0%, rgba(78, 42, 176, 0.82) 100%);
	--accent-primary-bg-hover:
		linear-gradient(180deg, rgba(118, 78, 246, 0.92) 0%, rgba(86, 48, 188, 0.88) 100%);
	--accent-primary-bg-active:
		linear-gradient(180deg, rgba(96, 60, 220, 0.94) 0%, rgba(70, 38, 160, 0.90) 100%);
	--accent-primary-border: rgba(180, 150, 255, 0.62);
	--accent-primary-border-hover: rgba(200, 174, 255, 0.76);
	--accent-primary-text: #efe7ff;
	--accent-primary-text-shadow: 0 0 10px rgba(180, 140, 255, 0.18);
	--accent-primary-icon-shadow: drop-shadow(0 0 6px rgba(180, 140, 255, 0.22));
	--accent-soft-bg: rgba(120, 78, 255, 0.22);
	--accent-soft-border: rgba(170, 140, 255, 0.26);
	--accent-soft-outline: rgba(190, 164, 255, 0.28);

	--accent-selected-bg:
		linear-gradient(180deg, rgba(62, 48, 78, 0.92) 0%, rgba(45, 38, 60, 0.92) 100%);
	--accent-selected-bg-hover:
		linear-gradient(180deg, rgba(68, 52, 86, 0.96) 0%, rgba(49, 40, 66, 0.96) 100%);
	--accent-selected-border: rgba(190, 120, 255, 0.75);
	--accent-selected-shadow:
		0 0 0 1px rgba(190, 120, 255, 0.22) inset,
		0 0 0 1px rgba(190, 120, 255, 0.18),
		0 0 14px rgba(160, 96, 255, 0.14);
	--accent-selected-text: #f3ebff;

--danger-bg:
	linear-gradient(180deg, rgba(126, 42, 42, 0.66) 0%, rgba(92, 28, 28, 0.64) 100%);
--danger-bg-hover:
	linear-gradient(180deg, rgba(142, 52, 52, 0.72) 0%, rgba(104, 34, 34, 0.70) 100%);
	--danger-border: rgba(200, 98, 98, 0.52);
	--danger-border-hover: rgba(216, 112, 112, 0.62);
	--danger-shadow: none;
	--danger-shadow-hover: none;
	--danger-text: #fff5f5;
	--danger-text-hover: #ffffff;
}

body.light-mode {
	--bg-app: #ececec;
	--bg-panel: #f7f7f7;
	--bg-surface: #ffffff;
	--bg-input: #efefef;
	--bg-soft: #dddddd;
	--bg-button: #e4e4e4;
	--bg-button-hover: #d8d8d8;

	--text-main: #111111;
	--text-soft: #222222;
	--text-muted: #444444;
	--text-dim: #666666;

	--border-soft: #c7c7c7;
	--border-strong: #9a9a9a;
	--border-table: #d0d0d0;
	--border-dot: #888888;
	--outline-soft: rgba(0, 0, 0, 0.08);

	--bg-card: #f3f3f3;
	--bg-card-2: #ececec;
	--bg-table: #ffffff;
	--bg-table-head: #f1f1f1;
	--bg-modal: #f8f8f8;
	--bg-floating: #f0f0f0;

	--text-table: #111111;
	--text-table-head: #222222;
	--text-label: #555555;

	--shadow-panel: 0 3px 8px rgba(0, 0, 0, 0.08);
	--shadow-modal: 0 8px 24px rgba(0, 0, 0, 0.18);
	--shadow-modal-soft: 0 8px 24px rgba(0, 0, 0, 0.14);
	--shadow-note: 0 2px 4px rgba(0, 0, 0, 0.08);
}

body.light-mode .btn-danger,
body.light-mode .folder-action-danger,
body.light-mode .note-action-danger,
body.light-mode .color-editor-delete-btn,
body.light-mode .confirm-danger-btn {
	box-shadow: none;
}

body.light-mode .btn-danger:hover,
body.light-mode .btn-danger:focus-visible,
body.light-mode .folder-action-danger:hover,
body.light-mode .folder-action-danger:focus-visible,
body.light-mode .note-action-danger:hover,
body.light-mode .note-action-danger:focus-visible,
body.light-mode .color-editor-delete-btn:hover,
body.light-mode .color-editor-delete-btn:focus-visible,
body.light-mode .confirm-danger-btn:hover,
body.light-mode .confirm-danger-btn:focus-visible {
	box-shadow: none;
}



body {
	background: var(--bg-app);
	color: var(--text-main);
	font-family: var(--font-ui);
	margin: 0;
	padding: 1rem;
	padding-bottom: calc(8.5rem + env(safe-area-inset-bottom, 0px));
	min-height: 100dvh;
	box-sizing: border-box;
}







/* =========================================================
   BASE / RESET
========================================================= */




html {
	scrollbar-width: none;
	-ms-overflow-style: none;
}

html,
body {
	overflow-y: auto;
}

body::-webkit-scrollbar {
	display: none;
}

* {
	-webkit-tap-highlight-color: transparent;
}

button,
.folder-sheet-item,
.folder-sheet-menu-btn,
.color-choice-btn,
.color-code-row,
.note {
	user-select: none;
	-webkit-user-select: none;
}





/* =========================================================
   LAYOUT
========================================================= */




.wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	width: 100%;
	max-width: var(--app-max-width);
	margin: 0 auto;
}

.folder-display,
.side {
	background: var(--bg-panel);
	padding: 1rem;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-panel);
	width: 100%;
	box-sizing: border-box;
}

.folder-section {
	position: fixed;
	left: 50%;
	bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	width: calc(100% - 2rem);
	max-width: var(--app-max-width);
	background: color-mix(in srgb, var(--bg-panel) 92%, transparent);
	padding: 0.85rem;
	border-radius: var(--radius-lg);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
	box-sizing: border-box;
	z-index: 999;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.control-panel-inputs {
	width: 100%;
}

.top-inputs {
	max-width: 100%;
	width: 100%;
	margin-bottom: 0.25rem;
}

.control-side {
	padding: 0.85rem;
	min-height: auto;
}

.control-side input {
	margin-bottom: 0.45rem;
}

.control-side .kabel-info-tekst {
	height: 1rem;
	margin-top: 0.1rem;
	font-size: 0.82rem;
}

.folder-display {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.35rem;
	padding: 0.85rem 1rem;
	min-height: auto;
}

.side {
	max-width: none;
}

.folder-title-block {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	width: 100%;
}

.folder-name {
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.2;
}

.folder-name-btn {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: none;
	outline: none;
	box-shadow: none;
	margin: 0;
	padding: 0.18rem 0.45rem;
	margin-left: -0.45rem;
	border-radius: 12px;
	color: var(--text-main);
	font: inherit;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
	transition:
		background 0.18s ease,
		color 0.18s ease,
		outline-color 0.18s ease;
}

.folder-name-btn:hover,
.folder-name-btn:focus-visible {
	background: rgba(255, 255, 255, 0.06);
	color: var(--text-main);
	outline: 1px solid rgba(255, 255, 255, 0.08);
	outline-offset: -1px;
	box-shadow: none;
}

.folder-name-btn:active {
	transform: none;
	background: rgba(255, 255, 255, 0.09);
}

.folder-name-btn:disabled {
	opacity: 0.55;
	cursor: default;
	pointer-events: none;
}

body.light-mode .folder-name-btn:hover,
body.light-mode .folder-name-btn:focus-visible {
	background: rgba(0, 0, 0, 0.05);
	outline: 1px solid rgba(0, 0, 0, 0.08);
}

.side {
	flex: 1;
	max-width: none;
}

#preview,
#log,
hr {
	width: 100%;
	max-width: var(--app-max-width);
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}




/* =========================================================
   INPUTS / KNAPPER
========================================================= */




input,
select {
	width: 100%;
	padding: 0.6rem;
	margin-bottom: 0.6rem;
	border: none;
	border-radius: var(--radius-md);
	background: var(--bg-input);
	color: var(--text-main);
	font-size: 1rem;
	box-sizing: border-box;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--text-main);
	-webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset;
	box-shadow: 0 0 0 1000px var(--bg-input) inset;
	transition: background-color 9999s ease-out 0s;
	caret-color: var(--text-main);
	border-radius: var(--radius-md);
}

button {
	background: var(--bg-button);
	color: var(--text-main);
	padding: 0.6rem 1.2rem;
	border: 1px solid var(--border-soft);
	border-radius: 6px;
	margin: 0.3rem 0.4rem;
	font-size: 1rem;
	cursor: pointer;
	transition:
		background 0.18s ease,
		border-color 0.18s ease,
		box-shadow 0.18s ease,
		color 0.18s ease;
	outline: 1px solid var(--outline-soft);
	outline-offset: -1px;
}

button:hover,
button:focus-visible {
	background: var(--bg-button-hover);
	border-color: var(--border-strong);
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
}

button:active {
	transform: translateY(1px);
}

.btn-accent,
.accent-primary {
	background: var(--accent-primary-bg);
	border: 1px solid var(--accent-primary-border);
	box-shadow: var(--accent-primary-shadow);
	color: var(--accent-primary-text);
}

.btn-accent:hover,
.btn-accent:focus-visible,
.accent-primary:hover,
.accent-primary:focus-visible {
	background: var(--accent-primary-bg-hover);
	border-color: var(--accent-primary-border-hover);
	box-shadow: var(--accent-primary-shadow-hover);
	color: var(--accent-primary-text);
}

.btn-accent:active,
.accent-primary:active {
	background: var(--accent-primary-bg-active);
	box-shadow: var(--accent-primary-shadow-active);
}

.btn-danger,
.folder-action-danger,
.note-action-danger,
.color-editor-delete-btn,
.confirm-danger-btn {
	background: var(--danger-bg);
	border: 1px solid var(--danger-border);
	color: var(--danger-text);
	box-shadow: none;
}

.btn-danger:hover,
.btn-danger:focus-visible,
.folder-action-danger:hover,
.folder-action-danger:focus-visible,
.note-action-danger:hover,
.note-action-danger:focus-visible,
.color-editor-delete-btn:hover,
.color-editor-delete-btn:focus-visible,
.confirm-danger-btn:hover,
.confirm-danger-btn:focus-visible {
	background: var(--danger-bg-hover);
	border-color: var(--danger-border-hover);
	color: var(--danger-text-hover);
	box-shadow: none;
}

.is-selected-accent {
	background: var(--accent-selected-bg);
	border-color: var(--accent-selected-border);
	color: var(--accent-selected-text);
}

.is-selected-accent:hover,
.is-selected-accent:focus-visible {
	background: var(--accent-selected-bg-hover);
	color: var(--accent-selected-text);
}

.badge-accent {
	color: var(--accent-primary-text);
	background: var(--accent-soft-bg);
	border: 1px solid var(--accent-soft-border);
}




/* =========================================================
   TOPBAR / TOOLBAR
========================================================= */



.topbar-actions {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex: 0 0 auto;
}

.theme-toggle-btn {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: #2f2f2f;
	color: var(--text-main);
	border: 1px solid rgba(255, 255, 255, 0.10);
	outline: 1px solid rgba(255, 255, 255, 0.04);
	outline-offset: -1px;
	box-shadow: none;
}

.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
	background: #383838;
	border-color: rgba(255, 255, 255, 0.16);
	box-shadow: none;
}

.theme-toggle-icon {
	font-size: 1.25rem;
	line-height: 1;
	display: block;
	transform: translateY(-1px);
}

body.light-mode .theme-toggle-btn {
	background: #e7e7e7;
	border-color: rgba(0, 0, 0, 0.08);
	outline: 1px solid rgba(0, 0, 0, 0.04);
}

body.light-mode .theme-toggle-btn:hover,
body.light-mode .theme-toggle-btn:focus-visible {
	background: #dddddd;
	border-color: rgba(0, 0, 0, 0.12);
}

.help-toggle-btn {
	font-weight: 700;
	font-size: 1.1rem;
}

.help-hint-pulse {
	border-color: rgba(180, 150, 255, 0.62) !important;
	outline: 1px solid rgba(190, 164, 255, 0.26) !important;
	outline-offset: -1px;
	box-shadow:
		0 0 0 1px rgba(190, 164, 255, 0.14) inset,
		0 0 12px rgba(160, 96, 255, 0.18),
		0 0 24px rgba(120, 78, 255, 0.12);
	animation: helpHintPulse 0.95s ease-in-out 3;
}

@keyframes helpHintPulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.035);
	}
	100% {
		transform: scale(1);
	}
}

.help-toggle-icon {
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.help-toggle-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.toolbar-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	align-items: center;
	gap: 0.75rem;
}

.toolbar-row button {
	width: 100%;
	min-height: 52px;
	margin: 0;
}

.bottom-nav-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 0;
}

.bottom-nav-btn .btn-icon {
	width: 22px;
	height: 22px;
	display: block;
	flex: 0 0 auto;
	opacity: 0.96;
}

.bottom-nav-btn .btn-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.bottom-nav-btn .btn-label {
	line-height: 1;
	font-size: 11px;
	letter-spacing: 0.2px;
}

.bottom-nav-btn.btn-skjot .btn-icon {
	width: 22px;
	height: 22px;
}

.bottom-nav-btn.btn-skjot {
	transform: none;
	transform-origin: center;
}

.bottom-nav-btn.btn-skjot:active {
	transform: translateY(1px);
}

.bottom-nav-btn.is-active .btn-icon,
.bottom-nav-btn:active .btn-icon {
	opacity: 1;
}

.bottom-nav-btn.btn-skjot {
	background: var(--accent-primary-bg);
	border: 1px solid var(--accent-primary-border);
	box-shadow: none;
}

.bottom-nav-btn.btn-skjot:hover,
.bottom-nav-btn.btn-skjot:focus-visible {
	background: var(--accent-primary-bg-hover);
	border-color: var(--accent-primary-border-hover);
	box-shadow: none;
}

.bottom-nav-btn.btn-skjot:active {
	background: var(--accent-primary-bg-active);
	box-shadow: var(--accent-primary-shadow-active);
}

.bottom-nav-btn.btn-skjot .btn-icon svg {
	filter: var(--accent-primary-icon-shadow);
}




/* =========================================================
   HOVEDINPUT / KABELINFO
========================================================= */




.control-side-merged {
	padding: 1rem;
}

.merged-input-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
	grid-template-areas:
		"fiber-left comment-btn fiber-right"
		"kabel-left meta-btn kabel-right";
	column-gap: 0.75rem;
	row-gap: 0.65rem;
	align-items: center;
}

.merged-input {
	width: 100%;
	height: 48px;
	margin: 0;
	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, 0.18);
	outline: 1px solid rgba(255, 255, 255, 0.06);
	outline-offset: -1px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
	transition:
		border-color 0.18s ease,
		outline-color 0.18s ease,
		box-shadow 0.18s ease;
}

.merged-input:focus {
	border-color: rgba(255, 255, 255, 0.28);
	outline-color: rgba(255, 255, 255, 0.10);
}

.control-side-merged .merged-input {
	margin-bottom: 0;
}

#fiberLeft {
	grid-area: fiber-left;
}

#fiberRight {
	grid-area: fiber-right;
}

#kabelLeft {
	grid-area: kabel-left;
}

#kabelRight {
	grid-area: kabel-right;
}

.kabel-meta-btn.pending-comment-btn {
	grid-area: comment-btn;
}

.kabel-meta-btn {
	grid-area: meta-btn;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: center;
}

.pending-comment-btn.has-comment {
	border-color: rgba(155, 115, 255, 0.42);
	outline-color: rgba(155, 115, 255, 0.18);
	background: rgba(155, 115, 255, 0.10);
	color: #d9c8ff;
}

.pending-comment-btn.has-comment:hover,
.pending-comment-btn.has-comment:focus-visible {
	border-color: rgba(155, 115, 255, 0.56);
	outline-color: rgba(155, 115, 255, 0.24);
	background: rgba(155, 115, 255, 0.14);
	color: #efe8ff;
}

.kabel-meta-btn svg {
	width: 22px;
	height: 22px;
	display: block;
}

.merged-kabel-info-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
	gap: 0.75rem;
	align-items: start;
	margin-top: 0.55rem;
}

.merged-kabel-info {
	height: auto;
	min-height: 1.2rem;
	padding-right: 0;
	text-align: left;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.merged-kabel-info:last-child {
	text-align: right;
}

.merged-kabel-info-spacer {
	width: 48px;
	min-width: 48px;
}

.kabel-info-tekst {
	font-size: 0.9rem;
	color: #888;
	margin-top: 0;
	text-align: center;
	height: 1.2rem;
	overflow: hidden;
	padding-right: 0.6rem;
}

.kabel-info-inline {
	display: flex;
	justify-content: space-between;
}




/* =========================================================
   PREVIEW / TABELLER / DOTS
========================================================= */



.live-preview-card {
	position: relative;
	width: 100%;
	max-width: 760px;
	margin: 0 auto 0.35rem auto;
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(30, 30, 34, 0.98) 0%, rgba(24, 24, 27, 0.98) 100%);
	outline: 1px solid rgba(170, 140, 255, 0.14);
	box-shadow: var(--shadow-panel);
	overflow: hidden;
}

.live-preview-card::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 1px;
	background: linear-gradient(90deg, rgba(170, 140, 255, 0.7) 0%, rgba(170, 140, 255, 0.2) 58%, rgba(170, 140, 255, 0) 100%);
	pointer-events: none;
}

.live-preview-card.is-expanded {
	outline-color: var(--accent-soft-outline);
}

.live-preview-header {
	width: 100%;
	margin: 0;
	padding: 0.82rem 0.9rem;
	border: none;
	outline: none;
	box-shadow: none;
	border-radius: 0;
	background: linear-gradient(180deg, rgba(120, 78, 255, 0.08) 0%, rgba(120, 78, 255, 0.02) 100%);
	color: var(--text-main);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.live-preview-header:hover,
.live-preview-header:focus-visible {
	background: linear-gradient(180deg, rgba(120, 78, 255, 0.12) 0%, rgba(120, 78, 255, 0.04) 100%);
	border: none;
	outline: none;
	box-shadow: none;
}

.live-preview-header:active {
	transform: none;
}

.live-preview-header-main {
	min-width: 0;
	flex: 1;
	display: flex;
	align-items: center;
	gap: 0.7rem;
}

.live-preview-badge {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 27px;
	padding: 0 0.7rem;
	border-radius: 999px;
	background: rgba(120, 78, 255, 0.18);
	border: 1px solid rgba(180, 150, 255, 0.24);
	color: var(--accent-primary-text);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.2px;
	white-space: nowrap;
}

.live-preview-summary {
	min-width: 0;
	flex: 1;
	font-family: var(--font-mono);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--text-main);
}

.live-preview-chevron {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	color: rgba(214, 199, 255, 0.9);
	transition: transform 0.2s ease, color 0.18s ease;
}

.live-preview-chevron svg {
	width: 100%;
	height: 100%;
	display: block;
}

.live-preview-card.is-expanded .live-preview-chevron {
	transform: rotate(180deg);
}

.live-preview-body-shell {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.22s ease;
}

.live-preview-card.is-expanded .live-preview-body-shell {
	grid-template-rows: 1fr;
}

.live-preview-body {
	min-height: 0;
	overflow: hidden;
	padding: 0 0.9rem 0;
}

.live-preview-card.is-expanded .live-preview-body {
	padding-bottom: 0.9rem;
}

.live-preview-empty {
	padding: 0.05rem 0 0.2rem;
	font-size: 0.84rem;
	color: var(--text-dim);
}

.live-preview-meta {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0.6rem;
	align-items: center;
	padding: 0.1rem 0 0.55rem;
}

.live-preview-meta-box {
	min-width: 0;
	font-family: var(--font-mono);
	font-size: 0.84rem;
	line-height: 1.2;
	color: var(--text-soft);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.live-preview-meta-box.is-right {
	text-align: right;
}

.live-preview-table-wrap {
	min-width: 0;
}

.live-preview-table-wrap table {
	margin-top: 0;
}

.live-preview-table-wrap:empty {
	display: none;
}

body.light-mode .live-preview-card {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 242, 252, 0.96) 100%);
	outline-color: rgba(120, 78, 255, 0.16);
}

body.light-mode .live-preview-header {
	background: linear-gradient(180deg, rgba(120, 78, 255, 0.08) 0%, rgba(120, 78, 255, 0.02) 100%);
}

body.light-mode .live-preview-header:hover,
body.light-mode .live-preview-header:focus-visible {
	background: linear-gradient(180deg, rgba(120, 78, 255, 0.12) 0%, rgba(120, 78, 255, 0.04) 100%);
}

body.light-mode .live-preview-badge {
	background: rgba(120, 78, 255, 0.1);
	border-color: rgba(120, 78, 255, 0.18);
	color: #5e33d8;
}

body.light-mode .live-preview-chevron {
	color: #6c44ec;
}




table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
	background: var(--bg-table);
	border-radius: 10px;
	overflow: hidden;
	color: var(--text-table);
}

th,
td {
	padding: 0.3rem 0.5rem;
	text-align: center;
	border: 1px solid var(--border-table);
	font-size: 0.95rem;
	color: var(--text-table);
}

th {
	background: var(--bg-table-head);
	font-weight: 600;
	color: var(--text-table-head);
}

.color-code-header-row th {
	background: var(--bg-table-head);
	font-family: var(--font-mono);
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-table-head);
	padding: 0.35rem 0.5rem;
	letter-spacing: 0.2px;
}

.color-code-header-row.single-side th {
	text-align: center;
}

.dot {
	position: relative;
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 1px solid #444;
	vertical-align: middle;
	margin-right: 4px;
	box-sizing: border-box;
	overflow: hidden;
}

.dot-striped::after {
	content: "";
	position: absolute;
	left: 2px;
	right: 2px;
	top: 50%;
	height: 2px;
	transform: translateY(-50%);
	background: var(--stripe-color, #1f1f1f);
	border-radius: 999px;
	opacity: 0.78;
}

td:nth-child(3) {
	border-left: 1px solid #444;
	border-right: 1px solid #444;
}

hr {
	border: none;
	border-top: 1px solid #444;
	margin: 2rem 0;
}

#log {
	padding-bottom: 1rem;
}

#toast {
	position: fixed;
	bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: #fff;
	padding: 0.8rem 1.2rem;
	border-radius: 6px;
	font-size: 0.95rem;
	display: none;
	opacity: 0.95;
	z-index: 12000;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	pointer-events: none;
}




/* =========================================================
   NOTATER
========================================================= */




.new-note {
	/* ← Brukes for å gi nyeste notat en glødende animasjon på nytt notat*/
	animation: noteGlow 2s ease-out;
}

@keyframes noteGlow {
	0% {
		box-shadow: 0 0 0px #ffffff00;
	}

	30% {
		box-shadow: 0 0 12px #ffffffcc;
	}

	100% {
		box-shadow: 0 0 0px #ffffff00;
	}
}

.note {
	background: var(--bg-card);
	padding: 0.3rem 0.3rem;
	border-left: 1.5px solid var(--text-dim);
	border-radius: 4px;
	cursor: pointer;
	box-shadow: var(--shadow-note);
	margin-bottom: 1rem;
	overflow: hidden;
	max-height: 32px;
	transition:
		max-height 0.2s ease,
		box-shadow 0.18s ease,
		transform 0.18s ease,
		background 0.18s ease,
		color 0.18s ease;
	will-change: max-height;
	color: var(--text-main);
}

.note-type-glatt {
	border-left-color: #6fbf73;
}

.note-type-trapp {
	border-left-color: #5fa3d9;
}

.note-type-kryss {
	border-left-color: #d8b85f;
}

.note.collapsed {
	white-space: nowrap;
	text-overflow: ellipsis;
	max-height: 32px;
}

.note:not(.collapsed) {
	transform: translateY(-1px);
}

.note-extra,
.note table {
	opacity: 1;
	transition: opacity 0.14s ease;
}

.note.collapsed .note-extra,
.note.collapsed table {
	opacity: 0;
	pointer-events: none;
}

.note-header {
	padding: 0.2rem 0.6rem;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1;
}


.note-header-fixed {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
}

/*Kabel ID i et lagret notat, venstre side*/
.note-box.left {
	flex: 1;
	max-width: 30%;
	overflow: hidden;
	font-family: var(--font-mono);
	display: flex;
	justify-content: flex-start;
	transform-origin: left center;
}


/*Kabel ID i et lagret notat, høyre side*/
.note-box.right {
	flex: 1;
	max-width: 30%;
	overflow: visible;
	font-family: var(--font-mono);
	display: flex;
	transform-origin: right center;
	justify-content: flex-end;
}

.note-box.mid {
	max-width: 25%;
	min-width: 25%;
	background: var(--bg-surface);
	font-family: var(--font-mono);
	border-radius: 8px;
	padding: 0.3rem;
	margin: -0.2rem 0.2rem 0 0.2rem;
	display: flex;
	justify-content: center;
	align-items: center;
	outline: 1px solid var(--border-soft);
	color: var(--text-main);
}

.note-box.ginfo {
	display: inline-flex;
	background: var(--bg-surface);
	font-family: var(--font-mono);
	border-radius: 8px;
	padding: 0.3rem 0.6rem;
	font-size: 0.85rem;
	margin: 0.3rem 0;
	color: var(--text-main);
	justify-content: center;
	align-items: center;
	white-space: nowrap;
	outline: 1px solid var(--border-soft);
}

.note-text {
	white-space: nowrap;
	transform: scale(1);
	display: inline-block;
	transform-origin: center center;
}

.note-ginfo-row {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0 0.6rem;
	margin: 0.3rem 0;
}

.note-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.85rem;
	color: #aaa;
	margin-top: 0.5rem;
	padding: 0 0.6rem;
	gap: 1rem;
	flex-wrap: wrap;
}

.note-comment-text {
	font-style: italic;
}

.note-meta-text {
	text-align: right;
}




/* =========================================================
   FELLES PANELSTIL
========================================================= */




.folder-display,
.folder-section,
.side,
.note {
	outline: 1px solid var(--outline-soft);
}




/* =========================================================
   MODALER
========================================================= */




.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.1s ease;
}

.modal-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

.modal-card,
.color-modal-box {
	padding: 2rem;
	border-radius: var(--radius-lg);
	width: 90%;
	max-width: 400px;
	box-sizing: border-box;
	box-shadow: var(--shadow-modal);
	opacity: 0;
	transform: translateY(10px) scale(0.985);
	transition:
		opacity 0.1s ease,
		transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

.modal-overlay.is-open .modal-card,
.modal-overlay.is-open .color-modal-box {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.modal-card {
	background: var(--bg-modal);
	color: var(--text-main);
}

.color-modal-box {
	background: var(--bg-panel);
	color: var(--text-main);
	text-align: center;
}

.modal-card.modal-card-sm {
	max-width: 300px;
}

.modal-title {
	margin: 0 0 1rem 0;
	text-align: center;
	color: var(--text-main);
}

.modal-actions {
	margin-top: 1rem;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.modal-actions > button {
	flex: 1 1 0;
	min-width: 0;
}

.modal-actions-stack {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin-top: 1.5rem;
}

.modal-input,
.modal-textarea {
	width: 100%;
	padding: 0.6rem;
	margin-top: 1rem;
	border-radius: 8px;
	background: var(--bg-input);
	color: var(--text-main);
	border: 1px solid var(--border-soft);
	box-sizing: border-box;
}

.modal-textarea {
	resize: vertical;
	min-height: 90px;
}

.modal-danger {
	background: darkred;
}

.modal-text {
	text-align: center;
	color: var(--text-label);
	margin-bottom: 1.5rem;
}

.input-wrap-relative {
	position: relative;
	width: 100%;
}



/*MODAL VARIANTER*/



.modal-actions-center {
	justify-content: center;
}

.modal-card-lg {
	max-width: 400px;
}

.modal-content-center {
	text-align: center;
}

.modal-fill {
	width: 100%;
}

.modal-actions-top {
	margin-top: 1.5rem;
}

.modal-actions-equal>button {
	flex: 1;
}

.modal-inline-btn {
	padding: 0.4rem 1rem;
	border-radius: 6px;
	border: 1px solid var(--border-soft);
	background: var(--bg-button);
	color: var(--text-main);
	cursor: pointer;
	outline: 1px solid var(--outline-soft);
	outline-offset: -1px;
}

.modal-inline-btn:hover,
.modal-inline-btn:focus-visible {
	background: var(--bg-button-hover);
	border-color: var(--border-strong);
}




/*MODAL HEADER OG LUKKEKNAPP*/



.modal-head-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.modal-title-left {
	margin: 0;
	text-align: left;
	flex: 1;
}

.modal-close-btn {
	background: transparent;
	border: none;
	color: #ddd;
	font-size: 2rem;
	line-height: 1;
	padding: 0;
	margin: 0;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: 10px;
}

.modal-close-btn:hover {
	background: rgba(255, 255, 255, 0.08);
}




/* KOMMENTAR / CONFIRM / NOTE ACTION / SMÅ MODALTILPASNINGER */



.note-action-card {
	max-width: 320px;
}

.note-action-head {
	margin-bottom: 1rem;
	align-items: center;
}

.note-action-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--text-main);
	text-align: left;
	margin: 0;
	flex: 1;
}

.note-action-list {
	margin-top: 0;
}

.note-action-btn {
	width: 100%;
	margin: 0;
}

#confirmModal {
	z-index: 11000;
}

#confirmModal.confirm-modal-import .modal-card {
	max-width: 420px;
}

#confirmModal.confirm-modal-import .modal-actions {
	flex-direction: row;
	gap: 0.7rem;
}

#confirmModal.confirm-modal-import .modal-actions > button {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	margin: 0;
	padding-left: 0.75rem;
	padding-right: 0.75rem;
}

#confirmModal.confirm-modal-import #confirmText {
	margin-bottom: 1.1rem;
}

@media (max-width: 520px) {
	#confirmModal.confirm-modal-import .modal-card {
		max-width: 92vw;
	}

	#confirmModal.confirm-modal-import .modal-actions {
		gap: 0.55rem;
	}

	#confirmModal.confirm-modal-import .modal-actions > button {
		font-size: 0.95rem;
		padding-left: 0.55rem;
		padding-right: 0.55rem;
	}
}




/* ---------- KABELINFO-DIALOG ---------- */



.kabel-modal {
	background: var(--bg-modal);
	border: none;
	border-radius: var(--radius-lg);
	padding: 1rem 1.2rem;
	color: var(--text-main);
	max-width: 260px;
	box-shadow: var(--shadow-modal-soft);
	opacity: 0;
	transform: translateY(10px) scale(0.985);
	transition:
		opacity 0.2s ease,
		transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

.kabel-modal.is-open {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.kabel-modal.is-closing {
	opacity: 0;
	transform: translateY(10px) scale(0.985);
}

.kabel-modal::backdrop {
	background: rgba(0, 0, 0, 0);
	transition: background 0.2s ease;
}

.kabel-modal.is-open::backdrop {
	background: rgba(0, 0, 0, 0.7);
}

.kabel-modal.is-closing::backdrop {
	background: rgba(0, 0, 0, 0);
}

.kabel-modal input,
.kabel-modal select {
	width: 100%;
	padding: 0.4rem;
	margin-bottom: 0.8rem;
	background: var(--bg-input);
	border: 1px solid var(--border-soft);
	color: var(--text-main);
	border-radius: 6px;
}

.kabel-modal.kabel-meta-modal {
	max-width: 640px;
	width: min(94vw, 640px);
	box-sizing: border-box;
}

.kabel-meta-form {
	display: flex;
	flex-direction: column;
}

.kabel-meta-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.kabel-meta-col {
	min-width: 0;
}

.kabel-meta-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-main);
	margin-bottom: 0.9rem;
	text-align: center;
}

.kabel-meta-input {
	width: 100%;
	height: 54px;
	padding: 0.6rem 0.8rem;
	margin-bottom: 0.85rem;
	border: none;
	border-radius: var(--radius-md);
	background: var(--bg-input);
	color: var(--text-main);
	font-size: 1rem;
	box-sizing: border-box;
}

.kabel-meta-input:last-child {
	margin-bottom: 0;
}

.kabel-form {
	display: flex;
	flex-direction: column;
}

.kabel-label {
	color: var(--text-label);
	font-size: 0.9rem;
}

.kabel-modal-actions {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1rem;
}

/* =========================================================
   KABELOVERSIKT
========================================================= */

.cable-overview-card {
	max-width: 520px;
}

.cable-overview-list {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	margin-top: 0.4rem;
}

.cable-overview-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.9rem;
	padding: 0.9rem 1rem;
	border-radius: 14px;
	background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
	outline: 1px solid var(--outline-soft);
}

.cable-overview-main {
	min-width: 0;
	flex: 1;
}

.cable-overview-id {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-main);
	line-height: 1.2;
	word-break: break-word;
}

.cable-overview-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.35rem;
	font-size: 0.84rem;
	color: var(--text-dim);
}

.cable-overview-meta span {
	padding: 0.18rem 0.5rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	outline: 1px solid rgba(255, 255, 255, 0.06);
}

.cable-overview-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.5rem;
	font-size: 0.84rem;
	color: var(--text-soft);
}

.cable-overview-stats span {
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	outline: 1px solid rgba(255, 255, 255, 0.06);
}

.cable-overview-warning {
	color: #f3d27a;
}

.cable-overview-action-btn {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: var(--bg-button);
	color: var(--text-main);
	border: 1px solid var(--border-soft);
	outline: 1px solid var(--outline-soft);
	outline-offset: -1px;
	box-shadow: none;
}

.cable-overview-action-btn:hover,
.cable-overview-action-btn:focus-visible {
	background: var(--bg-button-hover);
	border-color: var(--border-strong);
	box-shadow: none;
}

.cable-overview-action-btn svg {
	width: 20px;
	height: 20px;
	display: block;
}

body.light-mode .cable-overview-meta span,
body.light-mode .cable-overview-stats span {
	background: rgba(0, 0, 0, 0.04);
	outline: 1px solid rgba(0, 0, 0, 0.05);
}

/* =========================================================
   KABELDETALJ
========================================================= */

.cable-detail-card {
	max-width: 1120px;
	padding: 1rem 0.5rem 0.5rem 0.5rem;
}

.cable-detail-head-row {
	align-items: flex-start;
}

.cable-detail-head-actions {
	display: inline-flex;
	align-items: flex-start;
	margin-left: auto;
	flex: 0 0 auto;
}

.cable-detail-title-wrap {
	display: inline-flex;
	align-items: center;
	max-width: min(100%, calc(100% - 56px));
	padding: 0.38rem 0.7rem;
	border-radius: 12px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.02) 100%);
	outline: 1px solid rgba(255, 255, 255, 0.05);
}

.cable-detail-info-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0 0.35rem;
	margin-bottom: 0.9rem;
}

.cable-detail-info-main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.45rem;
	min-width: 0;
	flex: 1 1 auto;
}

.cable-detail-meta,
.cable-detail-stats {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	padding: 0;
	margin: 0;
}

.cable-detail-info-row .cable-detail-view-toggle {
	flex: 0 0 auto;
	align-self: flex-start;
}

.cable-detail-view-toggle {
	width: 52px;
	height: 52px;
	padding: 0;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.04);
	color: var(--text-soft);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.cable-detail-view-toggle svg {
	width: 22px;
	height: 22px;
	display: block;
	fill: currentColor;
}

.cable-detail-view-toggle:hover,
.cable-detail-view-toggle:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.14);
	color: var(--text-main);
	transform: translateY(-1px);
}

body.light-mode .cable-detail-view-toggle {
	background: rgba(0, 0, 0, 0.035);
	border-color: rgba(0, 0, 0, 0.08);
	color: var(--text-soft);
}

body.light-mode .cable-detail-view-toggle:hover,
body.light-mode .cable-detail-view-toggle:focus-visible {
	background: rgba(0, 0, 0, 0.06);
	border-color: rgba(0, 0, 0, 0.12);
	color: var(--text-main);
}

.cable-detail-title {
	margin: 0;
	line-height: 1.1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.light-mode .cable-detail-title-wrap {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.035) 0%, rgba(0, 0, 0, 0.02) 100%);
	outline: 1px solid rgba(0, 0, 0, 0.06);
}

.cable-detail-card .modal-head-row {
	margin-bottom: 0.55rem;
}

.cable-detail-badge,
.cable-detail-stat {
	padding: 0.18rem 0.5rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	outline: 1px solid rgba(255, 255, 255, 0.06);
	font-size: 0.8rem;
	line-height: 1.1;
	color: var(--text-soft);
}

.cable-detail-badge-warning {
	color: #f3d27a;
}

.cable-detail-table-wrap {
	margin-top: 0.2rem;
	max-height: min(72vh, 820px);
	overflow-x: auto;
	overflow-y: auto;
	border-radius: 12px;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
}

.cable-detail-table-wrap::-webkit-scrollbar {
	display: none;
}

.cable-detail-table-wrap.is-compact {
	overflow-x: hidden;
}

.cable-nav-btn {
	appearance: none;
	-webkit-appearance: none;
	display: block;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0.18rem 0.28rem;
	border: 0;
	outline: none;
	box-shadow: none;
	background: transparent;
	border-radius: 8px;
	color: var(--text-main);
	cursor: pointer;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cable-nav-btn:hover,
.cable-nav-btn:focus-visible {
	background: rgba(255, 255, 255, 0.07);
	color: var(--text-main);
	box-shadow: none;
}

body.light-mode .cable-nav-btn:hover,
body.light-mode .cable-nav-btn:focus-visible {
	background: rgba(0, 0, 0, 0.06);
}

.cable-nav-text {
	display: block;
	width: 100%;
	min-width: 0;
	padding: 0.18rem 0.28rem;
	box-sizing: border-box;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--text-dim);
}

.cable-compact-link {
	text-align: left;
}

.cable-compact-list {
	display: flex;
	flex-direction: column;
	gap: 0.42rem;
	padding: 0 0.35rem 0.25rem 0.35rem;
}

.cable-compact-row {
	display: grid;
	grid-template-columns: minmax(78px, 0.95fr) minmax(72px, 0.72fr) minmax(0, 1.9fr);
	align-items: center;
	gap: 0.65rem;
	padding: 0.54rem 0.72rem;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.025);
	outline: 1px solid rgba(255, 255, 255, 0.05);
}

.cable-compact-row.is-free {
	opacity: 0.78;
}

.cable-compact-col {
	min-width: 0;
}

.cable-compact-source,
.cable-compact-target,
.cable-compact-cable {
	font-family: var(--font-mono);
	font-size: 0.88rem;
	line-height: 1.2;
}

.cable-compact-source {
	color: var(--text-main);
	font-weight: 600;
}

.cable-compact-target {
	color: var(--text-soft);
	white-space: nowrap;
}

.cable-compact-target.is-free {
	color: var(--text-dim);
}

.cable-compact-cable {
	color: var(--text-main);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cable-compact-cable.is-free {
	color: var(--text-dim);
	font-family: inherit;
}

.splice-overview-list {
	display: flex;
	flex-direction: column;
	gap: 0.42rem;
	padding: 0 0.35rem 0.25rem 0.35rem;
}

.splice-overview-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(132px, 1.05fr) minmax(0, 1fr);
	align-items: center;
	gap: 0.55rem;
	padding: 0.54rem 0.72rem;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.025);
	outline: 1px solid rgba(255, 255, 255, 0.05);
}

.splice-overview-link {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	outline: none;
	box-shadow: none;
	background: transparent;
	border-radius: 10px;
	padding: 0.38rem 0.55rem;
	margin: -0.38rem -0.55rem;
	min-width: 0;
	width: auto;
	display: block;
	font-family: var(--font-mono);
	font-size: 0.88rem;
	line-height: 1.2;
	color: var(--text-main);
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition:
		background 0.16s ease,
		color 0.16s ease,
		opacity 0.16s ease;
}

.splice-overview-link-left {
	text-align: left;
}

.splice-overview-link-right {
	text-align: right;
}

.splice-overview-link:hover,
.splice-overview-link:focus-visible {
	background: rgba(255, 255, 255, 0.07);
	color: var(--text-main);
	opacity: 1;
}

body.light-mode .splice-overview-link:hover,
body.light-mode .splice-overview-link:focus-visible {
	background: rgba(0, 0, 0, 0.06);
}

.splice-overview-range {
	font-family: var(--font-mono);
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--text-main);
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.light-mode .splice-overview-row {
	background: rgba(0, 0, 0, 0.02);
	outline: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-mode .cable-compact-row {
	background: rgba(0, 0, 0, 0.02);
	outline: 1px solid rgba(0, 0, 0, 0.06);
}





body.light-mode .cable-detail-badge,
body.light-mode .cable-detail-stat {
	background: rgba(0, 0, 0, 0.04);
	outline: 1px solid rgba(0, 0, 0, 0.05);
}





/* =========================================================
   MAPPER
========================================================= */




#folderModal {
	align-items: flex-end;
	padding: 0;
	background: rgba(0, 0, 0, 0.72);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s ease;
}

#folderModal.is-open {
	opacity: 1;
	pointer-events: auto;
}

.folder-sheet {
	width: 100%;
	max-width: 760px;
	max-height: min(78vh, 720px);
	background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-card) 100%);
	border-radius: 22px 22px 0 0;
	box-sizing: border-box;
	padding: 0.8rem 0.9rem calc(1rem + env(safe-area-inset-bottom, 0px));
	box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.22);
	outline: 1px solid var(--outline-soft);
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	transform: translateY(36px);
	opacity: 0;
	transition:
		transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.2s ease;
	will-change: transform, opacity;
}

#folderModal.is-open .folder-sheet {
	transform: translateY(0);
	opacity: 1;
}

.folder-sheet-handle {
	width: 42px;
	height: 5px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	margin: 0.15rem auto 0.05rem auto;
}

.folder-sheet-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 0 0.2rem;
}

.folder-sheet-header-text {
	min-width: 0;
	flex: 1;
}

.folder-sheet-title {
	text-align: left;
	margin: 0;
	font-size: 1.6rem;
}

.folder-sheet-subtitle {
	color: #a8a8a8;
	font-size: 0.92rem;
	margin-top: 0.35rem;
}

.folder-sheet-close {
	background: transparent;
	border: none;
	color: #ddd;
	font-size: 2rem;
	line-height: 1;
	padding: 0;
	margin: 0;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: 12px;
	flex: 0 0 auto;
}

.folder-sheet-close:hover {
	background: rgba(255, 255, 255, 0.08);
}

.folder-sheet-list {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	overflow-y: auto;
	padding-right: 0.1rem;
}

.folder-sheet-list::-webkit-scrollbar {
	width: 6px;
}

.folder-sheet-list::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.14);
	border-radius: 999px;
}

.folder-sheet-item {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	background: linear-gradient(180deg, var(--bg-card-2) 0%, var(--bg-card) 100%);
	border: none;
	border-radius: 16px;
	padding: 0.9rem 0.95rem;
	margin: 0;
	outline: 1px solid var(--outline-soft);
	box-sizing: border-box;
	text-align: left;
	color: var(--text-main);
}

.folder-sheet-item:hover {
	background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
}

.folder-sheet-item-main {
	min-width: 0;
	flex: 1;
}

.folder-sheet-item-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--text-main);
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.folder-sheet-item-meta {
	margin-top: 0.3rem;
	font-size: 0.86rem;
	color: var(--text-soft);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.folder-sheet-item-updated {
	margin-top: 0.18rem;
	font-size: 0.78rem;
	color: var(--text-dim);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.folder-sheet-item-side {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	flex: 0 0 auto;
}

.folder-sheet-icon-btn {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.92);
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex: 0 0 auto;
	outline: 1px solid rgba(255, 255, 255, 0.12);
	outline-offset: -1px;
	box-shadow: none;
}

.folder-sheet-icon-btn:hover,
.folder-sheet-icon-btn:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	outline-color: rgba(255, 255, 255, 0.2);
	box-shadow: none;
}

.folder-sheet-icon-btn svg {
	width: 18px;
	height: 18px;
	display: block;
}

.folder-sheet-active-badge {
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--accent-primary-text);
	background: var(--accent-primary-bg);
	border: 1px solid var(--accent-primary-border);
	padding: 0.22rem 0.5rem;
	border-radius: 999px;
	white-space: nowrap;
	box-shadow: none;
}

.folder-sheet-menu-btn {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.92);
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 0.8;
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex: 0 0 auto;
	letter-spacing: 0;
	outline: 1px solid rgba(255, 255, 255, 0.12);
	outline-offset: -1px;
	box-shadow: none;
}

.folder-sheet-menu-btn:hover,
.folder-sheet-menu-btn:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	outline-color: rgba(255, 255, 255, 0.2);
}

.folder-sheet-menu-btn:hover {
	background: rgba(127, 127, 127, 0.10);
	color: var(--text-main);
}

.folder-sheet-item.is-active-folder {
	outline: 1px solid var(--accent-soft-outline);
}

.folder-sheet-item.is-active-folder .folder-sheet-item-title,
.folder-sheet-item.is-active-folder .folder-sheet-item-meta {
	color: var(--text-main);
}

.folder-sheet-item.is-active-folder {
	box-shadow: var(--accent-selected-shadow);
}

.folder-sheet-empty {
	background: linear-gradient(180deg, #2e2e2e 0%, #262626 100%);
	border-radius: 16px;
	padding: 1.25rem 1rem;
	text-align: center;
	color: #b9b9b9;
	outline: 1px solid rgba(255, 255, 255, 0.08);
}

.folder-sheet-footer {
	padding-top: 0.15rem;
}

.folder-sheet-footer-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7rem;
}

.folder-sheet-footer-btn,
.folder-sheet-new-btn {
	width: 100%;
	min-height: 52px;
	margin: 0;
	font-weight: 700;
}

.folder-menu-card {
	max-width: 320px;
}

.folder-action-list {
	margin-top: 0;
}

.folder-action-btn {
	width: 100%;
	margin: 0;
}

.folder-menu-head {
	margin-bottom: 1rem;
	align-items: center;
}

.folder-menu-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--text-main);
	text-align: left;
	margin: 0;
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}





/* =========================================================
   FARGEKODER
========================================================= */





.color-choice-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	width: calc(100% - 1rem);
	margin: 0 auto;
	box-sizing: border-box;
}

#colorModalActions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	width: calc(100% - 1rem);
	margin: 1rem auto 0;
	align-items: stretch;
	box-sizing: border-box;
}

#colorModalActions > button {
	width: 100%;
	min-width: 0;
	margin: 0;
	box-sizing: border-box;
}

#colorModalActions > button:only-child {
	grid-column: 1 / -1;
}

.color-choice-col {
	min-width: 0;
}

.color-choice-label {
	margin-bottom: 0;
	color: var(--text-dim);
	font-size: 0.85rem;
}

.color-mode-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.color-mode-control {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.color-mode-value {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text-main);
	letter-spacing: 0.2px;
}

.mode-switch {
	position: relative;
	display: inline-flex;
	width: 46px;
	height: 28px;
	flex: 0 0 auto;
}

.mode-switch input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
}

.mode-slider {
	position: relative;
	display: block;
	width: 46px;
	height: 28px;
	background: var(--bg-button);
	border: 1px solid var(--border-soft);
	border-radius: 999px;
	transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
	overflow: hidden;
}

.mode-slider::before {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	left: 4px;
	top: 4px;
	border-radius: 50%;
	background: var(--bg-surface);
	transition: transform 0.18s ease, background 0.18s ease;
}

.mode-switch input:checked+.mode-slider {
	background: var(--accent-primary-bg);
	border-color: var(--accent-primary-border);
	box-shadow: 0 0 0 1px rgba(190, 164, 255, 0.12) inset;
}

.mode-switch input:checked+.mode-slider::before {
	transform: translateX(18px);
	background: #d8c6ff;
}

.color-choice-btn {
	width: 100%;
	display: block;
	box-sizing: border-box;
	text-align: left;
	padding: 0.7rem 1rem;
	border-radius: 10px;
	background: var(--bg-card);
	color: var(--text-main);
	border: 1px solid transparent;
	margin: 0 0 0.55rem 0;
	cursor: pointer;
	outline: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.color-choice-btn.is-selected {
	border-color: var(--accent-primary-border);
	box-shadow: var(--accent-primary-shadow);
	background: var(--accent-primary-bg);
	color: var(--accent-primary-text);
}

.color-choice-btn:hover {
	background: var(--bg-card-2);
}

.color-choice-btn.is-selected:hover {
	background: var(--accent-primary-bg-hover);
	border-color: var(--accent-primary-border-hover);
	box-shadow: var(--accent-primary-shadow-hover);
	color: var(--accent-primary-text);
}

body.light-mode .color-choice-btn.is-selected,
body.light-mode .color-choice-btn.is-selected:hover,
body.light-mode .color-choice-btn.is-selected:focus-visible {
	box-shadow: none;
}

.color-modal-head {
	margin-bottom: 1.25rem;
	align-items: center;
}

.color-modal-title {
	margin: 0;
}

.color-modal-ok-btn {
	min-width: 110px;
}


/* ---------- FARGEKODEKORT / PREVIEW ---------- */


.color-code-row {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	font-family: Consolas, monospace;
	background-color: var(--bg-card);
	border-radius: 8px;
	padding: 12px 16px;
	cursor: pointer;
	transition: box-shadow 0.2s, background-color 0.2s, color 0.2s;
	margin: 0 auto 0.5rem auto;
	outline: 1px solid var(--border-strong);
	outline-offset: -1px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	color: var(--text-main);
}

.color-code-row:hover {
	box-shadow: 0 0 8px #444;
}

.color-code-name {
	font-size: 1.1em;
	font-weight: 600;
	color: var(--text-main);
	margin-bottom: 0.6rem;
	text-align: left;
}

.color-code-preview {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 6px;
	width: 100%;
	justify-items: center;
	align-items: center;
}

.color-preview-row {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	width: 100%;
	margin-top: 0.2rem;
}

.color-preview-row+.color-preview-row {
	margin-top: 0.55rem;
}

.color-preview-label {
	font-size: 0.82rem;
	color: var(--text-dim);
	text-align: center;
	line-height: 1;
}

.color-preview-dots {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 6px;
	width: 100%;
	justify-items: center;
	align-items: center;
}

.color-dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 1px solid #444;
	box-sizing: border-box;
}

.color-divider {
	width: 100%;
	border-bottom: 1px solid #A1A1A1;
	margin: -7px 0 8px 0;
}



/* ---------- FARGEEDITOR ---------- */



.color-edit-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0 auto 1.5rem auto;
	max-width: 320px;
}

.color-edit-title {
	margin: 0;
	font-size: 1.2rem;
}

.color-editor-card {
	max-width: 430px;
	padding: 1.4rem;
}

.color-editor-head {
	align-items: center;
	margin-bottom: 1.1rem;
}

.color-editor-title {
	margin: 0;
	text-align: left;
}

.color-editor-section {
	background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
	border-radius: 14px;
	padding: 1rem;
	outline: 1px solid var(--outline-soft);
	margin-bottom: 1rem;
}

.color-editor-label {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text-label);
	margin-bottom: 0.65rem;
	text-align: left;
}

.color-editor-input {
	margin: 0;
	background: var(--bg-input);
	border: 1px solid var(--border-soft);
	border-radius: 12px;
	padding: 0.85rem 1rem;
	font-size: 1rem;
	color: var(--text-main);
}

.color-editor-input:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.color-editor-grid-box {
	padding-top: 0.15rem;
}

.color-editor-card .fiber-grid {
	margin-top: 0;
	column-gap: 4px;
	row-gap: 10px;
}

.color-editor-card .fiber-labels {
	font-size: 0.88rem;
	color: #c2c2c2;
}

.color-editor-card .fiber-dots {
	width: 21px;
	height: 21px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.color-editor-actions {
	margin-top: 1.2rem;
}

.color-editor-actions>button {
	flex: 1;
}







/* ---------- FIBERGRID / COLOR PICKER ---------- */




.fiber-dots {
	grid-row: 2;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid #444;
	cursor: pointer;
	transition: transform 0.1s ease;
	box-sizing: border-box;
	transform: scale(1.15);
}

.fiber-dots:active {
	transform: scale(1.15);
}

.fiber-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 6px;
	justify-items: center;
	align-items: end;
	margin-top: 1rem;
}

.fiber-labels {
	font-size: 0.75rem;
	color: var(--text-dim);
	text-align: center;
}

.popup-color-picker {
	position: absolute;
	z-index: 10001;
	background: var(--bg-modal);
	padding: 0.6rem;
	border-radius: 8px;
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
	border: 1px solid var(--border-soft);
	display: none;
}

.popup-color-picker-grid {
	display: grid;
	grid-template-columns: repeat(2, auto);
	gap: 8px;
	justify-content: center;
	align-items: center;
	width: min-content;
	max-width: calc(100vw - 2rem);
}

.popup-color-option {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 1px solid #555;
	margin: 4px;
	cursor: pointer;
}





/* =========================================================
   HJELP
========================================================= */




.help-modal-card {
	max-width: 420px;
}

.help-modal-head {
	margin-bottom: 1rem;
}

.help-modal-body {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.help-slide-counter {
	font-size: 0.82rem;
	color: var(--text-dim);
	text-align: center;
}

.help-slide-dots {
	display: flex;
	justify-content: center;
	gap: 0.45rem;
	margin-top: 0.15rem;
}

.help-slide-dot {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	transition: transform 0.18s ease, background 0.18s ease;
}

.help-slide-dot.is-active {
	background: rgba(180, 150, 255, 0.95);
	transform: scale(1.15);
}

.help-modal-actions {
	margin-top: 1.2rem;
}

.help-modal-actions>button {
	flex: 1;
}

body.light-mode .help-slide-dot {
	background: rgba(0, 0, 0, 0.14);
}

body.light-mode .help-slide-dot.is-active {
	background: rgba(126, 92, 214, 0.92);
}

.help-slide-icon-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 0.15rem;
	margin-bottom: 0.15rem;
}

.help-slide-icon {
	width: 54px;
	height: 54px;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, rgba(54, 54, 58, 0.95) 0%, rgba(40, 40, 44, 0.95) 100%);
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
	color: #c9b2ff;
}

.help-slide-icon svg {
	width: 28px;
	height: 28px;
	display: block;
}

.help-slide-title {
	font-size: 1.22rem;
	font-weight: 700;
	text-align: center;
	color: var(--text-main);
	margin-top: 0.15rem;
}

.help-slide-text {
	font-size: 0.98rem;
	line-height: 1.65;
	color: var(--text-soft);
	text-align: center;
	min-height: 170px;
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: pre-line;
	padding: 0 0.5rem;
}

body.light-mode .help-slide-icon {
	background: linear-gradient(180deg, rgba(236, 236, 236, 0.98) 0%, rgba(226, 226, 226, 0.98) 100%);
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
	color: rgba(126, 92, 214, 0.95);
}




/* =========================================================
   RESPONSIV
========================================================= */




@media (max-width: 420px) {

	.modal-card,
	.color-modal-box {
		padding: 1rem;
		width: calc(100vw - 1rem);
	}

	.fiber-grid {
		column-gap: 2px;
		row-gap: 6px;
	}

	.fiber-labels {
		font-size: 0.68rem;
	}

	.fiber-dots {
		width: 16px;
		height: 16px;
	}

	.color-dot {
		width: 13px;
		height: 13px;
	}
}

@media (max-width: 520px) {
	.folder-sheet {
		max-height: min(82vh, 760px);
		padding-left: 0.8rem;
		padding-right: 0.8rem;
	}

	.folder-sheet-title {
		font-size: 1.45rem;
	}

	.folder-sheet-item {
		padding: 0.85rem 0.85rem;
	}

	.folder-sheet-item-title {
		font-size: 1rem;
	}

	.folder-sheet-item-meta {
		font-size: 0.82rem;
	}
}

@media (max-width: 420px) {
	.color-editor-card {
		padding: 1rem;
		width: calc(100vw - 1rem);
	}

	.color-editor-section {
		padding: 0.85rem;
	}

	.color-editor-card .fiber-labels {
		font-size: 0.8rem;
	}

	.color-editor-card .fiber-dots {
		width: 18px;
		height: 18px;
	}
}