

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent the 'outer' scrollbar so only the map/sidebar scroll */
}
   /* ===============================
     Fixed Buttons
     =============================== */
  .fixed-buttons {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
  }

  .fixed-buttons button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background-color 0.2s;
  }

  .fixed-buttons button:hover {
    background-color: #0056b3;
  }


  /* ===============================
     Collapsible/Floating Palette
     =============================== */

  .vertical-header:active {
    cursor: grabbing;
  }

  /* Palette body */

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
  }


  /* ===============================
     Lozenges
     =============================== */
  .lozenge,
  .area-lozenge,
  .tag-lozenge,
  .resource-lozenge,
  .place-lozenge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 2px 6px;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
    cursor: pointer;
    box-sizing: border-box;
    margin: 2px;
    border-radius: 15px;
  }

  .area-lozenge { background-color: #d4edda; }
  .tag-lozenge { background-color: #fff3cd; }
  .resource-lozenge { background-color: #f8d7da; }
  .place-lozenge { background-color: #d1ecf1; }

  .lozenge-selected {
    outline: 2px solid #1890ff;
    background-color: #cceeff !important;
    box-shadow: 0 0 5px rgba(0,136,255,0.6);
  }

  .lozenge.dropped,
  .area-lozenge.dropped,
  .tag-lozenge.dropped,
  .resource-lozenge.dropped,
  .place-lozenge.dropped {
    font-size: 10px;
    padding: 1px 1px;
    margin: 1px 0;
    line-height: 1em;
  }

  .territory-input {
    padding: 10px;
    border: 1px solid #ccc;
    cursor: pointer;
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.accordion-panel {
    border: 1px solid #ccc;
    border-top: none;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    position: absolute; /* Floating dropdown effect */
    width: 100%;
    z-index: 1000;
}




/* Core 'nav' behavior (Missing Bootstrap logic) */
.nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

.nav-item {
    margin-bottom: -1px; /* Ties the tab to the border below it */
}

.nav-item:hover {
    background-color: #007bff;
    color: white;
}

/* The actual clickable tab link */
.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #0d6efd;
    text-decoration: none;
    transition: color .15s ease-in-out, background-color .15s ease-in-out;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.nav-link:hover {
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* Active State */
.nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

  /* ===============================
     Calendar Grid
     =============================== */
  #calendar-grid {
    margin-top: 90px;
    display: flex;
    flex-direction: column;
    gap: 6px; /* vertical gap between week rows */
  }

  /* Default: desktop */
  .week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px; /* reduce horizontal/vertical spacing */
  }

  .slot {
    height: 90px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fafafa;
    box-sizing: border-box;
    overflow: hidden;
    font-size: 0.85em;
  }

  .slot:hover {
    background-color: #cce5ff;
    cursor: pointer;
  }

  .day-column, .empty-day {
    height: 300px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 1px; /* controls vertical spacing between slots */
    padding: 0; /* remove extra padding inside column */
  }

  .day-column.today-cell {
    border: 4px double #007BFF !important;
  }

  .day-header {
    background-color: #e0e0e0;
    padding: 4px;
    text-align: center;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
  }


  /* ===============================
     Mobile Media Queries
     =============================== */

/* Portrait: one column per week */
@media (max-width: 900px) and (orientation: portrait) {
  .week-row {
    grid-template-columns: 1fr;
    gap: 1px; /* smaller vertical gap */
  }
  .slot {
    width: 100%;
    height: 70px;
    font-size: 0.75em;
    background-color: #ffe6ea;
  }
}

/* Landscape: 7 columns scaled down */
@media (max-width: 900px) and (orientation: landscape) {
  .week-row {
    grid-template-columns: repeat(7, 1fr);
    gap: 1px; /* smaller horizontal gap */
  }
  .slot {
    width: auto;
    height: 55px;
    font-size: 0.7em;
    background-color: #e6f0ff;
  }
}


.nav-link.active {
  background-color: #007bff;
  color: white;
}

.section {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.maximpact-label {
  font-size: 1.2em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}
.maximpact-checkbox {
  width: 24px;
  height: 24px;
  accent-color: #ff0000; /* Bright red tick (modern browsers only) */
  transform: scale(1.5);  /* Fallback for browsers that don't support accent-color */
  cursor: pointer;
  border: 2px solid #444;
}

.tag-existing {
  border: 2px solid blue;
  background-color: #E0D4F7;
  color: blue;
}

.tag-new {
  border: 2px solid red;
  background-color: #D6E9FF;
  color: red;
}

#streamProcessing {
    background-color: #f9f9f9;
}

#importTable {
    background-color: #f1f1f1;
}

#file-info-table .fixlevel {
    width: 70px;
}

#file-info-table input[type="number"] {
    box-sizing: border-box;
}

#file-info-table td {
    vertical-align: middle;
}

