body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

.header {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px;
}

.logo {
  width: 80px;
  height: auto;
}

.toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu {
  margin: 10px;
}

.landscape {
  display: none;
  gap: 1em;
}

.portrait {
  display: none;
}

@media (min-width: 768px) {
  .landscape {
    display: flex;
  }
}

nav.menu.landscape {
  display: flex;          /* Horizontal layout */
  gap: 1rem;              /* Space between links */
  flex-wrap: wrap;        /* Optional: wrap on small screens */
  align-items: center;    /* Vertical alignment */
}

nav.menu.landscape a {
  text-decoration: none;
  color: #333;
  padding: 0.5rem 1rem;
}

nav.menu.landscape a.active {
  font-weight: bold;
  color: #0077cc;
  border-bottom: 2px solid #0077cc;
}

select.fancy-combo {
  display: block;
  width: 100%;
  border: 2px solid #0077cc;
  color: #0077cc;
  background-color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  appearance: none; /* Removes default styling in some browsers */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%230077cc'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.65rem;
  cursor: pointer;
  transition: border-color 0.2s ease-in-out;
}

select.fancy-combo:hover,
select.fancy-combo:focus {
  border-color: #005fa3;
  outline: none;
}

div.content-box {
  background-color: #f9fbff;
  border: 2px solid #0077cc;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 8px; /* 8px gap on left and right */
  width: calc(100% - 16px); /* Subtract 8px from both sides */
  box-sizing: border-box;
  color: #333;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 4px 12px rgba(0, 119, 204, 0.1);
}

div.content-box h2 {
  color: #0077cc;
  margin-top: 0;
}

div.content-box p {
  line-height: 1.6;
}

div.content-box a {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #0077cc;
  border: 1px solid #0077cc;
  border-radius: 4px;
  transition: background-color 0.2s ease-in-out;
}

div.content-box a:hover {
  background-color: #0077cc;
  color: #fff;
}

footer.magic-footer {
  position: relative;
  background: linear-gradient(to right, #0077cc, #005fa3);
  color: #fff;
  padding: 1.5rem;
  text-align: center;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
}

footer.magic-footer a {
  color: #fff;
  text-decoration: underline;
  font-weight: bold;
}

footer.magic-footer a:hover {
  text-decoration: none;
  color: #ffdd57;
}

.sparkle-overlay {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.sparkle-overlay.animate {
  animation: sparkle 6s linear forwards;
}

@keyframes sparkle {
  0% {
    transform: rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: rotate(360deg);
    opacity: 0;
  }
}

* {
  box-sizing: border-box;
}

.login-form {
  max-width: 90%;
  margin: auto;
  padding: 1rem;
}


input, button {
  border: 2px solid #99ccee; /* Light blue default */
  background-color: white;
  padding: 6px;
  font-size: 1rem;
  font-family: sans-serif;
  outline: none;
  transition: border-color 0.2s ease-in-out;
}

button {
	cursor: pointer;
}

input:focus, button:focus {
  border-color: #0077cc; /* Darker blue on focus */
}

button.red {
  border-color: red;
}

button.green {
  border-color: green;
}
.form-row {
  min-width: 0;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: nowrap;       /* Prevent wrapping */
}

.form-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  flex: 1;                     /* match your input’s flex behavior */
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 0.4rem 2rem 0.4rem 0.6rem;
  font-size: 1rem;
  font-family: inherit;

  border: 2px solid #0077cc;
  border-radius: 4px;
  background-color: #fff;
  color: #0077cc;

  background-image: url("data:image/svg+xml;utf8,<svg fill='rgb(0,119,204)' height='14' width='14' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'><polygon points='0,0 20,0 10,10'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.7rem;
}


label {
  flex: 0 0 20%;            /* 30% width, no grow/shrink */
  text-align: right;
  padding-right: 10px;
  white-space: nowrap;      /* Prevent label text from wrapping */
  border: 1px dashed #0077cc;
}

input {
  flex: 1;                  /* Take remaining space */
  min-width: 0;             /* Prevent overflow */
}

.error-print {
    font-size: 1.2em; /* h2 is usually around 1.5em */
    color: red;
    font-weight: normal; /* optional: less bold than h2 */
    margin: 0.5em 0;     /* optional: spacing control */
}

button.eye-toggle {
  width: 2.5em;         /* consistent width */
  height: 2.5em;        /* consistent height */
  font-size: 1.5em;     /* scale emoji nicely */
  line-height: 1;       /* prevent vertical shift */
  text-align: center;
  padding: 0;
  overflow: hidden;
  display: inline-block;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif;
}

.filter-grid {
	display: grid;
	grid-template-columns: auto auto;
	gap: 10px 20px;
	align-items: center;
}
.filter-grid label {
	display: contents;
}

table.grid-table {
  border-collapse: collapse;
  border: 2px solid #2a6fdb; /* Outer border */
  width: 100%;
  font-family: sans-serif;
  background-color: #f8fbff;
}

table.grid-table th,
table.grid-table td {
  border: 1px solid #a3c2f2; /* Inner grid lines */
  padding: 8px 12px;
  text-align: left;
  color: #1a3e72;
}

table.grid-table th {
  background-color: #dbe9ff;
  font-weight: bold;
}

table.grid-table tr:nth-child(even) {
  background-color: #eef5ff;
}

.table-button {
  font-size: 1em;
  padding: 0.5em 1em;
  margin: 0.3em;
  border: 1px solid #ccc;
  border-radius: 0.3em;
  background-color: #dbe9ff;
  cursor: pointer;
  vertical-align: middle;
  min-width: 2.5em;
  min-height: 2.5em;
  text-align: center;
  line-height: 1.2em;
}

.clickable-table { 
width: 100%; 
border: 1px solid #a3c2f2; 
table-layout: fixed;
border-collapse: separate; 
border-spacing: 0;
}
.clickable-table th, .clickable-table td { border: 1px solid #a3c2f2; padding: 8px; }
.clickable-table tbody tr { background-color: white; }
.clickable-table tbody tr:hover { background-color: #f0f8ff; cursor: pointer; }
.clickable-table td { background: transparent; }

.device-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #000;
}

.device-table th,
.device-table td {
  border: 1px solid #000;
  padding: 8px;
}

/* link style inside the table */
.device-table a.loclink {
  text-decoration: none;
  color: #0000DD;
}

.device-table a.loclink:hover {
  text-decoration: underline;
}

input.invalid {
  border: 2px solid #d33;
  background-color: #ffecec;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.delete-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid red;
    border-radius: 50%;
    color: red;
    font-weight: bold;
    text-align: center;
    line-height: 16px;
    cursor: pointer;
}

.reactivate-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid green;
    border-radius: 50%;
    color: green;
    font-weight: bold;
    text-align: center;
    line-height: 16px;
    cursor: pointer;
}
