@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600&display=swap");
*,
*::before,
*::after {
  box-sizing: border-box;
}

.base-layout {
  display: grid;
  grid-template-columns: 70px 1fr;
  grid-template-rows: 70px 1fr;
  transition: 0.5s;
  height: 100%;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .base-layout {
    display: flex;
    flex-direction: column;
  }
}
.base-layout.full-side-nav {
  grid-template-columns: 170px 1fr;
  grid-template-rows: 70px 1fr;
  transition: 0.5s;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .base-layout.full-side-nav {
    display: flex;
    flex-direction: column;
  }
}

.top-nav {
  background-color: #1B1424;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}
.top-nav img.mobile-menu {
  display: none;
}
.top-nav .tenant-menu {
  display: none;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .top-nav {
    justify-content: space-between;
  }
  .top-nav .tenant-menu {
    background-color: #1B1424;
    display: inline-flex;
    color: #EDF3EC;
  }
  .top-nav img.mobile-menu {
    display: block;
    margin: 20px;
  }
}
.top-nav .nav-logo {
  margin-right: 12px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .top-nav .nav-logo {
    margin: 20px;
  }
}

.top-nav-edge {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 70px 70px 0;
  border-color: transparent #1b1424 transparent transparent;
  background-color: #EDF3EC;
  z-index: 2;
  transition: width 0.5s;
  box-sizing: content-box;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .top-nav-edge {
    display: none;
  }
}
.full-side-nav .top-nav-edge {
  width: 100px;
  transition: width 0.5s;
}

.top-nav-name {
  color: #EDF3EC;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  z-index: 2;
  transition: width 0.5s;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .top-nav-name {
    display: none;
  }
  .top-nav-name .tenant-menu {
    display: none;
  }
}
.top-nav-name .tenant-menu {
  background-color: #1B1424;
  margin-left: 20px;
  display: inline-flex;
  color: #EDF3EC;
}

.side-nav {
  background-color: #EDF3EC;
  box-shadow: 4px 0 4px rgba(0, 0, 0, 0.25);
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .side-nav {
    display: none;
  }
  .side-nav.open-mobile {
    display: block;
  }
}

.nav-items {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
  gap: 50px;
  margin-top: 70px;
  position: sticky;
  top: 70px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .nav-items {
    margin-top: 0;
    gap: 20px;
  }
}

.nav-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  z-index: 2;
  transition: width 0.5s;
  overflow: hidden;
  text-decoration: none;
  font-size: 16px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .nav-item {
    width: 150px;
    transition: width 0.5s;
    justify-content: normal;
  }
}
.full-side-nav .nav-item {
  width: 150px;
  transition: width 0.5s;
  justify-content: normal;
}
.main-content .nav-item {
  width: 160px;
}
@media only screen and (min-width: 768px) and (min-height: 700px) {
  .nav-item.active:before {
    background-color: #1B1424;
    content: "";
    border-radius: 10px;
    width: 50px;
    height: 50px;
    position: absolute;
    z-index: 1;
    transition: width 0.5s;
  }
  .side-nav .nav-item.active:before {
    left: 10px;
  }
  .full-side-nav .nav-item.active:before {
    width: 150px;
    transition: width 0.5s;
  }
  .main-content .nav-item.active:before {
    width: 160px;
  }
}
@media only screen and (min-width: 768px) and (min-height: 700px) {
  .nav-item.active span {
    color: #EDF3EC;
  }
}
.nav-item span {
  z-index: 2;
  color: #1B1424;
  margin-left: 10px;
}
.main-content .nav-item span {
  margin: 0;
}