#file-info-table input[type="checkbox"] {
    width: auto;
    margin: 0 auto;
    display: block;
}

body
{
			margin: 0;
			padding: 0;
			overflow: auto;
			height: 100%;
			max-height: 100%;
			font-family:Arial, Helvetica, sans-serif;
			line-height: 1.5em;
}
body.protected #content { display: none; }
body.protected #login { display: block; }

body.unlocked #content { display: block; }
body.unlocked #login { display: none; }



#main {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevents the whole page from scrolling */
}

header {
    height: 50px; /* Example height */
}

/* 1. The Outer Frame */
#app-layout {
    display: flex;
    flex-direction: row; /* Main left, Sidebar right */
    width: 100vw;
    height: 100vh;
    gap: 11px;
    overflow: hidden;
}

/* 2. The Right Sidebar (The Stack) */
#sidebar {
      display: flex;
      flex-direction: column;
      height: 100vh;      /* Force sidebar to be exactly the screen height */
      overflow: hidden;   /* DO NOT let the sidebar itself scroll */
      flex: 0 0 310px;
      width: 310px;}

/* 3. The Nav (Top of Sidebar) */
#nav-sidebar {
    flex: 1;            /* Take all available space... */
    min-height: 0;      /* ...BUT allow it to be smaller than its content */
    overflow-y: auto;   /* Show a scrollbar ONLY here if the list is long */
    background: #DAE9BC;
}

/* 4. The Logs (Bottom of Sidebar) */
#log-sidebar-container {
  flex: 0 0 200px;    /* Lock this to exactly 200px (adjust as needed) */
  height: 200px;
  background: #111;   /* Black background so it stands out */
  color: #0f0;
  border-top: 3px solid #444;
  overflow-y: auto;   /* Internal scrolling for logs */
}
#logwin {
    /* REMOVE: position: fixed, bottom, right, width: 310px */
    height: 100%;      /* Fill the height of the 35% lower area */
    width: 100%;       /* Fill the width of #lower-sidebar */
    background: #111;
    color: #0f0;
    padding: 5px;
    font-family: monospace;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#lower-sidebar {
    flex: 0 0 300px;    /* This says: "Stay exactly 300px tall at the bottom" */
    flex: 0 0 310px; /* Symmetry with left sidebar */
    border-left: 1px solid #ccc;
    height: 300px;
    background: #111;   /* Black background for logs */
    border-top: 2px solid #444;
    overflow-y: auto;   /* Scroll inside the log window */
    display: block !important;
    visibility: visible !important;
}

#footer {
	bottom: 0;
	right : 230px;
	left: 20px;
	height: 100px;
	overflow: hidden; /* Disables scrollbars on the header frame. To enable scrollbars, change "hidden" to "scroll" */
	background: white;
}

#selectedTitle {
  font-weight: bold;
}

/* Bottom panel */


.stay-on-top {
  z-index: 999999 !important;
  position: relative !important;
}


.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4CAF50;
}

input:checked + .slider:before {
  transform: translateX(22px);
}



/* 3. Force the Folium Iframe to fill ONLY this 65% space */
#iframe-container, #iframe1 {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
}


/* When iframe is active */
#iframe1.map-active {
  position: relative !important;
  z-index: 99 !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}

/* When dimming modal */
.dimmed {
  opacity: 0.35 !important;
  pointer-events: none !important;
}

/* Calendar hidden by default but stays in document flow */

/* Mapwin = fixed-size container (height of screen minus margins) */

/* Top-level app layout */

/* Sidebar (NAV) */
/* 1. The Container: Force it to be the full screen width */
/* 1. Sidebar on left, content area on right */


/* 1. Main Layout: Sidebar vs Content */


/* 2. Content Column: Map (Top) vs Data/Logs (Bottom) */
/* 1. Ensure the parent doesn't allow any overflow bleeding */
#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: #fff;
}

/* 2. Lock the Map height using calc to account for gaps/borders */
#mapwin {
  flex: 0 0 calc(70% - 11px) !important;
    height: calc(70% - 11px) !important;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.filename-box {
  width: 150px;
  max-width: 150px;

  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;

  text-overflow: ellipsis;

  padding: 2px 6px;
  border: 1px solid #ccc;
  background: #fff;

  font-family: monospace;
  cursor: default;
}

/* Ensure the Leaflet container inside also respects the height */
#mapwin > .folium-map {
    height: 100% !important;
    width: 100% !important;
}



/* 4. Lock the Lower Section to the remaining 35% */
#lower-layout {
  flex: 0 0 30% !important;
    height: 30% !important;
    display: flex;
    flex-direction: row;
    border-top: 2px solid #ccc;
    background: white;
    z-index: 10; /* Ensures it stays "on top" of any Folium markers */
}

/* 5. Data area within the Lower Section */
#lower-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%; /* Fills the 30% parent */
}

