/* =====================================================================
   QuickQuote – STYLE (Hardcore refactor + nový farebný skin)
   - zachované existujúce selektory/ID (bez zásahov do HTML)
   - zjednotené farby cez CSS premenné
   - deduplikované pravidlá (posledná hodnota vyhráva)
   ===================================================================== */

:root{
  /* ===== BRAND ===== */
  --primary: #2563eb;        /* modern blue */
  --primary-700: #1d4ed8;
  --primary-300: #93c5fd;
  --accent: #22c55e;

  /* ===== LIGHT NEUTRALS ===== */
  --bg: #f3f4f6;             /* celé pozadie appky */
  --surface: #ffffff;        /* karty, panely */
  --surface-2: #f8fafc;      /* jemné pozadia */
  --surface-3: #eef2f7;      

  --text: #111827;           /* hlavný text */
  --text-2: #374151;         /* sekundárny text */
  --muted: #6b7280;
  --muted-2: #9ca3af;

  /* ===== BORDERS & SHADOWS ===== */
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --border-subtle: #eef2f7;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(15,23,42,0.08);

  /* ===== STATUS ===== */
  --success: #16a34a;
  --success-700: #15803d;
  --info: #0ea5e9;
  --info-700: #0284c7;
  --warning: #f59e0b;
  --warning-700: #d97706;
  --danger: #dc2626;
  --danger-700: #b91c1c;

  /* ===== STATUS BACKGROUNDS ===== */
  --primary-bg: rgba(37,99,235,0.10);
  --primary-border: rgba(37,99,235,0.25);

  --warning-bg: rgba(245,158,11,0.12);
  --warning-border: rgba(245,158,11,0.35);

  --danger-bg: rgba(220,38,38,0.12);
  --danger-border: rgba(220,38,38,0.30);

  /* ===== HEADER ===== */
  --header-1: #0f172a;
  --header-2: #1f2937;
  --header-grad: linear-gradient(135deg,var(--header-1),var(--header-2));
  --accent-grad: linear-gradient(90deg,var(--primary),var(--accent));
}


/* Base polish */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  background: radial-gradient(1200px 700px at 30% -10%, rgba(37,99,235,0.25), transparent 55%),
              radial-gradient(900px 500px at 90% 0%, rgba(34,197,94,0.22), transparent 55%),
              var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{ color: var(--primary); }
a:hover{ color: var(--primary-300); }

button, .btn, input, select, textarea{
  font-family: inherit;
}

input:focus, select:focus, textarea:focus, button:focus{
  outline: none;
}

:focus-visible{
  outline: 2px solid rgba(37,99,235,0.55);
  outline-offset: 2px;
}

/* Scrollbar (nenápadné, ale profi) */
*::-webkit-scrollbar{ width: 10px; height:10px; }
*::-webkit-scrollbar-thumb{
  background: rgba(148,163,184,0.28);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0);
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover{ background: rgba(148,163,184,0.40); }
*::-webkit-scrollbar-track{ background: rgba(0,0,0,0.18); }


/* ==================== Merged & themed rules ==================== */

body{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.login-page{
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px 0;

  background-image: url("https://stavix.sk/login_backg.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;          /* KĽÚČOVÉ */
  background-attachment: fixed;    /* NEPOSUVA SA */
}
@media (max-width: 768px){
  body.login-page{
    background-image: url("https://stavix.sk/login_backg_mobile.png");
    background-position: center top;
    background-size: cover;
    background-attachment: scroll;
  }
}

body.login-page::before{
  content:"";
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35); /* jemné stmavenie */
  z-index: -1;
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 400px;
  box-sizing: border-box;
  border-top: 5px solid var(--primary);
}

.login-container h2 {
  text-align: center;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 25px;
}

.login-container label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.login-container input[type="text"],
.login-container input[type="password"],
.login-container input[type="email"],
.login-container input[type="date"],
.login-container textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-sizing: border-box;
  height: 38px;
  margin-bottom: 15px;
}

.login-container textarea {
  height: auto;
}

.login-container button {
  width: 100%;
  margin-top: 10px;
}

.login-links {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9em;
}

.login-links a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 10px;
}

.login-links a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.invoice-form-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1.5fr;
  gap: 20px;
}

.card {
  background-color: var(--surface);
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  background: var(--surface);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-control {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--surface);
  background: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: 0 4px 10px rgba(13,110,253,.15);
}

.btn-success {
  background-color: var(--success);
  color: white;
  background: #1a9d3f;
}

.btn-danger {
  background-color: var(--danger);
  color: var(--surface);
  border-color: var(--danger);
  background: #d23;
}

.btn-secondary {
  background-color: var(--warning);
  color: white;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.summary-table td {
  padding: 8px 0;
  border-top: 1px solid var(--border-subtle);
}

.total-row td {
  font-size: 1.2em;
  font-weight: bold;
  border-top: 2px solid var(--text);
}

.text-right {
  text-align: right;
}

.room-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.room-container {
  border: 1px solid var(--border-strong);
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
  background-color: var(--surface-2);
}

.room-header, .work-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 5px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.work-item {
  border: 1px solid var(--border-subtle);
  padding: 10px;
  margin-bottom: 10px;
  background-color: var(--surface-2);
}

.materials-list {
  margin-top: 10px;
  padding-left: 15px;
  border-left: 2px solid #ddd;
}

.material-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.room-title {
  font-size: 1.2em;
}

.editable-field {
  border: 1px solid var(--border-strong);
  padding: 2px 5px;
  cursor: text;
}

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

.header {
  background: var(--header-1);
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: relative;
  z-index: 10;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.12);
}

.header h1 {
  margin-top: 0;
  font-size: 35px;
}

.main-content {
  display: flex;
  flex-grow: 1;
  margin-top: 10px;
}

.sidebar {
  background-color: var(--surface);
  padding: 20px;
  width: 220px;
  border-right: 1px solid var(--border);
}

