/* generic styling */
body {
  background: white; /* hsl(215, 30%, 40%); */
  /*background:#ddd;*/

  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  text-align: center;
  line-height: 130%;

  color: #000;
  margin: 0 auto 0 auto;
  min-width: 500px;
  max-width: 95%;
}

#shadow_top {
  display: block;
  height: 30px;
  margin: 0;
  width: auto;
  background-image: url("top.png");
  background-position: bottom;
  background-repeat: no-repeat;
  background-size: contain;
}

#shadow_bottom {
  display: block;
  height: 30px;
  margin: 0;
  width: auto;
  background-image: url("bottom.png");
  background-position: top;
  background-repeat: no-repeat;
  background-size: contain;
}

#content {
  text-align: left;
  padding: 30px 2px 0px 0px;
}

#window {
  border-radius: 10px;
  background: #fff;
  width: auto;
  box-shadow: 0 20px 10px -10px rgba(0, 0, 0, 0.4),
    0 -20px 10px -10px rgba(0, 0, 0, 0.4);
}

#top {
  width: auto;
}

/* title bar and logo */
#toptitle {
  padding: 15px 20px 15px 20px;
  text-align: left;
  border-radius: 10px;
  background-color: hsl(215, 50%, 100%);

  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  gap: 10px 10px;
}

#toptitle .left {
  align-self: left;
}

#toptitle .left h1 {
  font-size: 180%;
  font-weight: 800;
  letter-spacing: 3px;
  color: hsl(215, 30%, 20%);
  text-shadow: 3px 3px 5px #999;
  margin: 0px;
}

#toptitle .left p {
  font-size: 120%;
  font-weight: 400;
  letter-spacing: 2.3px;
  color: hsl(215, 30%, 30%);
  text-shadow: 3px 3px 5px #bbb;
  font-style: italic;
  margin: 10px 0 0 0;
}

#toptitle .status {
  width: 480px;

  align-self: right;

  text-align: left;
  font-size: 12px;
  padding: 2px;
}

#toptitle .status tr,
#toptitle .status td {
  border: none;
  margin: 0;
  padding: 0 10px 0 5px;
}

/* menubar */
#topmenubar {
  display: flex;
  justify-content: space-between;
  border-radius: 10px;
  background-color: hsl(215, 30%, 85%);
  padding: 10px 10px;

  margin: 0 10px 30px 10px;
  box-shadow: 0px 0px 5px 0px hsl(215, 30%, 50%, 0.2);
}

/* render window where page is loaded into */
#render {
  border-radius: 10px;
  margin: 0 10px;
}

/* footer */
#footer {
  clear: both;
  color: #999;
  text-align: center;

  border-top: 2px dotted #ccc;
  margin: 15px 15px 0 15px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 85%;
}

img {
  border: none;
}

/* styling of text */
h1 {
  font-size: 160%;
  font-weight: 400;

  color: hsl(215, 30%, 10%);
  margin: 0 0 10px 0;
}

h2 {
  padding-top: 10px;
  padding-bottom: 5px;
  border-bottom: 2px dotted #ccc;
  font-size: 140%;
  font-weight: 400;
  color: hsl(215, 30%, 30%);
  margin: 25px 0 10px 0;
}

h2.first {
  margin-top: 0px;
}

h3 {
  padding-top: 10px;
  font-size: 120%;
  font-weight: 400;
  color: hsl(215, 30%, 30%);
  text-decoration-line: underline;
  text-decoration-style: line;
  text-decoration-color: #ccc;
  margin: 15px 0 15px 0;
}

h3.first {
  margin-top: 0px;
}

p {
  margin: 5px 0 10px;
  max-width: 800px;
}

li {
  margin-bottom: 15px;
}

/* div groups and options */
.group {
  display: block;
  /*border-bottom:2px dotted #ccc;*/
  /*padding-bottom:10px;*/
}

.group.last {
  border-bottom: none;
}

.group p {
  margin: 0.1em 0 1em 0;
}

.invisible {
  display: none;
}

.visible {
  display: block;
}