/* Ensure the datawin inside #lower-main fills it correctly */
#datawin {
  display: flex !important;
      flex-direction: column !important;
      height: 100% !important;
      width: 100% !important;
      margin: 0 !important;
      padding: 0 !important; /* This kills the 'innertube' space */
      overflow: hidden !important;
    }

/* Ensure the table scrolling still works */
#datawin > div {
    flex: 1;
    overflow-y: auto;
}
#datawin  td:nth-child(1), #datawin  th:nth-child(1),#datawin  td:nth-child(2), #datawin  th:nth-child(2),#datawin  td:nth-child(3), #datawin  th:nth-child(3),#datawin  td:nth-child(4), #datawin  th:nth-child(4),#datawin  td:nth-child(5), #datawin  th:nth-child(5),
#datawin  td:nth-child(6), #datawin  th:nth-child(6),#datawin  td:nth-child(7), #datawin  th:nth-child(7),#datawin  td:nth-child(8), #datawin  th:nth-child(8),#datawin  td:nth-child(9), #datawin  th:nth-child(9),
#datawin  td:nth-child(10), #datawin  th:nth-child(10),#datawin  td:nth-child(11), #datawin  th:nth-child(11),#datawin  td:nth-child(12), #datawin  th:nth-child(12),#datawin  td:nth-child(13), #datawin  th:nth-child(13),#datawin  td:nth-child(14), #datawin  th:nth-child(14)
 { /* 2-13 columns */
    width: 12px;
    min-width: 12px;
    max-width: 12px;
    overflow: hidden;
    white-space: nowrap; /* Prevents text from wrapping */
}

#calendar {
    position: absolute;
    inset: 0;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    background: white;   /* toggle via JS */
    z-index: 200;           /* HIGHER than iframe */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}


#calendar-header {
    flex: 0 0 auto; /* fixed height */
    background: white;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
    z-index: 300;
}

/* Only this scrolls */

#calendar-scroll {
    position: relative;

    /* 1. Allows it to fill the remaining space below the header */
    flex: 1 1 auto;

    /* 2. CRITICAL FIX: Allows the flex item to shrink (vertically)
       to fit the container's calculated height, rather than the height
       of its content. */
    min-height: 0;

    /* 3. Enables vertical scrolling if content is too tall */
    overflow-y: auto;

    padding: 5px;
    z-index: 300;
}

#calendar-scroll.add-place-active {
    opacity: 0 !important;
    pointer-events: none !important;
}
/* Login screen on top of everything initially */

#loginScreen {
    visibility: visible;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    z-index: 400;
}

/* add to your CSS */
#loginScreen.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#loginMessage {
  transition: opacity 0.5s ease-in-out;
  opacity: 0; /* start hidden */
}
#loginMessage.show {
  opacity: 1; /* fade in */
}

/* Fullscreen map iframe */
#overlay-iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto;
}

/* Close button */
#close-overlay {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999; /* above iframe */
  padding: 5px 10px;
  background: white;
  border: 1px solid #333;
  border-radius: 4px;
  pointer-events: auto;
}


/* Calendar styles (unchanged) */

.slot { position: relative; height: 90px; width: 100%; border: 1px solid #ddd; border-radius: 4px; background-color: #fafafa; box-sizing: border-box; padding: 1px 6px; overflow: hidden; font-size: 0.85em; line-height: 1.2em; }
.slot-time { font-size: 0.75em; font-weight: 600; color: #666; margin-right: 0.4em; vertical-align: baseline; }
.slot-content { display: inline; word-break: break-word; }
.slot small { color: #555; display: block; }
.slot-label { position: absolute; top: 2px; left: 4px; font-size: 0.75em; color: #666; pointer-events: none; z-index: 200; background: rgba(255,255,255,0.85); border-radius: 3px; padding: 0 4px; white-space: nowrap; --label-width: calc(100% + 8px); }
.slot::before { content:""; display:block; width:calc(var(--label-width,3em)+6px); height:0; flex:0 0 auto; }
.slot .lozenge { margin:0; padding:0 4px; font-size:0.8em; line-height:1em; display:inline-block; border-radius:4px; white-space:nowrap; opacity:1; }
.slot .lozenge[data-type="activity"] { background: rgba(204,229,255,0.9); }
.slot .lozenge[data-type="resource"] { background: rgba(212,237,218,0.9); }
.slot .lozenge[data-type="place"] { background: rgba(255,243,205,0.9); }
.slot .lozenge[data-type="area"] { background: rgba(248,215,218,0.9); }
.election-highlight { border: 2px double red !important; box-sizing: border-box; }
.today-highlight { border: 2px double blue !important; box-sizing: border-box; }
/* Container to align label and switch */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 12px; /* space between label and switch */
  font-family: sans-serif;
  margin: 10px 0;
}

.toggle-label {
  font-size: 16px;
  color: #333;
}


/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

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

.stay-on-top {
  z-index: 999999 !important;
  position: relative !important;
}


.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4CAF50;
}

input:checked + .slider:before {
  transform: translateX(22px);
}


/* When dimming modal */
.dimmed {
  opacity: 0.35 !important;
  pointer-events: none !important;
}

  /* Calendar hidden by default but stays in document flow */



/* Fullscreen overlay */
#map-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998; /* ABOVE bootstrap modal (modal = 1050) */
    pointer-events: none; /* allows clicks to pass through */
}

/* Container that holds the iframe */
#map-overlay-container {
    width: 100%;
    height: 100%;
    position: relative;
    pointer-events: auto; /* container still receives events */
}