.sidebar h3 {
  margin-top: 30px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li a {
  text-decoration: none;
  color: var(--text-2);
  font-weight: 500;
  display: flex;
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 5px;
  align-items: center;
  gap: 10px;
}

.sidebar ul li a:hover {
  background-color: var(--surface-2);
}

.sidebar ul li.sidebar-separator {
  margin-top: 20px;
  padding-top: 0px;
}

.sidebar ul li.sidebar-separator-line {
  margin-top: 20px;
  padding-top: 0px;
  border-top: 1px solid var(--border);
}

.content {
  flex-grow: 1;
  padding: 30px;
}

.btn {
  padding: 10px 15px;
  border: 1px solid transparent;
  cursor: pointer;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  margin-left: 5px;
  transition: background-color 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary, .btn-add {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover, .btn-add:hover {
  background-color: var(--primary-700);
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-secondary-2 {
  background-color: var(--success);
  color: white;
}

.btn-secondary-2:hover {
  background-color: var(--success-700);
}

.btn-edit {
  background-color: var(--warning);
  color: var(--text);
}

.btn-edit:hover {
  background-color: var(--warning-700);
}

.btn-delete {
  background-color: var(--danger);
  color: white;
}

.btn-delete:hover {
  background-color: var(--danger-700);
}

.action-buttons {
  margin-bottom: 20px;
}

.form-section, .modal-content form {
  background-color: var(--surface);
  border-radius: 8px;
}

.form-section {
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 25px;
  background-color: var(--surface-2);
  border-radius: 8px;
  border: 1px solid #ddd;
}

.form-section h3, .modal-content h3 {
  margin-top: 0;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.form-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.form-column {
  flex: 1;
  min-width: 320px;
}

.form-field {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.form-field label {
  grid-column: 1 / 2;
  text-align: right;
  font-weight: 500;
  color: #555;
}

.form-field input, .form-field select, .form-field .input-with-button {
  grid-column: 2 / 3;
}

.form-field-full {
  margin-bottom: 15px;
}

.form-section input, .form-section select, .modal-content input, .modal-content select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-sizing: border-box;
  height: 38px;
}

.input-with-button {
  display: flex;
}

.input-with-button input {
  flex-grow: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.input-with-button button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  flex-shrink: 0;
}

.form-field-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.form-field-inline label {
  flex-basis: 100px;
  text-align: right;
  font-weight: 500;
  flex-shrink: 0;
}

.summary-section {
  background-color: #f8f9fa;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px 30px;
}

.summary-grid > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.summary-grid label, .summary-grid span, .summary-grid .total-label, .summary-grid .total-value {
  font-weight: 500;
  font-size: 1.1em;
}

.rooms-tabs-container {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.room-tab {
  padding: 12px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -2px;
  font-size: 1em;
  font-weight: 500;
  color: #495057;
}

.room-tab.active {
  background-color: var(--surface);
  border-color: var(--border) var(--border) var(--surface);
  border-radius: 6px 6px 0 0;
  color: var(--primary);
}

.room-tab-content {
  display: none;
}

.room-tab-content.active {
  display: block;
}

.room-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.9em;
  table-layout: fixed;
}

.items-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.work-item-row {
  background-color: var(--surface-2);
  font-weight: bold;
}

.material-item-row {
  background-color: var(--surface);
}

.material-item-row .item-name-nested {
  padding-left: 25px;
}

.items-table input[type="number"] {
  width: 80px;
  padding: 6px;
  text-align: right;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}

.items-table .item-total {
  font-weight: bold;
  text-align: right;
  width: 120px;
}

.items-table .item-actions {
  width: 40px;
  text-align: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.btn-icon {
  background: transparent;
  border: 0;
  color: var(--danger);
  font-size: 1.4em;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.empty-state, .empty-state-minor {
  text-align: center;
  color: #777;
  padding: 20px;
  font-style: italic;
}

.work-subtotal-row td {
  border-top: 2px solid var(--border-strong);
  text-align: right;
  font-weight: bold;
  color: var(--text);
  padding: 10px !important;
  background-color: var(--surface-2);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(15, 23, 42, 0.45);
  justify-content: center;
  align-items: center;
}

.modal.visible {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.modal.on-top {
  z-index: 1001;
}

.modal-content {
  background-color: #fefefe;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.22);
  position: relative;
  width: 80%;
  max-width: 600px;
  border: 1px solid var(--border-strong);
}

.modal-content.large-modal-content {
  max-width: 95%;
}

.modal-content.large-modal-content-50 {
  max-width: 50%;
}

.close-button {
  color: #aaa;
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 1.6rem;
  font-weight: bold;
  cursor: pointer;
  float: right;
  border: 0;
  background: transparent;
  line-height: 1;
}

.close-button:hover {
  color: black;
}

.modal-dual-panel {
  display: flex;
  gap: 20px;
}

.panel-main {
  flex: 2;
}

.panel-side {
  flex: 1;
  border-left: 1px solid var(--border);
  padding-left: 20px;
  max-height: 400px;
  overflow-y: auto;
}

#work-materials-preview {
  list-style: none;
  padding-left: 0;
}

#work-materials-preview li {
  padding: 5px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-form-section {
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 15px;
  margin-top: 15px;
}

#we-work-total {
  font-weight: bold;
  font-size: 1.1em;
  padding-left: 10px;
}

#we-materials-list {
  max-height: 200px;
  overflow-y: auto;
}

#we-materials-list > div {
  display: flex;
  justify-content: space-between;
  padding: 5px;
  border-bottom: 1px dotted var(--border-strong);
}

.work-actions, .material-actions {
  display: flex;
  gap: 5px;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
}

.invoice-editor-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.editor-header h2 {
  margin: 0;
}

.action-buttons button, .action-buttons a {
  margin-left: 10px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.room-list-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.room-item {
  border: 1px solid var(--border-strong);
  padding: 15px;
  border-radius: 8px;
  background-color: var(--surface);
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.room-header h4 {
  margin: 0;
}

.room-body .action-buttons {
  margin-bottom: 15px;
}

.work-item, .material-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 0.5fr;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.item-name {
  font-weight: bold;
}

.item-total {
  font-weight: bold;
  text-align: right;
}

.item-actions {
  text-align: right;
}

div.dt-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

div.dataTables_length {
  flex: 1;
  text-align: left;
}

div.dataTables_filter {
  flex: 1;
  text-align: right;
}

.dt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}

.dataTables_length {
  flex: 1;
  text-align: left;
  margin-right: 1em;
}

.dataTables_filter {
  flex: 1;
  text-align: right;
}

.btn-info {
  background-color: var(--info);
  color: var(--surface);
  border-color: var(--info);
}

.btn:hover {
  opacity: 0.9;
}

.dataTables_wrapper .row:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.dataTables_wrapper .row:first-child .dataTables_length {
  margin: 0;
}

.dataTables_wrapper .row:first-child .dataTables_filter {
  margin: 0;
}

.dataTables_wrapper .dataTables_length {
  margin: 0;
}

.dataTables_wrapper .dataTables_filter {
  margin: 0;
}

.header .logo img {
  height: 100px;
  margin-top: 20px;
  margin-bottom: -25px;
  object-fit: contain;
  z-index: 20;
  margin-left: 60px;
}

#request-full-btn {
  background: var(--primary);
  color: var(--surface);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 22px;
  border-radius: 10px;
  border: none;
  box-shadow: 0 6px 14px rgba(13,110,253,0.3);
  transition: transform .05s ease, box-shadow .2s ease;
}

#request-full-btn:hover {
  box-shadow: 0 8px 18px rgba(13,110,253,0.45);
}

#request-full-btn:active {
  transform: translateY(1px);
}

.btn-primary-big {
  font-size: 18px;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 700;
}

.btn-request-full {
  display: inline-block;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 16px;
  border-radius: 10px;
  background: var(--info);
  color: var(--surface);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(14,165,233,.35);
}

.btn-request-full:hover {
  background: var(--info-700);
}

.modal .modal-content {
  width: 100%;
  margin: 0 auto;
  margin-top: 5vh;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.modal-body {
  padding: 16px;
}

#license-request-form label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 600;
}

#license-request-form input[type="text"],
#license-request-form input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 0.98rem;
  box-sizing: border-box;
}

#license-request-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--bg);
}

.btn-primary, .btn-outline {
  appearance: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .02s ease, box-shadow .2s ease;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-outline {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  background: #f8f9fa;
}

.filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 16px 0 20px;
}

#category-filter {
  min-width: 260px;
  height: 40px;
  padding: 8px 12px;
  font-size: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-sizing: border-box;
}

input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
  margin-right: 4px;
}

input[type="radio"] + label {
  margin-right: 15px;
  cursor: pointer;
}

.license-card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 26px rgba(0,0,0,.06);
}

.license-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.license-head h1 {
  margin: 0;
  font-size: 1.35rem;
}

.license-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
  border: 1px solid transparent;
}

.license-badge.trial {
  color: #8a6b00;
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.license-badge.full {
  color: #0f5132;
  background: #d1f7df;
  border-color: #9be7b9;
}

.license-sub {
  margin: 8px 0 14px;
  color: var(--muted);
}

.license-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

.license-grid .k {
  display: block;
  color: var(--muted-2);
  font-size: .85rem;
}

.license-grid .v {
  font-weight: 700;
  font-size: 1rem;
}

.license-progress {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  margin: 12px 0 2px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.license-progress .bar {
  height: 100%;
  width: var(--p,0%);
  background: linear-gradient(90deg, var(--primary), var(--primary-300));
}

.license-progress .legend {
  text-align: right;
  font-size: .8rem;
  color: var(--muted);
  margin-top: 6px;
}

.license-cta {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.license-btn {
  width: 100%;
  max-width: 520px;
  height: 52px;
  border-radius: 12px;
  font-size: 1.05rem;
}

.qq-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.qq-badge:hover {
  filter: brightness(1.05);
}

.qq-badge.wait {
  background: var(--warning-bg);
  color: #8a6b00;
  border-color: var(--warning-border);
}

.qq-badge.confirm {
  background: var(--primary-bg);
  color: var(--primary-700);
  border-color: var(--primary-border);
}

.qq-badge.work {
  background: #eaf5ff;
  color: #0a58ca;
  border-color: #cde8ff;
}

.qq-badge.done {
  background: #d1f7df;
  color: #0f5132;
  border-color: #9be7b9;
}

.qq-badge.inv {
  background: #efe3ff;
  color: #5b21b6;
  border-color: #dbc8ff;
}

.qq-badge.reject {
  background: #ffe2e2;
  color: #7f1d1d;
  border-color: #ffc9c9;
}

.qq-badge.waitPay {
  background: var(--warning-bg);
  color: #8a6b00;
  border-color: var(--warning-border);
}

.qq-badge.paid {
  background: #d1f7df;
  color: #0f5132;
  border-color: #9be7b9;
}

.qq-badge.overdue {
  background: #ffe2e2;
  color: #7f1d1d;
  border-color: #ffc9c9;
}

.qq-badge.sent {
  background: var(--primary-bg);
  color: var(--primary-700);
  border-color: var(--primary-border);
}

.qq-badge.void {
  background: var(--surface-2);
  color: var(--muted);
  border-color: #e2e8f0;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.icon-btn:hover {
  background: var(--surface-2);
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: var(--surface);
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.msg-bell {
  position: relative;
  text-decoration: none;
}

.msg-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--danger);
  color: var(--surface);
  font-size: 12px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
}

.chat-wrap {
  display: grid;
  gap: 12px;
  min-height: 400px;
  grid-template-columns: 260px 1fr;
}

.chat-users {
  width: 280px;
  min-width: 240px;
  max-height: 60vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.chat-users .user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.chat-users .user:hover {
  background: var(--surface-2);
}

.chat-users .user.active {
  background: var(--primary-bg);
}

.chat-users .user .tag {
  font-size: 11px;
  color: #64748b;
}

.chat-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  max-height: 60vh;
}

.chat-log {
  flex: 1;
  overflow: auto;
  padding: 12px;
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
}

.msg {
  max-width: min(70%, 520px);
  display: inline-block;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 4px 0;
  word-wrap: break-word;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}

.msg.me {
  background: var(--info-bg);
  align-self: flex-end;
  margin-left: auto;
  color: #0c4a6e;
}

.msg.other {
  background: var(--surface);
}

.msg .meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.chat-actions .left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}

.chat-actions .right {
  margin-left: auto;
}

.chat-input {
  flex: 1;
  min-width: 240px;
  height: 42px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  resize: none;
  overflow: auto;
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.btn-send {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: var(--surface);
  font-weight: 700;
  cursor: pointer;
}

.hdr-chat {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
  text-decoration: none;
}

.hdr-chat .ico {
  font-size: 20px;
  line-height: 1;
}

#chat-users {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  background: var(--surface);
}

.peer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--surface-2);
  cursor: pointer;
}

