body {
	font-family: 'Arial', sans-serif;
	margin: 0;
	padding: 0;
}
/* body * {
	outline: 1px solid red;
} */
.container {
	max-width: 1000px;
	margin: 40px auto;
	padding: 2rem;
	background: #111;
	border-radius: 12px;
	box-shadow: 0 8px 20px rgba(0,0,0,0.1);
	color: #fff;
}
h2 {
	text-align: center;
	margin-bottom: 1.5rem;
}
form {
	margin-bottom: 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
}
input, select, button {
	padding: 0.5rem;
	border-radius: 5px;
	border: none;
	font-size: 1rem;
}
button:not(.hamburger) {
	background-color: #007BFF;
	color: white;
	cursor: pointer;
	min-width: 120px;
}
button:not(.hamburger):hover {
	background-color: #0056b3;
}
button.close-button {
	background-color: #dc3545;
}

button.close-button:hover {
	background-color: #c82333;
}
button.reopen-button {
	background-color: #fd7e14;
}
button.reopen-button:hover {
	background-color: #e36a06;
}
.create-button {
	width: 100%;
	padding: 0.75rem;
	background: #007F00;
	border: none;
	border-radius: 8px;
	color: white;
	font-size: 1rem;
	cursor: pointer;
	margin-top: 1rem;
}
.create-button:hover {
	background: #006600;
}	
.table-container {
	overflow-x: auto;
	width: 100%;
}
table {
	width: 100%;
	border-collapse: collapse;
	background: #222;
	min-width: 600px;
}
th, td {
	padding: 0.75rem;
	border: 1px solid #444;
}
th {
	text-align: center;
	background: #333;
}
.actions form {
	display: flex;
	margin: 0;
	vertical-align: middle;  
	text-align: center;    
	height: 100%;
	white-space: nowrap; 
	align-items: center;
	justify-content: center;
	gap: 10px;
}
.actions form button {
	min-width: 80px;
}
.brand-select-wrapper {
	position: relative;
	display: inline-block;
}

.brand-select {
	padding-left: 2.2rem; /* leave space for logo */
	height: 2.2rem;
	background-repeat: no-repeat;
	background-position: 5px center;
	background-size: 20px auto;
}

.form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
	margin-bottom: 1rem;
}
.selection-img {
	width: 100%;         /* Make image fill the button */
	height: auto;        /* Keep aspect ratio */
	border-radius: 12px; /* Match button rounding */
	display: block;      /* Remove inline spacing */
}
.selection-info-container {
	display: flex;
	justify-content: center;
	gap: 2rem;
	padding: 2rem 2rem 1rem 2rem; /* top right bottom left */
	/* background-color: #999;	*/ /* #f9f9f9; */
	/* border-radius: 20px; */
	/* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); */
	/* margin-bottom: 0.5rem; */
}
.credit-info-container {
	display: flex;
	justify-content: center;
	gap: 2rem;
	padding: 2rem;
	background-color: #999;	/* #f9f9f9; */
	border-radius: 20px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	margin-bottom: 2rem;
}
@media (max-width:750px) {
  .selection-info-container {
    flex-direction: column;
    align-items: center;
  }
  .credit-info-container {
    flex-direction: column;
    align-items: center;
  }
}
.credit-box-green {
	width: 200px;
	padding: 20px;
	border-radius: 15px;
	text-align: center;
	background-color: #4CAF50;
	color: white;
	border: none;
	font: inherit;
}
.credit-box-green:hover {
	transform: scale(1.03);
	background-color: #388E3C;
}
.credit-box-blue {
	width: 200px;
	padding: 20px;
	border-radius: 15px;
	text-align: center;
	background-color: #2196F3;
	color: white;
	cursor: pointer;
	transition: transform 0.2s ease;
	border: none;
	font: inherit;
}
.credit-box-blue:hover {
	transform: scale(1.03);
}
.credit-value {
	font-size: 36px;
	font-weight: bold;
}
.credit-label {
	font-size: 18px;
	margin-top: 10px;
}
.credit-note {
	font-size: 12px;
	margin-top: 10px;
}
.credit-link {
	color: #fff;
	text-decoration: underline;
	font-weight: bold;
}
.credit-link:hover {
	text-decoration: none;
}
.cart-link {
	position: fixed;
	top: 100px;
	right: 20px;
	text-decoration: none;
	z-index: 999;
	transition: transform 0.2s ease;
}
.cart-link:hover {
	transform: scale(1.1);
}
.cart-icon {
	position: relative;
	width: 60px;
	height: 60px;
	cursor: pointer;
}
.cart-icon img {
	width: 100%;
	height: auto;
}
.cart-count {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: red; /* You can change this color */
	font-size: 22px;
	font-weight: bold;
	padding: 0; /* Remove extra padding */
	min-width: 0; /* Remove min width */
	background: none; /* Remove background */
	border-radius: 0; /* No rounding */
	text-align: center;
	pointer-events: none;
	
	/* White outline */
	text-shadow:
		-1px -1px 0 white,
		 1px -1px 0 white,
		-1px  1px 0 white,
		 1px  1px 0 white;
}
.bounce {
	animation: bounce 1s infinite alternate;
}
@keyframes bounce {
	0%   { transform: translateY(0); }
	100% { transform: translateY(-5px); }
}