#close-overlay:hover {
    cursor: pointer;
    background: #f0f0f0;
}



/* Title stays fixed at top */


#tabletitle {
  flex: 0 0 34px !important; /* Force it to stay exactly 34px, no growing */
      height: 34px !important;
      display: flex !important;
      flex-direction: row !important;
      justify-content: space-between !important;
      align-items: center !important;
      padding: 0 10px !important;
      margin: 0 !important;
      background: #f1f1f1;
      border-bottom: 1px solid #ccc;
      box-sizing: border-box;
}

.title-group, .bulk-actions {
  display: flex !important;
      align-items: center !important;
      gap: 8px !important;
      height: 100% !important;
      margin: 0 !important;                   /* Space between the label, the select, and the button */
}

/* Remove default margins that push buttons off-alignment */
#tabletitle select,
#tabletitle button,
#tabletitle span {
    margin: 0;
    font-size: 0.85rem;         /* Slightly smaller text keeps the bar slim */
    height: 28px;               /* Force everything to the same physical height */
    line-height: 1;
}

#tableSelector, #groupActionSelect, #btnRunGroupAction {
    margin: 2px 0; /* Tighten up the vertical footprint of the inputs */
    padding: 2px 5px;
    font-size: 0.9rem;
}

#lower-main {
    display: flex;
    flex-direction: column;
    gap: 0; /* Removes the 11px gap if it was inheriting it from #app-layout */
}

.table-container {
  flex: 1 !important; /* Takes the rest of the 35% area */
      display: block !important;
      overflow-y: auto !important;
      margin: 0 !important;
      padding: 0 !important;
    }

/* Table header stays fixed while scrolling */
#content-table {
  width: 100%;
      border-collapse: collapse !important;
      margin-top: 0 !important; /* Kill default Bootstrap table margin */
}

#content-table th,
#content-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#nav {
    /* REMOVE: position: fixed, top, right, height: 800px */
    width: 100%;       /* Fill the 310px sidebar */
    background: #DAE9BC;
    color: black;
    padding: 5px;
    font-size: 1em;
    opacity: 0.8;
    /* Optional: if you want it to scroll if it's too long */
    overflow-y: auto;
}

#chartContainer {
  width: 250px;
  height: 250px;
  position: relative;
}

#streamChart {
  display: block;
  width: 100%;
  height: 100%;
}



.innertube {
	margin: 5px; /* Provides padding for the content */
}

p {
	color: #555;
}

nav ul {
	list-style-type: square;
	margin: 0;
	padding: 0;
}

nav ul a {
	color: darkgreen;
	text-decoration: none;
}
.centred {
	text-align: center;
}
.flashes {
	font-color: red;
	font-weight: bold;
	text-align: left;
}

.tab-button {
  padding: 10px 20px;
  border: 1px solid #ccc;
  border-bottom: none;
  background-color: #f0f0f0;
  cursor: pointer;
}

.tab-button.active-tab {
  border: 2px solid #007bff;
  border-bottom: none;
  background-color: #ffffff;
  font-weight: bold;
  color: #007bff;
}
.election-tab {
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-bottom: none;
  background-color: #f1f1f1;
  cursor: pointer;
  margin-right: 4px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  font-weight: bold;
}

.election-tab:hover {
  background-color: #e7e7e7;
}

.election-tab.active {
  background-color: #ffffff;
  border-bottom: 2px solid white;
  border-color: #ccc #ccc white;
}

.tab-item {
  position: relative;
}

.delete-tab-btn {
  position: absolute;
  top: 2px;
  right: 6px;
  color: red;
  font-weight: bold;
  cursor: pointer;
  display: none; /* hidden by default */
}

.tab-item:hover .delete-tab-btn {
  display: inline; /* only show on hover */
}

.text-wrapper {
    width: 200px; /* set a width for the wrapping container */
    word-wrap: normal; /* ensures the text wraps to the next line if it overflows the container */
}

.lefted {
	text-align: left;
	padding-left : 5px;
}

.leftedmerge {
	text-align: left;
	padding-left : 5px;
   border-right: none;
   white-space: nowrap;
}