.peer:hover {
  background: var(--surface-2);
}

.peer.active {
  background: var(--primary-bg);
}

.peer .name {
  font-weight: 600;
  color: var(--text);
}

.peer .u-badge {
  display: none;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: var(--surface);
  font-size: 12px;
  align-items: center;
  justify-content: center;
}

.peer.has-unread .name {
  color: var(--text);
}

#chat-thread {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

#chat-messages {
  flex: 1;
  overflow: auto;
  padding: 12px;
}

.msg-row {
  display: flex;
  margin: 6px 0;
}

.msg.them {
  margin-right: auto;
  background: var(--bg);
  color: var(--text);
}

.chat-input textarea {
  flex: 1;
  height: 44px;
  resize: none;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-sizing: border-box;
}

.chat-input .send-btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--surface);
}

.card-title {
  font-size: .9rem;
  color: #666;
  margin-bottom: 4px;
}

.card-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.panel {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-top: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-body {
  padding: 12px 16px;
}

.btn-warning {
  background: #e39b17;
}

.nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-tabs .nav-link {
  display: inline-block;
  padding: 8px 12px;
  background: #f5f7fb;
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: var(--text);
  text-decoration: none;
}

.nav-tabs .nav-link.active {
  background: var(--surface);
  color: #000;
  font-weight: 700;
}

.tab-content {
  background: transparent;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.text-muted {
  opacity: .75;
}

.form-label {
  font-weight: 600;
}

.bc-row {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.8fr;
  gap: 12px;
  align-items: end;
}

.bc-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 6px 0;
  font-weight: 600;
}

.bc-badge {
  font-size: 12px;
  background: var(--primary-bg);
  color: #1d4ed8;
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1;
}

.bc-control {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  height: 40px;
  box-sizing: border-box;
}

.bc-select {
  appearance: auto;
}

.bc-tpl-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bc-btn-small {
  height: 40px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #6c757d;
  color: var(--surface);
  border: 0;
  cursor: pointer;
}

#spell-dialog {
}

#spell-dialog .sd-card {
  background: var(--surface);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  width: min(820px, 96vw);
}

#spell-dialog .sd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

#spell-dialog .sd-head .sd-title {
  font-weight: 700;
  font-size: 1.05rem;
}

#spell-dialog .sd-body {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
  align-items: start;
}

#spell-dialog .sd-preview {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  min-height: 120px;
  max-height: 40vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .96rem;
  line-height: 1.35;
  height: clamp(160px, 28vh, 260px);
}

#spell-dialog .sd-meta {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 6px;
}

#spell-dialog .sd-hl {
  background: #fff3bf;
  box-shadow: 0 0 0 2px #ffe58f inset;
  border-radius: 4px;
  padding: 1px 2px;
}

#spell-dialog .sd-ctl {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: var(--surface);
}

#spell-dialog .sd-row {
  margin: 8px 0;
}

#spell-dialog .sd-label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

#spell-dialog .sd-select {
  width: 100%;
  min-width: 260px;
  height: 40px;
  padding: 6px 10px;
  font-size: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-sizing: border-box;
}

#spell-dialog .sd-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 12px;
}

#spell-dialog .btn-slim {
  padding: 6px 10px;
  font-size: .92rem;
  border-radius: 8px;
}

#spell-dialog .btn-ghost {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}

#spell-dialog .btn-light {
  background: #f8f9fa;
  color: var(--text-2);
  border: 1px solid var(--border);
}

#spell-dialog .sd-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  max-height: 35vh;
  overflow: auto;
  background: var(--surface);
  height: clamp(160px, 28vh, 260px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#spell-dialog .sd-item {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 1rem;
}

#spell-dialog .sd-item + .sd-item {
  border-top: 1px solid var(--surface-2);
}

#spell-dialog .sd-item:hover {
  background: var(--primary-bg);
}

#spell-dialog .sd-item.is-active {
  background: var(--primary-bg);
  outline: 2px solid var(--primary-border);
}

#promo-root {
  position: relative;
  z-index: 500;
}

.promo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg,var(--warning-bg),var(--warning-200));
  border: 1px solid var(--warning);
  color: var(--header-2);
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
  max-width: 1200px;
  margin: 10px auto 0 auto;
  transition: transform .25s ease, opacity .25s ease;
}

.promo-bar.hidden {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.promo-bar .promo-badge {
  font-weight: 700;
  font-size: .85rem;
  background: var(--text);
  color: var(--surface);
  padding: 4px 8px;
  border-radius: 999px;
}

.promo-bar .promo-title {
  font-weight: 700;
}

.promo-bar .promo-spacer {
  flex: 1;
}

.promo-bar .btn {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
}

.promo-bar .btn-primary {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.promo-bar .btn-ghost {
  background: var(--surface);
  color: var(--text-2);
}

.promo-bar .btn-link {
  background: transparent;
  border: none;
  color: var(--text-2);
  text-decoration: underline;
  padding: 4px 6px;
}

body.promo-no-scroll {
  overflow: hidden;
}

#promo-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
}

#promo-modal-overlay.show {
  display: flex;
  animation: promoFade .18s ease-out;
}

.promo-modal {
  width: min(720px, 96vw);
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden;
  transform: translateY(8px);
  animation: promoUp .18s ease-out forwards;
}

.promo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
}

.promo-title {
  font-weight: 700;
}

.promo-close {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
}

.promo-body {
  padding: 0;
}

.promo-media {
  display: block;
  width: 100%;
  height: auto;
  max-height: 65vh;
  object-fit: cover;
  background: #000;
}

.promo-media-wrap {
  position: relative;
  background: #000;
}

.promo-media-wrap video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 65vh;
}

.promo-media-wrap .promo-ticker {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,.5);
  color: var(--surface);
  font-size: .85rem;
  padding: 4px 8px;
  border-radius: 999px;
}

.promo-content {
  padding: 12px 14px;
  font-size: .95rem;
  color: var(--text-2);
}

.promo-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid #eef2f7;
}

.promo-actions .btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
}

.promo-actions .btn-primary {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.promo-actions .btn-ghost {
  background: var(--surface);
  color: var(--text-2);
}

.promo-actions .btn-link {
  background: transparent;
  border: none;
  color: var(--text-2);
  text-decoration: underline;
  padding: 4px 6px;
}

.form-field-stack {
  display: block;
}

.form-field-stack .form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #555;
  text-align: left;
}

.form-section textarea,
.content-box textarea,
.card textarea {
  width: 100%;
  min-height: 140px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  box-sizing: border-box;
  resize: vertical;
  font: inherit;
}

.has-hover-hint .hint {
  display: block;
  color: #64748b;
  margin-top: 6px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .15s ease, max-height .15s ease;
}

.has-hover-hint textarea:hover + .hint,
.has-hover-hint textarea:focus + .hint {
  opacity: 1;
  max-height: 120px;
}

.summary-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px 16px;
  align-items: start;
}

.summary-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.summary-item label {
  font-weight: 600;
  color: var(--text-2);
  margin-right: 8px;
}

.summary-value {
  margin-left: auto;
}

.inl-num {
  width: 72px;
  text-align: right;
  padding: 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font: inherit;
  background: var(--surface);
}

.grand-total .total-value {
  font-size: 1.15rem;
  font-weight: 700;
}

.two-tables {
  display: grid;
  gap: 16px;
}

.pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.pane-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.items-table th, .items-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.items-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
}

.works-table tr.selected {
  background: #f6f7f9;
}

.items-table .item-name {
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pane-empty {
  color: var(--muted);
  font-size: .95rem;
  padding: 8px;
}

.btn-icon:hover {
  background: var(--bg);
}

.table-wrap {
  max-height: 420px;
  overflow: auto;
  border-radius: 6px;
}

.items-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.items-table td.item-qty,
.items-table td.item-price,
.items-table td.item-total {
  text-align: right;
}

.items-table td.item-actions {
  text-align: right;
  padding-left: 12px;
}

.item-actions .btn-icon {
  margin-left: 6px;
}

.rooms-tabs-content .items-table .item-actions {
  width: auto !important;
  min-width: 84px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-left: 12px;
}

.rooms-tabs-content .items-table .item-total {
  white-space: nowrap;
  padding-right: 14px;
}

.rooms-tabs-content .btn-icon {
  font-size: 1.2em;
  padding: 2px 6px;
  line-height: 1;
}

.rooms-tabs-content .items-table {
  table-layout: fixed;
}

#qa-create-customer-modal .modal-content {
  max-width: 560px;
  width: 96%;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
}

#qa-create-customer-modal .modal-header,
#qa-create-customer-modal .modal-body,
#qa-create-customer-modal .modal-actions {
  padding: 16px;
}

