body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
 /* background: linear-gradient(205deg, #ffffff, #002857)*/
 /*background: #eef2f7;*/
 background: linear-gradient(
    180deg,
    #eef2f7 0%,
    #cfd9e6 100%
  );
  
}

.header {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    background-color: #0f264f;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}
.page-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* History on the right */
  height: 90px;             /* ✅ match sidebar logo area */
  width: 100%;
  padding: 0 24px;
  border-bottom: 1px solid rgba(15, 38, 79, 0.08);
}

/* Centered title */
.page-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0b1f3a;
  line-height: 1; /* helps vertical centering */
}

.btn-outline {
  background: transparent;
  border: 1px solid #0f264f;
  color: #0f264f;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}

.btn-outline:hover {
  background: rgba(15, 38, 79, 0.06);
}

.stats-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 20px 10px;
}

.stat-badge{
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.85;
  background-color: rgba(0, 40, 87, 0.08);
  color: rgb(0, 40, 87);
  border: 1px solid rgba(0, 40, 87, 0.2);

}

label.cursor-help:hover span {
  opacity: 1;
}

.gradient-blue {
    background: linear-gradient(135deg, #0f264f, #005bba);
}

.gradient-gold {
    background: linear-gradient(135deg, #c79c5a, #9b733b);
}

.form-container {
    display: flex;
    justify-content: center;
    width: 100%;
    
}

.container { 
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto;
}

.box {
  width: 95%;
  height: auto;
    background: #fff;
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.06);
  
  overflow: hidden;
  margin: 0 auto;
  padding: 18px;
}

.box-title{
    font-size: 16px;
    margin-left: 10px;
    margin-top: 10px;
}

.form-entry {
    margin-bottom: 1rem;
    border-left: 1px solid rgba(15, 38, 79, 0.12);
    border-bottom: 1px solid rgba(15, 38, 79, 0.12);
}

.form-fields {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-fields-dynamic {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    /*border: 0.1rem solid #cbd5e0;*/
    /*padding: 15px 15px;*/
    border-radius: 8px;
    margin-left: 10px;
    margin-right: 10px;
}

.rest-field {
    width: 100%;
    margin-top: 10px;
}

.field {
    flex: 1;
}

.label {
    display: block;
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.input,select {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d6deea;
  font-size: 14px;
  color: #111827;
  background-color: #fff;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}

.input:focus, select:focus{
  outline: none;
  border-color: #0f264f;
  box-shadow: 0 0 0 2px rgba(15, 38, 79, 0.15);
}

/* normalize select look */
select.input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.25rem;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1rem;
}


.remove-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  margin: 0 0 6px 10px;
  text-align: left;
}

.remove-btn:hover {
  color: #d91f3d;
}


.add-btn-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    margin-right: 10px;
    margin-bottom: 10px;
   
}

.add-btn {
    background-color: white;
    font-weight: bold;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;   /* Right aligned */
    align-items: center;
    padding: 0 10px 10px 10px;
    box-sizing: border-box;      /* Prevents overflow */
    overflow-x: hidden;          /* Stops horizontal overflow */
}

.submit-btn {
    background-color: #193b7a;
    color: white;
    font-weight: bold;
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #0f2953;
}

.phrases-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    margin-top: 10px;
    margin-left: 10px;
    max-width: 90%;
}

.phrase {
  background-color: rgb(236, 240, 246);
  color: rgb(0, 40, 87);
  border: 1px solid rgba(0, 40, 87, 0.25);
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 12px;
  font-weight: 600;
}

.phrase:hover {
  background-color: rgb(0, 40, 87);
  color: white;
}

.result { 
    padding: 10px; 
    margin-bottom: 10px; 
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    width: 80%;
    margin-top: 10px;
}
.loading { 
    font-size: 18px; 
    font-weight: bold; 
    color: #555; 
}

.suggestions-table {
    width: 100%;
    
}