.righted {
	text-align: right;
	padding-right : 5px;

}

input.right-cropped {
  text-align: right;
  direction: rtl;
  unicode-bidi: plaintext;
}

.rightedmerge {
	text-align: right;
	padding-right : 5px;
  border-left: none;
}

.coded {
	text-align: center;
	padding-right : 10px;
}

.newpage {
  page-break-before: always;
}

.collapsible:after {
  content: '\002B';
  color: white;
  font-weight: bold;
  float: right;
  margin-left: 5px;
}

.active:after {
  content: "\2212";
}

.content {
  padding: 0 30px;
  position: absolute;
  max-height: 0;
  overflow: auto;
  transition: max-height 0.2s ease-out;
  background-color: #f1f1f1;
}

.mapwardname {
  color: yellow;
  font-size: 1em;
  font-weight: bold;
  font-size: 100%;
  line-height: 2;
}

.maptitle {
  color: darkgray;
  font-size: 2em;
  font-weight: bold;
  font-size: 100%;
  line-height: 3;
  text-align: center;
}


.open-button {
  background-color: #555;
  color: white;
  padding: 0 0 ;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  position: relative;
  bottom: 0;
  right: 40;
  width: 100px;
}

/* The popup form - hidden by default */
.form-popup {
  display: none;
  background-color : white;
  position: relative;
  right: 30px;
  border: 3px solid #f1f1f1;
  z-index: 9;
  width: 300px;
}

.login-container {
	position: absolute;
  width: 100%;
  height: 100%;
  max-height: 400px;
  z-index: 15;
  top: 50%;
  left: 50%;
	border-radius: 8pt;
  margin: -250px 0 0 -250px;
	margin: 20;
  max-width: 600px;
  padding: 10px;
  background-color: #00bed6;
	font-family 'Franklin Gothic Medium', 'Arial Narrow';
}

.logentry {
	height :2em;
	font-size:2em;
}
/* Add styles to the form container */
.form-container {
  max-width: 300px;
  padding: 10px;
  background-color: white;
}

/* Full-width input fields */
.form-container input[type=text], .form-container input[type=password] {
  width: 100%;
  padding: 15px;
  margin: 5px 0 22px 0;
  border: none;
  background: #f1f1f1;
}

/* When the inputs get focus, do something */
.form-container input[type=text]:focus, .form-container input[type=password]:focus {
  background-color: #ddd;
  outline: none;
}

/* Set a style for the submit/login button */
.form-container .btn {
  background-color: #04AA6D;
  color: white;
  padding: 16px 20px;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-bottom:10px;
  opacity: 0.8;
}

/* Add a red background color to the cancel button */
.form-container .cancel {
  background-color: red;
}

/* Add some hover effects to buttons */
.form-container .btn:hover, .open-button:hover {
  opacity: 1;
}

table {
	page-break-inside: auto;
  font-family: arial, sans-serif;
  border-collapse: collapse;
  width: 100%;
  border-spacing:10;
  margin-left: 10px;
}

tbody {
    overflow-y: auto;    /* Trigger vertical scroll    */
    overflow-x: hidden;  /* Hide the horizontal scroll */
}

table thead {
   	display:table-header-group;
   	font-weight: bold;
}

tfoot {
        display: table-footer-group;
				font-weight: bold;
}

table tr td {
	page-break-inside: avoid;
	font-size: 12pt;
  font-family:'Arial',Times,serif;
	border:1px solid navy;
}

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



.er-table {
  border-collapse: collapse;
  width: 95%;
  max-width: 1200px; /* optional, for consistency */
  margin: 20px auto;
  table-layout: fixed;  /* 🔧 forces column widths to respect your percentages */
}
th, td {
border: 1px solid #aaa;
padding: 8px;
text-align: center;
overflow: hidden;         /* 👈 prevents content from breaking the layout */
text-overflow: ellipsis;  /* 👈 adds ... if content too long */
white-space: nowrap;      /* 👈 prevents wrapping; use 'normal' if you want wrap */
}
  /* Column width by percentage */
.er-table th:nth-child(1),
.er-table td:nth-child(1) {
width: 5%;
}

.er-table th:nth-child(2),
.er-table td:nth-child(2) {
width: 25%;
}

.er-table th:nth-child(3),
.er-table td:nth-child(3) {
width: 5%;
}

.er-table th:nth-child(4),
.er-table td:nth-child(4) {
width: 15%;
}

.er-table th:nth-child(5),
.er-table td:nth-child(5) {
width: 15%;
}

.er-table th:nth-child(6),
.er-table td:nth-child(6) {
width: 10%;
}

.er-table th:nth-child(7),
.er-table td:nth-child(7) {
width: 25%;
}
tr:has(.selectRow:checked) > td {
  background-color: #ccc;
}