#qa-create-customer-modal .modal-header {
  border-bottom: 1px solid var(--border);
}

#qa-create-customer-modal .modal-actions {
  border-top: 1px solid var(--bg);
}

#qa-create-customer-modal .modal-body {
  max-height: calc(90vh - 120px);
  overflow: auto;
}

#qa-create-customer-modal .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#qa-create-customer-modal label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-2);
  margin-bottom: 6px;
}

#qa-create-customer-modal input[type="text"],
#qa-create-customer-modal input[type="email"] {
  width: 100%;
  height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-sizing: border-box;
}

#qa-create-customer-modal .full {
  grid-column: 1 / -1;
}

#customers-table tbody tr.selected {
  background: var(--primary-bg) !important;
}

#customers-table tbody tr.selected td {
  box-shadow: inset 0 0 0 9999px rgba(99,102,241,0.08);
}

#customers-table tbody tr {
  cursor: pointer;
}

.mail-layout {
  display: block;
  margin-top: 10px;
}

.mail-main,
.mail-sidebar {
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 16px 18px;
}

.mail-main h3,
.mail-sidebar h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.mail-templates-list {
  margin-bottom: 16px;
}

.templates-scroll {
  max-height: 280px;
  overflow-y: auto;
}

.mc-template-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-2);
}

.mc-template-row:last-child {
  border-bottom: 0;
}

.mc-template-info {
  flex: 1;
  min-width: 0;
}

.mc-template-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-template-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

.mc-template-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 10px;
}

.qq-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.mc-modal-dialog {
  width: 94%;
  max-width: 980px;
  max-height: 90vh;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.3);
  display: flex;
  flex-direction: column;
}

.mc-modal-header {
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mc-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.mc-modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.mc-modal-body {
  padding: 14px 20px;
  overflow-y: auto;
}

.mc-modal-footer {
  padding: 10px 20px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.mc-modal-footer-left,
.mc-modal-footer-right {
  display: flex;
  gap: 8px;
}

.mc-modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 16px;
}

.mc-modal-col .card {
  margin: 0;
}

.mc-template-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mc-template-inline .form-control {
  flex: 1;
}

.menu-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.75;
}

.sidebar ul li a:hover .menu-icon {
  opacity: 1;
}

.sidebar ul li a.active {
  background-color: var(--surface-2);
  color: var(--primary-700);
  font-weight: 600;
}

.sidebar ul li a.active .menu-icon {
  opacity: 1;
  filter: brightness(1.2);
}

.client-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px 22px;
  border-bottom: none;
  background: linear-gradient(90deg, var(--text), var(--header-2));
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.45);
  color: var(--border);
}

.client-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.client-logo {
  height: 42px;
  width: auto;
}

.client-title-block {
  display: flex;
  flex-direction: column;
}

.client-app-name {
  font-weight: 600;
  font-size: 1rem;
  color: #f9fafb;
}

.client-app-subtitle {
  font-size: 0.8rem;
  color: #9ca3af;
}

.client-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.client-nav a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.client-nav a:hover {
  background: var(--bg);
  color: var(--text);
}

.client-nav a.active {
  background: var(--text);
  color: var(--surface);
}

.client-main {
  max-width: 900px;
  margin: 20px auto;
  padding: 0 16px;
}

.client-main h1 {
  margin-bottom: 16px;
}

.card.danger {
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
}

.form-message {
  margin-top: 8px;
  font-size: 0.85rem;
}

.form-message.error {
  color: #b91c1c;
}

.form-message.ok {
  color: #166534;
}

.client-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--border);
}

.client-name {
  font-weight: 600;
}

.btn-small {
  padding: 4px 10px;
  font-size: 0.85rem;
}

.company-card .company-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.company-info {
  flex: 1;
}

.company-logo-box {
  flex: 0 0 auto;
  max-width: 180px;
}

.company-logo-img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: contain;
  background: var(--surface);
  padding: 6px;
  box-shadow: 0 0 6px rgba(15, 23, 42, 0.12);
}

.client-welcome,
.client-name {
  color: var(--border);
}

.app-container .sidebar {
  background: #f9fafb;
  border-right: 1px solid var(--border);
}

.app-container .sidebar h3 {
  color: #4b5563;
  margin-top: 0;
}

.app-container .sidebar ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.app-container .sidebar ul li {
  margin-bottom: 4px;
}

.app-container .sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-2);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.app-container .sidebar ul li a:hover {
  background-color: #e0edff;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.app-container .sidebar ul li a.active {
  background-color: #1d4ed8;
  color: var(--surface);
  font-weight: 600;
}

.app-container .sidebar ul li a.active .menu-icon {
  opacity: 1;
  filter: brightness(1.2);
}

.content .card,
.client-main .card {
  margin-bottom: 16px;
}

.content .panel,
.client-main .panel {
  margin-bottom: 18px;
}

.client-main form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--text-2);
}

.client-main form input[type="text"],
.client-main form input[type="email"],
.client-main form input[type="password"],
.client-main form textarea {
  width: 100%;
  margin-top: 4px;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
}

.client-main form textarea {
  resize: vertical;
  min-height: 120px;
}

.client-main form button {
  margin-top: 8px;
}

.client-main .card {
  padding: 16px 18px;
}

.content .card {
  padding: 14px 16px;
  margin-bottom: 16px;
}

#feedback-form input[type="text"] {
  width: 100%;
}

.content form label,
.client-main form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--text-2);
}

.content form input[type="text"],
.content form input[type="email"],
.content form input[type="password"],
.content form textarea,
.client-main form input[type="text"],
.client-main form input[type="email"],
.client-main form input[type="password"],
.client-main form textarea {
  width: 100%;
  margin-top: 4px;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
}

.content form textarea,
.client-main form textarea {
  resize: vertical;
  min-height: 120px;
}

.qq-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.qq-kpi {
  padding: 14px;
  border-radius: 12px;
}

.qq-kpi-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.qq-kpi-value {
  font-size: 22px;
  font-weight: 800;
}

.qq-tabs {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.qq-tab {
  border: 2px solid transparent;
  background: var(--surface-2);
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  position: relative;
}

.qq-tab.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.qq-tab-content {
  margin-top: 8px;
}

.qq-zebra tbody tr:nth-child(even) {
  background: var(--surface-2);
}

.qq-zebra tbody tr:hover {
  background: var(--primary-bg);
}

.qq-tab:hover {
  background: var(--primary-bg);
}

.qq-tab:active {
  transform: translateY(1px);
}

.qq-swal-wide .qq-swal-input,
.qq-swal-wide .swal2-input,
.qq-swal-wide .swal2-select {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.qq-swal-wide.swal2-popup {
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.qq-swal-wide .swal2-html-container {
  margin: 0 !important;
  padding: 0 !important;
}

.qq-swal-wide .qq-swal-form {
  text-align: left;
  padding: 0 12px;
}

.qq-swal-wide label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 600;
  color: var(--text-2);
}

.qq-swal-wide .swal2-input,
.qq-swal-wide .swal2-textarea,
.qq-swal-wide .swal2-select {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.qq-swal-wide .swal2-textarea {
  min-height: 90px;
  resize: vertical;
}

.qq-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.qq-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.qq-icon-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 6px 8px;
  line-height: 1;
  cursor: pointer;
}

.qq-icon-btn:hover {
  background: var(--surface-2);
}

.qq-icon-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.qq-mini-table th, .qq-mini-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.qq-swal-wide .swal2-select {
  width: 100% !important;
  max-width: 100% !important;
  height: 44px !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.swal2-popup .swal2-select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background-color: var(--surface);
  font-size: 15px;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 20px,
    calc(100% - 15px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.swal2-popup .swal2-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.25);
}

.qq-table-wrap-free {
  max-height: none !important;
  overflow: visible !important;
}

.qq-swal-form select.swal2-input {
  width: 100%;
  box-sizing: border-box;
  height: 2.625em;
  padding: 0.75em;
  border: 1px solid #d9d9d9;
  border-radius: 0.25em;
  background: var(--surface);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  background-color: var(--warning-bg);
}

.tab-count:empty {
  display: none;
}

.qq-tab .qq-badge {
  display: none;
  margin-left: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--surface);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}

.qq-tab .qq-badge.is-on {
  display: inline-block;
}

.qq-hide-sidebar .sidebar {
  display: none !important;
}

.qq-hide-sidebar .content {
  width: 100%;
  max-width: 100%;
  margin-left: 0 !important;
}

.qq-autofilled {
  background: var(--surface-2);
}

.qq-hide-topbar .main-content {
  padding-top: 0 !important;
}

.lbl {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.input {
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 8px 10px;
  background: var(--surface);
}

.qq-paid-grid {
  width: min(520px, 92vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.qq-paid-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.qq-paid-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.qq-paid-input, .qq-paid-select, .qq-paid-text {
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: var(--surface);
  font-size: 14px;
  line-height: 20px;
}

.qq-paid-text {
  height: auto;
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
}

.qq-paid-form {
  padding: 10px 6px 0 6px;
}

.qq-chat-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.qq-chat-ico {
  font-size: 22px;
  line-height: 1;
}

.qq-chat-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: var(--surface);
  font-weight: 700;
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
}

.qq-chat-fab.pulse {
  animation: qqPulse 1.2s infinite;
}

.qq-chat-mini {
  position: fixed;
  right: 18px;
  bottom: 84px;
  width: 380px;
  max-width: calc(100vw - 36px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
  overflow: hidden;
  display: none;
  z-index: 10000;
}

.qq-chat-mini.open {
  display: block;
}

.qq-chat-mini-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 10px 12px;
  border-bottom: 1px solid #eef2f7;
  background: #fbfcff;
}

.qq-chat-mini-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
}

.qq-chat-mini-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.qq-chat-mini-close {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  color: var(--muted);
}

.qq-chat-mini-list {
  max-height: 380px;
  overflow: auto;
  padding: 12px;
  background: var(--surface);
}

.qq-chat-mini-compose {
  border-top: 1px solid #eef2f7;
  padding: 10px 12px 12px 12px;
  background: var(--surface);
}

.qq-chat-mini-compose textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px;
  resize: none;
  font-size: 13px;
}

.qq-chat-mini-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  align-items: center;
}

