﻿html { overflow-y: scroll; }

/* ===================================================================================================================================================================
   ============================================================================== Servira — Core =====================================================================
   =================================================================================================================================================================== */

/* ---------- Base ---------- */
body {
  background-color: #f8f6f2;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- Headings standardization (H1–H7) --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--servira-font, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif);
  font-weight: 600;
  color: #1a2a47;
  margin-bottom: 0.75rem;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }
h7 { font-size: 0.8rem; font-weight: 500; } /* pseudo for minor text */


/* ===================================================================================================================================================================
   ====================================================== Servira — Unified Panel System (Login + Global Modals) =====================================================
   =================================================================================================================================================================== */

/* --- basic page font + background for login --- */
body.login-page {
  background-color: #f8f6f2;
  font-family: var(--servira-font, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
}

/* --- panel wrapper --- */
.panel-structure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  padding: 20px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* --- main card --- */
.panel-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  width: 100%;
}

/* --- header gradient (shared) --- */
.gradient-header {
  background: linear-gradient(90deg, #1a2a47, #28436e);
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.gradient-header .panel-title {
  margin: 0;
  color: #ffffff;
  text-align: center;
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

/* --- body (shared) --- */
.panel-body {
  background: #ffffff;
  border: 1px solid #c0c0c0;
  border-top: none;
  color: #000000;
  padding: 24px 28px;
  text-align: center;
  border-radius: 0 0 16px 16px;
}

/* footer: subtle top border and inherits outer radius */
.modal-footer {
  border-top: 1px solid #c0c0c0;
  background: #f8f8f8;
  padding: 12px;
  border-radius: 0 0 16px 16px;  /* only visible if it's the last child */
}

/* remove corner rounding from inner sections by default */
.gradient-header,
.panel-body,
.modal-footer {
  border-radius: 0;
}

/* when panel has NO footer (like login), curve the bottom of the body */
.panel-card > .panel-body:last-child {
  border-radius: 0 0 16px 16px;
}

/* flatten Bootstrap wrapper so only our panel has curves */
.modal-content {
  border-radius: 0 !important;
  background: transparent !important; /* stop white bleed-through */
  overflow: visible;                   /* lets panel’s shadow show cleanly */
  border: none !important;
  box-shadow: none !important;
}

/* ensure our panel fills it perfectly */
.modal-dialog {
  margin: 0 auto;
  max-width: 500px;  /* or whatever width you prefer */
}

/* --- mobile tweaks --- */
@media (max-width: 480px) {
  .panel-structure { padding: 16px; }
  .panel-body { padding: 20px 16px; }
  .gradient-header .panel-title { font-size: 1.2rem; }
}

/* ===================================================================================================================================================================
   ======================================================================== Servira — Buttons ========================================================================
   =================================================================================================================================================================== */

/*--Basic shared button attributes--*/
.btn-servira,
.btn-edit,
.btn-delete,
.btn-permissions,
.btn-restore {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  border: none !important;
  box-sizing: border-box !important;
  gap: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  height: 34px;
  padding: 5px;
  transition: all 0.15s ease;
  text-decoration: none !important;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/*-- Servira button --*/
.btn-servira {
  background-color: #1a2a47 !important;
  color: #fff !important;
}

.btn-edit {
  background-color: #1a2a47;
  color: #fff;
  width: 50px;
}

.btn-servira:hover {
  background-image: linear-gradient(0deg, #1a2a47, #28436e);
}

/*-- Edit button --*/
.btn-edit {
  background-color: #1a2a47;
  color: #fff;
  width: 50px;
}
.btn-edit:hover {
  background-image: linear-gradient(0deg, #1a2a47, #28436e);
}

/*-- Delete button --*/
.btn-delete {
  background-color: #8B2635;
  color: #fff;
  width: 50px;
}
.btn-delete:hover {
  background-image: linear-gradient(0deg, #8B2635, #b12f42);
}

/*-- Restore button --*/
.btn-restore {
  background-color: #17a2b8;  /* info blue */
  color: #fff;
  border: none;
  width: 50px;
}
.btn-restore:hover {
  background-color: #138496;
  color: #fff;
}

/*-- Icon alignment --*/
.btn-servira i,
.btn-edit i,
.btn-delete i,
.btn-permissions i,
.btn-restore i {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --- Unified large button (for login and modals) --- */
.btn-servira-large {
  background-color: #1a2a47;
  color: #ffffff;
  height: 40px;
  width: 120px;
  border: none;
  border-radius: 8px;
  padding: 15px 15px;
  font-size: 1rem;
  font-weight: 600; /* bold text */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-servira-large:hover {
  background-image: linear-gradient(0deg, #1a2a47, #28436e);
}

/* ===================================================================================================================================================================
   ======================================================================== Servira — Navbar and content =============================================================
   =================================================================================================================================================================== */

/* =======================================================
   Servira — Navbar
   ======================================================= */

/* ---------- Navbar container attributes ---------- */
   .navbar-container {
  max-width: 1300px;
  margin: 10px auto 0 auto;
  border-radius: 16px 16px 0 0;
  overflow: visible;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ---------- Navbar background attributes ---------- */
.navbar-dark.bg-darkblue {
  background-image: linear-gradient(90deg, #1a2a47, #28436e);
  background-size: 1300px 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
  border-radius: 16px 16px 0 0;
  position: relative;
}

/* ---------- Navbar link attributes ---------- */
.navbar .nav-link {
  color: #f1f1f1 !important;
  font-weight: 700;
  padding: 8px 14px;
  transition: background 0.2s ease, color 0.2s ease;
  border-radius: 6px;
}

/* ---------- Larger user + logout icons only ---------- */
.navbar .nav-link.logout-icon {
  font-size: 1.5em; /* 1.5x default nav icon size */
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =======================================================
   Servira — Navbar buttons
   ======================================================= */

/* ---------- No animation for logout button ---------- */
.logout-button {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
}
.logout-button:focus {
  outline: none;
  box-shadow: none;
}

/* =======================================================
   Servira — Dropdown menu
   ======================================================= */

/* ---------- Dropdown menu attributes ---------- */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2000;
  display: none;
  border: none;
  border-radius: 0 0 12px 12px;
  padding: 0;
  margin: 0;
  background-image: linear-gradient(90deg, #1a2a47, #28436e); /* Keep same as for navbar background */
  background-size: 1300px 100%;
  background-repeat: no-repeat;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
  clip-path: inset(0 -20px -20px -20px);
}

/* ---------- Keeps navbar dropdown menu appear on hover (desktop only) ---------- */
@media (hover: hover) and (pointer: fine) and (min-width: 992px) {
  .navbar .dropdown:hover > .dropdown-menu {
    display: block;
  }
}

/* ---------- Navbar dropdown list item attributes ---------- */
.dropdown-item {
  position: relative;
  z-index: 0;
  color: #f1f1f1;
  font-weight: 600;
  padding: 4px 12px;
  transition: color .2s ease;
}

/* ---------- Keeps submenu items the same style as before ---------- */
.dropdown-item:hover, .dropdown-item:focus {
  background: transparent !important;
  color: #ffffff;
}

/* =======================================================
   Servira — Content container
   ======================================================= */

  /* ---------- Content container attributes ---------- */
.content-container {
  max-width: 1300px;
  margin: 0 auto 40px auto;
  background: #ffffff;
  border: 1px solid #c0c0c0;
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 7px;
  box-shadow:  0 6px 20px rgba(0,0,0,0.3);
}

/* Side-by-side layout inside settings - RESOLVE - REMOVE*/
.content-container.settings-flex {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

/* =======================================================
   Servira — Subnavbar (Card-like secondary menu)
   ======================================================= */

.subnavbar {
  display: flex;
  align-items: center;
  gap: 1px;
  background-color: transparent;
  padding: 4px 10px;
  height: 40px;
  margin: 0 auto 0px;
  width: 100%;
  max-width: 1230px;
  box-sizing: border-box;
  margin-bottom: -1px;

}

/* --- Subnav items --- */
.subnav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border: 1px solid #c0c0c0 !important;
  border-bottom: none !important;
  background-color: #f6f6f7;       /* slightly lighter gray than container */
  font-weight: 700;
  color: #1a2a47;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  flex: 0 0 150px;
}

/* --- Hover & active states --- */
.subnav-item:hover {
  background-image: linear-gradient(0deg, #e0e0e2, #f6f6f7);
}

.subnav-item.active {
  background-image: linear-gradient(0deg, #f5f6f7, #e7e7e7);
  color: #1a2a47;
  border-bottom: none !important;
  z-index: 2;
}

.subnav-item i {
  margin-right: 5px;
}

/* =======================================================
   Servira — Mobile Layout (base.html only)
   ======================================================= */
@media (max-width: 991.98px) {

  /* --- Navbar container --- */
  .navbar-container {
    margin: 0;
    border-radius: 0;
    max-width: 100%;
    box-shadow: none;
  }

  /* --- Navbar background --- */
  .navbar-dark.bg-darkblue {
    border-radius: 0;
    background-size: cover;
  }

  /* --- Navbar collapse area --- */
  .navbar-collapse {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  /* --- Navbar links --- */
.navbar .nav-link {
  padding: 10px 14px;
  font-size: 1rem;
}

.navbar .nav-link:focus,
.navbar .nav-link:active {
  outline: none;
  box-shadow: none;
}

  /* --- Dropdown menu (inside collapsed navbar) --- */
  .dropdown-menu {
    position: static; /* no absolute positioning inside mobile collapse */
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 4px;
  }

  /* --- Main content container --- */
  .content-container {
    max-width: 100%;
    margin: 0 0 20px 0;
    border-radius: 0;
    box-shadow: none;
    padding: 10px;
    border-left: none;
    border-right: none;
  }

  /* --- Global modal --- */
  .modal-dialog {
    margin: 1rem;
  }
  .modal-content {
    border-radius: 12px;
  }
}

/* --- Very small devices (≤480px): subnav items full width --- */
@media (max-width: 980px) {
  .subnavbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .subnav-item {
    flex: 1 1 100%;
  }

  .subnav-item:first-child {
    margin-left: 15px;  /* preserves the desktop-style offset */
  }

  .subnav-item:last-child {
    margin-right: 15px;  /* preserves the desktop-style offset */
  }
}

/* ===================================================================================================================================================================
   ======================================================================== Servira — Cards ==========================================================================
   =================================================================================================================================================================== */

  /*-- Main card attributes --*/
  .card {
  background: #fff;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 20px;
  width: 100%;                /* full width within container */
  max-width: 1260px;          /* keeps desktop readability */
  margin-left: auto;
  margin-right: auto;
}

/*-- Card header attributes--*/
.card-header {
  background-color: #f5f6f7 !important;
  border-bottom: 1px solid #c0c0c0 !important;
  color: #1a2a47 !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  height: 50px;
  box-sizing: border-box;
}

/*-- Keeps the header icon+text to the left --*/
.card-header .header-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.card-header .header-left i {
  color: #1a2a47;
  font-size: 1rem;
}

/*-- Keeps actions to the right --*/
.card-header .header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/*-- Card body attributes --*/
.card-body {
  background: #ffffff;
  padding: 16px;
 }

 .card-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===================================================================================================================================================================
   ======================================================================== Servira — Status badge ===================================================================
   =================================================================================================================================================================== */

/* =======================================================
   Status Labels for lists
   ======================================================= */

/* ---------- Status Colors ---------- */
:root {
  --status-active:   #199237; /* deep teal-green, complements navy */
  --status-inactive: #6eb4c5; /* gray slate neutral */
  --status-archived: #1a2a47; /* muted golden yellow */
  --status-deleted:  #ac2626; /* slightly desaturated red */
}

.status-badge.active   { background-color: var(--status-active); }
.status-badge.inactive { background-color: var(--status-inactive); color: #fff; }
.status-badge.archived { background-color: var(--status-archived); color: #ffffff; }
.status-badge.deleted  { background-color: var(--status-deleted); }

.status-label.active   { color: var(--status-active); }
.status-label.inactive { color: var(--status-inactive); }
.status-label.archived { color: var(--status-archived); }
.status-label.deleted  { color: var(--status-deleted); }

/* Uniform width for all status labels */
.status-label{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 26px;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}

.status-label {
  font-weight: 600;
  text-transform: capitalize;
}

.badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  border-radius: 6px;
  padding: 0 8px;
  vertical-align: middle;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  border-radius: 6px;
  padding: 0 8px;
  vertical-align: middle;
}

/* =======================================================
   Status Labels for orders
   ======================================================= */
.badge{
  display: inline-block;
  width: 100px;
  height: 26px;
  vertical-align: middle;           
  text-align: center;
  white-space: nowrap;
}

.badge.status-sent { background-color: #42a5f5; color: #fff; }
.badge.status-packing { background-color: #ffb300; color: #fff; }
.badge.status-packed { background-color: #f57c00; color: #fff; }
.badge.status-delivering { background-color: #7cb342; color: #fff; }
.badge.status-received { background-color: #009688; color: #fff; }
.badge.status-booked { background-color: #9e9e9e; color: #fff; }

.table.compact-table th,
.table.compact-table td {
  vertical-align: middle;
  font-size: 0.95rem;
}

/* ===================================================================================================================================================================
   ======================================================================== Servira — Table default ==================================================================
   =================================================================================================================================================================== */

/*-- Main table attributes --*/
.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/*-- Table rows and columns attributes --*/
.table th,
.table td {
  padding: 0.6rem 0.6rem;  /* whatever baseline you want */
  border-bottom: 1px solid #e7e7e7;
  font-size: 0.93rem;
  color: #333;
  vertical-align: middle;
  height: 45px;
  overflow: hidden;            /* required for ellipsis */
  text-overflow: ellipsis;     /* replaces overflow text with … */
  white-space: nowrap;         /* prevents wrapping */ 
}
.table tr:hover { background-color: #f9fbfd; }
.table.compact-table th, .table.compact-table td {
  padding: 6px 10px;
  font-size: 0.9rem;
}
.table td, .table th {
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
}
.table td button,
.table td .d-inline-flex {
  max-width: 100%;          /* buttons can't stretch column */
  flex-wrap: wrap;
  justify-content: center;
}

.table thead th:first-child { text-align: left; }

.table th:first-child,
.table td:first-child {
  padding-left: 0.6rem !important;
}

.table td:last-child .d-inline-flex {
  justify-content: flex-end !important;
  width: 100%;
}

/* ===================================================================================================================================================================
   ======================================================================== Servira — Checkboxes =====================================================================
   =================================================================================================================================================================== */

/* Reset Bootstrap defaults */
.form-check-input[type="checkbox"] {
  background-image: none !important;
  box-shadow: none !important;
  background-color: #1a2a47 !important;
  border-color: #1a2a47 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  position: relative;
  cursor: pointer;
  width: 26px;                   /* ✅ larger size */
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 26px 26px;    /* ✅ icon scaled proportionally */
  transition: filter 0.15s ease-in-out;
}

/* Keep Servira navy always */
.form-check-input[type="checkbox"]:hover,
.form-check-input[type="checkbox"]:focus,
.form-check-input[type="checkbox"]:checked,
.form-check-input[type="checkbox"]:not(:checked),
.form-check-input[type="checkbox"]:indeterminate {
  background-color: #1a2a47 !important;
  border-color: #1a2a47 !important;
  box-shadow: none !important;
}

/* ✅ UNCHECKED (empty white outline) */
.form-check-input[type="checkbox"]:not(:checked) {
  background-color: #1a2a47 !important;
}

/* ✅ CHECKED (white checkmark) */
.form-check-input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20640%20640'%3E%3Cpath%20fill='%23ffffff'%20d='M480%2096C515.3%2096%20544%20124.7%20544%20160L544%20480C544%20515.3%20515.3%20544%20480%20544L160%20544C124.7%20544%2096%20515.3%2096%20480L96%20160C96%20124.7%20124.7%2096%20160%2096L480%2096zM160%20144C151.2%20144%20144%20151.2%20144%20160L144%20480C144%20488.8%20151.2%20496%20160%20496L480%20496C488.8%20496%20496%20488.8%20496%20480L496%20160C496%20151.2%20488.8%20144%20480%20144L160%20144zM390.7%20233.9C398.5%20223.2%20413.5%20220.8%20424.2%20228.6C434.9%20236.4%20437.3%20251.4%20429.5%20262.1L307.4%20430.1C303.3%20435.8%20296.9%20439.4%20289.9%20439.9C282.9%20440.4%20276%20437.9%20271.1%20433L215.2%20377.1C205.8%20367.7%20205.8%20352.5%20215.2%20343.2C224.6%20333.9%20239.8%20333.8%20249.1%20343.2L285.1%20379.2L390.7%20234z'/%3E%3C/svg%3E") !important;
}

/* ✅ INDETERMINATE (white horizontal bar) */
.form-check-input[type="checkbox"]:indeterminate {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20640%20640'%3E%3Crect%20x='160'%20y='296'%20width='320'%20height='48'%20fill='%23ffffff'/%3E%3C/svg%3E") !important;
}

/* ✅ Ensure alignment in tables/forms */
.table .form-check-input[type="checkbox"],
.modal .form-check-input[type="checkbox"],
.form-check .form-check-input[type="checkbox"] {
  margin: 0 auto;
  vertical-align: middle;
}

/* ✅ Focus outline */
.form-check-input[type="checkbox"]:focus-visible {
  outline: 2px solid #4d6cb8;
  outline-offset: 1px;
}











































































































/* =======================================================
   Servira — Input Field
   ======================================================= */

.form-control,
.form-select,
input[type="text"],
input[type="number"],
select {
  min-height: 34px;
  padding: 0.3rem 0.65rem !important;
  font-size: 0.9rem !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 6px !important;
  box-sizing: border-box;
  border: 1px solid #c0c0c0 !important;
}

#orderResultModal .modal-content {
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#orderResultModal .modal-title {
  font-weight: 600;
}

#orderResultMessage {
  font-size: 1rem;
  padding: 10px 0;
}

.sent-col,
.received-col {
  color: #6c757d;
  font-style: italic;
  font-size: 0.9rem;
}

/* =======================================================
   Servira inline permission manager
   ======================================================= */

.user-row.table-active {
  background-color: var(--servira-bg-accent-light);
  font-weight: 500;
}

.perm-row td {
  background-color: var(--servira-bg-light);
  padding: 0 !important;
  text-align: left;
}

.perm-row td .servira-permission-manager {
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.perm-row td .servira-permission-manager .inline-injection {
  max-width: 100%;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Dedicated inline injection container so inline widgets
   (like permission manager) render full-width inside tables */
.inline-injection {
  background: #fff;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin: 0;
  width: 100%;
  max-width: 100%;
  border: 1px solid #e0e0e0;
  box-sizing: border-box;
  display: block;
}


























/* =======================================================
   Servira Form Layout — Aligned Labels + Inputs
   ======================================================= */
.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-row .fixed-label {
  flex: 0 0 140px;              /* fixed label width */
  font-weight: 600;
  color: #444;
  margin-bottom: 0;
  text-align: right;            /* label text aligned right */
}

.form-row input,
.form-row select,
.form-row textarea {
  flex: 1;
  width: 100%;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  min-height: 34px;
  line-height: 1.2;
  box-sizing: border-box;
}

.form-row input,
.form-row select {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-row textarea {
  min-height: 110px;
  line-height: 1.4;
  padding: 0.45rem 0.65rem;
  resize: vertical;
  white-space: normal;
  overflow: auto;
}


.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #1a2a47;
  box-shadow: 0 0 0 2px rgba(26,42,71,0.15);
  outline: none;
}
/* =======================================================
   Read-only Field Styling (Locked Category)
   ======================================================= */
.readonly-field {
  background-color: #f8f9fc !important;
  color: #444 !important;
  border: 1px solid #dcdcdc !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: not-allowed;
  font-weight: 500;
}

/* =======================================================
   Product Form Enhancements — Conversion rows???????????????????????????????????????????????????????????????????????????????????????????????????????
   ======================================================= */

/* Let dropdowns (select boxes) open over cards */
.card-body {
  overflow: visible !important;
}

/* Ensure form dropdowns render above nearby elements */
.form-select {
  position: relative;
  z-index: 1050;
}



/* =======================================================
   Conversion List Layout
   ======================================================= */

.conversion-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bs-body-bg);
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
}

.conversion-unit select,
.conversion-multiplier input {
  min-width: 140px;
}

.conversion-unit,
.conversion-multiplier {
  display: flex;
  align-items: center;
}

.conversion-actions {
  flex-shrink: 0;
}

.conversion-row + .conversion-row {
  margin-top: 0.4rem;
}

/* =======================================================
   Hide Django formset DELETE checkboxes globally??????????????????????????????????????????????????????????????????????????????????
   ======================================================= */

input[type="checkbox"][name*="DELETE"],
label[for*="DELETE"],
.form-check input[name*="DELETE"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/* =======================================================
   Product Colors — Picker + Used Colors (Servira Unified)
   ======================================================= */
#id_color {
  width: 70px;
  height: 36px;
  padding: 0;
  border: 1px solid #dcdcdc;                  /* match other inputs */
  border-radius: 6px;                         /* same rounded corners */
  cursor: pointer;
  background: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);  /* consistent shadow */
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Hover & focus behavior consistent with other inputs */
#id_color:hover,
#id_color:focus {
  border-color: #1a2a47; /* Servira navy */
  box-shadow: 0 0 0 2px rgba(26, 42, 71, 0.15);
  outline: none;
}

/* Used colors below picker */
.used-colors {
  margin-top: 8px;
}

.color-swatch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch:hover {
  transform: scale(1.15);
  border-color: #888;
}

.color-swatch.selected {
  outline: 2px solid var(--status-active, #199237);
  outline-offset: 2px;
}

/* =======================================================
   Servira — Used Colors Alignment Under Input (Refined)
   ======================================================= */
.used-colors-wrapper {
  display: flex;
  align-items: flex-start;
  margin-left: 150px;              /* label (140) + gap (10) */
  margin-top: 8px;                 /* space above, like other fields */
  margin-bottom: 16px;              /* ✅ new: space below */
  max-width: calc(100% - 150px);
}

/* Fake input styled exactly like other fields */
.used-colors-fakeinput {
  flex: 1;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  padding: 8px 10px;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box; /* ✅ ensures same width calc as inputs */
}

/* Inside fake input */
.color-swatch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch:hover {
  transform: scale(1.15);
  border-color: #888;
}

.color-swatch.selected {
  outline: 2px solid var(--status-active, #199237);
  outline-offset: 2px;
}

/* =======================================================
   Servira — Final alignment fix for Color Row (Modal)
   ======================================================= */
#bulkEditModal .color-row {
  align-items: flex-start; /* don't center entire stack */
}

#bulkEditModal .color-row .fixed-label {
  display: flex;
  align-items: center;        /* vertical alignment to the input height */
  justify-content: flex-end;  /* push text to the right (toward the input) */
  height: 38px;
  margin: 0;
}

#bulkEditModal .color-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

#bulkEditModal .color-input-line {
  display: flex;
  align-items: center;
  height: 38px;
}

#bulkEditModal #bulkColor {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
}

/* =======================================================
   Servira — Product Colors (Unified)
   ======================================================= */
#id_color {
  width: 70px;
  height: 36px;
  padding: 0;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Shared swatch styles */
.used-colors { margin-top: 8px; }

.color-swatch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}

.color-swatch:hover { transform: scale(1.15); border-color: #888; }

.color-swatch.selected {
  outline: 2px solid var(--status-active, #199237);
  outline-offset: 2px;
}

/* =======================================================
   Servira — Bulk Edit Color Picker Consistency
   ======================================================= */
#bulkColor {
  width: 70px;
  height: 36px;
  padding: 0;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Hover/focus same as #id_color */
#bulkColor:hover,
#bulkColor:focus {
  border-color: #1a2a47;
  box-shadow: 0 0 0 2px rgba(26, 42, 71, 0.15);
  outline: none;
}

#bulkColor::-webkit-color-swatch-wrapper { padding: 0; }
#bulkColor::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

/* =======================================================
   Servira — Left-align only "Elérhető éttermek" checkboxes
   ======================================================= */
.restaurants-card .table td,
.restaurants-card .table label.form-check-label {
  text-align: left !important;
}

.restaurants-card .table .form-check {
  justify-content: flex-start !important;
  padding-left: 3px !important;   /* ensure no bootstrap gap */
}

.restaurants-card .table .form-check-input[type="checkbox"] {
  margin-left: 3px !important;
  margin-right: 6px !important;
}

.restaurants-card .table td:first-child {
  padding-left: 3px !important;   /* remove default 1rem padding */
}

/* =======================================================
   Servira — Permission Manager Grid Refinement
   ======================================================= */

/* Permission grid — exactly 4 columns, auto-wrap */
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  max-width: 100%;
  gap: 1.5rem;
  justify-items: stretch;
  align-items: start;
}

#deleteModalText strong { color: var(--bs-danger); }

/* Hide receiver selector wrapper when not needed */
.receiver-select.hidden {
  display: none !important;
}

/* Order Info Table */
.info-table th, .info-table td {
  text-align: center;
  vertical-align: middle;
  background-color: #f8f9fa;
  font-size: 0.95rem;
}
.order-view-table th,
.order-view-table td {
  background-color: #ffffff;
}

/* ===========================================
   restaurant suggestion dropdown (Servira)
   =========================================== */
#restaurantSuggestions {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  width: 390px !important;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#restaurantSuggestions.show {
  display: block;
}

#restaurantSuggestions .dropdown-item {
  padding: 6px 10px;
  font-size: 0.9rem;
  color: #212529;
  cursor: pointer;
}

#restaurantSuggestions .dropdown-item:hover {
  background-color: #f8f9fa;
}

#restaurantSearchInput {
  max-width: 390px !important;
}

#addUserRestaurantBtn {
  border-radius: 6px;
  width: 50px;
}

/* ===========================================
   Product suggestion dropdown (Servira)
   =========================================== */
#productSuggestions {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#productSuggestions.show {
  display: block;
}

#productSuggestions .dropdown-item {
  padding: 6px 10px;
  font-size: 0.9rem;
  color: #212529;
  cursor: pointer;
}

#productSuggestions .dropdown-item:hover {
  background-color: #f8f9fa;
}

/* Order items table alignment */
#orderItemsTable th, #orderItemsTable td {
  vertical-align: middle;
}

#orderItemsTable input {
  height: 30px;
  font-size: 0.9rem;
  padding: 2px 6px;
}

#orderItemsTable th,
#orderItemsTable td {
  vertical-align: middle;
}

#orderItemsTable {
  border: 1px solid #dee2e6;
}

#orderItemsTable .btn-sm {
  padding: 2px 6px;
}

/* =======================================================
   Servira — Input Alignment (match button height)
   ======================================================= */
.form-control,
.form-select,
input[type="text"],
input[type="number"],
select {
  height: 30px !important;       /* match Servira buttons */
  font-size: 0.85rem !important; /* consistent with .btn-servira font */
  line-height: 1.3 !important;
  border-radius: 6px !important; /* same curvature */
  box-sizing: border-box;
}

#orderResultModal .modal-content {
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#orderResultModal .modal-title {
  font-weight: 600;
}

#orderResultMessage {
  font-size: 1rem;
  padding: 10px 0;
}

.sent-col,
.received-col {
  color: #6c757d;
  font-style: italic;
  font-size: 0.9rem;
}

/* ==========================================
   Uniform column + input sizing for order tables
   ========================================== */

/* Table column widths */
#orderItemsTable th:nth-child(1) /* Megnevezés */{
  width: 600px;
}

#orderItemsTable th:nth-child(2), /* Egység */
#orderItemsTable th:nth-child(3), /* Rendelt */
#orderItemsTable th:nth-child(4), /* Küldött */
#orderItemsTable th:nth-child(5), /* Fogadott */
#orderItemsTable td:nth-child(2),
#orderItemsTable td:nth-child(3),
#orderItemsTable td:nth-child(4),
#orderItemsTable td:nth-child(5) {
  width: 140px;
  text-align: center;
  vertical-align: middle;
}

/* Egység dropdown (compact, centered) */
#orderItemsTable select.form-select-sm {
  width: 90px;
  min-width: 80px;
  max-width: 100px;
  margin: 0 auto;
  padding: 2px 6px;
  font-size: 0.9rem;
  height: 30px;
  text-align: center;
}

/* Mennyiség inputs (same width, right-aligned) */
#orderItemsTable input[type="number"] {
  width: 100px;
  min-width: 90px;
  max-width: 110px;
  margin: 0 auto;
  text-align: right;
  height: 30px;
  padding: 2px 6px;
  font-size: 0.9rem;
}
