/* SaaS */
  .app-container {
    padding:48px 24px;
    max-width:1280px;
    margin:0 auto;
  }
  .page-header {
    margin-bottom:32px;
  }
  .page-header h1 {
    font-size:28px;
    font-weight:600;
    margin:0 0 4px 0;
  }
  .page-sub {
    color:#6b7280;
    margin:0;
    font-size:15px;
  }
  .card-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
    gap:24px;
  }
  .card {
    display:block;
    background:white;
    padding:24px;
    border-radius:12px;
    box-shadow:0 4px 14px rgba(0,0,0,0.05);
    text-decoration:none;
    color:#111827;
    transition:0.2s;
    border:1px solid #e5e7eb;
  }
  button.card h3 {
      text-align: left;
      color: #007eff;
  }
  button.card p {
      text-align: left;
  }
  .card:hover {
    transform:translateY(-3px);
    box-shadow:0 10px 24px rgba(0,0,0,0.08);
    border: 1px solid #008D6F;
  }
  .card h3 {
    margin:0 0 8px 0;
    font-size:18px;
    font-weight:600;
  }
  .card p {
    margin:0;
    color:#505663;
    font-size:14px;
  }
/* Error Messages */
  .error-messages {
    background:#fee2e2;
    border:1px solid #ef4444;
    color:#991b1b;
    padding:12px 16px;
    border-radius:8px;
    margin-bottom:24px;
    font-size:14px;
  }
  .live-popup {
    background: #ffefef;
    border: 1px solid #d33;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #600;
    z-index: 5000;
    white-space: nowrap;
    pointer-events: none;
  }

/* Filter */
  .filter-icon {
    cursor: pointer;
    margin-left: 5px;
    font-size: 12px;
  }
  .table-scroll {
    position: relative;
  }
  .filter-popup {
    position: absolute;
    display: none;
    background: #fff;
    border: 1px solid #ccc;
    padding: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    z-index: 1000;
  }
  .popup-actions {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
  }
  .popup-actions button {
    font-size: 12px;
    padding: 3px 6px;
    cursor: pointer;
  }
  .popup-actions button:hover {
    background: #eee;
  }