.greybox {
  background-color: hsl(30, 31%, 95%);
  border: 0;
  border-radius: 10px;
  padding: 10px 10px;
}

/* Make the blocks smaller */
.block.greybox {
  font-size: 0.9rem; /* Smaller font size */
  padding: 10px 15px; /* Reduce padding inside the block */
  width: auto;
  max-width: 200px; /* Limit the width of the blocks */
  display: inline-block; /* Make sure they stay aligned properly */
  margin: 10px; /* Add some space between blocks */
}

/* Table Styling */
.block.greybox table {
  width: 100%;
  border-collapse: collapse; /* Remove space between table borders */
  font-size: 0.8rem; /* Reduce the font size further for tables */
}

.block.greybox th,
.block.greybox td {
  padding: 6px; /* Reduce padding inside table cells */
  border: none; /* Remove table borders or make them lighter */
  text-align: left;
}

.block.greybox th {
  font-weight: bold;
  color: #333;
  background-color: #f4f4f4;
}

.block.greybox td {
  text-align: right;
}

/* Headings for blocks */
.block.greybox h2 {
  font-size: 1rem; /* Reduce the font size for headings */
  margin-bottom: 10px;
}

/* tables */
table {
  border-collapse: collapse;
}

td,
th {
  border-color: #ddd;
  border-style: solid;
  border-width: 2px;
  padding: 10px;
}

/* form inputs/labels */
label {
  clear: both;
  display: block;
  line-height: 1.4em;
  padding: 6px 0 2px 0;
  max-width: 800px;
}

label.choice {
  clear: both;
  display: block;
  line-height: 1.4em;
  margin: -30px 0 0 25px;
  padding: 0 0 15px 0;
}

label.checkbox {
  clear: both;
  display: block;
  line-height: 1.4em;
  margin: -30px 0 0 25px;
  padding: 0 0 8px 0;
}

input[type="text"] {
  width: 90%;
  margin: 2px 0 8px 0;
  padding: 0.25rem;
}

input[type="submit"] {
  margin: 10px 0 5px 0;
  height: 40px;
}

input[type="button"] {
  margin: 10px 0 5px 0;
  height: 40px;
}

input[type="checkbox"] {
  margin: 0 0 0 0;
  height: 30px;
  vertical-align: center;
}

input[type="radio"] {
  margin: 0 0 0 0;
  height: 35px;
  vertical-align: top;
}

.button {
  margin: 10px 0 5px 0;
  height: 40px;
}

.flexcontainer {
  display: flex;
  flex-flow: row wrap;
  gap: 20px;
}

.flexdiv-sm {
  flex-basis: 320px;
  flex-grow: 1;
}
.flexdiv-md {
  flex-basis: 480px;
  flex-grow: 2;
}
.flexdiv-lg {
  flex-basis: 100%;
  flex-grow: 3;
}

/* liveview layout */
#values {
  flex-basis: 480px;
}

/* Value blocks (Temperature/Analog/Digital): equal-width responsive cards that
   reflow cleanly on mobile instead of uneven inline-blocks. */
#valuelist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: start;
}
#valuelist .block.greybox {
  display: block;
  width: auto;
  max-width: none;
  margin: 0;
}
/* The "Timestamp of data" line is also a child of #valuelist; keep it on its
   own full-width row above the cards instead of taking a grid cell. */
#valuelist > p {
  grid-column: 1 / -1;
  margin: 0 0 4px;
}
/* Let long channel labels (e.g. "Inlet_fdgfd_gfdg (T1)") wrap inside the value
   card instead of overflowing past the box / widening the grid column. */
#valuelist .block.greybox td:first-child {
  overflow-wrap: anywhere;
  word-break: break-word;
}

#plot {
  flex-grow: 2;
  flex-basis: 800px;
}

#plotly {
  height: 75vh;
}

.check {
  -webkit-appearance: none; /*hides the default checkbox*/
  height: 20px;
  width: 20px;
  background-color: #fe0006;
  text-align: center;
  font-weight: 600;
  color: white;
  border-radius: 3px;
  outline: none;
}

.check:checked {
  background-color: #0e9700;
}