/*! Guilfoss Design System 1.21 */
:root {
    --guil-g-color-border-base-1: #c9c9c9;
    --guil-g-color-border-base-2: #aeaeae;
    --guil-g-color-border-base-3: #939393;
    --guil-g-color-border-base-4: #747474;
 }

/*! normalise.css v3.0.2 | MIT License | git.io/normalise */

html {
    font-family: sans-serif;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust:100%
}

article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
    display:block
}


a {
    background-color:transparent
}

a:active, a:hover {
    outline:0
}

abbr[title] {
    border-bottom:1px dotted
}

b, strong {
    font-weight:700;
    color: gray
}

dfn {
    font-style:italic
}

h1 {
    position : relative;
    text-align : center;
		font-size: 3em;
    font-weight: bold;
    margin: .67em 0
}

mark {
    background: #ff0;
    color:#000
}

small {
    font-size:80%
}

sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align:baseline
}

sup {
    top:-.5em
}

sub {
    bottom:-.25em
}

img {
    border:0
}

svg:not(:root) {
    overflow:hidden
}

figure {
    margin:1em 40px
}

hr {
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
    height:0
}

pre {
    overflow:auto
}

code, kbd, pre, samp {
    font-family: monospace, monospace;
    font-size:1em
}

button, input, optgroup, select, textarea {
    color: inherit;
    font: inherit;
    margin:0
}

button {
    overflow:visible
}

button, select {
    text-transform:none
}

button, html input[type=button], input[type=reset], input[type=submit] {
    -webkit-appearance: button;
    cursor:pointer
}

button[disabled], html input[disabled] {
    cursor:default
}

button::-moz-focus-inner, input::-moz-focus-inner {
    border: 0;
    padding:0
}

input {
    line-height:normal
}

input[type=checkbox], input[type=radio] {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    padding:0
}

input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button {
    height:auto
}

input[type=search] {
    -webkit-appearance: textfield;
    -webkit-box-sizing: content-box;
    box-sizing:content-box
}

input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration {
    -webkit-appearance:none
}

fieldset {
    border: 1px solid silver;
    margin: 0 2px;
    padding:.35em .625em .75em
}

legend {
    border: 0;
    padding:0
}

textarea {
    overflow:auto
}

optgroup {
    font-weight:700
}

tr {
position: relative;
}


td, th {
    color: indigo;
    padding:0;
		font-size: 12pt;
}

*, :after, :before {
    -webkit-box-sizing: border-box;
    box-sizing:border-box
}