.toast {
		position: fixed;
		bottom: 20px;
		right: 20px;
		padding: 15px 20px;
		color: white;
		border-radius: 5px;
		z-index: 9999;
		animation: fadeOut 4s forwards;
}

.toast.success { background-color: #28a745; }
.toast.error   { background-color: #dc3545; }
.toast.info    { background-color: #17a2b8; }
.toast.warning { background-color: #ffc107; color: #212529; }

@keyframes fadeOut {
		0%   { opacity: 1; }
		80%  { opacity: 1; }
		100% { opacity: 0; display: none; }
}

.pagination {
	display: flex;
	justify-content: center;
	text-align: center;
	margin: 2rem 0;
}

.pagination a {
	color: #666;
	background-color: #f0f0f0;
	border: 1px solid #ddd;
	margin: 0 4px;
	padding: 8px 14px;
	text-decoration: none;
	border-radius: 6px;
	transition: background-color 0.2s, color 0.2s;
	font-size: 14px;
}

.pagination a:hover:not(.active):not(.disabled) {
	background-color: #e0e0e0;
	color: #000;
}

.pagination a.active {
	background-color: #007bff;
	color: #fff;
	border-color: #007bff;
	font-weight: bold;
}

.pagination a.disabled {
	pointer-events: none;
	background-color: #e9e9e9;
	color: #aaa;
	border-color: #ddd;
}

.error-message {
	background: #ffe0e0;
	color: #b30000;
	padding: 0.75rem;
	border: 1px solid #ffb3b3;
	border-radius: 8px;
	margin-top: 1rem;
	margin-bottom: 1rem;
	text-align: center;
}

.warning-message {
		background: #fff8e1;  /* Light yellow background */
		color: #996600;       /* Dark golden text */
		padding: 0.75rem;
		border: 1px solid #ffdd99;  /* Soft orange-yellow border */
		border-radius: 8px;
		margin-top: 1rem;
		margin-bottom: 1rem;
		text-align: center;
}

.success-message {
		background: #e0ffe0;  /* Light green background */
		color: #006600;       /* Dark green text */
		padding: 0.75rem;
		border: 1px solid #b3ffb3;  /* Light green border */
		border-radius: 8px;
		margin-top: 1rem;
		margin-bottom: 1rem;
		text-align: center;
}

.success-message a {
	color: #0066cc; /* deep green */
	text-decoration: underline;
	font-weight: 600;
}

.success-message a:hover {
	color: #003300;
	text-decoration: none;
}

/* Horizontal database list */
.database {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
	padding: 0 2rem;
	max-width: 100%; /* 1200px; */
	margin: 0 auto;
	margin-bottom: 2rem; /* Space between sections */
}

.database-card {
	background: #111;
	border-radius: 0.5rem;
	padding: 2rem;
	text-align: center;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
	max-width: 300px;

	display: flex;
	flex-direction: column;   /* stack children vertically */
	justify-content: space-between; /* push bottom content down */
}

.database-card img {
	width: 100%;
	height: auto;
	border-radius: 0.5rem;
	margin-bottom: 1rem;
}

.database-card h3 {
	margin-bottom: 1rem;
}

.database-card p {
	var(--text-muted);
	font-size: 0.95rem;
}

.database-card a {
    display: block;
}

.database-card button {
	margin-top: auto;  /* pushes button to the bottom */
	margin-left: auto;  /* center horizontally */
	margin-right: auto; /* center horizontally */
	max-width: 100px;
	background: var(--accent);
	border: none;
	color: var(--foreground);
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	cursor: pointer;
	transition: background 0.3s;
}

.database-card button:hover {
	background: #006edc;
}

/* Different color themes */
.database-card.blue {
  background: #1e3a8a;
}

.database-card.green {
  background: #166534;
}

.database-card.orange {
  background: #c2410c;
}

.database-card.yellow {
  background: #fbbf24; /* #facc15 for lighter tone */
}

.database-card.red {
  background: #b91c1c;
}

/* Horizontal brands list */
.brands {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
	padding: 0 2rem;
	max-width: 100%;
	margin: 0 auto 4rem;
}

.brands-card {
	background: #111;
	border-radius: 0.5rem;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
	overflow: hidden; /* ensures button corners match card */
}

.brands-button {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	background: transparent;
	border: none;
	cursor: pointer;
	color: inherit;
	text-align: center;
	transition: background 0.3s, transform 0.2s;
}

.brands-button:hover {
	background: rgba(255, 255, 255, 0.05);
	transform: scale(1.02);
}

.brands-button img {
	max-width: 200px;
	max-height: 200px;
	object-fit: contain;
	margin-bottom: 1rem;
}

.brands-button h3 {
	font-size: 1.2rem;
	color: #fff;
	margin: 0;
}

.no-results {
  display: flex;
  justify-content: center;   /* horizontal center */
  align-items: center;       /* vertical center if you give it height */
  text-align: center;
  padding: 2rem;             /* add spacing */
  font-size: 1.5rem;         /* make it more evident */
  font-weight: bold;         /* stronger emphasis */
  color: #fff;               /* 555 subtle but visible */
}

.no-results p {
  margin: 0;                 /* remove default spacing */
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}
.hero h1 {
  font-size: 2rem;
  margin: .5rem 0;
}
.hero .subtitle {
  color: #aaa;
  font-size: 1rem;
}
.chips {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}
.chip {
  background: #222;
  padding: .4rem .8rem;
  border-radius: 999px;
  font-size: .85rem;
  border: 1px solid #333;
}
.details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}
@media (max-width:900px) {
  .details-grid {
    grid-template-columns: 1fr;
  }
}
.card {
  background: #161616;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,.6);
}
.card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #333;
  padding-bottom: .5rem;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: .35rem 0;
  border-bottom: 1px dotted #222;
}
.detail-row:last-child {
  border-bottom: none;
}
.detail-label {
  color: #aaa;
  font-size: .9rem;
}
.detail-value {
  color: #fff;
  font-weight: 500;
}
.back-link {
	display: block;
	box-sizing: border-box;
	text-align: center;
	text-decoration: none;
	margin-top: 2rem;
	width: 100%;
	padding: 0.75rem;
	background: #1e90ff;
	border: none;
	border-radius: 8px;
	color: white;
	font-size: 1rem;
	cursor: pointer;
}
.back-link:hover {
	background: #147bd1;
}
.hash {
  font-family: monospace;
  font-size: .85rem;
  word-break: break-all;
}
.buttons {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  padding: .8rem;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  transition: background .2s ease;
  font-weight: 600;
}

/* Deduct Credits Button – Green */
.deduct-credits {
  background: #28a745;
}
.deduct-credits:hover {
  background: #1e7e34;
}

/* Buy Subscription / Credits Button – Green */
.buy-subs-credits {
  background: #28a745; 
}
.buy-subs-credits:hover {
  background: #1e7e34;
}

/* Login to Download Button – Red */
.login-to-download {
  background: #dc3545; 
}
.login-to-download:hover {
  background: #b02a37;
}

/* Download Button – Green */
.download {
  background: #28a745;
}
.download:hover {
  background: #1e7e34;
}

/* Downloaded Button – Blue */
.downloaded {
  background: #007BFF;
}
.downloaded:hover {
  background: #0056b3;
}

.file-unavailable {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  padding: .8rem;
  background: #6c757d; /* gray */
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
}
a {
  color: white;          /* makes the text white */
  text-decoration: none; /* removes the underline */
}

/* ===========================================================================
 * AutoFix additions (appended to the database.css base)
 * ========================================================================= */

/* upload dropzone */
.afx-drop {
	display: block;
	border: 2px dashed #444;
	border-radius: 12px;
	padding: 2.5rem 1.5rem;
	text-align: center;
	background: #161616;
	transition: border-color .2s, background .2s;
	cursor: pointer;
}
.afx-drop.dragover { border-color: #007BFF; background: #10243f; }
.afx-drop.afx-error { border-color: #dc3545; }

/* full-width red "Cancel" button on the confirm step (matches .create-button) */
.afx-cancel-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem;
	margin-top: 1rem;
	background: #dc3545;
	color: #fff;
	text-align: center;
	border: none;
	border-radius: 8px;
	font-size: 1rem;
	text-decoration: none;
	cursor: pointer;
}
.afx-cancel-btn:hover { background: #c82333; }
.afx-drop p { margin: .4rem 0; color: #bbb; }
.afx-drop .afx-file { color: #fff; font-weight: 600; word-break: break-all; }
.afx-drop input[type=file] { display: none; }

/* a labelled field block used on the confirm step */
.afx-field { width: 100%; max-width: 460px; box-sizing: border-box; margin: 1rem auto; text-align: left; }
.afx-field label { display: block; font-weight: 600; margin-bottom: .4rem; }
.afx-field input[type=text], .afx-field select {
	width: 100%; box-sizing: border-box; background: #0d0f14; color: #fff; border: 1px solid #333;
}
/* MCU ID: monospace so the full 8/16/32 hex string fits and stays readable */
.afx-field input#hex { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .5px; }
.afx-field .afx-hint { color: #9aa2b1; font-size: .85rem; margin-top: .4rem; }

/* provenance signature badge */
.afx-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #26303f; color: #cdd7e6; }

/* per-tool usage-notes callout (confirm step) */
.afx-usage { width: 100%; box-sizing: border-box; margin: .25rem 0 1rem; padding: .85rem 1.1rem; text-align: left;
	background: #0e1b33; border: 1px solid #244a86; border-left: 3px solid #4f8cff; border-radius: 8px;
	color: #cdd7e6; font-size: .9rem; line-height: 1.5; }
.afx-usage-h { font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
	color: #8fb6ff; margin-bottom: .4rem; }
.afx-usage p { margin: .35rem 0; }
.afx-usage a { color: #7fb0ff; }
.afx-usage ul, .afx-usage ol { margin: .35rem 0 .35rem 1.15rem; }
.afx-usage img { max-width: 100%; height: auto; border-radius: 6px; }
.afx-usage code { background: #10243f; padding: 1px 5px; border-radius: 4px; }
.afx-badge.ok   { background: #153d28; color: #54e08a; }
.afx-badge.warn { background: #3d2a14; color: #ffb968; }

/* small monospace value, e.g. decoded MCU ID / sha1 */
.afx-mono { font-family: monospace; font-size: .9rem; word-break: break-all; }

/* "checksums not recomputed" reminder sits under the result card */
.afx-checksum-note { color: #996600; font-size: .85rem; margin-top: 1rem; text-align: center; }

/* center a single action column of .buttons on narrow result cards */
.afx-actions { max-width: 460px; margin: 1.5rem auto 0; }

/* compact download button for the my-files table */
.afx-dl {
	display: inline-block;
	padding: .4rem .9rem;
	background: #28a745;
	color: #fff;
	border-radius: 7px;
	font-size: .85rem;
	font-weight: 600;
	text-decoration: none;
}
.afx-dl:hover { background: #1e7e34; }

/* upload form: stack children full-width (override the global flex-row form
   rule, which otherwise collapses the progress bar to a thin vertical sliver) */
#afxUploadForm { display: block; }

/* upload progress bar */
.afx-progress {
	display: none;
	width: 100%;
	box-sizing: border-box;
	margin-top: 1rem;
	height: 24px;
	background: #0d0f14;
	border: 1px solid #333;
	border-radius: 8px;
	overflow: hidden;
	position: relative;
}
.afx-progress.show { display: block; }
.afx-progress-bar { height: 100%; width: 0; background: #007BFF; transition: width .15s ease; }
.afx-progress-text {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	font-size: .8rem; color: #fff; font-weight: 600;
}
.afx-progress.indeterminate .afx-progress-bar { width: 100%; animation: afxpulse 1s ease-in-out infinite; }
@keyframes afxpulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ===========================================================================
 * vagedc17immo additions
 * ===========================================================================*/

/* operation chooser */
.vi-ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.vi-op-card {
	display: block; text-decoration: none; color: #fff;
	background: #1b1b1b; border: 1px solid #333; border-radius: 10px; padding: 1.2rem;
	transition: border-color .15s, transform .15s;
}
.vi-op-card:hover { border-color: #4f8cff; transform: translateY(-2px); }
.vi-op-title { font-size: 1.15rem; font-weight: bold; margin-bottom: .4rem; }
.vi-op-desc  { font-size: .9rem; color: #bbb; line-height: 1.35; }

/* per-block info cards + confirm columns */
.vi-block { background: #1b1b1b; border: 1px solid #333; border-radius: 8px; padding: .8rem 1rem; margin-bottom: .8rem; }
.vi-block-h { font-weight: bold; color: #4f8cff; margin-bottom: .5rem; }
.vi-cols { display: flex; gap: 1rem; align-items: stretch; flex-wrap: wrap; }
.vi-col { flex: 1 1 260px; background: #1b1b1b; border: 1px solid #333; border-radius: 8px; padding: .8rem 1rem; }
.vi-arrow { align-self: center; font-size: 1.6rem; color: #4f8cff; }

/* file inputs */
.vi-file { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; width: 100%; }
.vi-file > span { font-size: .85rem; color: #ccc; }
.vi-file > input[type=file] { width: 100%; background: #222; border: 1px solid #444; }

.vi-advanced { margin: .5rem 0 1rem; }
.vi-advanced > summary { cursor: pointer; color: #4f8cff; }

.vi-cost-badge {
	display: inline-block; margin-left: .6rem; padding: .15rem .55rem;
	font-size: .8rem; border-radius: 999px; background: #223; border: 1px solid #4f8cff; color: #cfe0ff; vertical-align: middle;
}

@media (max-width: 640px) {
	.vi-cols { flex-direction: column; }
	.vi-arrow { transform: rotate(90deg); }
}

/* compact per-field drop zone (EEPROM / Processor etc.) */
.vi-drop { padding: 1.2rem 1rem; text-align: left; margin-bottom: .8rem; }
.vi-drop-label { color: #9aa; font-size: .72rem; margin: 0 0 .35rem; text-transform: uppercase; letter-spacing: .05em; }
.vi-drop .afx-file { color: #9fb4d8; font-weight: 500; font-size: .92rem; }
.vi-drop .afx-file.has-file { color: #fff; }

/* operation tabs (Info / Clone / Immo) */
.vi-optabs { display: flex; gap: .5rem; margin: 0 0 1.2rem; flex-wrap: wrap; justify-content: center; }
.vi-optab { padding: .45rem 1rem; border: 1px solid #333; border-radius: 8px; color: #bbb; text-decoration: none; background: #1b1b1b; transition: border-color .15s, color .15s; }
.vi-optab:hover { border-color: #4f8cff; color: #fff; }
.vi-optab.active { border-color: #4f8cff; color: #fff; background: #10243f; }

/* logged-out landing */
.vi-landing { background: #1b1b1b; border: 1px solid #333; border-radius: 10px; padding: 1.3rem 1.4rem; margin: 1rem 0; }
.vi-landing h3 { margin-top: 0; color: #4f8cff; }
.vi-landing ul { line-height: 1.6; }
.vi-login-cta { display: inline-block; margin-top: .5rem; padding: .7rem 1.4rem; background: #007BFF; color: #fff; border-radius: 8px; text-decoration: none; font-weight: 600; }
.vi-login-cta:hover { background: #0069d9; }
