/* Toggle switch (iOS-stil) */
.toggle-switch { position:relative; display:inline-block; width:50px; height:28px; flex-shrink:0; }
.toggle-switch input { opacity:0; width:0; height:0; }
.toggle-slider {
  position:absolute; cursor:pointer; inset:0;
  background:#c0392b; border-radius:28px; transition:background .25s;
}
.toggle-slider::before {
  content:""; position:absolute; width:22px; height:22px;
  left:3px; bottom:3px; background:#fff; border-radius:50%; transition:transform .25s;
}
.toggle-switch input:checked + .toggle-slider { background:#27ae60; }
.toggle-switch input:checked + .toggle-slider::before { transform:translateX(22px); }

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

/* Page styles */

body, h1, h2, h3, p, td, quote, small, form, input, ul, li, ol, label {
    margin: 0px;
    padding: 0px;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    margin-top: 20px;
    color: #51555C;
    font-size: 13px;
    background-color: #123456;
    text-align: center;
}

.clear {
    clear: both;
}

a, a:visited {
    color: #007bc4;
    text-decoration: none;
    outline: none;
}

a:hover {
    text-decoration: underline;
}

#rounded {
    max-width: 1500px;
    margin: 20px auto;
    padding: 0 clamp(8px, 2vw, 20px);
    text-align: left;
}

.container {
    background-color: #FFFFFF;
    padding: clamp(8px, 2vw, 20px);
    border-radius: 10px;
    width: 100%;
}

h1 {
    font-size: 28px;
    font-weight: bold;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}

h2 {
    font-weight: normal;
    font-size: 20px;
    color: #999999;
}

ul {
    margin: 30px 0px;
    padding: 0;
}

li {
    list-style: none;
    display: block;
    float: left;
    width: auto;
    position: relative;
}

li a, li a:visited {
    padding: 10px 16px;
    text-align: left;
    background-color: #000033;
    color: white;
    border-radius: 8px;
    display: block;
    margin-right: 4px;
    font-size: 1.3em;
    font-weight: 500;
    transition: background .15s;
}

li a:hover {
    background-color: #666666;
    text-decoration: none;
}

#pageContent {
    margin-top: 20px;
    border: 1px dashed #cccccc;
    padding: clamp(8px, 2vw, 20px);
    border-radius: 8px;
    width: 100%;
}

#loading {
    visibility: hidden;
}

.demo {
    color: white;
}

.loadbox {
    text-align: center;
    width: 100%;
    max-width: 500px;
}

/* Burger Menu Styles */
#primary_nav_wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    position: relative;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
}

.burger-line {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #000033;
}

/* Dropdown Indicator */
.submenu-indicator {
    font-size: 0.8em;
    margin-left: 5px;
}

/* Nav: menu til venstre, logo til højre */
#primary_nav_wrap > ul {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
#primary_nav_wrap .nav-logo {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
}
#primary_nav_wrap .nav-logo img {
  display: block;
  height: clamp(32px, 15vw, 150px);
  transition: height .2s ease;
}

/* Burger-knap justering */
#burger-menu { margin-right: 6px; }

/* Mobil hurtig-nav (Bordstyring, Opfølgning, Bookinger) */
#mobile-quick-nav { display: none; }

/* Mobile styles */
@media (max-width: 768px) {
    .burger-menu {
        display: block;
    }
    .employee-card {
        margin-bottom: 15px;
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .employee-card h5 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .employee-card p {
        font-size: 0.9em;
        margin-bottom: 5px;
    }

    .employee-list .col-12 {
        padding: 0 5px;
    }

    .employee-table th:nth-child(5),
    .employee-table td:nth-child(5), /* Email */
    .employee-table th:nth-child(6),
    .employee-table td:nth-child(6)  /* By */
    {
        display: none;
    }

    #receiptsTable th:nth-child(5),
    #receiptsTable td:nth-child(5), /* Bord */
    #receiptsTable th:nth-child(6),
    #receiptsTable td:nth-child(6), /* Kasse */
    #receiptsTable th:nth-child(8),
    #receiptsTable td:nth-child(8)  /* Gennemsnitlig rabat */
    {
        display: none;
    }

    #primary_nav_wrap { flex-wrap: nowrap; }
    #burger-menu { position: static !important; flex-shrink: 0; margin-right: 4px; }

    #primary_nav_wrap ul {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 9000;
        padding: 4px 0;
        margin: 0;
        flex-direction: column;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 12px 32px rgba(0,0,0,.4);
    }

    #primary_nav_wrap ul li {
        float: none;
        width: 100%;
        position: relative;
    }

    #primary_nav_wrap ul li a {
        display: block;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255,255,255,.08);
        border-radius: 0;
        margin: 0;
        text-align: left;
        font-size: 1.2em;
    }

    #primary_nav_wrap ul li:last-child a {
        border-bottom: none;
    }

    #primary_nav_wrap ul li ul {
        display: none;
        padding-left: 0;
        position: relative;
        top: 0;
    }

    #primary_nav_wrap ul li.active > ul {
        display: block;
    }

    #primary_nav_wrap ul li ul li a {
        padding-left: 36px;
        font-size: .95em;
        opacity: .85;
    }

    #mobile-quick-nav {
        display: flex;
        gap: 6px;
        flex: 1;
    }
    #mobile-quick-nav .mqn-link {
        flex: 1;
        text-align: center;
        padding: 12px 4px;
        background: #2a3040;
        border: 1px solid #3a4560;
        border-radius: 8px;
        color: #e6e7e9;
        text-decoration: none;
        font-size: 1.1em;
        font-weight: 600;
        white-space: nowrap;
    }
    #mobile-quick-nav .mqn-link:active {
        background: #3a4a60;
    }

    /* Tabeller: scroll horisontalt */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    th, td { padding: 6px; font-size: 0.9em; white-space: nowrap; }
}

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

    #primary_nav_wrap ul li ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: auto;
        z-index: 1000;
        background-color: #000033;
        border-radius: 5px;
        margin: 0;
        padding: 0;
    }

    #primary_nav_wrap ul li ul li {
        float: none;
        width: 100%;
    }

    #primary_nav_wrap ul li ul li a {
        padding: 10px;
        border-bottom: none;
        display: block;
        width: 100%;
    }

    #primary_nav_wrap ul li ul li a:hover {
        background-color: #666666;
    }
}