.check:before {
  content: "✖";
}
.check:checked:before {
  content: "✔";
}

.check:hover {
  cursor: pointer;
  opacity: 0.8;
}

/* generic styling */
body {
  background: #191932; /* Updated background color */
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  text-align: center;
  line-height: 130%;
  color: #191932; /* Updated text color */
  margin: 0 auto 0 auto;
  min-width: 500px;
  max-width: 95%;
}

/* ... (rest of your CSS remains unchanged) ... */

#toptitle {
  /* ... other styles ... */
  background-color: white; /* Updated to orange for accent */
}

#toptitle .left h1 {
  /* ... other styles ... */
  color: #ffffff; /* Updated to white for contrast */
  text-shadow: 3px 3px 5px #000; /* Updated shadow for better visibility */
}

#toptitle .left p {
  /* ... other styles ... */
  color: #ffffff; /* Updated to white */
  text-shadow: 3px 3px 5px #000; /* Updated shadow for better visibility */
}

#topmenubar button {
  background-color: #ff5b23;
  border: 2px solid #ff5b23;
  color: white;

  border-radius: 10px;
  font-size: 105%;
  text-align: center;
  text-decoration: none;

  display: inline-block;
  margin: 0 5px 0 0;
  height: 40px;
}

#topmenubar button.selected {
  background-color: #ff5b23;
  color: #ffffff;
  font-weight: 700;
}

#topmenubar button:hover {
  background-color: #f8a285;
  color: white;
}

#topmenubar {
  /* ... other styles ... */
  background-color: white; /* Updated to the main dark blue background */
}

#topmenubar button {
  background-color: #f78661; /* Updated to orange */
  border: 2px solid #f78661; /* Same orange border */
  color: #ffffff; /* White text */
}

#topmenubar button.selected {
  background-color: #ff5b23; /* Strong orange = active tab */
  color: #ffffff;
  font-weight: 700;
}

#topmenubar button:hover {
  background-color: #fcb69a; /* Lightened orange for hover effect */
  color: #ffffff;
}

#topmenubar button #start_logging_button {
  order: 2;
  background-color: #52dd43;
}

#topmenubar button:hover #start_logging_button {
  background-color: #9cdf95;
}

/* Hide the text for smaller screens */
@media (max-width: 768px) {
  #start_logging_button .button-text {
    display: none;
  }
}

/* ... (rest of your CSS remains unchanged) ... */

/* styling of text */
h1,
h2,
h3 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

h1 {
  /* ... other styles ... */
  color: #f78661; /* Updated to orange */
}

h2 {
  /* ... other styles ... */
  color: #f78661; /* Updated to orange */
}

h3 {
  /* ... other styles ... */
  color: #f78661; /* Updated to orange */
}

/* ... (rest of your CSS remains unchanged) ... */

/* ... (rest of your CSS remains unchanged) ... */

#footer {
  /* ... other styles ... */
  color: #ffffff; /* Updated to white */
}

.split-size-container {
  display: flex;
  align-items: center;
  gap: 10px; /* Adds space between the input and select */
}

.split-size-container select {
  margin-right: 10px; /* Adds some space between the input and select */
  width: auto; /* Remove if you want the browser to automatically handle the width */
}

/* Adjust individual widths if necessary */
#file_split_size {
  width: 100px; /* Or whatever width suits your design */
}

#file_size_split_size_unit {
  width: 100px; /* Or whatever width suits your design */
}

table.compact-table {
  width: 100%;
  max-width: 800px;
  border-collapse: collapse; /* Remove space between borders */
  font-size: 0.9em; /* Smaller font for compactness */
  margin: 10px 0; /* Add some space around the table */
}

table.compact-table th,
table.compact-table td {
  border: 1px solid #ddd; /* Light grey border */
  padding: 8px; /* Reduce padding */
  text-align: left; /* Align text to the left */
}

table.compact-table th {
  background-color: #f2f2f2; /* Light grey background for header */
  font-weight: bold; /* Make header text bold */
}

table.compact-table tr:nth-child(even) {
  background-color: #f9f9f9; /* Zebra striping for rows */
}

