/* public/assets/css/style.css */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Spline+Sans:wght@400;500;600&display=swap");

      :root {
        --bg: #f6f7fb;
        --surface: #ffffff;
        --muted: #6c737f;
        --text: #1b1f2a;
        --border: #e6e8ef;
        --chip: #f1f3f8;
        --primary: #1e63ff;
        --green: #7bdc8c;
        --green-strong: #2fa84f;
        --orange: #f5c493;
        --orange-strong: #d7832c;
        --shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
        --radius-lg: 18px;
        --radius-md: 14px;
        --radius-sm: 10px;
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        font-family: "Spline Sans", sans-serif;
        color: var(--text);
        background: radial-gradient(circle at top right, #eef2ff, #f9fafc 55%);
      }

      .page {
        max-width: 1200px;
        margin: 32px auto 60px;
        padding: 0 20px;
      }

      .toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        align-items: center;
        justify-content: space-between;
        background: var(--surface);
        border-radius: var(--radius-lg);
        padding: 18px 20px;
        box-shadow: var(--shadow);
      }

      .search-wrap {
        flex: 1 1 320px;
        display: flex;
        align-items: center;
        gap: 10px;
        background: var(--chip);
        border-radius: 999px;
        padding: 10px 14px;
      }

      .search-wrap svg {
        width: 18px;
        height: 18px;
        stroke: var(--muted);
      }

      .search-input {
        border: none;
        background: transparent;
        outline: none;
        width: 100%;
        font-size: 14px;
        color: var(--text);
      }

      .chips {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
      }

      .chip {
        border: 1px solid var(--border);
        background: var(--surface);
        border-radius: 999px;
        padding: 8px 16px;
        font-weight: 600;
        font-size: 13px;
        color: var(--text);
        cursor: pointer;
        transition: all 0.2s ease;
      }

      .chip.is-active {
        background: #e8f0ff;
        border-color: #cddcff;
        color: var(--primary);
        box-shadow: 0 6px 18px rgba(30, 99, 255, 0.12);
      }

      .status-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .status-btn {
        border-radius: 999px;
        border: none;
        padding: 10px 18px;
        font-weight: 600;
        font-size: 13px;
        cursor: pointer;
        background: #f5f6fb;
        color: var(--muted);
        transition: all 0.2s ease;
      }

      .status-btn.is-active.status-ready {
        background: #dff6e5;
        color: var(--green-strong);
      }

      .status-btn.is-active.status-future {
        background: #fff0df;
        color: var(--orange-strong);
      }

      .filters {
        margin-top: 18px;
        background: var(--surface);
        border-radius: var(--radius-lg);
        padding: 20px;
        box-shadow: var(--shadow);
      }

      .filters-grid {
        display: grid;
        grid-template-columns: repeat(7, minmax(140px, 1fr));
        gap: 14px;
      }

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

      .field-label {
        font-size: 12px;
        color: var(--muted);
        font-weight: 600;
      }

      .input,
      select {
        width: 100%;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 12px 14px;
        font-size: 13px;
        background: #fff;
        color: var(--text);
        outline: none;
        transition: border-color 0.2s ease;
      }

      .input:focus,
      select:focus {
        border-color: #c7d8ff;
      }

      .mfi-range {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }

      .filters-actions {
        margin-top: 16px;
        display: flex;
        justify-content: flex-end;
      }

      .is-hidden {
        display: none !important;
      }

      .load-alert {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 16px;
        border-radius: var(--radius-md);
        background: #fff1f2;
        border: 1px solid #fecdd3;
        color: #b91c1c;
        font-size: 13px;
        font-weight: 600;
      }

      .load-alert button {
        border: none;
        background: #fee2e2;
        color: #b91c1c;
        padding: 8px 14px;
        border-radius: 999px;
        font-weight: 600;
        cursor: pointer;
      }

      .loading-state {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 16px;
        border-radius: var(--radius-md);
        background: var(--surface);
        box-shadow: var(--shadow);
        font-size: 13px;
        color: var(--muted);
      }

      .spinner {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        border: 2px solid #d7dbea;
        border-top-color: var(--primary);
        animation: spin 0.8s linear infinite;
      }

      @keyframes spin {
        to {
          transform: rotate(360deg);
        }
      }
      .reset-btn {
        border: 1px solid var(--border);
        background: #fff;
        border-radius: 999px;
        padding: 10px 18px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        color: var(--text);
      }

      .table-section {
        margin-top: 22px;
      }

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

      .results-count {
        color: var(--muted);
        font-size: 13px;
        font-weight: 600;
      }

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

      table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 12px;
        min-width: 980px;
      }

      thead th {
        text-align: left;
        font-size: 12px;
        font-weight: 600;
        color: var(--muted);
        background: #f0f2f7;
        padding: 14px 12px;
      }

      tbody tr {
        background: var(--surface);
        box-shadow: var(--shadow);
      }

      tbody td {
        padding: 16px 12px;
        font-size: 13px;
        vertical-align: middle;
      }

      tbody td:first-child {
        border-radius: var(--radius-md) 0 0 var(--radius-md);
      }

      tbody td:last-child {
        border-radius: 0 var(--radius-md) var(--radius-md) 0;
      }

      .product-cell {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .product-name {
        font-weight: 600;
        font-size: 13px;
      }

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

      .badge {
        display: inline-flex;
        align-items: center;
        padding: 4px 10px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
      }

      .badge.category-pp {
        background: #e1f0ff;
        color: #1f62c7;
      }

      .badge.category-pe {
        background: #e8f6f2;
        color: #1f7a66;
      }

      .badge.category-ps {
        background: #f7e9ff;
        color: #8a4bb6;
      }

      .badge.category-abs {
        background: #fff1df;
        color: #c97b1b;
      }

      .badge.category-mp {
        background: #f4f5f8;
        color: #5a6270;
      }

      .badge.application {
        background: #f0f4ff;
        color: #2d5bd1;
      }

      .badge.status-ready {
        background: #dff6e5;
        color: var(--green-strong);
      }

      .badge.status-future {
        background: #fff0df;
        color: var(--orange-strong);
      }

      .quantity {
        font-weight: 600;
      }

      .price {
        font-weight: 600;
      }

      .price-note {
        color: var(--muted);
        font-size: 12px;
        margin-top: 6px;
      }

      .buy-btn {
        border: none;
        background: #e9f0ff;
        color: #1f4fd1;
        border-radius: 12px;
        padding: 10px 16px;
        font-weight: 600;
        cursor: pointer;
      }

      .cards {
        display: none;
      }

      .card {
        background: var(--surface);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
        padding: 18px;
        display: flex;
        flex-direction: column;
        gap: 14px;
      }

      .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

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

      .card-label {
        font-size: 11px;
        color: var(--muted);
        font-weight: 600;
        margin-bottom: 4px;
      }

      .card-value {
        font-size: 13px;
        font-weight: 600;
      }

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

      @media (max-width: 1200px) {
        .filters-grid {
          grid-template-columns: repeat(3, minmax(160px, 1fr));
        }
      }

      @media (max-width: 900px) {
        .toolbar {
          flex-direction: column;
          align-items: stretch;
        }

        .status-toggle {
          justify-content: flex-start;
        }
      }

      @media (max-width: 768px) {
        .filters-grid {
          grid-template-columns: repeat(2, minmax(160px, 1fr));
        }

        table {
          display: none;
        }

        .cards {
          display: grid;
          gap: 16px;
        }
      }

      @media (max-width: 560px) {
        .filters-grid {
          grid-template-columns: 1fr;
        }

        .card-grid {
          grid-template-columns: 1fr;
        }

        .card-footer {
          flex-direction: column;
          align-items: stretch;
        }

        .buy-btn {
          width: 100%;
          text-align: center;
        }
      }

      .detail-modal {
        position: fixed;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        z-index: 1000;
        transition: opacity 0.2s ease;
      }

      .detail-modal.is-open {
        opacity: 1;
        pointer-events: auto;
      }

      .detail-modal__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(15, 18, 25, 0.55);
      }

      .detail-modal__dialog {
        position: relative;
        z-index: 1;
        width: min(920px, 92vw);
        max-height: 90vh;
        background: var(--surface);
        border-radius: 20px;
        box-shadow: 0 24px 80px rgba(8, 10, 20, 0.35);
        display: flex;
        flex-direction: column;
        gap: 18px;
        padding: 24px;
        overflow: hidden;
        transform: translateY(10px);
        transition: transform 0.2s ease;
      }

      .detail-modal.is-open .detail-modal__dialog {
        transform: translateY(0);
      }

      .detail-modal__close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid var(--border);
        background: #fff;
        color: var(--text);
        font-size: 20px;
        cursor: pointer;
      }

      .detail-modal__header {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .detail-modal__title {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
      }

      .detail-modal__sub {
        color: var(--muted);
        font-size: 13px;
        font-weight: 600;
      }

      .detail-modal__carousel {
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .detail-modal__track {
        flex: 1;
        min-height: 260px;
      }

      .detail-modal__slide {
        display: none;
      }

      .detail-modal__slide.is-active {
        display: block;
      }

      .detail-modal__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 18px;
        background: #f8f9fd;
        border-radius: 16px;
        padding: 18px;
      }

      .detail-modal__actions {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 12px;
      }

      .detail-modal__tds-link--primary {
        background: #1f4fd1;
        color: #fff;
      }

      .detail-modal__grid div {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .detail-modal__grid span {
        font-size: 12px;
        color: var(--muted);
        font-weight: 600;
      }

      .detail-modal__grid strong {
        font-size: 14px;
        font-weight: 600;
        color: var(--text);
      }

      .detail-modal__tds {
        background: #f8f9fd;
        border-radius: 16px;
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .detail-modal__tds-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .detail-modal__tds-title {
        font-weight: 600;
        font-size: 14px;
      }

      .detail-modal__tds-link {
        text-decoration: none;
        background: #e9f0ff;
        color: #1f4fd1;
        border-radius: 999px;
        padding: 8px 14px;
        font-size: 12px;
        font-weight: 600;
      }

      .detail-modal__tds-body {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .detail-modal__tds-frame {
        width: 100%;
        height: 360px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #fff;
      }

      .detail-modal__tds-empty {
        color: var(--muted);
        font-size: 13px;
        padding: 24px;
        text-align: center;
        border: 1px dashed var(--border);
        border-radius: 12px;
        background: #fff;
      }

      .detail-modal__nav {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid var(--border);
        background: #fff;
        color: var(--text);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
      }

      .detail-modal__nav:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(16, 24, 40, 0.12);
      }

      .detail-modal__footer {
        display: flex;
        justify-content: flex-end;
      }

      .detail-modal__close-btn {
        border: none;
        background: var(--primary);
        color: #fff;
        padding: 10px 18px;
        border-radius: 999px;
        font-weight: 600;
        cursor: pointer;
      }

      @media (max-width: 900px) {
        .detail-modal__dialog {
          width: min(680px, 92vw);
          padding: 20px;
        }

        .detail-modal__grid {
          grid-template-columns: 1fr;
        }
      }

      @media (max-width: 640px) {
        .detail-modal__carousel {
          gap: 6px;
        }

        .detail-modal__nav {
          width: 32px;
          height: 32px;
        }

        .detail-modal__tds-frame {
          height: 280px;
        }
      }

      .kp-footer {
        margin-top: 32px;
        background: #ffffff;
        border-top: 1px solid var(--border);
      }

      .kp-footer__inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 24px 20px;
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        gap: 20px;
      }

      .kp-footer__brand {
        display: flex;
        flex-direction: column;
        gap: 8px;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.5;
      }

      .kp-footer__logo {
        font-weight: 600;
        font-size: 16px;
        color: var(--text);
      }

      .kp-footer__links,
      .kp-footer__contact {
        display: flex;
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
        color: var(--muted);
      }

      .kp-footer__links a {
        color: inherit;
        text-decoration: none;
        font-weight: 600;
      }

      .kp-footer__links a:hover {
        color: var(--primary);
      }

      .kp-footer__bottom {
        max-width: 1200px;
        margin: 0 auto;
        padding: 12px 20px 20px;
        font-size: 12px;
        color: var(--muted);
        border-top: 1px dashed var(--border);
      }

      @media (max-width: 900px) {
        .kp-footer__inner {
          grid-template-columns: 1fr 1fr;
        }
      }

      @media (max-width: 640px) {
        .kp-footer__inner {
          grid-template-columns: 1fr;
        }
      }