/* Sales table styles */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #ddd;
    padding: clamp(4px, 1vw, 8px);
}

th {
    background-color: #f2f2f2;
    text-align: left;
}

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

.center {
    text-align: center;
}

.right {
    text-align: right;
}

.navigation {
    text-align: center;
    margin-top: 20px;
}

.navigation a {
    margin: 0 10px;
    color: #007bc4;
    text-decoration: none;
    font-weight: bold;
}

.navigation a:hover {
    text-decoration: underline;
}

/* Login container styling */
.login-container {
    background-color: #fff;
    padding: clamp(12px, 3vw, 20px);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
}

.headline {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* Input group styling */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Alle input-felter: box-sizing */
input, select, textarea {
    box-sizing: border-box;
}

/* Login button styling */
.login-button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-height: 44px;
}

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

/* Status message styling */
#status {
}
/* Container for the search input and clear button */
.search-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Container for the product list controls */
.product-list-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

/* Search input field */
#searchInput {
    padding: 10px;
    font-size: 16px;
    width: 100%;
    padding-right: 40px; /* plads til clear-knap */
}

/* Clear search input field */
.clear-search {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search:hover {
    color: #000;
}

/* Buttons for selecting/deselecting products */
.product-list-controls button {
    padding: 10px;
    font-size: 16px;
    margin: 5px 0;
    width: 100%;
}

/* Container for the product list */
#productList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: 10px;
    width: 100%;
}

/* Individual product checkbox container */
.product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    cursor: pointer;
}

/* Hide the default checkbox */
.product-item input[type="checkbox"] {
    display: none;
}

/* Custom checkbox appearance */
.product-item input[type="checkbox"] + span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Custom checkbox appearance when checked */
.product-item input[type="checkbox"]:checked + span {
    background-color: #d0f0c0;
}

.product-item span::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.product-item input[type="checkbox"]:checked + span::before {
    content: '\2714';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    background-color: #d0f0c0;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    line-height: 20px;
}

/* Hide the default checkbox */
input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-block;
  width: 20px;
  height: 20px;
  background: white;
  border: 1px solid #999;
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

/* Style the checked state */
input[type="checkbox"]:checked {
  background-color: #007BFF;
  border-color: #007BFF;
}

/* Add a checkmark */
input[type="checkbox"]:checked::after {
  content: '\2714';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: white;
}

.excl-vat {
    color: #d3d3d3;
}

.datepicker-container {
	margin-bottom: 20px;
}
.datepicker-label {
	margin-right: 10px;
}

.employee-card {
    background-color: #f8f9fa;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    text-align: center;
}

/* Board grid: flydende responsive */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.board-card {
    width: 100%;
    max-width: 400px;
    border: 1px solid #ccc;
    padding: clamp(10px, 2vw, 15px);
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
}

.board-card h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.board-card p {
    margin: 5px 0;
}

.status-free {
    color: green;
    font-weight: bold;
}

.status-occupied {
    color: red;
    font-weight: bold;
}

.board-card.occupied {
    background-color: #fff0f0;
}

.board-card.free {
    background-color: #f0fff0;
}
.board-card-link {
    text-decoration: none;
    color: inherit;
}

.board-card-link:hover .board-card {
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.4);
    transition: box-shadow 0.2s ease;
}

/* Samme udseende i begge temaer */
.theme-toggle {
  position: fixed; bottom: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 9999px;
  background: #2d3644; color: #e6e7e9;
  border: 1px solid #3a4658;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
html .theme-toggle {
  background: #e6e7e9; color: #12161c; border-color: #c9d0db;
}

/* Modaler: flydende bredde */
.mm-modal > div {
    width: min(95vw, 450px);
    max-width: 95vw;
    margin: 5vh auto;
}

/* Tabeller: responsiv overflow-wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* =====================
   MOBIL TILPASNINGER
   ===================== */

@media (max-width: 480px) {
    /* Body font-size op for læsbarhed */
    body { font-size: 15px; }

    /* Checkboxes: større touch target */
    input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }

    /* Modaler: fuld bredde på mobil */
    .mm-modal > div,
    [style*="width:400px"],
    [style*="width:350px"],
    [style*="width:340px"] {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 5vh auto !important;
    }

    /* Input-felter: fuld bredde */
    .input-group input,
    .input-group select,
    .input-group textarea {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Flex-rækker: wrap altid */
    [style*="display:flex"],
    [style*="display: flex"] {
        flex-wrap: wrap !important;
    }

    /* Tabeller: kompakt */
    th, td {
        padding: 4px 6px !important;
        font-size: 0.85em;
    }

    /* Loadbox */
    .loadbox { width: 100% !important; max-width: 100% !important; }

    /* Settle summary knapper: fuld bredde */
    #settle-summary .login-button,
    #grp-settle-summary .login-button {
        width: 100%;
        margin-top: 6px;
    }

    /* Drag-handle: større touch target */
    .drag-handle {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Admin-tabel: edit-inputs fuld bredde */
    .edit-cell input,
    .edit-cell select {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* iPad / tablet */
@media (min-width: 481px) and (max-width: 1024px) {
    input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
}