/* table.compact-table tr:hover {
  background-color: #f1f1f1; /* Highlight on row hover 
} */

/* Body and Container */
body {
  background-color: #f4f7f6;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  padding: 20px;
}

/* Headers */
h1,
h2,
h3 {
  font-family: "Montserrat", sans-serif;
  color: #e6632e; /* Darker shade of the orange */
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  border-bottom: 2px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

/* Cards */
.card {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

table th,
table td {
  /* padding: 12px 15px; */
  border: 1px solid #ddd;
  text-align: left;
}

table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

table tr:nth-child(even) {
  background-color: #fafafa;
}

/* General Button Styling */
.button {
  background-color: #f78661;
  color: white;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.2s ease;
  margin: 10px 10px 10px 0;
  display: inline-block;
}

/* Hover and Focus Effects */
.button:hover,
.button:focus {
  background-color: #e25e3b;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Secondary Button */
.button-secondary {
  background-color: #6c757d;
  color: white;
}

.button-secondary:hover,
.button-secondary:focus {
  background-color: #5a6268;
}

/* Disabled Button */
.button:disabled {
  background-color: #ddd;
  cursor: not-allowed;
  color: #999;
}

/* Button Alignment for Import/Export */
.button-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.button-group .button {
  flex-grow: 1;
}

/* Inputs */
input[type="text"],
input[type="number"],
input[type="password"],
select {
  padding: 8px;
  width: 100%;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 20px;
}

input:focus,
select:focus {
  outline: none;
  border-color: #f78661;
}

/* Footer */
#footer {
  clear: both;
  text-align: center;
  padding: 20px;
  color: #999;
  border-top: 1px solid #eee;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  /* Scale the whole heading hierarchy down together on mobile; without h2/h3
     here, h2 stayed 2rem and matched the shrunken h1 (no visual hierarchy). */
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.2rem;
  }

  .button {
    width: 100%;
    margin-bottom: 20px;
  }

  .block.greybox {
    max-width: 100%;
    margin: 10px auto;
  }
}

td input[type="text"] {
  width: auto;
}

/* Align the checkbox better */
td input[type="checkbox"] {
  margin-left: 10px; /* Aligns the checkbox nicely in the column */
}

input[type="number"] {
  width: auto; /* Let the width be dynamic */
  padding: 10px; /* Padding inside the input */
  font-size: 1rem; /* Font size for consistency with other fields */
  border: 1px solid #ccc; /* Match other inputs' border styles */
  border-radius: 5px; /* Rounded corners for consistency */
  box-sizing: border-box; /* Ensure padding is included in width calculations */
}

input[type="number"]:focus {
  border-color: #f78661; /* Highlight border on focus to match the orange theme */
  outline: none; /* Remove the default blue outline */
}

a {
  color: #1742b9;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Flexbox container for a more compact layout */
.form-grid-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-start;
  max-width: 800px;
}

.form-group {
  flex: 1;
  min-width: 220px;
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .form-group {
    flex: 0 0 100%;
    min-width: unset;
  }
  .form-grid-container {
    gap: 10px;
  }
}

/* .form-group {
  display: flex;
  flex-direction: column;
  flex-basis: 48%;
  margin-bottom: 20px;
} */

label {
  font-size: 0.9rem;
  display: block;
  margin-bottom: 5px;
}

select,
input[type="number"] {
  width: 100%;
  padding: 8px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button.button {
  background-color: #ff784e;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

button.button:hover {
  background-color: #ff9a71;
}

.note {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #666;
}

/* Style the details element and its summary */
details {
  background-color: #f9f9f9; /* Light grey background */
  border: 1px solid #ddd; /* Subtle border */
  border-radius: 5px; /* Rounded corners */
  padding: 10px;
  margin-bottom: 15px; /* Space below the explanation box */
  max-width: 800px;
}

details[open] {
  background-color: #fefefe; /* Slightly brighter when expanded */
}

details summary {
  cursor: pointer; /* Make the summary clickable */
  font-weight: bold;
  padding: 5px 0;
}

details p {
  font-size: 0.95rem; /* Slightly smaller text */
  line-height: 1.4; /* Improved line spacing */
  margin-top: 10px; /* Some space between the summary and text */
  color: #555; /* Darker text color for contrast */
}

details ul {
  margin-left: 20px; /* Indentation for list */
}

details summary:hover {
  color: #ff784e; /* Hover effect on the summary */
}

/* Card-like styling for the explanation section */
.explanation-box {
  background-color: #f5f5f5; /* Soft background for distinction */
  border: 1px solid #ddd; /* Thin border around */
  padding: 15px;
  border-radius: 8px; /* Rounded corners */
  margin-top: 10px;
}

#homepage .container {
  max-width: 800px;
  padding: 20px;
}

#homepage .box {
  background-color: #f9f9f9;
  padding: 15px;
  margin: 15px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#homepage details summary {
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
}

#homepage details p {
  padding: 10px 0;
  margin: 0;
}