.qq-chat-mini-send {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #2563eb;
  color: var(--surface);
  font-weight: 800;
  cursor: pointer;
}

.qq-chat-mini-openproj {
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
}

.qq-chat-mini-select {
  margin-top: 8px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  background: var(--surface);
}

.qq-chat-row {
  display: flex;
  margin: 10px 0;
}

.qq-chat-row.mine {
  justify-content: flex-end;
}

.qq-chat-row.other {
  justify-content: flex-start;
}

.qq-chat-bubble {
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.qq-chat-row.mine .qq-chat-bubble {
  background: #f2f7ff;
  border-color: #dbe7ff;
}

.qq-chat-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.qq-chat-text {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.qq-chat-gif {
  width: 30px;
  height: 30px;
  object-fit: contain;
  pointer-events: none;
}

.qq-peer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.qq-peer-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156,163,175,.18);
}

.qq-peer-status.online {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #065f46;
}

.qq-peer-status.online .qq-peer-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
}

.qq-peer-status.offline {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text-2);
}

/* =========================================================
   QuickQuote – Light UI + Dark Sidebar (LastPass vibe)
   Daj tento blok úplne na KONIEC style.css (override)
   ========================================================= */

:root{
  /* Základné farby */
  --qq-bg:        #f3f4f6;   /* pozadie appky */
  --qq-surface:   #f8fafc;   /* karty (nie čistá biela) */
  --qq-surface-2: #ffffff;   /* čistá biela len občas */
  --qq-border:    #e5e7eb;
  --qq-text:      #0f172a;
  --qq-muted:     #64748b;

  /* Brand / accent (jemný, nie “krikľavý”) */
  --qq-accent:    #ef4444;   /* červený nádych ako v screenshote */
  --qq-accent-2:  #f97316;   /* teplý prechod */
  --qq-link:      #2563eb;

  /* Sidebar */
  --qq-side:      #2f3b45;   /* tmavá sivomodrá */
  --qq-side-2:    #26313a;   /* tmavšia na hover */
  --qq-side-text: rgba(255,255,255,.78);
  --qq-side-soft: rgba(255,255,255,.08);

  /* Header */
  --qq-head-1:    #d53333;   /* červenejší header */
  --qq-head-2:    #c02626;
}

/* APP background */
html, body{
  background: var(--qq-bg);
  color: var(--qq-text);
}

/* =========================================
   HEADER
   ========================================= */
.header{
  background: linear-gradient(90deg, var(--qq-head-1), var(--qq-head-2)) !important;
  box-shadow: 0 6px 18px rgba(15,23,42,.18) !important;
  position: relative;
}

/* tenká accent linka hore (ako “polish”) */
.header::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height:4px;
  background: linear-gradient(90deg, var(--qq-accent), var(--qq-accent-2));
}

/* texty v headery – nech sú čitateľné */
.header, .header *{
  color: rgba(255,255,255,.92) !important;
}
.header a{ text-decoration:none; }
.header a:hover{ opacity:.95; }

/* Trial banner nech nekričí – stále viditeľný */
.header .trial-banner{
  background: rgba(255,255,255,.14) !important;
  color: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
}
.header .trial-banner a{
  color: #fff !important;
  text-decoration: underline !important;
}

/* =========================================
   LAYOUT + CONTENT
   ========================================= */
.main-content{
  background: var(--qq-bg);
}

.content{
  padding: 26px 28px; /* trošku kompaktnejšie */
}

/* =========================================
   SIDEBAR (tmavší, ako screenshot)
   ========================================= */