.nav-icon {
  background-color: #1B1424;
  width: 40px;
  height: 40px;
  z-index: 2;
  flex: none;
}
@media only screen and (min-width: 768px) and (min-height: 700px) {
  .active .nav-icon {
    background-color: #EDF3EC;
  }
}
.nav-icon.home-icon {
  -webkit-mask: url(/icons/home.svg) no-repeat center;
  mask: url(/icons/home.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.planning-icon {
  -webkit-mask: url(/icons/planning.svg) no-repeat center;
  mask: url(/icons/planning.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.contacts-icon {
  -webkit-mask: url(/icons/contact.svg) no-repeat center;
  mask: url(/icons/contact.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.users-icon {
  -webkit-mask: url(/icons/users.svg) no-repeat center;
  mask: url(/icons/users.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.settings-icon {
  -webkit-mask: url(/icons/settings.svg) no-repeat center;
  mask: url(/icons/settings.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.logout-icon {
  -webkit-mask: url(/icons/logout.svg) no-repeat center;
  mask: url(/icons/logout.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.report-icon {
  -webkit-mask: url(/icons/report.svg) no-repeat center;
  mask: url(/icons/report.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.profile-icon {
  -webkit-mask: url(/icons/profile.svg) no-repeat center;
  mask: url(/icons/profile.svg) no-repeat center;
  -webkit-mask-size: contain;
}
.nav-icon.gdpr-icon {
  -webkit-mask: url(/icons/gdpr.svg) no-repeat center;
  mask: url(/icons/gdpr.svg) no-repeat center;
  -webkit-mask-size: contain;
}

.main-content {
    display: grid;
    grid-template-columns: minmax(500px, 100%);
    justify-content: center;
    margin: 70px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .main-content {
    margin: 20px 0 0;
    grid-template-columns: 1fr;
  }
}
.main-content article {
  background-color: #EDF3EC;
  box-shadow: 0 6px 6px 3px rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-columns: 1fr;
  padding: 20px;
}
.main-content .base-content {
  background-color: #EDF3EC;
  box-shadow: 0 6px 6px 3px rgba(0, 0, 0, 0.25);
  padding: 20px;
}

.settings-sub-menu {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 300px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .settings-sub-menu {
    flex-direction: column;
    display: flex;
  }
}
.settings-sub-menu h3 {
  margin: 0 0 20px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .settings-sub-menu h3 {
    border-right: none;
    margin: 0 0 10px;
  }
}
.settings-sub-menu .menu-content {
  margin-left: 20px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .settings-sub-menu .menu-content {
    margin: 0;
  }
}
.settings-sub-menu .menu-content .component {
  margin-bottom: 20px;
}
.settings-sub-menu .menu-side-content {
  border-right: 1px solid rgba(27, 20, 36, 0.3137254902);
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .settings-sub-menu .menu-side-content {
    border-right: none;
  }
}
.settings-sub-menu .menu-side-content .component {
  margin-top: 20px;
}

.companies-container {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 150px;
  border-bottom: 1px solid rgba(27, 20, 36, 0.3137254902);
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .companies-container {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
  }
}
.companies-container h4 {
  margin: 0;
  align-self: center;
  overflow-wrap: break-word;
}
.companies-container .contacts-container {
  border-left: 1px solid rgba(27, 20, 36, 0.3137254902);
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  justify-content: space-between;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .companies-container .contacts-container {
    border: none;
  }
  .companies-container .contacts-container .component-group {
    flex-direction: column;
  }
  .companies-container .contacts-container .component-group .component {
    margin: 0 0 20px;
  }
}
.companies-container .contacts-container .badge {
  cursor: default;
}

.companies-header {
  display: flex;
  height: fit-content;
  column-gap: 50px;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .companies-header {
    flex-direction: column;
  }
}

html, body {
  margin: 0;
  height: 100%;
  background: #C5D8D3 none;
}

.rz-g > div, .rz-datalist-data > li {
  background: none;
  border: none;
}

.rz-datalist-content > .rz-g > .rz-card {
  box-shadow: var(--rz-card-shadow);
  flex-grow: 0;
  word-break: break-all;
}

.rz-datalist-data {
  padding: 0;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .rz-datalist-data li {
    padding-left: 0;
    padding-right: 0;
  }
}

.rz-card {
  background-color: #EDF3EC;
}

.container::before {
  width: 0;
  background-color: var(--container-color);
  content: "";
  display: inline-block;
  height: 46px;
  position: absolute;
  padding: 10px;
  margin-top: -10px;
  margin-left: -10px;
  border-top-left-radius: var(--rz-card-border-radius);
  border-bottom-left-radius: var(--rz-card-border-radius);
  box-sizing: content-box;
}
@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .container::before {
    border-bottom-left-radius: 0;
  }
}

.rz-datepicker.rz-popup {
  width: 440px !important;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background-color: #C5D8D3;
  width: 6px;
}

::-webkit-scrollbar-thumb {
  width: 6px;
  background-color: #1B1424;
}

@media only screen and (max-width: 768px), only screen and (max-height: 575.98px) and (orientation: landscape) {
  .mobile-hidden {
    display: none;
  }
}

.support-panel {
  position: fixed;
  bottom: 0;
  right: -15px;
  z-index: 1000;
  width: 20px;
  height: 100px;
}
.support-panel:has(.support-content) {
  width: 220px;
  height: 100px;
}
.support-panel span {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  transform: rotate(90deg);
  cursor: pointer;
  border-top: 1px solid #1B1424;
}
.support-panel .support-content {
  margin-left: 5px;
}

@media only screen and (max-width: 768px) {
  .mobile-full {
    width: 100% !important;
  }
}

:root {
  font-family: "Open Sans", sans-serif;
  font-size: 20px;
  color: #1B1424;
  background-color: #C5D8D3;
  --container-color: rgb(0,0,0);
  --active-focus: #EF9F0B;
  --gutter:100px;
  --col-max:240px;
  --col-min:190px;
}

.input-text {
  border: none;
  border-bottom: 1px solid #1B1424;
  width: 200px;
  background-color: #EDF3EC;
  line-height: 20px;
  font-size: 20px;
  font-family: "Open Sans", sans-serif;
}
.input-text:focus {
  outline: none;
}

.component-icon {
  width: 20px;
  height: 20px;
  align-self: center;
  cursor: pointer;
}
.badge .component-icon {
  margin-left: 5px;
}
.button .component-icon {
  width: 15px;
  height: 15px;
  margin-left: 5px;
}

.component {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.component-display-name {
  align-self: center;
}

.badge {
  border-radius: 15px;
  font-size: 19px;
  padding: 5px 8px;
  background-color: #C5D8D3;
  margin-right: 20px;
  margin-bottom: 20px;
  display: inline-flex;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
  line-height: 28px;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  border: 2px solid transparent;
  transition: all 0.3s;
}
.badge:hover {
  border: 2px solid rgba(27, 20, 36, 0.3137254902);
}
.badge:hover img {
  display: block;
}
.badge.active {
  background-color: #EF9F0B;
}
.badge img {
  display: none;
}
.badge a {
  color: #1B1424;
  text-decoration: none;
}

.button {
  border: 2px solid #3EDA4B;
  border-radius: 15px;
  background-color: #EDF3EC;
  color: #3EDA4B;
  padding: 5px 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  display: inline-flex;
  cursor: pointer;
  text-transform: uppercase;
}
.button:hover {
  box-shadow: 0 0 5px #3EDA4B;
}
.button.delete {
  border: 2px solid #DA4B3E;
  color: #DA4B3E;
}
.button.delete:hover {
  box-shadow: 0 0 5px #DA4B3E;
}

.component-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
.component-group .component {
  margin-bottom: 20px;
  margin-right: 20px;
}

.component .select {
  position: relative;
  display: inline-block;
  z-index: 20;
}
.component .select-content {
  min-width: 100%;
  background-color: #C5D8D3;
  margin-top: 8px;
}
.component .select-content.closed {
  display: none;
}
.component .select-content.open {
  display: block;
  position: absolute;
}
.component .select-content span {
  list-style-type: none;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  height: 40px;
  padding-left: 5px;
  font-size: 15px;
}
.component .select-content span img {
  height: 20px;
  padding-right: 5px;
}
.component .select-content span:hover {
  background-color: #EDF3EC;
}
.component .select-content span:hover .checkbox {
  border-color: #C5D8D3;
}
.component .select-display {
  border: 3px solid #C5D8D3;
  padding: 5px 20px;
  cursor: pointer;
  text-transform: uppercase;
  user-select: none;
}

.rz-button-text {
  font-family: "Open Sans", sans-serif;
}

.file-input .file {
  opacity: 0;
  width: 0.1px;
  height: 0.1px;
  position: absolute;
}

.location-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #C5D8D3;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  overflow: auto;
}

.comment {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 4px;
  background-color: #C5D8D3;
  font-size: 14px;
  line-height: 20px;
  font-family: "Open Sans", sans-serif;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
  user-select: none;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  transition: all 0.3s;
  min-width: 400px;
}
.comment.transporter {
  background-color: #EF9F0B;
}
.comment .comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.comment .comment-header .comment-date {
  font-size: 12px;
  color: #1B1424;
}
.comment .comment-body {
  font-size: 14px;
  line-height: 20px;
  font-family: "Open Sans", sans-serif;
}

/** PLANNING & CALENDAR CSS **/

/* Topbar is already sticky; keep */
.planning-topbar {
    position: sticky;
    top: 0;
    background: #EDF3EC;
    z-index: 10;
}

/* Header row aligned with body */
.planning-header-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(27,20,36,.3137254902);
    padding-block: 15px;
    background: #EDF3EC;
    z-index: 10;
}

.spacer {
    flex: 0 0 var(--gutter);
}
/* matches hour gutter width */
.calendar-shell {
    flex: 1 1 auto;
    min-width: 0;
}

/* remove the 20px article padding for this page */

.planning--fullbleed .planning-width {
    width: 100%;
    max-width: none; /* <-- remove calc(7 * var(--col-max)) cap */
    margin-inline: 0; /* <-- no centering gaps */
}

.planning--fullbleed .planning-background {
    margin: 0;
}
/* just in case */
.planning--fullbleed .calendar-grid {
    width: 100%;
}
/* fill shell */

/* Shared width wrapper so header and grid match */
.planning-width {
    width: 100%;
    margin-inline: auto;
}

/* Days header: 7 equal columns */
.planning-days,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

/* Body track: gutter + calendar */
.planning-track {
    display: flex;
}

.hour-gutter {
    height: 2400px;
    width: var(--gutter);
    display: flex;
    flex-direction: column;
    position: sticky;
    left: 0;
    z-index: 5;
    background: #EDF3EC;
}

.calendar-shell {
    flex: 1 1 auto;
    min-width: 0;
}

/* Hour ticks */
.planning-hour {
    height: 100px;
    width: var(--gutter);
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(27,20,36,.3137254902);
    border-right: 1px solid rgba(27,20,36,.3137254902);
}

/* Background hour lines span full calendar width */
.planning-background {
    background-image: repeating-linear-gradient(to bottom, transparent, transparent 99px, rgba(27,20,36,.3137254902) 100px, rgba(27,20,36,.3137254902) 101px);
    background-size: 100% 100px;
}

/* Calendar grid itself fills the shared width */
.calendar-grid {
    height: 2400px;
    position: relative;
    width: 100%; /* critical: the width cap now lives on .planning-width */
}

.calendar-day {
    position: relative;
    box-sizing: border-box;
    border-left: 1px solid #1B142450;
}

    .calendar-day:first-child {
        border-left: 0;
    }

/* Event cards (unchanged; your positioning is inline) */
.planning-row {
    background-color: var(--container-color);
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    cursor: pointer;
}

    .planning-row span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* Responsive tweak: if viewport is narrow, prefer slightly smaller columns */
@media (max-width:1200px) {
    :root {
        --col-max: 200px;
    }
}

/* Selected components bar at bottom */
.selected-components-container {
    position: sticky;
    bottom: 0;
    background: #EDF3EC;
    z-index: 100;
}


/** RIBBON STYLE CALENDAR ROW **/
/* Ribbon row sits under the weekday labels, inside the sticky topbar */
.planning-ribbon-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(27,20,36,.18);
    background: #EDF3EC;
    z-index: 10;
}

/* Ribbon grid: 7 equal columns, auto stack lanes (rows) as needed */
.vessel-ribbons {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 28px; /* lane height */
    gap: 4px 4px; /* row/col gap */
    padding: 6px 0 8px; /* vertical breathing room */
}

/* Individual ribbon pill */
.vessel-ribbon {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0; /* text ellipsis */
    border-radius: 6px;
    padding: 2px 10px;
    box-shadow: 0 1px 0 rgba(0,0,0,.08) inset, 0 1px 2px rgba(0,0,0,.06);
    cursor: pointer;
    overflow: hidden;
}

    .vessel-ribbon span {
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }

    /* Continuation chevrons (if ribbon began before / ends after this week) */
    .vessel-ribbon.continues-left::before,
    .vessel-ribbon.continues-right::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 10px;
        background: linear-gradient(90deg, rgba(0,0,0,.22), rgba(0,0,0,0));
        opacity: .35;
        pointer-events: none;
    }

    .vessel-ribbon.continues-left::before {
        left: 0;
        transform: scaleX(-1);
        border-top-left-radius: 6px;
        border-bottom-left-radius: 6px;
    }

    .vessel-ribbon.continues-right::after {
        right: 0;
        border-top-right-radius: 6px;
        border-bottom-right-radius: 6px;
    }