/* MAIN */
@import url('https://fonts.googleapis.com/css?family=Poppins');

  body {
    padding-top: 75px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: #555;
    padding-bottom: 56px;
  }

  a:visited {
    text-decoration: none;
  }
  #fa {
    font-size: 2em;
    line-height: 1.4em;
  }
  dl {
    clear: both;
    overflow: hidden;
    margin: 0.5em 0;
    width: 100%;
  }
  dt {
    float: left;
    text-align: left;
    color: #333;
    width: 250px;
    font-weight: bold;
  }
  dd {
    float: left;
    margin-left: 10px;
    text-align: left;
  }
  dd input {
    width: 500px !important;
  }
  #operations {
    clear: both;
    margin: 1em 0 1em 75px;
  }
  a.back-link {
    margin-left: 0px;
  }
  .search-box {
    display: flex;
    position: relative;
    margin: 1em 0;
  }
  input.table-search-input {
    width: 100%;
    padding: 0.3em;
    padding-left: 37px;
    border: 1.5px solid #0078D4;
    border-radius: 5px;
  }
  .search-box::before {
    content: '';
    position: absolute;
    padding: 0 5px;
    width: 25px;
    height: 100%;
    background: url(https://cdn4.iconfinder.com/data/icons/kripto-black-2/512/kripto-search-b.png) center center / 60% no-repeat;
    background-color: #0078D4;
    color: #fff;
    z-index: 10;
  }

/* Footer */
  footer { font-size: .9em; margin: 10px; color: #999; text-align: center;}
  footer .content { display: inline; }
  footer a { margin-left: 10px; color: #777; }
  footer a:visited { color: #777; }
  footer a:hover { color: #008D6F; text-decoration: none; }

/* HEADERS */
  .quote_headers {
    /*background-color: #2ec4b6;*/
    background-color: #0078D4;
    border-bottom: 1px solid #f0f0f0;
    padding: 5px 10px;
    z-index: 1;
    margin-bottom: 10px;
  }
  .quote_head {
    background-color: #0078D4;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 30px;
    z-index: 1;
    margin-bottom: 10px;
  }
  .quote_head h2 {
    text-align: center;
    margin: 0;
    color: #fff;
  }
  .quote_headers h4 {
    text-align: left;
    margin: 0;
    color: #fff;
  }


/* ACTIONS */
  .actions1 {
    margin-bottom: 1em;
    margin-left: 4px;
  }

/* ERRORS */
  .errors {
    display: inline-block;
    border: 2px solid red;
    color: red;
    padding: 1em;
    margin-bottom: 1em;
    margin-top: 1em;
    background: #fff;
    margin-left: 10px;
  }
  .errors ul {
    margin-bottom: 0;
    padding-left: 1em;
  }

/* SESSION MESSAGES */
  #message {
    color: #00A34A;
    background: white;
    border: 2px solid #00A34A;
    padding: 1em 15px;
    margin: 1em 30px;
    max-width: 1200px;
    text-align:  center;
    font-weight: bold;
    text-decoration: underline;
    margin: 0 auto;
    margin-bottom: 10px;
  }
  .field-error-popup {
    position: absolute;
    background: #fff;
    color: #d9534f;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 9999;
    display: none;
    border: 2px solid #d9534f;
    box-shadow: 0 0 6px rgba(0,0,0,.4);
  }
.field-error-popup::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 10px;
    border-width: 6px;
    border-style: solid;
    border-color: #d9534f transparent transparent transparent;
  }
  .invalid {
    border: 2px solid red !important;
    background: #f8d7da;
  }

  .valid {
    border: 2px solid green !important;
    background: #d4edda;
  }
  .live-field-error-popup {
    position: absolute;
    background: #fff;
    color: #d9534f;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 99999;
    display: none;
    box-shadow: 0 0 6px rgba(0,0,0,.4);
    border: 2px solid #d9534f;
  }

/* A LINKS */
  a.aanpassen {
    color: #f2c437 !important;
    padding-left: 10px;
    font-size: 0.9em;
    text-decoration: none;
    transition: all .2s ease-in-out;
    font-style: italic;
  }
  a.aanpassen:hover {
      font-style: normal;
      text-decoration: underline;
    }

/* TABLES */
  .quote_table tr:nth-child(odd) {
      background-color: #fff;
    }
  .quote_table tr:nth-child(even) {
      background-color: #f1f1f1;
    }
  .quote_table tr {
      border-bottom: 1px solid #ddd;
    }
  #table_input1{
   width: 400px;
    }
  #table_input2{
     width: 100px;
     margin-left: 80px;
     -moz-appearance: textfield;
     text-align: right;

      }
  .quote_table th:first-child,
  .quote_table td:first-child {
      padding-left: 10px;
      min-width: 450px;
    }
  .quote_table td,
  .quote_table th {
      padding: 8px 8px;
      display: table-cell;
      text-align: left;
      vertical-align: top;
    }
  .quote_table th {
      font-weight: bold;
    }
  .quote_table {
    font-size: 13px!important;
    border: 1px solid #ccc;
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    display: table;
    }

  /* ==========================
     GENERIEKE TABEL STIJL
  ========================== */

  .table-scroll {
    overflow-x: auto;
    width: 100%;
  }

  .reusable-table {
    width: 100%;
    table-layout: fixed;     /* ⬅️ essentieel */
    border-collapse: collapse;
  }

  /* Alle cellen */
  .reusable-table th,
  .reusable-table td {
    padding: 5px 10px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Eerste kolom altijd 10% */
  .reusable-table th:first-child,
  .reusable-table td:first-child {
    width: 6%;
    font-weight: 600;
  }
  .reusable-table td:first-child {
    background-color: rgba(0, 120, 212, 0.6);
    text-align: center;
  }
  .reusable-table .col-title {
    width: 30%;
  }
  .reusable-table .col-stap {
    width: 40%;
  }
  /* rest verdeelt automatisch */
  .reusable-table col:not(.col-id):not(.col-title):not(.col-stap) {
    width: auto;
  }

  /* Klikbare rijen */
  .reusable-table tr[data-href] {
    cursor: pointer;
  }

  /* Sticky header (optioneel, werkt met scroll) */
  .reusable-table thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    background-color: #0078D4;
    text-transform: uppercase;
    font-size: .8em;
    line-hseven: 12px;
    color: #fff;
  }
  .reusable-table tbody tr { border-top: 1px solid rgba(255,255,255,.8); transition: background-color .6s, color .6s; }
  .reusable-table tr { border-top: 1px solid rgba(255,255,255,.8); transition: background-color .6s, color .6s; }
  .reusable-table tr:nth-child(even) { background-color: rgba(177, 201, 219, .7); }
  .reusable-table tr:nth-child(odd) { background-color: rgba(219, 239, 255, .7); }
  .reusable-table tbody tr:hover { color: #000; background-color: rgba(46, 196, 182,.3); }

  @media (max-width: 768px) {

    .form_container {
      margin-top: 5px!important;
    }

    /* Tabelstructuur uitschakelen */
    .reusable-table,
    .reusable-table thead,
    .reusable-table tbody {
      display: block;
      width: 100%;                 /* ✅ schermbreedte */
    }

    .reusable-table thead {
      display: none;
    }

    /* Elke rij = card */
    .reusable-table tr {
      display: block;
      margin: 0 12px 16px;         /* ✅ padding links/rechts van scherm */
      border: 1px solid #ddd;
      border-radius: 10px;
      background: #fff;
      overflow: hidden;            /* ✅ header full width */
      transition: background-color 0.2s ease;
    }

    /* Hover / tap effect */
    .reusable-table td:hover {
      background-color: rgba(46, 196, 182, 0.25);
    }

    .reusable-table tr:active {
      background-color: rgba(46, 196, 182, 0.6);
    }

    .reusable-table tr[data-href] {
      cursor: pointer;
    }

    /* Cell layout */
    .reusable-table td {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      border: none;
      padding: 8px 12px;           /* ✅ interne padding */
      width: 100%;
    }

    /* Label links */
    .reusable-table td::before {
      content: attr(data-label);
      font-weight: 600;
      flex: 0 0 30%;
      color: #444;
    }

    /* Waarde rechts */
    .reusable-table td > * {
      flex: 1;
    }

    /* Eerste kolom = card header */
    .reusable-table td:first-child {
      display: block;
      width: 100%;
      background-color: rgba(0, 120, 212, 0.15);
      font-weight: 700;
      padding: 12px;
      margin: 0;
      text-align: left;
    }
  }

/* BUTTONS */

  #button_pos {
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    z-index: 2;
  }
  button#fmea_add_row, button#sipoc_add_row  {
      margin: 10px 0;
      padding: 8px 35px;
      border-radius: 5px;
      border: 2px solid #2BBFB7;
      color: #2BBFB7;
      background: #fff;
      }
  button#fme_add_row:hover. button#sipoc_add_row:hover {
    border-radius: 5px;
    background: #2BBFB7;
    border: 2px solid #2BBFB7;
    color: #fff;
    }
  button.delete-row {
    padding: 8px;
    text-align: center;
    border-radius: 5px;
    vertical-align: middle;
    border: 2px solid #2BBFB7;
    color: #2BBFB7;
    background: #fff;
    }
  button.delete-row:hover {
    border-radius: 5px;
    background: #2BBFB7;
    border: 2px solid #2BBFB7;
    color: #fff;
    }
  button.make-fmea-btn {
    padding: 8px;
    text-align: center;
    border-radius: 5px;
    vertical-align: middle;
    border: 2px solid #2BBFB7;
    color: #2BBFB7;
    background: #fff;
    }
  button.make-fmea-btn:hover {
    border-radius: 5px;
    background: #2BBFB7;
    border: 2px solid #2BBFB7;
    color: #fff;
    }
  button.button-box-grow.effect-box-grow {
    /* Generic styles for a button */
    width: 230px;
    margin: 10px 10px;
    font-size: 0.8em;
    color: #0078D4;
    background-color: transparent;
    border: 0.1em solid #0078D4;
    border-radius: 0.6em;
    padding: 1.2em 1.5em;
    position: relative;
    z-index: 1;
    overflow: hidden;
    font-weight: 300;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1.2em;
  }
  button.button-box-grow.effect-box-grow:hover {
    /* Generic Hover style for a button */
    color: #fff;
  }
  button.button-box-grow.effect-box-grow::after {
    /* Adds the overlay for creating slide effect */
    content: '';
    position: absolute;
    background-color: #0078D4;
    z-index: -1;
    padding: 0.25em 0.5em;
    display: block;
    transition: all 0.35s;
  }
  button.button-box-grow.effect-box-grow:hover::after {
    /* Hover effect for the overlay slide effect */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: all 0.35s;
  }
  button.button-box-grow.effect-box-grow::after {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    transform: scale(0, 0);
  }
  button.button-box-grow.effect-box-grow:hover::after {
    transform: scale(1, 1);
  }
  /* AI Button container */
  .ai_container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
  }

  /* Button */
  .ai_btn {
  position: relative;
  padding: 10px 44px 10px 28px; /* extra ruimte rechts voor ⭐ */
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.3px;
  background:
    linear-gradient(#0b0f1a, #0b0f1a) padding-box,
    linear-gradient(135deg, #7c3aed, #c084fc) border-box;
  overflow: hidden;
}

  .ai_btn::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 7px;
    background: #0b0f1a;        /* normaal: donker */
    z-index: 0;
    transition: background 200ms ease;
  }
  .ai_btn:hover::before {
    background: #ffffff;       /* 🤍 hover = wit */
  }

  .ai_btn::after {
    content: attr(data-text);
    background: linear-gradient(135deg, #7c3aed, #c084fc);
    -webkit-background-clip: text;
    color: transparent;
    position: relative;
    z-index: 1;
  }

  /* Sterren */
  .ai-stars {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%) scale(1);
    opacity: 1;                 /* ⭐ altijd zichtbaar */
    z-index: 2;
    pointer-events: none;
    color: #c084fc;
    animation: sparkle 2s ease-in-out infinite;
  }

  /* Hover effect */
  .ai_btn:hover {
    box-shadow: 0 0 18px rgba(192, 132, 252, 0.35);
  }

  .ai_btn:hover::after {
    filter: brightness(1.2);
  }
  .ai-stars {
    color: #c084fc;
  }
  /* Sparkle animation */
  @keyframes sparkle {
    0% {
      transform: translateY(-50%) scale(1);
      opacity: 0.85;
    }
    50% {
      transform: translateY(-58%) scale(1.15);
      opacity: 1;
    }
    100% {
      transform: translateY(-50%) scale(1);
      opacity: 0.85;
    }
  }
  /* Modal backdrop */
  .ai-modal {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 26, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 200ms ease, visibility 200ms ease;
    z-index: 9999;
  }

  /* Modal zichtbaar */
  .ai-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Modal box */
  .ai-modal-content {
    background: #0b0f1a;
    color: #fff;
    padding: 28px 36px;
    border-radius: 12px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 0 30px rgba(192, 132, 252, 0.35);
  }
  .ai-filled {
    border: 1px solid #c084fc !important;
    background-color: #faf5ff;
  }

/* INPUT */

  input#calc_price::-webkit-outer-spin-button,
  input#calc_price::-webkit-inner-spin-button {
    -webkit-appearance: none;
     margin: 0;
   }
  #table_input {
   -moz-appearance: textfield;
  }
  input#table_input::-webkit-outer-spin-button,
  input#table_input::-webkit-inner-spin-button {
   -webkit-appearance: none;
    margin: 0;
  }
  .spinner {
    width: 42px;
    height: 42px;
    margin: 20px auto 0;
    border-radius: 50%;
    border: 3px solid rgba(192, 132, 252, 0.25);
    border-top-color: #c084fc;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
/* Navigatie Menu */
  .nav2026 {
    background: #0078D4;
    color: #fff;
    font-family: 'Inter', sans-serif;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: fixed;              /* <-- Always top */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
  }
  .nav-mobile-logo {
    display: none;
  }
  .nav-item:hover > a,
  .nav-dropdown li:hover > a {
    background: #2bbfb7;
  }
  .nav-brand img {
    height: 50px;
    width: auto;
    display: block;
  }
  .nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 55px;
    justify-content: space-between;
  }
  .nav-brand {
    display: flex;                /* <-- For logo */
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
  }