#homepage .compact-table {
  width: 100%;
  border-collapse: collapse;
}

#homepage .compact-table th,
#homepage .compact-table td {
  padding: 8px 12px;
  border: 1px solid #ddd;
}

#homepage .greybox {
  background-color: #f0f0f0;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 5px;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
}

#right_buttons {
  display: flex;
  align-items: center;
}

/* For mobile menu */
#hamburger_menu {
  display: none;
  position: relative;
}

/* menubar */

#menu_toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

#menu_items {
  display: flex;
}

#menu_items button {
  margin-right: 10px;
  padding: 10px 20px;
  border: none;
  background-color: #ffa07a;
  color: #fff;
  cursor: pointer;
}

#menu_items button:hover {
  background-color: #ff7f50;
}

#menu_items button.selected {
  background-color: #ff5b23; /* Strong orange = active tab */
  color: #ffffff;
  font-weight: 700;
}

#menu_items.hidden {
  display: none;
}

#menu_items button {
  margin: 5px 0;
  padding: 10px;
}

/* Left menu container */
#left_buttons {
  display: flex;
  align-items: center;
}

.button-icon {
  margin-right: 5px;
}
/* Mobile specific styles */
@media (max-width: 768px) {
  /* Hamburger menu toggle button */
  #menu_toggle {
    display: block;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 5px;
    color: #ff5b23; /* Orange color for hamburger icon */
    position: relative;
    z-index: 1000; /* Ensure it's above the menu */
  }

  /* Hide the menu items by default on mobile */
  #menu_items {
    position: fixed;
    left: -300px; /* Initially off-screen */
    top: 0;
    width: 250px; /* Width of the sliding menu */
    height: 100%;
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease; /* Smooth sliding effect */
    z-index: 1001; /* Ensure it's below the toggle button */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  #close_menu {
    align-self: flex-end; /* Position the close button at the top-right */
    background: none;
    border: none;
    font-size: 24px;
    color: #ff5b23; /* Orange color */
    cursor: pointer;
    margin-bottom: 20px; /* Space below the close button */
  }

  /* Show the menu when active */
  #menu_items.show {
    left: 0; /* Slide the menu into view */
  }

  /* Mobile button styles - stack vertically */
  #menu_items button {
    margin-bottom: 10px;
    text-align: left;
    font-size: 100%;
  }

  /* Hide the regular menu buttons on mobile */
  #left_buttons {
    display: none;
  }

  /* Align the Start Logging button to the right */
  #start_logging_button {
    right: 10px;
    top: 10px;
    height: 40px;
  }

  /* Hide the text for smaller screens */
  #start_logging_button .button-text {
    display: none;
  }
}

/* Desktop styles */
@media (min-width: 769px) {
  #left_buttons {
    display: flex;
  }

  /* Hide the hamburger toggle button on desktop */
  #menu_toggle {
    display: none !important;
  }

  /* Ensure the menu items are displayed on desktop */
  #menu_items {
    display: none;
  }
}

/* ── Narrow form group (e.g. small selects like Wi-Fi channel) ─────────── */
.form-group-narrow {
  flex: 0 0 160px;
  min-width: unset;
}

