/* General */

:root {
  --white:#FFF;
  --action-blue: #1895E4;
  --input-gray: #303030;
  --light-gray: #9E9E9E;
  --secondary-gradient: linear-gradient(90deg, #2A3033 0%, #465357 100%);
  --primary-gradient: linear-gradient(90deg, #123C56 0%, #14689C 100%);
  --Dark-gray: #202020;
  --Abyss-gray: #101010;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--Abyss-gray, #101010);
  color: #ffffff;
  max-width: 1920px;
  margin: 0 auto;
}

.secondary {
  color: var(--white, #FFF);
  font-size: 24px;
  font-family: 'Montserrat', 'Roboto', system-ui, -apple-system, Segoe UI, Roboto, Arial;
  font-weight: 400;
  word-wrap: break-word
}

h2 {
  color: #FFFFFF;
  font-size: 24px;
  font-family: 'Montserrat', 'Roboto', system-ui, -apple-system, Segoe UI, Roboto, Arial;
  font-weight: 400;
  word-wrap: break-word
}

h3 {
  color: var(--White, #FFF);;
  font-size: 16px;
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Roboto, Arial;
  font-weight: 700;
  word-wrap: break-word;
}

button {
  border-radius: 5px;
  background: var(--secondary-gradient, linear-gradient(90deg, #2A3033 0%, #465357 100%));
  padding: 12px;
  border: 0;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
}

button.primary {
  background: var(--primary-gradient, linear-gradient(90deg, #123C56 0%, #14689C 100%));
}

.separator-line-horizontal {
  height: 1px;
  align-self: stretch;
  background: var(--Abyss-gray, #101010);
  margin: 10px 0;
}

.separator-line-vertical {
  width: 1px;
  align-self: stretch;
  background: var(--Abyss-gray, #101010);
}

.horizontal-divider {
  border: 0px;
  border-top: 1px solid var(--Abyss-gray, #101010);
  height: 1px;
  align-self: stretch;
}

.vertical-divider {
  border: 0px;
  border-right: 1px solid var(--Abyss-gray, #101010);
  width: 1px;
  align-self: stretch;
}

.content-scrollable {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  flex: 1 0 0;
  align-self: stretch;

  overflow-x: hidden;
  overflow-y: auto;
}

/* The scrollbar track (the background) */
.content-scrollable::-webkit-scrollbar {
  width: 8px;
}

.content-scrollable::-webkit-scrollbar-track {
  background: var(--Abyss-gray, #101010);
  border-radius: 4px;
}

/* The draggable thumb */
.content-scrollable::-webkit-scrollbar-thumb {
  background: #14689C;   /* your blue */
  border-radius: 4px;
}

.content-scrollable::-webkit-scrollbar-thumb:hover {
  background: #448aff;   /* slightly lighter on hover */
}

.input-like {
  padding: 10px 12px;
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 10px;
}

.input-explain-text {
  font-style: italic;
  display: flex;
  padding: 0 30px;
  align-items: center;
  align-self: stretch;
  max-width: 450px;

  &.wide {
    max-width: fit-content;
  }
}

/* Custom radio input */

.custom-radio {
  width: 20px;
  height: 20px;
  border: 2px solid #303030;
  border-radius: 50%;
  background-color: var(--Abyss-gray, #101010);
  display: inline-block;
  position: relative;
  cursor: pointer;
}

input:checked + .custom-radio {
  border-color: #2563eb;
}

input:checked + .custom-radio::after {
  content: "";
  width: 12px;
  height: 12px;
  background: #2563eb;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.bold {
  font-weight: bold;
}

/* Custom Toggle slider */

.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #ccc;
  font-size: 14px;
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-option {
  color: #aaa;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background-color: #555;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

/* Checked state — blue track, knob slides right */
.toggle input:checked + .slider {
  background-color: #1895E4;
}

.toggle input:checked + .slider::before {
  transform: translateX(20px);
  background-color: rgba(14, 51, 74, 0.85);
}

.toggle-option:first-child {
  color: #ffffff;
  font-weight: 600;
}

.toggle-control:has(input:checked) .toggle-option:first-child {
  font-weight: normal;
}
.toggle-control:has(input:checked) .toggle-option:last-child {
  color: #ffffff;
  font-weight: 600;
}

/* Login Styles */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
}

.login-wrapper .login-container {
  max-width: 360px;
  padding: 24px;
}

.login-wrapper .login-header {
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-wrapper .login-header .header-text {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.1em;
}

.login-wrapper .login-header .header-text h1 {
  margin: 0;
  font-size: 1.8em;
}

.login-wrapper .login-header .logo {
  display: flex;
  justify-content: center;
  width: 250px;
  height: 250px;
}

.field {
  margin-bottom: 14px;
  text-align: center;
  height: 84px;
  opacity: 1;
  gap: 60px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #9E9E9E;
}

/*input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--Abyss-gray, #101010);
  border-radius: 5px;
  font-size: 16px;
  background-color: #303030;
  color: #ffffff;
}*/

input, select, ::picker(select) {
  padding: 10px 12px;
  border: 1px solid #101010;
  border-radius: 5px;
  font-size: 16px;
  background-color: #303030;
  color: #ffffff;
  margin-bottom: 10px;
  width: 320px;

  &[type=radio] {
    appearance: none;
    margin-bottom: 6px;
    border-radius: 13px;

    width: 18px;
    height: 18px;

    background-color: var(--Abyss-gray, #101010);
    box-shadow: none;
    border: 2px solid var(--Input-gray, #303030);
    
    display: flex;
    padding: 2px;
    background-clip: padding-box;
    justify-content: center;
    align-items: center;
    gap: 10px;
    aspect-ratio: 1/1;
    transition: 120ms ease-in-out;
    transition-property: background-color, box-shadow;

    &:checked {
      background-color: var(--action-blue, #1895E4);
      box-shadow: inset 0 0 0 2px var(--Abyss-gray, #101010);
    }
  }

  &[type="checkbox"] {
    appearance: none;
    margin-bottom: 6px;

    background-color: var(--Abyss-gray, #101010);
    border: 2px solid var(--Input-gray, #303030);

    display: flex;
    width: 26px;
    height: 26px;
    padding: 1px;
    background-clip: content-box;
    justify-content: center;
    align-items: center;
    gap: 10px;
    aspect-ratio: 1/1;

    &::before {
      content: url("/assets/img/checkmark.svg");
      width: 14.999px;
      height: 11.238px;
      margin-bottom: 2px;
      transform: scale(0);
      transition: 120ms transform ease-in-out;
    }

    &:checked {
      background-color: var(--action-blue, #1895E4);
      box-shadow: inset 0 0 0 2px var(--Abyss-gray, #101010);
    }

    &:checked::before {
      transform: scale(1);
    }
  }


  &:disabled {
    opacity: 0.15;
    + label {
      opacity: 0.15;
    }
  }
}

select {
  display: flex;
  height: 48px;
  align-items: center;
}

select:hover {
  border: 1px solid var(--action-blue, #1895E4);
}

select, ::picker(select) {
  appearance: base-select;
}

::picker(select) {
  padding: 0;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 0 0;
  gap: 10px;

  border-radius: 5px;
  border: 1px solid var(--Light-gray, #9E9E9E);
  background: var(--Input-gray, #303030);
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.50);
}

option {
  height: 48px;
  border-radius: 5px;
  display: flex;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;
}

option:checked {
  background: var(--Highlight-gray, #767676);
}

option:hover {
  background: var(--action-blue, #1895E4);
}

option:focus {
  background: var(--Highlight-gray, #767676);
}

option::checkmark {
  display: none;
}

input:focus {
  outline: none;
  border-color: #ffffff;
}


textarea {
  width: 100%;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
  background: var(--input-gray);
  border: 1px solid var(--Abyss-gray, #101010);
  border-radius: 5px;
  color: #ffffff;
  word-break: break-all;
  padding: 10px 12px;
}

textarea:hover {
  border: 1px solid var(--action-blue, #1895E4);
}

.input-style {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--Abyss-gray, #101010);
  border-radius: 5px;
  font-size: 16px;
  background-color: #303030;
  color: #ffffff;
}

.input-style:hover {
  border: 1px solid var(--action-blue, #1895E4);
}

.input-style:focus {
  outline: none;
  border-color: #ffffff;
}

.input-style:open {
  outline: none;
  border-color: #ffffff;
}

/* SELECTBOX */

.multiselect {
  width: inherit;
}

.selectBox {
  position: relative;

  :hover {
    border: 1px solid var(--action-blue, #1895E4);
  }

  .input-style:focus {
    outline: none;
    border-color: #ffffff;
  }

  .input-style:open {
    outline: none;
    border-color: #ffffff;
  }
}

.selectBox select {
  width: 100%;
}

.overSelect {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

.checkboxes {
  z-index: 1;
  min-width: 300px;
  max-height: 500px;
  position: absolute;
  display: none;
  /*padding: 10px 12px;*/
  font-size: 16px;
  background-color: #303030;
  color: #ffffff;
  overflow-y: auto;
  padding-top: 10px;
  border: 1px solid var(--Abyss-gray, #101010);
  border-radius: 5px;
}

.checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.checkboxes label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;

  width: 30px;
  height: 30px;
  background: var(--Abyss-gray, #101010);
  border: 1px solid #303030;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Style the checked state since you've taken over rendering */
.checkboxes label input[type="checkbox"]:checked {
  background-color: #505050;        /* or an accent color */
  border-color: #888;
}

/* Add a custom checkmark via pseudo-element */
.checkboxes label input[type="checkbox"]:checked::after {
  content: '';
  display: block;
  width: 8px;
  height: 14px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-6px, -2px);
}

/* The scrollbar track (the background) */
.checkboxes::-webkit-scrollbar {
  width: 8px;
}

.checkboxes::-webkit-scrollbar-track {
  background: var(--Abyss-gray, #101010);
  border-radius: 4px;
}

/* The draggable thumb */
.checkboxes::-webkit-scrollbar-thumb {
  background: #14689C;   /* your blue */
  border-radius: 4px;
}

.checkboxes::-webkit-scrollbar-thumb:hover {
  background: #448aff;   /* slightly lighter on hover */
}

select.input-style {
  appearance: none;
  -webkit-appearance: none;

  /* Custom arrow using inline SVG */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;  /* 10px padding from right */

  padding-right: 30px;  /* prevent text from going under the arrow */
}

/* SELECTBOX */

input:hover {
  border: 1px solid var(--action-blue, #1895E4);
}

input:focus {
  outline: none;
  border-color: #ffffff;
}

.login-container button {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #123C56 0%, #14689C 100%);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
}

button[disabled] {
  opacity: .7; cursor: not-allowed;
}

.login-wrapper .error {
  display: none;
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffe6e6;
  color: #8a0000;
  font-size: 14px;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Navbar */
#navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #202020;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

#navbar .navbar-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

#navbar .navbar-left .menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  gap: 7px;
  aspect-ratio: 1/1;
  background: #202020;
  border: 0;
}

#navbar .navbar-left button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
  cursor: pointer;
}

#navbar .navbar-left button:active {
  transform: scale(0.95);
}

#navbar .navbar-left .menu-icon svg {
  transition: transform 0.3s ease;
}

#navbar .navbar-left .menu-icon:hover svg {
  /*transform: rotate(180deg); */
}

#navbar .navbar-left .nav-header-text {
  display: flex;
  height: 60px;
  padding: 10px 20px;
  align-items: center;
  gap: 10px;
}

/* Right side: logo */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

#navbar .navbar-right .nav-brand {
  display: flex;
  align-items: center;
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 434px;
  background: #000000;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1001;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  height: 80px;
  align-items: center;
  flex-shrink: 0;
}

.sidebar-header .sidebar-close {
  display: flex;
  width: 80px;
  height: 80px;
  justify-content: center;
  align-items: center;
}

.sidebar-header .sidebar-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e74c3c;
  transform: rotate(90deg);
  cursor: pointer;
}

.sidebar-header .sidebar-close svg {
  transition: stroke 0.3s ease;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0 40px 40px 40px;
  flex: 1;
}

.nav-menu a {
  display: block;
  padding: 15px 20px;
  color: var(--action-blue, #1895E4);
  text-decoration: none;
  transition: background 0.3s, padding-left 0.3s;
  font-size: 32px;
}

.nav-menu a:hover {
  padding-left: 30px;
  color: #ffffff;
}

.nav-menu a.active {
  border-left: 4px solid var(--action-blue, #1895E4);
  padding-left: 26px;
  color: #ffffff;
}

.nav-menu a.active:hover {
  padding-left: 30px;
}

.sidebar-footer {
  flex-shrink: 0;
}

/* Main Content */
.app-body {
  display: flex;
  flex: 1;
}

/* Main Content Area - now a flex/grid container */
.main-content {
  flex: 1;
  padding: 20px;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

/* Content wrapper with main + sidebar */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px; /* Main content + 320px sidebar */
  gap: 30px;
  width: 100%;
}

/* When left sidebar is present: 3 columns */
.content-wrapper:has(.content-sidebar--left) {
  grid-template-columns: 250px 1fr 250px;
}

/* Shared sidebar styles */

.content-sidebar--left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 0;
  border-radius: 8px;
  background: #202020;
  gap: 10px;
  margin-bottom: 20px;

  h2 {
    display: flex;
    width: 300px;
    padding: 10px 20px;
    align-items: center;
    gap: 10px;

    color: var(--White, #FFF);
    font-family: Montserrat;
    font-size: 32px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
  }

  .entity-details {
    display: flex;
    padding: 0 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    align-self: stretch;
    
    p {
      display: flex;
      align-items: center;

      color: var(--Light-gray, #9E9E9E);
      font-family: Roboto;
      font-size: 16px;
      font-style: normal;
      font-weight: 400;
      line-height: normal;
    }

    span {
      display: flex;
      align-items: center;
      align-self: stretch;

      color: var(--White, #FFF);
      font-family: Roboto;
      font-size: 16px;
      font-style: normal;
      font-weight: 700;
      line-height: normal;
    }
  }

  .content-left-sidebar-channel-alarms {
    display: flex;
    width: 300px;
    padding: 10px 20px;
    align-items: center;
    gap: 10px;

    color: var(--White, #FFF);
    font-family: Montserrat;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
  }
}

/* Main content section */
.content-main {
  min-width: 0; /* Prevents overflow issues */
  display: flex;
  min-height: 920px;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  flex: 1 0 0;

  
}

/* Grid Table */
.data-grid {
  background: #202020;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  color: #9E9E9E;
  width: 100%;
}

/* Grid Header */
.data-grid-header {
  display: grid;
  grid-template-columns: 1fr 2fr 2fr 2fr 2fr; /* Adjust based on your columns */
  gap: 15px;
  padding: 15px 20px;
  /*font-family: Roboto; */
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--Abyss-gray, #101010);
}

.data-grid-header > div {
  display: flex;
  align-items: center;
}

/* Grid Body */
.data-grid-body {
  display: flex;
  flex-direction: column;
}

/* Grid Row */
.data-grid-row {
  display: grid;
  grid-template-columns: 1fr 2fr 2fr 2fr 2fr; /* Same as header */
  gap: 15px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--Abyss-gray, #101010);
  transition: all 0.3s ease;
  align-items: center;
  cursor: pointer;
}

.data-grid-row:last-child {
  border-bottom: none;
}

.data-grid-row:hover {
  /*background: #f8f9fa; */
  transform: translateX(5px);
  box-shadow: -3px 0 0 0 #667eea inset;
}

/* Grid Cell */
.data-grid-cell {
  display: flex;
  align-items: center;
  color: #ffffff;
  font-size: 16px;
  /*font-family: Roboto; */
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

.data-grid-cell.actions {
  display: flex;
  gap: 8px;
}

.data-grid-cell button {
  background: #667eea;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.data-grid-cell button:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.data-grid-cell button.secondary {
  background: #95a5a6;
}

.data-grid-cell button.secondary:hover {
  background: #7f8c8d;
}

.data-grid-cell button.danger {
  background: #e74c3c;
}

.data-grid-cell button.danger:hover {
  background: #c0392b;
}

.data-grid-cell .ship-receiver-statuses {
  padding: 5px;
}

li.content-line {
  /* display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: system-ui, -apple-system, sans-serif; */

  /* Target the main question label */
  /* .input-label {
    font-weight: 600;
    color: #333;
    font-size: 16px;
  } */

  /* Target the container row holding No / Switch / Yes */
  .toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;

    /* Base layout styles for both No and Yes text labels */
    .side-label {
      font-size: 14px;
      cursor: pointer;
      user-select: none;
      transition: opacity 0.2s, font-weight 0.2s;
    }

    /* Default style rules when the switch is un-checked (No) */
    .left-label { font-weight: bold; opacity: 1; }
    .right-label { font-weight: normal; opacity: 0.5; }

    /* The box wrapping the switch track */
    .switch-wrapper {
      position: relative;
      display: inline-block;
      width: 50px;
      height: 26px;

      /* Hide the default browser checkbox */
      .toggle-input {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;

        /* Focus ring for keyboard tab accessibility */
        &:focus-visible + .slider {
          outline: 2px solid #2196F3;
          outline-offset: 2px;
        }

        /* Styling logic changes when the user clicks 'Yes' */
        &:checked {
          /* 1. Turn the track green */
          + .slider {
            background-color: var(--Action-blue, #1895E4);
            
            /* 2. Slide the white dot to the right side */
            &::before {
              transform: translateX(27px);
              background-color: var(--Modal-blue, rgba(14, 51, 74, 0.85));
            }
          }

          /* 3. Handle opacity and weights for side labels on check */
          ~ .right-label { font-weight: bold; opacity: 1; }
          ~ .left-label { font-weight: normal; opacity: 0.5; }
        }
      }

      /* The track/background shape of the toggle */
      .slider {
        position: absolute;
        cursor: pointer;
        top: 0; left: 0; right: 0; bottom: 0;
        background-color: var(--Abyss-gray, #101010);
        border-radius: 34px;
        transition: background-color 0.3s;

        /* The white round sliding knob element */
        &::before {
          position: absolute;
          content: "";
          height: 15px;
          width: 15px;
          left: 4px;
          bottom: 4px;
          /* background-color: var(--Modal-blue, rgba(14, 51, 74, 0.85)); */
          background-color: var(--Action-blue, #1895E4);
          border-radius: 50%;
          transition: transform 0.3s;
          box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
      }
    }
  }

  select {
    display: flex;
    height: 48px;
    padding: 10px 10px;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    border-radius: 5px;
    background: var(--Input-gray, #303030);

    /* ADD: style the select itself to match option look */
    color: var(--White, #FFF);
    font-family: Roboto;
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
    line-height: normal;

    option {
      color: var(--Light-gray, #9E9E9E);
      font-family: Roboto;
      font-size: 16px;
      font-style: italic;
      font-weight: 400;
      line-height: normal;
    }
  }
}

/* Form Errors */
.field-error {
  display: none;
  color: #ff0000;
  font-size: 15px; 
  font-family: Roboto;
  margin-top: 4px;
  padding: 0 2px;

  &.visible {
    display: block;
  }
}

.input-error {
  border: 1px solid #F00034 !important;
}

.toast {
  position: fixed;
  top: 100px;        /* below your navbar height */
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 9999;
  width: 420px;
  max-width: calc(100vw - 40px);

  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #1a0a0a;
  border: 0.5px solid #A32D2D;
  border-left: 3px solid #E24B4A;
  border-radius: 10px;
  padding: 14px 16px;
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.5s ease;

  .toast__close {
    background: none;
    border: none;
    cursor: pointer;
    color: #F09595;
    padding: 4px;
    flex-shrink: 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 18px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;

    &:hover {
      opacity: 1;
      background: rgba(255, 255, 255, 0.1);
    }

    &:active {
      background: rgba(255, 255, 255, 0.15);
    }
  }
  &.toast--hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-12px);  /* slide up when hidden */
  }
}


/* Empty state */
.data-grid-empty {
  padding: 60px 20px;
  text-align: center;
  color: #95a5a6;
}

.data-grid-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 15px;
  opacity: 0.3;
}

.data-grid-empty h3 {
  color: #7f8c8d;
  margin-bottom: 10px;
}

.data-grid-empty p {
  color: #95a5a6;
  font-size: 14px;
}

/* Receivers */
/* Split Card */
.split-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  align-self: stretch;
  border-radius: 5px;
  overflow: hidden;

  /* Aside (left colored panel) */
  .split-card-aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex-shrink: 0;
    padding: 20px;
    gap: 10px;
    border-radius: 5px 0 0 5px;

    &.active {
      background: linear-gradient(90deg, #004505 0%, #017007 100%);
    }

    &.error {
      background: linear-gradient(90deg, #510001 0%, #A50103 100%);
    }

    &.warning {
      background: linear-gradient(90deg, #713D01 0%, #D18F01 100%);
    }

    .split-card-aside__image {
      width: 100px;
      height: 100px;
      padding: 20px 0;
      border-radius: 10px 0 0 10px;
      object-fit: contain;
    }
  }

  /* Content (right panel) */
  .split-card-content {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 20px 0;
    border-radius: 0 5px 5px 0;
    min-width: 0;
    background: #202020;

    /* Title row */
    .split-card-content__header {
      display: flex;
      align-items: center;
      padding: 10px 20px;
    }

    .split-card-content__title {
      color: #ffffff;
      font-family: 'Montserrat', sans-serif;
      font-size: 32px;
      font-weight: 700;
    }

    /* Two-column body */
    .split-card-content__body {
      display: flex;
      flex-direction: row;
      align-items: flex-start;
      gap: 10px;
      align-self: stretch;
      padding: 0;
    }

    /* ── Status column (left of body) ── */
    .split-card-content__status-col {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      width: 207px;
      flex-shrink: 0;

      .status-field__actions {
        display: flex;
        align-items: center;
        padding: 0 20px;
        gap: 10px;

        /* border-radius: 5px; */
        /* background: var(--Primary-gradient, linear-gradient(90deg, #123C56 0%, #14689C 100%)); */

        button{
          color: var(--White, #FFF);
          font-family: Roboto;
          font-size: 16px;
          font-style: normal;
          font-weight: 700;
          line-height: normal;
          background: var(--Primary-gradient, linear-gradient(90deg, #123C56 0%, #14689C 100%)); 
        }
      }
    }

    /* Info column (right of body) */
    .split-card-content__info-col {
      display: flex;
      flex: 1 1 0;
      flex-direction: column;
      align-items: flex-start;
      min-width: 0;
    }
  }
}

/* Separators */
.split-card-separator {
  align-self: stretch;
  height: 1px;
  background: #303030;
  margin: 0;
}

.split-card-divider {
  width: 1px;
  align-self: stretch;
  flex-shrink: 0;
  background: #303030;
}

/* Status Field */
.status-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  padding: 0 20px;

  .status-field__label {
    display: flex;
    align-items: center;
    height: 36px;
    color: #9E9E9E;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
  }

  .status-field__value {
    display: flex;
    align-items: center;
    height: 48px;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;

    &.active  { color: #007007; }
    &.error   { color: #F00034; }
    &.warning { color: #f59e0b; }
    /*&.muted   { color: #9E9E9E; } */
  }
}

/* Info Row */
.info-row {
  display: flex;
  flex-direction: row;  /* keep horizontal always */
  align-items: center;
  align-self: stretch;
  gap: 10px;

  .info-row__label {
    display: flex;
    align-items: center;
    width: 40%;           /* percentage instead of fixed 200px */
    max-width: 200px;     /* won't exceed 200px on large screens */
    min-width: 80px;      /* won't shrink below 80px */
    flex-shrink: 1;
    height: 48px;
    padding: 10px;
    color: #9E9E9E;
    font-size: 16px;
    font-weight: 400;
  }

  .info-row__value {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;         /* critical: allows text to shrink */
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* Responsive */
@media (max-width: 992px) {
  .split-card {
    flex-direction: column;

    .split-card-aside {
      flex-direction: row;
      border-radius: 5px 5px 0 0;
      padding: 16px 20px;
      width: 100px;

      .split-card-aside__image {
        width: 60px;
        height: 60px;
        padding: 0;
        border-radius: 8px;
      }
    }

    .split-card-content {
      border-radius: 0 0 5px 5px;

      .split-card-content__body {
        flex-direction: column;
      }

      .split-card-content__status-col {
        width: 100%;
      }
    }
  }

  .split-card-divider {
    width: 100%;
    height: 1px;
  }

  .info-row .info-row__label {
    width: 160px;
  }
}

@media (max-width: 480px) {
  .info-row {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 8px 10px;
    gap: 2px;

    .info-row__label {
      width: auto;
      height: auto;
      padding: 0;
      font-size: 13px;
    }

    .info-row__value {
      font-size: 15px;
    }
  }

  .split-card-content__title {
    font-size: 24px;
  }
}

/* Operators */

/* Receivers */

#content .channel-grid .data-grid-header,
#content .channel-grid .data-grid-row
{
  grid-template-columns: 0.8fr 0.4fr 2fr 2fr 2fr 2fr;
}

#content .license-grid .data-grid-header,
#content .license-grid .data-grid-row
{
  grid-template-columns: 0.5fr 2fr 4fr 0.5fr 2fr;
}

/* Channels */

#content .content-main.channels .data-grid-header,
#content .content-main.channels .data-grid-row,
#content .content-main.operators .data-grid-header,
#content .content-main.operators .data-grid-row
{
  grid-template-columns: 0.2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
}

.form-main-alternate {
  display: flex;
  padding: 20px 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  flex: 1 0 0;
  align-self: stretch;
  border-radius: 10px;
  background: var(--Dark-gray, #202020);
}

.form-main, .channel-form-main {
  display: flex;
  padding: 20px 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  flex: 1 0 0;
  align-self: stretch;
  border-radius: 10px;
  background: var(--Dark-gray, #202020);
}

form-main hr, .channel-form-main hr {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-color: var(--Abyss-gray, #101010);
  width: 100%;
  border-width:0;
  flex-direction: column;
  align-items: flex-start;
  height: 2px;
  align-self: stretch;
  background: var(--Abyss-gray, #101010);
}

.channel-form-tabs-container {
  width: 100%; 
  justify-content: flex-start;
  align-items: center;
  display: flex;
}

.channel-form-tab-wrapper {
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 10px;
  padding-bottom: 10px;
  justify-content: flex-start;
  align-items: center;
  display: flex;
  cursor: pointer;

  span {
    color: var(--action-blue, #1895E4);
    font-size: 24px;
    font-family: 'Montserrat', 'Roboto', system-ui, -apple-system, Segoe UI, Roboto, Arial;
    font-weight: 400;
    text-decoration: underline;
    word-wrap: break-word
  }

  &[disabled] {
    opacity: 0.15 !important;
    cursor: default;
  }

  &.active {
    opacity: 1.0 !important;

    span {
      color: var(--white);
      text-decoration: none;
    }
  }
}

.channel-form-arrow-wrapper {
  height: 60px;
  padding-top: 10px;
  padding-bottom: 10px;
  opacity: 0.15;
  justify-content: center;
  align-items: center;
  gap: 10px;
  display: flex;

  div {
    padding: 10px;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    display: flex;

    img {
      width: 10px;
      height: 17px;
      position: relative;
    }
  }
}

.form, .channel-form {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: 1 0 0;
  align-self: stretch;
}

.form-left, .channel-form-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  flex: 1 0 0;
}

.form-right, .channel-form-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  flex: 1 0 0;
  align-self: stretch;
}

.form-panel, .channel-form-panel {
  display: flex;
  align-items: flex-start;
  /*justify-content: flex-start; */
  flex-wrap: wrap;
  flex: 1 0 0;
  align-self: stretch;
}

#channel-form-gateway {
  .radio-input-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: flex-start;

    label {
      display: flex;
      flex-direction: row-reverse; /* puts the radio after the text visually, adjust to taste */
      align-items: center;
      gap: 10px;
      cursor: pointer;
    }

    input[type="radio"] {
      display: none;
      width: 16px;
      height: 16px;
      accent-color: #2563eb;
      flex-shrink: 0;
      cursor: pointer;
    }
  }
}

#form-io, #channel-form-io {
  display: flex;
  align-items: flex-start;
  align-self: stretch;
  padding: 0;

  .form-fieldset, .channel-form-fieldset {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    flex: 1 0 0;
    align-self: stretch;

    legend {
      padding: 10px 0 30px;
    }

    p {
      padding: 0 10px;
      color: var(--light-gray, #E9E9E9);
    }

    .inputs-container {
      padding: 15px 0 0;

      input {
        max-width: 200px;
      }

      textarea {
        width: 100%;
        max-width: 200px;
      }

      select {
        min-width: 200px;
        max-width: 300px;
        width: initial;
      }
    }
  }
}

.form-fieldset, .channel-form-fieldset {
  gap: 20px;
  border-width: 0 !important;
  padding: 0 20px;

  legend {
    padding: 10px 20px;
    align-items: center;
  }

  .sub-title {
    font-size: 20px;
    padding: 20px 0;
  }

  .inputs-container {
    padding: 15px 20px 0;

    .toggle-wrapper {
      padding-bottom: 15px;
    }

    .radio-input-container {
      display: flex;
      flex-direction: column;
      gap: 25px;
      align-items: flex-start;

      label {
        display: flex;
        flex-direction: row-reverse; /* puts the radio after the text visually, adjust to taste */
        align-items: center;
        gap: 10px;
        cursor: pointer;
      }

      input[type="radio"] {
        width: 16px;
        height: 16px;
        accent-color: #2563eb;
        flex-shrink: 0;
        cursor: pointer;
      }

      input {
        display: none;
      }
    }
  }
}

#channel-secondary-input-container {
  display: none;
}

.form-footer, .channel-form-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  align-self: stretch;

  .form-footer-buttons, .channel-form-footer-buttons {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    align-self: stretch;

    button {
      display: flex;
      height: 48px;
      padding: 0 20px;
      align-items: center;
      gap: 10px;
    }
  }
}

.content-line {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: stretch;

  .content-line-input {
    display: flex;
    width: 300px;
    flex-direction: column;
    align-items: flex-start;
  }

  select {
    display: flex;
    width: 300px;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 10px;
  }

  &.lengthened {
    align-items: flex-start;
  }

  .line-label {
    display: flex;
    /*width: 300px;*/
    max-width: 300px;
    width: 50%;
    height: 48px;
    padding: 10px;
    align-items: center;
    gap: 10px;
  }

  input, select {
    max-width: 320px;
    width: 50%;
  }
}

.input-label {
  display: flex;
  width: 200px;
  height: 48px;
  padding: 10px;
  align-items: center;
  gap: 10px;
}

.customer-operator-details-hint {
  display: flex;
  padding: 10px;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;

  span {
    display: flex;
    align-items: center;
    align-self: stretch;
    color: var(--Light-gray, #9E9E9E);
    font-family: Roboto;
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
    line-height: normal;
  }
}

/* Right sidebar */
.content-sidebar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  height: fit-content;
  position: sticky;
  top: 90px; /* Navbar height (60px) + some spacing */
}

.content-sidebar .separator {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  height: 1px;
  align-self: stretch;
  background: var(--Abyss-gray, #101010);
}



.content-sidebar .tools-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 0;
  border-radius: 8px;
  background: var(--Dark-gray, #202020);;
  gap: 10px;
  margin-bottom: 20px;
}

.content-sidebar .tools-section h2 {
  display: flex;
  padding: 10px 20px 20px;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;
  border-bottom: 1px solid var(--Abyss-gray, #101010);
}

.content-sidebar .tools-section button {
  padding: 0 20px;
  height: 40px;
}

.content-sidebar .tools-section .tools-container {
  display: flex;
  padding: 10px 20px 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;
}

.tools-container .help-text {
  color: #FFF;
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Roboto, Arial;
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  line-height: normal;

  display: flex;
  padding: 0 20px;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;

  span {
    color: var(--Light-gray, #9E9E9E);
    font-family: Roboto;
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
    line-height: normal;
  }
}

.content-sidebar .widget-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 0;
  border-radius: 8px;
  background: #202020;
  gap: 10px;
  margin-bottom: 20px;
}

.content-sidebar .widget-section h2 {
  display: flex;
  padding: 10px 20px 20px;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;
  border-bottom: 1px solid var(--Abyss-gray, #101010);
}

.content-sidebar .widget-section .widget-container {
  display: flex;
  padding: 10px 20px 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;
}

.content-sidebar .help-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 0;
  gap: 20px;
  
  border-radius: 10px;
  background: linear-gradient(90deg, #123C56 0%, #14689C 100%);
}

.content-sidebar .help-section h2 {
  display: flex;
  padding: 0 20px;
  align-items: flex-start;
  gap: 10px;
}

.content-sidebar .help-section .help-text {
  display: flex;
  padding: 0 20px;
  align-items: center;
  align-self: stretch;
}

.content-sidebar .help-section .help-text span {
  color: #FFF;
  font-family: Roboto;
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  line-height: normal;
}



/* Skeleton loader */
.skeleton {
  background: linear-gradient(
      90deg,
      #202020 25%,
      #2a2a2a 50%,
      #202020 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-row {
  height: 60px;
  margin-bottom: 10px;
}

/* Responsive - stack on smaller screens */
@media (max-width: 1200px) {
  .content-wrapper {
    grid-template-columns: 1fr 280px;
  }
  .content-sidebar {
    max-width: 280px;
  }
  .content-wrapper:has(.content-sidebar--left) {
    grid-template-columns: 280px 1fr 280px;
  }
}

@media (max-width: 992px) {
  .content-wrapper,
  .content-wrapper:has(.content-sidebar--left) {
    grid-template-columns: 1fr; /* stack all vertically */
    gap: 20px;
  }

  .content-sidebar--left  { order: 1; position: static; }
  .content-main           { order: 2; }
  .content-sidebar--right { order: 3; position: static; }
}

@media (max-width: 768px) {
  .main-content {
    padding: 20px;
  }

  .data-grid-header {
    display: none; /* Hide header on mobile */
  }

  .data-grid-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    background: var(--Abyss-gray, #101010);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .data-grid-row:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }

  .data-grid-body {
    padding: 0 10px;
    background: var(--Abyss-gray, #101010);
  }

  .data-grid-cell {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
  }

  .data-grid-cell::before {
    content: attr(data-label);
    font-weight: 600;
    color: #FFFFFF;
    font-size: 12px;
    text-transform: uppercase;
  }

  .data-grid-cell.actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .data-grid-cell.actions::before {
    display: none;
  }

}

/* COLUMN DIVIDERS */

.dual-column {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  align-self: stretch;
  justify-content: center;

  &.fill {
    height: -webkit-fill-available;
  }
}

.dual-column-column {

  display: flex;
  align-items: center;
  flex: 1 0 0;
  flex-direction: column;
  gap: 20px;

  .inner-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    align-self: stretch;
  }

  h2 {
    display: flex;
    height: 48px;
    padding: 10px 20px;
    align-items: center;
    gap: 10px;
  }

  .content-line {
    padding: 0 20px;
  }
}

.inner-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  align-self: stretch;

  h2 {
    display: flex;
    height: 48px;
    padding: 10px 20px;
    align-items: center;
    gap: 10px;
  }

  .content-line {
    padding: 0 20px;
  }
}

.compact-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;
}

.status-container {
  display: flex;
  /*height: 48px;*/
  padding: 0 20px;
  align-items: flex-start;
  gap: 20px;

  h3 {
    display: flex;
    height: 48px;
    padding: 10px 20px;
    align-items: center;
    gap: 10px;
  }
}