.suggestions-table th {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    background: linear-gradient(180deg, #0f264f 0%, #123267 100%);
    
}
.suggestions-table td {
    padding: 8px;
    text-align: center;
    background: transparent;
    
}
.suggestions-table th{
    color: white;
    font-weight: 700;
}
.suggestions-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-scrollable {
  max-height: 50vh;   
  overflow-y: auto;
}

.suggestion-box{
    border-radius: 8px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom:20px;
}
.highlighted {
    background-color: rgb(129 189 239 / 60%)
}

.result-title {
    display: grid;
    grid-template-columns: auto 1fr auto; /* Left auto (logo), center 1fr (title), right auto (optional space) */
    align-items: center; /* Align items vertically */
    justify-content: center; /* Centers the grid container */
    width: 100%;
    color: #0f264f;
    margin-top: 1rem;
    position: relative;
    font-size: 24px;
    font-weight: bold;
}

.back-button {
    justify-self: start; /* Keep the logo on the left */
}

h1 {
    justify-self: center; /* Centers the title */
    margin: 0;
    font-size: 1.5rem;
}

.back-icon {
    height: 40px; /* Adjust the size as needed */
}

.help-button {
    justify-self: end; 
    color: #0f264f;
    border: none;
    padding: 8px 16px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    margin-right: 15px;
    background-color: white;
    height: 50px;
}

.pricing-rules {
    flex: 1;
    height: auto;
    background-color: white;
    border: 0.1rem solid #cbd5e0;
    border-radius: 8px;
}

.rules-input {
    width: 60%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 0.375rem;
    font-size: 1rem;
    color: #2d3748;
    background-color: white;
}

.sidebar {
    position: fixed;
    top: 100px;
    left: 0;
    width: 250px;
    height: 85vh;
    background-color: white;
    color: black;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border: 0.1rem solid #cbd5e0;
    border-radius: 8px;
    overflow-y: auto;
  }

  .sidebar.show {
    transform: translateX(0);
  }

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

  .sidebar li {
    margin: 10px 0;
  }

  .toggle-button {
    margin: 20px;
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
  }

  .modal-overlay{
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 18px;
}

.modal {
    width: 560px;
    max-width: 100%;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
    border: 1px solid rgba(15, 38, 79, 0.08);
}

.modal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(15, 38, 79, 0.08);
}



.modal-title{
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0b1f3a;
  letter-spacing: 0.2px;
}

.modal-close{
  background: transparent;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 6px 8px;
  border-radius: 8px;
}
.modal-close:hover{
  background: rgba(15, 38, 79, 0.06);
}

/* Body */
.modal-body{
  padding: 16px 18px 8px;
}

.modal-status{
  background: #f8fafc;
  padding: 14px;
}

.modal-label{
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.modal-input{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(15, 38, 79, 0.18);
  border-radius: 10px;
  outline: none;
  font-size: 14px;
  color: #0b1f3a;
  background: #fff;
}
.modal-input:focus{
  border-color: rgba(25, 59, 122, 0.65);
  box-shadow: 0 0 0 4px rgba(25, 59, 122, 0.12);
}

.modal-body-save-rules {
  padding: 0px;

}

.modal-footer{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(15, 38, 79, 0.08);
}

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

.status-subrow{
  margin-top: 6px;
  font-size: 12px;
  color: #475569;
}

.mt-8{ margin-top: 8px; }

.status-label{
  font-size: 13px;
  font-weight: 600;
  color: #0f264f;
}

.status-pill{
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.pill-ok{
  background: rgba(22, 163, 74, 0.10);
  border-color: rgba(22, 163, 74, 0.25);
  color: #166534;
}

.pill-warn{
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.30);
  color: #92400e;
}

.pill-danger{
  background: rgba(220, 38, 38, 0.10);
  border-color: rgba(220, 38, 38, 0.25);
  color: #991b1b;
}

/* Costs */
.costs{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(15, 38, 79, 0.18);
}

.cost-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size: 13px;
  color: #334155;
}

.cost-note{
  margin-top: 8px;
  font-size: 12px;
  color: #475569;
}

/* Message */
.modal-message{
  margin-top: 12px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
}

.msg-ok{
  background: rgba(15, 38, 79, 0.06);
  color: #0f264f;
}

.msg-danger{
  background: rgba(220, 38, 38, 0.10);
  color: #991b1b;
}

/* Actions */
.modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(15, 38, 79, 0.08);
}

/* Buttons (match your palette) */
.btn-primary{
  background: rgb(0, 40, 87);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 40, 87, 0.22);
}