/* Menu structure */
  .nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    margin-right: 100px;
    padding: 0;
  }
  .nav-menu a {
    padding: 4px 30px 0 30px;
    height: 55px;
    display: flex;
    align-items: center;
    font-weight: 500;
    text-decoration: none;
  }
  .nav-item:hover > a {
    background: #2bbfb7;
  }
  .nav-menu a:visited {
    color: #fff;
    text-decoration: none;
  }
  .nav-item {
    position: relative;
  }
  .nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    min-width: 200px;
    background: #141a24;
    border-radius: 6px;
    padding: 0px 0;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  }
  .nav-dropdown li a {
    padding: 8px 16px;
  }
  .nav-dropdown li:hover > a {
    box-shadow: inset 0 -2px 0 rgba(255,255,255,0.25);
  }
  .nav-item:hover > .nav-dropdown {
    display: block;
    background: #0078d4;
  }

  /* Hamburger */
  .nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    border: none;
    background: transparent;
    cursor: pointer;
  }
  .nav-toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
  }

  /* ===== Mobile ===== */
  @media(max-width: 900px) {

    body {
      padding-top: 55px;
    }
    .nav-inner { padding-right: 0; }
    .nav-menu {
      right: 0;
      margin: 0;
      padding: 0;
      position: fixed;
      top: 55px;
      width: 260px;
      height: calc(100vh - 55px);
      background: #0078D4;
      flex-direction: column;
      display: none;
      padding: 0;
      border-left: 1px solid rgba(255,255,255,0.15);
      overflow-y: auto;
      gap: 0;
    }

    .nav-menu a {
      height: auto;
      border-radius: 0;
      padding: 12px 20px;
      }

    .nav-mobile-logo {
      padding: 20px 0;
      border-bottom: 1px solid rgba(255,255,255,0.2);
      display: flex;
      justify-content: center;
    }

    .nav-mobile-logo img {
      height: 42px;
      width: auto;
    }

    .nav-dropdown {
      background: rgba(0,0,0,0.12);
      box-shadow: none;
      border-radius: 0;
      padding: 0;
      position: static;     /* ← key fix */
      display: none;
      width: 100%;
      background: rgba(0,0,0,0.12);
      }
    .nav-item.open > .nav-dropdown {
      display: block;
      }
    .nav-dropdown li a {
      padding: 10px 20px;
    }

    .nav-toggle {
      display: flex;
      margin-right: 50px;
    }

    .nav-item:hover > .nav-dropdown {
      display: none; /* hover disabled in mobile */
    }
  }