/* ── Inline field row: label + compact select/input on one line ─────────── */
.field-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}
.field-inline label {
  margin-bottom: 0;
  white-space: nowrap;
  font-weight: 600;
}
.select-inline {
  width: auto !important;
  min-width: 80px;
  flex-shrink: 0;
  margin-bottom: 0 !important;
}

/* ── Inline SVG icon inside buttons ────────────────────────────────────── */
.btn-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  vertical-align: -2px;
  margin-right: 6px;
  flex-shrink: 0;
}

/* ── Config page tabs ─────────────────────────────────────────────────── */
.config-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 16px 20px 0;
  border-bottom: 2px solid #e0e0e0;
  background: #fafafa;
}

.tab-btn {
  background: none;
  border: 1px solid transparent;
  border-bottom: 3px solid transparent;
  padding: 9px 22px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  border-radius: 4px 4px 0 0;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.tab-btn:hover  { color: #f78661; background: #fff3ee; }
.tab-btn.active { color: #f78661; border-bottom-color: #f78661; background: #fff; }

.tab-pane        { display: none; padding: 20px 20px 30px; }
.tab-pane.active { display: block; }

@media (max-width: 768px) {
  .config-tab-nav { padding: 10px 8px 0; gap: 1px; }
  .tab-btn        { padding: 8px 12px; font-size: 13px; }
}

/* ── Firmware update page ─────────────────────────────────────────── */
.fw-file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 700px;
  margin: 16px 0;
}

.fw-file-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}
.fw-file-row.fw-row-ok  { border-color: #4caf50; background: #f1fbf2; }
.fw-file-row.fw-row-bad { border-color: #e53935; background: #fff5f5; }

.fw-file-info   { flex: 1 1 180px; min-width: 140px; }
.fw-file-name   { font-family: monospace; font-size: .92rem; font-weight: 700; display: block; }
.fw-file-desc   { font-size: .8rem; color: #666; }

.fw-hidden-input { display: none; }
.fw-pick-btn    { cursor: pointer; padding: 8px 14px !important; white-space: nowrap; margin: 0 !important; }
.fw-chosen-name { flex: 1 1 120px; font-size: .85rem; color: #555; word-break: break-all; }
.fw-status-icon { font-size: 1.1rem; width: 1.4em; text-align: center; }

.fwupdate-error-box {
  background: #fff5f5;
  border: 1px solid #e53935;
  border-radius: 6px;
  padding: 12px 16px;
  color: #b71c1c;
  margin: 12px 0;
  max-width: 700px;
  font-size: .9rem;
}

.fw-progress-track {
  background: #e0e0e0;
  border-radius: 4px;
  height: 10px;
  max-width: 600px;
  overflow: hidden;
  margin: 8px 0 14px;
}
.fw-progress-bar   { background: #f78661; height: 100%; border-radius: 4px; transition: width .3s ease; }
.fw-progress-label { font-weight: 600; margin-bottom: 4px; }

.fw-step-list { display: flex; flex-direction: column; gap: 6px; max-width: 600px; }
.fw-step      { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: #555; }
.fw-step.fw-step-active { color: #f78661; font-weight: 600; }
.fw-step.fw-step-done   { color: #4caf50; }
.fw-step.fw-step-error  { color: #e53935; }

.fw-step-dot  { width: 10px; height: 10px; border-radius: 50%; background: #ccc; flex-shrink: 0; }
.fw-step.fw-step-active .fw-step-dot { background: #f78661; }
.fw-step.fw-step-done   .fw-step-dot { background: #4caf50; }
.fw-step.fw-step-error  .fw-step-dot { background: #e53935; }

.fw-step-pct  { margin-left: auto; font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  .fw-file-row  { flex-direction: column; align-items: flex-start; }
  .fw-pick-btn  { width: 100%; text-align: center; box-sizing: border-box; }
}

/* Small screens: the body otherwise keeps a desktop min-width that forces
   horizontal scrolling on narrow phones (the live-view chart and tables then
   run off-screen). Let it shrink to the viewport so everything reflows to fit. */
@media (max-width: 600px) {
  body { min-width: 0; }
}