.btn-secondary{
  background: #eef2f7;
  color: #0f264f;
  border: 1px solid rgba(15, 38, 79, 0.16);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.btn-secondary:hover{
  background: #e6edf6;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}

.card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 300px;
    padding: 15px;
    box-sizing: border-box;
    transition: transform 0.3s;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.card-text {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.card-text strong {
    font-weight: bold;
}

.card a {
    text-decoration: none;
    color: inherit;
}

.card a:visited {
    color: inherit;
}

.card a:link {
    color: inherit;
}

.tooltip-container {
    position: relative;
    display: inline-block;
  }

  .tooltip-container .tooltip-text {
    visibility: hidden;
    background-color: #f3f3f3;
    color: #333;
    padding: 8px 12px;
    border-radius: 8px;
    position: absolute;
    bottom: 125%; /* Show above the image */
    left: 50%;
    transform: translateX(-50%);
    max-width: 200px;
    white-space: normal; /* Allows wrapping */
    text-align: left;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
    width: 100px;
  }

  .tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
  }

  .suggestions-table-wrapper {
  /*max-height: 55vh;     */  
  overflow-y: auto;        /* vertical scroll */
  overflow-x: auto;        /* horizontal scroll */
  width: 100%;
  
}

.suggestions-table1 {
  width: max-content;  /* 👈 allows table to grow wider */
  min-width: 100%;     /* 👈 but never smaller than container */
  border-collapse: collapse;
}

.section-divider {
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.section-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eef2f7;
  padding-left: 12px;
  border-left: 4px solid rgb(0, 40, 87);

}

.section-title{
  font-size: 18px;        /* smaller = cleaner */
  font-weight: 700;
  color: #0f264f;
  margin: 0;
  letter-spacing: 0.2px;
}
.section-subtitle{
  font-size: 14px;        /* smaller = cleaner */
  font-weight: 500;
  color: #0f264f;
  margin: 0;
  letter-spacing: 0.2px;
}

.section-actions{
  display:flex;
  gap: 10px;
  align-items:center;
}

.btn-primary-outline, .btn-unreliable-data-outline {
  
  color: rgb(0, 40, 87);
  border: 1.5px solid rgb(0, 40, 87);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.18s ease;
}
.btn-unreliable-data-outline {
  background-color: white;
 
}
.btn-primary-outline {
  background-color: transparent;
 
}
/* Hover = commitment */
.btn-primary-outline:hover, .btn-unreliable-data-outline:hover {
  background-color: rgb(0, 40, 87);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 40, 87, 0.25);
}

.btn-cancel-outline {
  background-color: transparent;
  border: 1.5px solid rgb(177, 55, 69);
  color: rgb(177, 55, 69);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.18s ease;
}
.btn-primary-outline.btn-wide {
  min-width: 180px;   /* 👈 controls width */
  justify-content: center;
}

/* Hover = commitment */
.btn-cancel-outline:hover {
  background-color: rgb(177, 55, 69);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(177, 55, 69, 0.25);
}

/* Disabled */
.btn-primary-outline:disabled, .btn-unreliable-data-outline:disabled, .btn-cancel-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.submit-error {
  color: #8a1f2b;
  font-size: 13px;
  background: #fff5f5;
  border: 1px solid #f3caca;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

/* Toster */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000000;
}
.toast-success {
  width: 500px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.22);
  border: 1px solid rgba(22, 163, 74, 0.25);
  overflow: hidden;
  font-size: 13px;
}

.toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
  font-weight: 700;
}

.toast-close {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #166534;
}

.toast-body {
  padding: 12px 14px;
  color: #334155;
}

.toast-body code {
  display: inline-block;
  margin-left: 4px;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}


.edit-button{
  background: white;
  border: 1px solid rgba(15, 38, 79, 0.16);
  border-radius: 10px;
}

/* state label */
.save-state{
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
  white-space: nowrap;
  opacity: .9;
}

/* Dirty vs Saved styles */
.edit-cell.is-dirty .save-state{ color: #b45309; }  /* amber */
.edit-cell.is-saved .save-state{ color: #166534; }  /* green */

/* INPUT reacts */
.edit-cell.is-dirty .edit-input{
  border-color: rgba(245, 158, 11, 0.75);
  background: rgba(245, 158, 11, 0.08);
}
.edit-cell.is-saved .edit-input{
  border-color: rgba(22, 163, 74, 0.55);
  background: rgba(22, 163, 74, 0.06);
}

/* BUTTON reacts */
.save-icon-btn.btn-dirty{
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.12);
}
.save-icon-btn.btn-dirty .icon{
  fill: #b45309; /* amber */
}

.save-icon-btn.btn-saved{
  border-color: rgba(22, 163, 74, 0.55);
  background: rgba(22, 163, 74, 0.10);
}
.save-icon-btn.btn-saved .icon{
  color: #166534; /* check uses stroke */
  fill: none;
}

/* still keep your hover polish */
.save-icon-btn.btn-dirty:hover{
  background: rgba(245, 158, 11, 0.18);
}
.save-icon-btn.btn-saved:hover{
  background: rgba(22, 163, 74, 0.14);
}



/* Buttons */
.btn-rules{
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: 150ms ease;
}
.btn-primary-rules{
  background: #193b7a;
  color: #fff;
}
.btn-primary-rules:hover{
  filter: brightness(0.95);
}
.btn-ghost-rules{
  background: #fff;
  color: #193b7a;
  border-color: rgba(25, 59, 122, 0.35);
}
.btn-ghost-rules:hover{
  background: rgba(25, 59, 122, 0.06);
}
.btn-danger-rules{
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}
.btn-danger-rules:hover{
  background: rgba(239, 68, 68, 0.14);
}
.btn-rules:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
}
.modal-inline-message{
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.modal-inline-message-success{
  color: #15803d; /* green */
}

.modal-inline-message-error{
  color: #b91c1c; /* red */
}

.box--transparent {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

[x-cloak] { display: none !important; }

.stats-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:16px;
  margin-top:16px;
}

.stat-card{
  background:#fff;
  border-radius:12px;
  padding:18px 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.stat-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

.stat-label{
  color:#3f5d81;
  font-size:16px;
  margin-bottom:10px;
  font-weight:600;
}

.stat-value{
  font-size:28px;
  font-weight:700;
  color:#0f264f;
}

.muted{
  color:#667085;
}