::-webkit-input-placeholder {
    color: var(--guil-g-color-neutral-base-50, #747474);
    font-weight: 400;
    opacity:1
}

::-moz-placeholder {
    color: var(--guil-g-color-neutral-base-50, #747474);
    font-weight: 400;
    opacity:1
}

:-ms-input-placeholder {
    color: var(--guil-g-color-neutral-base-50, #747474);
    font-weight: 400;
    opacity:1
}

::-ms-input-placeholder {
    color: var(--guil-g-color-neutral-base-50, #747474);
    font-weight: 400;
    opacity:1
}

::placeholder {
    color: var(--guil-g-color-neutral-base-50, #747474);
    font-weight: 400;
    opacity:1
}

::-moz-selection {
    background: var(--guil-g-color-brand-base-90, #d8e6fe);
    text-shadow: none;
    color:var(--guil-g-color-neutral-base-10, #181818)
}

::selection {
    background: var(--guil-g-color-brand-base-90, #d8e6fe);
    text-shadow: none;
    color:var(--guil-g-color-neutral-base-10, #181818)
}

html {
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
    font-size: 10pt;
    line-height: 1.25;
    background: #eef4ff;
    color: var(--guil-g-color-neutral-base-10, #181818);
    -webkit-tap-highlight-color:rgba(0, 0, 0, 0)
}


/* Fix the spacing leak */
dl, fieldset, h1, h2, h3, h4, h5, h6, ol, p { /* Removed trailing comma */
    margin: 0;
    padding: 0; /* Changed from 20 20 to 0 or something much smaller */
}

dd, figure {
    margin:0
}

abbr[title] {
    text-decoration:none
}

abbr[title], fieldset, hr {
    border:0
}

hr {
    padding:0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: inherit;
    font-size: 1em;
}


ol, ul {
    list-style:none;
    margin-bottom: 2px;
}

a {
    color: #0176d3;
    text-decoration: none;
    -webkit-transition: color .1s linear;
    transition:color .1s linear;
}

a:focus, a:hover {
    text-decoration: underline;
    color:#014486;
}

a:active {
    color:#014486
}

a:focus-visible {
    outline-color:var(--guil-g-color-palette-blue-50, #0176d3)
}

a, button {
    cursor:pointer
}

dfn, strong {
    font-weight:700
}

mark {
    background-color: var(--guil-g-color-palette-yellow-90, #fff03f);
    color:var(--guil-g-color-neutral-base-10, #181818)
}

abbr[title] {
    cursor:help
}

/* keep your existing rule */
input[type=search] {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* position the search bar inside the map */
#mapwin input[type="search"] {
    position: absolute;
    top: 10px;
    right: 80px;   /* move it left of the layer control */
    z-index: 900;
    width: 220px;
}

/* ensure the layer control sits above it */
#mapwin .leaflet-control-layers {
    z-index: 1000;
}

input[type=text] {
    border: none;
}
caption, td, th {
    text-align:center;

}

h2 {
	text-align: center;
	font-size: 10pt;
	font-weight: bold;
  z-index: 10;
}

h3 {
	text-align: center;
	font-size: 8pt%;
	font-weight: bold;
}

.guil-button--small, .guil-button_small {
    line-height: 1.75rem;
    min-height:2rem
}

.guil-button {
    position: relative;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: var(--guil-c-button-spacing-block-start, var(--sds-c-button-spacing-block-start, 0)) var(--guil-c-button-spacing-inline-end, var(--sds-c-button-spacing-inline-end, 0)) var(--guil-c-button-spacing-block-end, var(--sds-c-button-spacing-block-end, 0)) var(--guil-c-button-spacing-inline-start, var(--sds-c-button-spacing-inline-start, 0));
    background: none;
    background-color: var(--guil-c-button-color-background, var(--sds-c-button-color-background, transparent));
    background-clip: border-box;
    border: var(--guil-c-button-sizing-border, var(--sds-c-button-sizing-border, 1px)) solid var(--guil-c-button-color-border, var(--sds-c-button-color-border, transparent));
    border-radius: var(--guil-c-button-radius-border, var(--sds-c-button-radius-border, .25rem));
    -webkit-box-shadow: var(--guil-c-button-shadow, var(--sds-c-button-shadow));
    box-shadow: var(--guil-c-button-shadow, var(--sds-c-button-shadow));
    line-height: var(--guil-c-button-line-height, var(--sds-c-button-line-height, 1.875rem));
    text-decoration: none;
    color: var(--guil-c-button-text-color, var(--sds-c-button-text-color, #0176d3));
    -webkit-appearance: none;
    white-space: normal;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select:none
}

.guil-radio .guil-radio--faux, .guil-radio .guil-radio_faux {
    width: 1rem;
    height: 1rem;
    display: inline-block;
    position: relative;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    vertical-align: middle;
    border: 1px solid var(--guil-c-radio-color-border, var(--sds-c-radio-color-border, var(--guil-g-color-border-base-4, #c9c9c9)));
    border-radius: 50%;
    background: none;
    background-color: var(--guil-c-radio-color-background, var(--sds-c-radio-color-background, var(--guil-g-color-neutral-base-100, #fff)));
    -webkit-box-shadow: var(--guil-c-radio-shadow, var(--sds-c-radio-shadow));
    box-shadow: var(--guil-c-radio-shadow, var(--sds-c-radio-shadow));
    -webkit-transition: border .1s linear, background-color .1s linear;
    transition:border .1s linear, background-color .1s linear
}

.guil-radio [type=radio]:checked + .guil-radio__label .guil-radio_faux, .guil-radio [type=radio]:checked + .guil-radio_faux, .guil-radio [type=radio]:checked ~ .guil-radio--faux, .guil-radio [type=radio]:checked ~ .guil-radio_faux {
    border-color: var(--guil-c-radio-color-border-checked, var(--sds-c-radio-color-border-checked, var(--sds-c-radio-color-border, var(--guil-g-color-border-base-4, #c9c9c9))));
    background: none;
    background-color:var(--guil-c-radio-color-background-checked, var(--sds-c-radio-color-background-checked, var(--sds-c-radio-color-background, var(--guil-g-color-neutral-base-100, #fff))))
}

.guil-radio [type=radio]:checked + .guil-radio__label .guil-radio_faux:after, .guil-radio [type=radio]:checked + .guil-radio_faux:after, .guil-radio [type=radio]:checked ~ .guil-radio--faux:after, .guil-radio [type=radio]:checked ~ .guil-radio_faux:after {
    width: .5rem;
    height: .5rem;
    content: "";
    position: absolute;
    top: 50%;
    /*! @noflip */
    left: 50%;
    -webkit-transform: translate3d(-50%, -50%, 0);
    transform: translate3d(-50%, -50%, 0);
    border-radius: 50%;
    background: none;
    background-color:var(--guil-c-radio-mark-color-foreground, var(--sds-c-radio-mark-color-foreground, #0176d3))
}

 .guil-radio [type=radio]:focus ~ .guil-radio_faux {
    border-color: var(--guil-c-radio-color-border-focus, var(--guil-c-radio-color-border-focus, var(--guil-g-color-border-base-4, #c9c9c9)));
    -webkit-box-shadow: var(--guil-c-radio-shadow-focus, var(--sds-c-radio-shadow-focus, var(--_guil-g-shadow-outset-focus, 0 0 3px #0176d3)));
    box-shadow: var(--guil-c-radio-shadow-focus, var(--sds-c-radio-shadow-focus, var(--_guil-g-shadow-outset-focus, 0 0 3px #0176d3)));
    outline:0
}


.guil-radio_button-group {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    border: 1px solid var(--guil-g-color-border-base-4, #e5e5e5);
    border-radius:.25rem
}

.SAVE {
width: 14 rem;
height: 3 rem;
display: inline-block;
}

.SEND {
width: 6.5rem;
height: 1.5rem;
display: inline-block;
}

.guil-radio_button {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    border: 0;
    border-radius: 0;
    background-clip:padding-box
}

.guil-action_button {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    border: 0;
    border-radius: 0;
    background-clip:padding-box
		width: 100px;
}

.guil-action--faux, .guil-action_faux {
    width: 6rem;
    height: 1rem;
    display: inline-block;
    position: relative;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    vertical-align: middle;
    border: 1px solid var(--guil-c-radio-color-border, var(--sds-c-radio-color-border, var(--guil-g-color-border-base-4, #c9c9c9)));
    border-radius: 50%;
    background: none;
    background-color: var(--guil-c-radio-color-background, var(--sds-c-radio-color-background, var(--guil-g-color-neutral-base-100, #fff)));
    -webkit-box-shadow: var(--guil-c-radio-shadow, var(--sds-c-radio-shadow));
    box-shadow: var(--guil-c-radio-shadow, var(--sds-c-radio-shadow));
    -webkit-transition: border .1s linear, background-color .1s linear;
    transition:border .1s linear, background-color .1s linear
}

.guil-radio--button .guil-radio_faux, .guil-radio_button .guil-radio--faux, .guil-radio_button .guil-radio_faux {
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
    vertical-align:middle
}


.guil-radio--button + .guil-radio_button, .guil-radio_button + .guil-radio--button, .guil-radio_button + .guil-radio_button {
    border-left: 1px solid var(--guil-g-color-border-base-4, #e5e5e5);
    margin:0
}

.guil-radio_button [type=radio] {
    width: 1px;
    height: 1px;
    border: 0;
    clip: rect(0 0 0 0);
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position:absolute
}

.guil-radio--button [type=radio]:checked + .guil-radio_faux, .guil-radio--button [type=radio]:checked ~ .guil-radio--faux, .guil-radio--button [type=radio]:checked ~ .guil-radio_faux, .guil-radio_button [type=radio]:checked + .guil-radio--button__label, .guil-radio_button [type=radio]:checked + .guil-radio--faux, .guil-radio_button [type=radio]:checked + .guil-radio_button__label, .guil-radio_button [type=radio]:checked + .guil-radio_faux, .guil-radio_button [type=radio]:checked ~ .guil-radio--faux, .guil-radio_button [type=radio]:checked ~ .guil-radio_faux {
    background-color: #0176d3;
    color:var(--guil-g-color-neutral-base-100, #fff)
}

.guil-radio_button__label {
    background-color:var(--guil-g-color-neutral-base-100, #fff)
}

.guil-radio_button__label:focus, .guil-radio_button__label:hover {
    cursor:pointer
}



html {
    font-size:10pt;
}



.border-width, .shadow {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap:1rem
}

.grid_container {
    border: 1px solid black;
    display: grid;
    grid-template-columns: 50px 50px 50px;
    grid-template-rows: 50px 50px;
    background-color: green;
    padding: 10px;
}

.small_btn {
    width: 100%;
    height: 50px;
}

.big_btn {
    width: 100%;
    height: 50px;
}

#second {
    border: 1px solid black;
    border-radius: 5px;
    height: 90vh;
    width: 50%;
    margin-left: 10px;
}

.grid-container {
    display: grid;
    grid-template-areas: "button1 button2 button3"
                         "button4 button5 button5";
    grid-gap: 5px;
}

.grid-item:nth-child(1) {
    grid-area: button1;
}

.grid-item:nth-child(2) {
    grid-area: button2;
}

.grid-item:nth-child(3) {
    grid-area: button3;
}

.grid-item:nth-child(4) {
    grid-area: button4;
}

.grid-item:nth-child(5) {
    grid-area: button5;
}

.border-radius {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 1fr var(--sds-g-sizing-9);
    gap:1rem;
}

.border-radius [data-value], .border-width [data-value], .shadow [data-value] {
    background: var(--sds-g-color-surface-container-1);
    border-radius: 8px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: .125rem;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    text-align: center;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    font-size: var(--sds-g-font-scale-neg-3);
    font-family: var(--sds-g-font-family-monospace);
    aspect-ratio:var(--sds-g-ratio-square)
}