.sidebar{
  background: linear-gradient(180deg, var(--qq-side), #2b3740) !important;
  border-right: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: 6px 0 18px rgba(15,23,42,.10) !important;
}

/* nadpis menu */
.sidebar h3{
  color: rgba(255,255,255,.65) !important;
  font-weight: 700;
  letter-spacing: .25px;
  margin-top: 14px !important;
}

/* linky v menu */
.sidebar ul li a{
  color: var(--qq-side-text) !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  display:flex; align-items:center; gap:10px;
  transition: background .15s ease, color .15s ease, transform .05s ease;
}

/* hover */
.sidebar ul li a:hover{
  background: var(--qq-side-soft) !important;
  color: rgba(255,255,255,.92) !important;
}

/* ACTIVE – už žiadna “modrá tehla” */
.sidebar ul li a.active{
  position: relative;
  background: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* ľavý accent pásik (vyzerá profi a neruší) */
.sidebar ul li a.active::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  bottom:8px;
  width:4px;
  border-radius:999px;
  background: linear-gradient(180deg, var(--qq-accent), var(--qq-accent-2));
}

/* ikonky – na tmavom sidebare ich treba “zosvetliť” */
.sidebar .menu-icon{
  opacity: .90 !important;
  filter: brightness(0) invert(1) !important;
}
.sidebar ul li a:hover .menu-icon,
.sidebar ul li a.active .menu-icon{
  opacity: 1 !important;
}

/* separator line v sidebare */
.sidebar ul li.sidebar-separator-line{
  border-top: 1px solid rgba(255,255,255,.10) !important;
}

/* =========================================
   CARDS – menej “biele”, viac premium
   (u teba sú rôzne .card, .panel, .room-container atď.)
   ========================================= */
.card,
.panel,
.room-container,
.work-item,
.chat-users,
.chat-thread{
  background: var(--qq-surface) !important;
  border: 1px solid var(--qq-border) !important;
  box-shadow: 0 8px 20px rgba(15,23,42,.06) !important;
  border-radius: 14px;
}

/* vnútorné plochy ktoré majú byť úplne biele (inputy) nech ostanú biele */
input, select, textarea{
  background: var(--qq-surface-2);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}



/* =========================================
   BUTTONS – nech nelietajú farby
   (ponechávam tvoje triedy, len zjemním)
   ========================================= */
.btn{
  border-radius: 10px;
}

.btn-primary, .btn-add{
  background: linear-gradient(180deg, var(--qq-accent), #dc2626) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-add:hover{
  filter: brightness(.96);
}

.btn-secondary, .btn-edit{
  background: #eef2f7 !important;
  color: #0f172a !important;
  border: 1px solid var(--qq-border) !important;
}
.btn-secondary:hover, .btn-edit:hover{
  background: #e5e7eb !important;
}

/* Sidebar: horný zoznam scrolluje, spodný je vždy dole */
.sidebar{
  display:flex;
  flex-direction:column;
  height: calc(100vh - 70px); /* 70px = tvoja .header výška */
  overflow:hidden;
}

.sidebar-top{
  overflow:auto;
  padding-right:6px;
}

.sidebar-bottom{
  margin-top:auto;
  padding-top:10px;
  border-top: 1px solid rgba(255,255,255,0.10); /* ak máš tmavý sidebar */
}

/* nech sa nezväčšujú default marginy ul */
.sidebar ul{
  margin:0;
  padding:0;
}
/* ==================================================
   SIDEBAR – fixná šírka + ochrana proti stlačeniu
   ================================================== */

.sidebar{
  width: 260px;
  min-width: 260px;
  max-width: 260px;

  flex: 0 0 260px;        /* kľúčové – flexbox ho nesmie zmenšiť */
  box-sizing: border-box;
}
/* Sidebar ostáva na mieste pri scrollovaní */
.sidebar{
  position: sticky;
  top: 70px;             /* výška headeru */
  height: calc(100vh - 70px);
  overflow: hidden;
}
.sidebar-top{
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-bottom{
  flex-shrink: 0;
}
.main-content{
  display: flex;
  min-height: calc(100vh - 70px);
}

.content{
  flex: 1 1 auto;
  min-width: 0;          /* extrémne dôležité pre tabuľky */
}
.header{
  position: sticky;
  top: 0;
  z-index: 100;
}
/* =========================================================
   COLOR OVERRIDE ONLY
   ========================================================= */

/* Základné farebné tokeny */
:root{
  /* tmavý navigačný rám (sidebar + header) */
  --nav-dark-1: #2f3b45;   /* základ */
  --nav-dark-2: #26313a;   /* mierne tmavší pre gradient */

  /* accent – tenký pásik ako v maile */
  --nav-accent-1: #2563eb;
  --nav-accent-2: #22c55e;

  /* obsah */
  --app-bg: #f3f4f6;
  --card-bg: #f8fafc;      /* NIE čistá biela */
  --card-border: #e5e7eb;

  --text-main: #0f172a;
  --text-muted: #64748b;
}

/* ================= HEADER ================= */

/* header pozadie – mail gradient, ale vo farbe sidebaru */
.header{
  background: linear-gradient(
    135deg,
    var(--nav-dark-2),
    var(--nav-dark-1)
  ) !important;
  color: rgba(255,255,255,.92) !important;
}

/* tenký accent pásik hore (ako v emaili) */
.header::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height:4px;
  background: linear-gradient(
    90deg,
    var(--nav-accent-1),
    var(--nav-accent-2)
  );
}

/* texty v headery */
.header h1,
.header h2,
.header h3,
.header span,
.header div{
  color: rgba(255,255,255,.92);
}

/* odkazy v headery */
.header a{
  color: #ffffff;
}
.header a:hover{
  opacity: .9;
}

/* ===== Sidebar: fixná šírka + sticky scroll ===== */
.app-container{
  display:flex;
  min-height: 100vh;
}

/* aby main-content nepretláčal sidebar */
.main-content{
  display:flex;
  flex: 1 1 auto;
  min-width: 0; /* dôležité pre tabuľky/DataTables */
}

.sidebar{
  flex: 0 0 280px;     /* fix šírka */
  width: 280px;
  min-width: 280px;
  max-width: 280px;

  position: sticky;
  top: 30;
  height: 90vh;
  overflow: auto;

  display: flex;
  flex-direction: column;
}

/* TOP/BOTTOM zóny (aby spodné položky boli úplne dole) */
.sidebar-top{ flex: 1 1 auto; }
.sidebar-bottom{ flex: 0 0 auto; padding-bottom: 10px; }

/* drobnosť: ul nech nemá extra medzery */
.sidebar ul{ margin: 0; padding: 0; list-style: none; }

:root{
  --ui-font: 0.85;     /* 0.9 = -10%, 0.85 = -15% */
  --ui-space: 0.95;    /* zmenší paddingy/medzery */
}

/* globálne menšie písmo */
html{ font-size: calc(16px * var(--ui-font)); }

/* zmenši bežné paddingy */
.header{ padding: calc(20px * var(--ui-space)) !important; }
.content{ padding: calc(30px * var(--ui-space)) !important; }
.sidebar{ padding: calc(20px * var(--ui-space)) !important; }

/* menu položky kompaktnejšie */
.sidebar ul li a{
  padding: calc(10px * var(--ui-space)) calc(12px * var(--ui-space)) !important;
}

/* tlačidlá kompaktnejšie */
.btn{
  padding: calc(10px * var(--ui-space)) calc(16px * var(--ui-space)) !important;
  font-size: 0.95em !important;
}

/* inputs kompaktnejšie */
input, select{
  height: calc(38px * var(--ui-space)) !important;
}

/* ================= LOGIN HEADER (mail-style) ================= */

.login-header{
  margin: -40px -40px 30px; /* zarovná sa s paddingom login-container */
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

/* accent bar */
.login-accent-bar{
  height: 6px;
  background: linear-gradient(90deg,#2563eb,#22c55e);
}

/* tmavý header */
.login-header-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;

  padding: 18px 22px;
  background: linear-gradient(135deg,#0f172a,#1f2937);
  color: #fff;
}

/* ľavá časť */
.login-header-left{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-pill{
  display: inline-block;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  font-size: 12px;
  letter-spacing: .2px;
}

.login-title{
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.login-subtitle{
  font-size: 13px;
  opacity: .85;
}

/* pravá časť */
.login-header-right img{
  width: 120px;
  height: auto;
  display: block;
}

.swal2-popup .tpl-list{
  height: min(60vh, 560px) !important;
}

/* Editor + preview layout */
.tpl-editor-wrap{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  align-items:start;
}

.tpl-text-big{ height: min(55vh, 520px); }

.tpl-preview-col{
  min-width:0;
}

.tpl-preview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}

.tpl-preview-title{
  font-weight:700;
  color:#374151;
  font-size:13px;
}

.tpl-preview{
  height: min(55vh, 280px);
  overflow:auto;
  padding:12px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#ffffff;
}

.qqx-ac{
  position: fixed;              /* dôležité */
  z-index: 2147483647;          /* úplne navrch */
  pointer-events: auto;         /* aby to bolo klikateľné */
}
.qqx-ac *{
  pointer-events: auto;
}
.qqx-ac .it{ cursor:pointer; }

/* základ modalu */
.modal{ position:fixed; inset:0; z-index:1000; }

/* tento (cenník prác) nech je vyššie */
#work-select-modal.modal{ z-index:1100; }

/* modal pridania práce musí byť ešte vyššie */
#work-modal.modal{ z-index:1200; }

/* modal výberu materiálu (priraďovanie) ešte vyššie */
#material-select-modal.modal{ z-index:1300; }

.modal.modal-top{
  z-index: 3000 !important;
}

/* ===== Modal stacking (quote editor) ===== */
.modal.visible { z-index: 1000; }
#work-select-modal.visible { z-index: 1010; }
#work-modal.visible { z-index: 1020; }
#material-select-modal.visible { z-index: 1030; }

/* aby DataTables v modale nepretiekli mimo */
.modal .modal-content { max-width: 1100px; width: calc(100% - 40px); }

/* ===== Modal: nech sa navrstvuje korektne ===== */
.modal { position: fixed; }
.modal.visible { display: flex; }
.modal .modal-content { position: relative; }

/* ===== Rádio prepínače (Výpočet množstva) ===== */
.qq-radio-inline{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.qq-radio-inline input[type="radio"]{
  margin:0;
}

.qq-radio-inline label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:0;
  cursor:pointer;
  user-select:none;
}

#material-modal.visible,
#material-editor-modal.visible{
  z-index: 1200;
}
#material-modal.visible.on-top,
#material-editor-modal.visible.on-top{
  z-index: 1200 !important;
}
/* SweetAlert2 musí byť nad všetkými modalmi v editore */
.swal2-container{
  z-index: 999999 !important;
}

.qqx-textarea {
  width: 100%;
  min-height: 46px;
  resize: vertical;
  line-height: 1.35;
  padding: 6px 8px;
  font-size: 14px;
  font-family: inherit;
}

/* =====================================================
   DataTable – hover vs selected (nezlievanie farieb)
   ===================================================== */

/* obyčajný hover */
table.dataTable tbody tr:hover {
  background-color: #f1f5f9 !important;
}

/* označený riadok */
table.dataTable tbody tr.selected,
table.dataTable tbody tr.dt-row-selected {
  background-color: #fee2e2 !important;
}

/* hover NAD označeným riadkom */
table.dataTable tbody tr.selected:hover,
table.dataTable tbody tr.dt-row-selected:hover {
  background-color: #fecaca !important;
}

/* text nech ostane čitateľný */
table.dataTable tbody tr.selected td,
table.dataTable tbody tr.dt-row-selected td {
  color: #7f1d1d;
  font-weight: 600;
}
tr.qq-selected { background:#fee2e2 !important; }
tr.qq-selected:hover { background:#fecaca !important; }

/* ================================
   DataTables: hover vs selected
   (oprava: u teba hover farbí TD)
   ================================ */

/* 1) Hover len pre NE-označené riadky */
table.dataTable tbody tr:not(.selected):hover td,
table.dataTable tbody tr:not(.dt-row-selected):hover td{
  background: #f1f5f9 !important;
}

/* 2) Označený riadok (farbi TD, nie TR) */
table.dataTable tbody tr.selected td,
table.dataTable tbody tr.dt-row-selected td{
  background: #fee2e2 !important;
  color: #7f1d1d !important;
  font-weight: 600;
}

/* 3) Hover nad označeným (iný odtieň červenej) */
table.dataTable tbody tr.selected:hover td,
table.dataTable tbody tr.dt-row-selected:hover td{
  background: #fecaca !important;
}

/* =====================================================
   DataTables – finálne riešenie hover / selected
   ===================================================== */

/* 1) Obyčajný hover – teplá neutrálna (nie modrá) */
table.dataTable tbody tr:not(.selected):not(.dt-row-selected):hover td {
  background-color: #f8f4f1 !important;
}

/* 2) Selected – jemná červená */
table.dataTable tbody tr.selected td,
table.dataTable tbody tr.dt-row-selected td {
  background-color: #fee2e2 !important;
  color: #7f1d1d !important;
  font-weight: 600;
}

/* 3) Hover nad selected – tmavšia červená */
table.dataTable tbody tr.selected:hover td,
table.dataTable tbody tr.dt-row-selected:hover td {
  background-color: #fecaca !important;
}

/* ==========================
   QuickQuote – Manual FAB (?)
   ========================== */
.qq-help-fab{
  position: fixed;
  top: 85px;       
  right: 18px;     
  z-index: 2147483647;

  width: 52px;
  height: 52px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  font-weight: 900;
  font-size: 22px;

  background: linear-gradient(135deg, var(--nav-accent-1, #2563eb), var(--nav-accent-2, #22c55e));
  color: #fff;

  box-shadow: 0 12px 30px rgba(15,23,42,.22);
  border: 1px solid rgba(255,255,255,.25);
  user-select: none;
}

.qq-help-fab:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.qq-help-fab:active{
  transform: translateY(0);
}

/* ===== Project head compact ===== */
.qq-head-compact{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
  padding:10px 14px !important;
}
.qq-head-main{ min-width:260px; flex:1; }
.qq-head-title{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.qq-head-name{
  font-size:18px;
  font-weight:900;
  line-height:1.15;
  color:#111827;
}
.qq-head-meta{
  margin-top:4px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:#6b7280;
  font-size:12px;
}
.qq-head-actions{ display:flex; gap:8px; align-items:flex-start; }

.qq-head-compact-body{ padding:10px 14px !important; }

.qq-head-row{
  display:flex;
  gap:10px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.qq-head-chip{
  flex: 1 1 420px;
  min-width: 280px;
  padding:10px 12px;
  border:1px solid #eef2f7;
  border-radius:12px;
  background:#fbfdff;
}
.qq-head-chip-title{ font-weight:800; color:#111827; margin-right:6px; }
.qq-head-chip-main{ font-weight:800; }
.qq-head-chip-sub{
  display:block;
  margin-top:4px;
  font-size:12px;
  color:#6b7280;
}

.qq-head-note{
  flex: 1 1 320px;
  min-width: 260px;
  padding:10px 12px;
  border:1px solid #eef2f7;
  border-radius:12px;
  background:#ffffff;
}
.qq-head-note summary{
  cursor:pointer;
  font-weight:800;
  color:#111827;
  font-size:13px;
  list-style:none;
}
.qq-head-note summary::-webkit-details-marker{ display:none; }
.qq-head-note-text{
  margin-top:6px;
  font-size:12px;
  color:#111827;
  white-space:pre-wrap;
}

/* ===== Forecast slim ===== */
.qq-forecast--bottom{
  margin-top:10px;
  padding-top:8px;
  border-top:1px solid #eef2f7;
}
.qq-forecast-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.qq-forecast-left{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.qq-forecast-title{ font-size:13px; font-weight:900; color:#111827; }
.qq-forecast-mini{ font-size:12px; color:#6b7280; }
.qq-forecast-right{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  font-size:12px;
  color:#6b7280;
}
.qq-forecast-bar{
  height:8px;
  background:#eef2f7;
  border-radius:999px;
  overflow:hidden;
  margin-top:8px;
}
.qq-forecast-barfill{
  height:100%;
  background:linear-gradient(90deg,#2563eb,#22c55e);
}
.qq-forecast-bottom{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-top:6px;
  font-size:12px;
  color:#6b7280;
}

.qq-dot{ margin:0 6px; color:#cbd5e1; }

/* ===== Project header PRO (compact + clean) ===== */
.qq-headpro{
  padding: 12px 16px !important;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
}
.qq-headpro-left{ flex:1; min-width: 320px; }
.qq-headpro-top{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.qq-headpro-title{
  font-size: 20px;
  font-weight: 900;
  line-height: 1.12;
  color:#111827;
  letter-spacing:-0.2px;
}
.qq-status{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.qq-status--active{ background:#dcfce7; color:#166534; border:1px solid #86efac; }
.qq-status--done{ background:#fee2e2; color:#991b1b; border:1px solid #fca5a5; }

.qq-headpro-meta{
  margin-top: 6px;
  display:flex;
  gap: 10px 16px;
  flex-wrap:wrap;
}
.qq-headpro-item{
  font-size: 12px;
  color:#6b7280;
  white-space:nowrap;
}
.qq-headpro-k{ font-weight:800; color:#475569; margin-right:6px; }
.qq-headpro-v{ font-weight:800; color:#111827; }

.qq-headpro-actions{
  display:flex;
  align-items:flex-start;
  gap:10px;
}

.qq-headpro-body{ padding: 12px 16px !important; }

.qq-headpro-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 980px){
  .qq-headpro-grid{ grid-template-columns: 1fr; }
}

.qq-headpro-box{
  background:#ffffff;
  border:1px solid #eef2f7;
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 86px; /* rovnaký vizuálny dojem */
}
.qq-headpro-box-title{
  font-size: 13px;
  font-weight: 900;
  color:#111827;
  margin-bottom: 6px;
}
.qq-headpro-box-main{
  font-size: 14px;
  font-weight: 900;
  color:#111827;
}
.qq-headpro-box-sub{
  margin-top: 6px;
  font-size: 12px;
  color:#6b7280;
}
.qq-headpro-box-sub a{ color:#2563eb; font-weight:800; text-decoration:none; }
.qq-headpro-box-sub a:hover{ text-decoration:underline; }
.qq-headpro-note{
  font-size: 12px;
  color:#111827;
  line-height: 1.45;
  max-height: 52px;     /* aby box neťahal výšku */
  overflow: hidden;
  text-overflow: ellipsis;
}
.muted{ color:#9ca3af; }
.dot{ margin: 0 8px; color:#cbd5e1; }

/* Forecast nech je dole a slim */
.qq-forecast--bottom{
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}
.qq-forecast-bar{ height: 8px !important; }

/* =========================================
   QuickQuote PRO Tabs (owner + client)
   - lighter, modern, less "black block"
   - active = subtle pill + accent underline
   ========================================= */

.qq-tabs{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin: 10px 0 14px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

/* tab button */
.qq-tab{
  appearance:none;
  border: 1px solid transparent;
  background: transparent;
  padding: 10px 14px;
  border-radius: 999px;
  cursor:pointer;

  font-weight: 850;
  font-size: 14px;
  line-height: 1;

  color: var(--text);
  position: relative;

  transition: background .15s ease, border-color .15s ease, transform .05s ease, color .15s ease;
}

/* hover = very subtle */
.qq-tab:hover{
  background: rgba(37,99,235,0.06); /* jemná modrá “hint”, nie agresívna */
  border-color: rgba(37,99,235,0.18);
}

/* active = clean + underline indicator */
.qq-tab.active{
  background: #ffffff;
  border-color: rgba(15,23,42,0.10);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(15,23,42,0.08);
}

/* accent underline inside active pill */
.qq-tab.active::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:6px;
  height:3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nav-accent-1, #2563eb), var(--nav-accent-2, #22c55e));
}

/* press */
.qq-tab:active{ transform: translateY(1px); }

/* ===== BADGE (owner uses .tab-count, client uses .qq-tab-badge) ===== */
.qq-tab .tab-count,
.qq-tab .qq-tab-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: 8px;

  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;

  background: rgba(15,23,42,0.08);
  color: rgba(15,23,42,0.85);
}

/* active tab badge: higher contrast but still clean */
.qq-tab.active .tab-count,
.qq-tab.active .qq-tab-badge{
  background: rgba(37,99,235,0.12);
  color: #1d4ed8;
}

/* Header actions nech neodkrajujú šírku obsahu (desktop) */
@media (min-width: 900px){
  .qq-headpro{ position:relative; top: 30px; }
  .qq-headpro-actions{
    position:absolute;
    top: -30px;
    right: 16px;
    z-index: 2;
  }
  /* aby sa title/meta “nepodliezli” pod tlačidlá */
  .qq-headpro-left{ padding-right: 240px; min-width:0; }
}


.qq-top-notif{ position:relative; display:inline-flex; align-items:center; }

.qq-bell-wrap{ position:relative; }
  .qq-bell-btn{
    position:relative;
    display:inline-flex; align-items:center; justify-content:center;
    width:44px; height:44px;
    border-radius:999px;
    border:1px solid #e5e7eb;
    background:#fff;
    box-shadow: 0 8px 18px rgba(2,6,23,.08);
    cursor:pointer;
  }
  .qq-bell-btn:hover{ transform: translateY(-1px); }
  .qq-bell-ico{ font-size:18px; }
  .qq-bell-badge{
    position:absolute; top:-6px; right:-6px;
    min-width:18px; height:18px;
    padding:0 6px;
    display:inline-flex; align-items:center; justify-content:center;
    border-radius:999px;
    background:#ef4444; color:#fff;
    font-size:12px; font-weight:900;
    border:2px solid #fff;
  }
  .qq-bell-panel{
    position:absolute; right:0; top:52px;
    width:min(420px, calc(100vw - 32px));
    border:1px solid #eef2f7;
    border-radius:16px;
    background:#fff;
    box-shadow: 0 18px 40px rgba(2,6,23,.14);
    overflow:hidden;
    z-index: 9999;
  }
  .qq-bell-head{
    padding:10px 12px;
    display:flex; justify-content:space-between; align-items:center; gap:10px;
    border-bottom:1px solid #eef2f7;
    background:linear-gradient(180deg,#fff 0%, #f8fafc 100%);
  }
  .qq-bell-list{ max-height: 360px; overflow:auto; }
  .qq-bell-item{
    padding:10px 12px;
    display:flex; gap:10px;
    border-bottom:1px solid #f1f5f9;
    cursor:pointer;
  }
  .qq-bell-item:hover{ background:#f8fafc; }
  .qq-bell-dot{
    width:10px; height:10px; border-radius:999px; margin-top:6px;
    background:#e5e7eb;
    flex: 0 0 auto;
  }
  .qq-bell-item.unread .qq-bell-dot{ background:#3b82f6; }
  .qq-bell-title{ font-weight:900; color:#0f172a; font-size:13px; }
  .qq-bell-body{ color:#64748b; font-size:12px; margin-top:2px; line-height:1.35; }
  .qq-bell-time{ color:#94a3b8; font-size:11px; font-weight:800; margin-top:6px; }
  .qq-bell-foot{
    padding:8px 12px;
    border-top:1px solid #eef2f7;
    background:#fff;
	}
  	/* ===== FIX: Bell panel inside dark header ===== */
.header .qq-bell-panel{
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #0f172a !important;
  box-shadow: 0 18px 40px rgba(2,6,23,.14) !important;
}

.header .qq-bell-panel *{
  color: inherit !important;
}

.header .qq-bell-head{
  background: linear-gradient(180deg,#ffffff 0%, #f8fafc 100%) !important;
  border-bottom: 1px solid #eef2f7 !important;
}

.header .qq-bell-item{ background: transparent !important; }
.header .qq-bell-item:hover{ background:#f8fafc !important; }

.header .qq-bell-title{ color:#0f172a !important; }
.header .qq-bell-body{ color:#64748b !important; }
.header .qq-bell-time{ color:#94a3b8 !important; }
.header .qq-bell-foot{ background:#ffffff !important; }
.qq-bell-action{
  background: none;
  border: 0;
  font-size: 12px;
  color: #2563eb;
  cursor: pointer;
  padding: 4px 6px;
}
.qq-bell-action:hover{
  text-decoration: underline;
}

.qqx-dragging { opacity:.45; }
.qqx-drop-top { border-top:3px solid #2563eb !important; }
.qqx-drop-bottom { border-bottom:3px solid #2563eb !important; }
.qqx-drop-inside { outline:2px dashed #2563eb; }

.qqx-drag-handle{
  width:28px;
  cursor:grab;
  opacity:.55;
  user-select:none;
  text-align:center;
  font-size:18px;
  font-weight:900;
}
.qqx-drag-handle:hover{ opacity:1; }
.qqx-drag-handle:active{ cursor:grabbing; }

.qqx-dragging{ opacity:.45; }

/* ===== Compact ONE-PANEL bottom summary ===== */
.qqsum-one{
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:8px 10px;
  background:#fff;
}

.qqsum-line{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:baseline;
}

.qqsum-divider{
  height:1px;
  background:#eef2f7;
  margin:6px 0;
}

.qqsum-pill{
  font-size:11px;
  font-weight:900;
  padding:3px 8px;
  border-radius:999px;
  background:#e0f2fe;
  color:#0f172a;
  white-space:nowrap;
}

.qqsum-pill-muted{
  background:#f1f5f9;
  color:#334155;
}

.qqsum-name{
  font-weight:900;
  font-size:13px;
  color:#0f172a;
}

.qqsum-kv{
  font-size:12px;
  color:#334155;
  white-space:nowrap;
}
.qqsum-kv b{
  color:#0f172a;
  font-weight:900;
}

.qqsum-strong{
  font-size:13px;
  color:#0f172a;
}

.qqsum-muted{ opacity:.92; }

.qqsum-sep{ opacity:.5; }

.qqsum-spacer{ flex:1; }

.qqx-drag-handle{
  width:32px;
  text-align:center;
  color:#94a3b8;
  font-weight:900;
  cursor:grab;
  user-select:none;
}
.qqx-drag-handle:active{ cursor:grabbing; }

.qqx-task-drag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  border-radius:8px;
  color:#94a3b8;
  font-weight:900;
}
.qqx-task-drag:hover{ background:#f1f5f9; color:#475569; }
tr.qqx-drop{ outline:2px dashed #cbd5e1; outline-offset:-2px; }
tr.qqx-dragging{ opacity:.55; }

#promo-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(3, 10, 20, .72);
  backdrop-filter: blur(10px);
}

#promo-modal-overlay.show{
  display: flex;
}

body.promo-no-scroll{
  overflow: hidden !important;
}

.promo-modal{
  position: relative;
  width: min(1240px, 96vw);
  max-height: 92vh;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(227,32,32,.10), transparent 28%),
    radial-gradient(circle at bottom right, rgba(72,180,50,.10), transparent 28%),
    linear-gradient(180deg, #07111f 0%, #0a1424 100%);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 30px 90px rgba(0,0,0,.50);
  animation: promoPopIn .18s ease;
}

@keyframes promoPopIn{
  from{ opacity:0; transform:translateY(10px) scale(.985); }
  to{ opacity:1; transform:translateY(0) scale(1); }
}

.promo-close{
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: rgba(6,16,30,.70);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: .18s ease;
}

.promo-close:hover{
  transform: scale(1.06);
  background: rgba(227,32,32,.18);
  border-color: rgba(255,255,255,.2);
}

.promo-shell{
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, .8fr);
  min-height: 540px;
}

.promo-visual{
  padding: 20px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
    radial-gradient(circle at center, rgba(255,255,255,.04), transparent 60%);
}

.promo-media-frame{
  width: 100%;
  height: 100%;
  min-height: 420px;
  border-radius: 24px;
  overflow: hidden;
  background: #040b14;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-media{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #040b14;
}

.promo-panel{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 24px 24px;
  border-left: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}

.promo-panel-top{
  padding-right: 56px;
}

.promo-kicker{
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: #dbe7f8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .35px;
  margin-bottom: 12px;
}

.promo-title{
  color: #fff;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 900;
  margin-bottom: 12px;
}

.promo-meta-badge{
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255,59,48,.12);
  border: 1px solid rgba(255,59,48,.22);
  color: #ffd9d6;
  font-weight: 800;
  font-size: 13px;
}

.promo-copy{
  color: #c6d3e6;
  font-size: 16px;
  line-height: 1.7;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px;
  padding: 16px 16px;
}

.promo-benefits{
  display: grid;
  gap: 12px;
}

.promo-benefit{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #eef4ff;
  font-size: 14px;
  line-height: 1.55;
}

.promo-benefit-ico{
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(109,220,61,.14);
  color: #9df06a;
  font-weight: 900;
  margin-top: 1px;
}

.promo-actions{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: auto;
}

.promo-btn{
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  transition: .18s ease;
}

.promo-btn:hover{
  transform: translateY(-1px);
}

.promo-btn-primary{
  color: #fff;
  background: linear-gradient(135deg, #c91414 0%, #ff2b2b 100%);
  box-shadow: 0 16px 35px rgba(227,32,32,.28);
}

.promo-btn-primary:hover{
  box-shadow: 0 22px 44px rgba(227,32,32,.38);
}

.promo-btn-muted{
  color: #fff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
}

.promo-btn-ghost{
  color: #c7d4e7;
  background: transparent;
  border: 1px dashed rgba(255,255,255,.12);
}

@media (max-width: 980px){
  .promo-modal{
    width: min(96vw, 860px);
    max-height: 94vh;
    overflow: auto;
  }

  .promo-shell{
    grid-template-columns: 1fr;
  }

  .promo-panel{
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.08);
  }

  .promo-media-frame{
    min-height: 300px;
  }
}

@media (max-width: 640px){
  #promo-modal-overlay{
    padding: 14px;
  }

  .promo-visual{
    padding: 14px;
  }

  .promo-panel{
    padding: 20px 16px 16px;
  }

  .promo-title{
    font-size: 28px;
  }

  .promo-close{
    top: 12px;
    right: 12px;
    width: 46px;
    height: 46px;
    font-size: 28px;
  }
}

/* ===== LOGIN MASCOT ===== */

.login-scene{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.login-page{
  overflow-x: hidden;
}

.login-container{
  position: relative;
  z-index: 2;
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
}

.login-mascot{
  position: absolute;
  right: -155px;
  top: 52%;
  transform: translateY(-50%);
  width: 260px;
  height: auto;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 16px 30px rgba(0,0,0,.28));
}

/* veľké obrazovky */
@media (min-width: 1400px){
  .login-mascot{
    right: -116px;
    width: 350px;
  }
}

/* tablet */
@media (max-width: 1100px){
  .login-mascot{
    right: -105px;
    width: 320px;
  }
}

/* mobil */
@media (max-width: 768px){
  .login-mascot{
    display: none;
  }

  .login-scene{
    display: block;
    width: 100%;
  }

  .login-container{
    margin: 0 auto;
    max-width: 400px;
  }
}

/* Licenčný formulár - presne do stredu obrazovky */
#request-full-modal.visible{
  display: flex;
  justify-content: center;
  align-items: center !important;
  padding: 24px;
}

#request-full-modal .modal-content{
  width: min(680px, 96vw);
  max-width: 680px;
  margin: 0 !important;
  max-height: min(88vh, 820px);
  overflow-y: auto;
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(15,23,42,0.28);
}