

    .app {
        display: flex;
        min-height: 100vh;
    }

    /* боковое меню */
    .sidebar {
        width: 300px;
        background: #ffffff;
        border-right: 1px solid #e6edf4;
        padding: 28px 0 24px 0;
        box-sizing: border-box;
        flex-shrink: 0;
        height: 100vh;
        position: sticky;
        top: 0;
        /* overflow-y: auto; */
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.02);
    }

    .logo-area {
        padding: 0 20px 24px 24px;
        border-bottom: 1px solid #eff3f8;
        margin-bottom: 24px;
    }

    .logo-area .logoA{
        background-size: 245px 78px;
    }

    .logo-area img {
        max-width: 180px;
        height: auto;
        display: block;
    }

    .nav-menu {
        list-style: none;
        padding: 0 12px;
    }

    .nav-item {
        padding: 10px 16px;
        margin-bottom: 4px;
        border-radius: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 500;
        color: #3a546d;
        transition: 0.2s;
    }

    .nav-item a{
      text-decoration: none;
      font-weight: 500;
      color: #3a546d;
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 100%;
    }

    .nav-item.active {
        background: #eef3fc;
        color: #0098db;
        font-weight: 600;
    }

    .nav-item.active a{
        background: #eef3fc;
        color: #0098db;
        font-weight: 600;
    }

    .nav-item:hover:not(.active) {
        background: #f5f8fe;
    }

    .nav-icon {
        font-size: 1.2rem;
        width: 28px;
    }

    .nav-item {}

    .main-content {
        flex: 1;
        padding: 24px 32px;
        overflow-x: auto;
    }

    .top-bar {
        background: white;
        border-radius: 20px;
        padding: 12px 24px;
        margin-bottom: 28px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
        border: 1px solid #eef2f8;
    }

    .user-info {
        display: flex;
        align-items: center;
        gap: 16px;
        background: #f8fafd;
        padding: 5px 16px 5px 20px;
        border-radius: 40px;
        cursor: pointer;
    }

    .user-name {
        font-weight: 500;
        color: #1a5f7a;
    }

    .logout-btn {
        color: #8a99ae;
        text-decoration: none;
        font-size: 0.85rem;
    }

    .widgets-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        margin-bottom: 32px;
    }

    .stat-card {
        background: white;
        border-radius: 24px;
        padding: 20px;
        border: 1px solid #eef3fc;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
        transition: transform 0.2s, box-shadow 0.2s;
        text-decoration: none;
        color: #1e3a5f;
    }

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    }

    .stat-title {
        font-size: 0.85rem;
        text-transform: uppercase;
        color: #6c819e;
        letter-spacing: 0.5px;
        margin-bottom: 12px;
    }

    .stat-value {
        font-size: 2rem;
        font-weight: 700;
        color: #1e3a5f;
    }

    .section-panel {
        background: white;
        border-radius: 28px;
        padding: 24px 28px;
        margin-bottom: 32px;
        border: 1px solid #eef3fc;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    }

    .section-content {
        display: none;
    }

    .section-content.active-section {
        display: block;
        animation: fade 0.2s ease;
    }

    @keyframes fade {
        from { opacity: 0; transform: translateY(4px);}
        to { opacity: 1; transform: translateY(0);}
    }

    .section-title {
        font-size: 1.4rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        color: #1f4a6e;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Стили для раздела ИИ-подбора (как на index_test.php) */
    .ai-requests-container {
        /* max-width: 800px; */
        margin: 0 auto;
    }

    .ai-requests-container .queriesBlock{
      padding: 0px;
      box-shadow: none;
      border-radius: 20px;
    }

    .ai-label {
        font-weight: 500;
        margin-bottom: 8px;
        color: #2c3e50;
    }

    .ai-requests-container .card form .ai-textarea {
        width: 100%;
        padding: 16px;
        border: 1px solid #cde0ef;
        border-radius: 20px;
        font-family: inherit;
        font-size: 0.95rem;
        resize: vertical;
        background: #fafcff;
        transition: 0.2s;
    }

    .ai-requests-container .card form .ai-textarea:focus {
        outline: none;
        border-color: #0098db;
        box-shadow: 0 0 0 3px rgba(0, 152, 219, 0.1);
    }

    .ai-hint {
        margin-top: 6px;
        margin-bottom: 16px;
    }

    .ai-save-btn {
        background: #0098db;
        color: white;
        border: none;
        padding: 10px 24px;
        border-radius: 40px;
        font-weight: 600;
        cursor: pointer;
        transition: 0.2s;
        margin-bottom: 32px;
    }

    .ai-save-btn:hover {
        background: #0077b3;
        transform: translateY(-1px);
    }

    .saved-requests-title {
        font-weight: 600;
        font-size: 1.1rem;
        margin: 24px 0 12px 0;
        color: #1f4a6e;
    }

    .saved-requests-list {
        background: #f9fbfe;
        border-radius: 20px;
        border: 1px solid #eef3fc;
        padding: 16px;
        min-height: 150px;
    }

    .request-item-ai {
        padding: 10px 12px;
        border-bottom: 1px solid #eef3fc;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .request-item-ai:last-child {
        border-bottom: none;
    }

    .request-text {
        color: #1e2a3a;
        word-break: break-word;
        flex: 1;
    }

    .delete-request {
        background: none;
        border: none;
        color: #c44;
        cursor: pointer;
        font-size: 1.2rem;
        padding: 4px 8px;
        border-radius: 20px;
        transition: 0.1s;
    }

    .delete-request:hover {
        background: #fee;
    }

    .clear-all-btn {
        background: none;
        border: 1px solid #cde0ef;
        padding: 6px 16px;
        border-radius: 30px;
        color: #5e748c;
        cursor: pointer;
        font-size: 0.8rem;
        margin-top: 12px;
        transition: 0.2s;
    }

    .clear-all-btn:hover {
        background: #f5f8fe;
        border-color: #b8cfdf;
    }

    .empty-state {
        text-align: center;
        color: #8a9bb0;
        padding: 24px;
    }

    /* остальные стили */
    .data-table, .catalog-table {
        width: 100%;
        border-collapse: collapse;
    }

    .data-table th, .data-table td,
    .catalog-table th, .catalog-table td {
        text-align: left;
        padding: 14px 12px;
        border-bottom: 1px solid #eff3f8;
        vertical-align: middle;
    }

    .data-table th, .catalog-table th {
        font-weight: 600;
        color: #5e748c;
        font-size: 0.8rem;
        background: #fafcff;
    }

    .data-table tr:hover, .catalog-table tr:hover {
        background: #fafcff;
    }

    .status-badge {
        background: #e4f0e8;
        color: #2c6e3c;
        padding: 4px 12px;
        border-radius: 40px;
        font-size: 0.7rem;
        font-weight: 500;
        display: inline-block;
    }

    .status-badge.warning {
        background: #fff0db;
        color: #c47a2e;
    }

    .stock-positive { color: #2c6e3c; font-weight: 500; }
    .stock-low { color: #c47a2e; font-weight: 500; }
    .stock-zero { color: #c44; font-weight: 500; }

    .qty-input {
        width: 80px;
        padding: 8px 10px;
        border: 1px solid #cde0ef;
        border-radius: 12px;
        text-align: center;
    }

    .btn-small {
        background: #0098db;
        border: none;
        padding: 6px 14px;
        border-radius: 30px;
        font-size: 0.75rem;
        font-weight: 500;
        cursor: pointer;
        color: white;
        transition: 0.2s;
    }

    .btn-small:hover {
        background: #0077b3;
        transform: translateY(-1px);
    }

    .request-item, .price-row, .api-card {
        background: #fafcff;
        border: 1px solid #ecf3f9;
        border-radius: 20px;
        padding: 14px 18px;
        margin-bottom: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .fav-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 18px;
    }

    .fav-card {
        background: #fbfdff;
        border: 1px solid #eef2f8;
        border-radius: 20px;
        padding: 16px;
    }

    .api-card { display: block; }
    pre {
        background: #f1f5f9;
        padding: 12px;
        border-radius: 16px;
        overflow-x: auto;
        font-size: 0.75rem;
        margin: 12px 0;
    }

    .search-block {
        background: white;
        border-radius: 28px;
        padding: 28px 32px;
        text-align: center;
        border: 1px solid #eef3fc;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    }

    .search-title {
        font-size: 1.6rem;
        font-weight: 700;
        color: #1f5777;
        margin-bottom: 8px;
    }

    .search-form {
        display: none;
        gap: 12px;
        margin: 0px 0px 0px 2%;
        animation: slideIn 0.3s ease;
    }

    .inline-search-show{
        border: 0px;
        background: none;
        display: flex;
        cursor: pointer;
        margin-top: 7px;
    }

    .searchLine{
      display: flex;
      min-width: 50%;
      position: relative;
    }



    .search-form.active {
      display: block;
    }


    /* КОМПАКТНЫЙ ВИДЖЕТ КОРЗИНЫ */
    .cart-widget {
        position: fixed;
        left: 20px;
        top: 137px;
        width: 260px;
        background: white;
        border-radius: 30px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        z-index: 1000;
        font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
        transition: all 0.2s ease;
    }

    .cart-widget-header {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 8px;
        background: #0098db;
        border-radius: 30px;
        cursor: pointer;
        color: white;
        font-size: 12px;
    }

    .cart-icon {
        font-size: 14px;
    }

    .cart-badge {
        background: #dd007a;
        border-radius: 20px;
        padding: 2px 8px;
        font-size: 12px;
        font-weight: bold;
        min-width: 20px;
        text-align: center;
    }

    .cart-arrow {
        margin-left: auto;
        font-size: 12px;
        transition: transform 0.2s;
    }

    .cart-widget.open .cart-arrow {
        transform: rotate(180deg);
    }

    .cart-widget-body {
        background: white;
        border-radius: 20px;
        margin-top: 8px;
        padding: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border: 1px solid #eee;
    }

    .cart-stats {
        display: flex;
        justify-content: space-between;
        font-size: 13px;
        padding-bottom: 8px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 8px;
        font-weight: 500;
    }

    /* Скролл для списка товаров */
    .cart-items-scroll {
        max-height: 250px;
        overflow-y: auto;
        margin-bottom: 8px;
    }

    /* Кастомизация скролла */
    .cart-items-scroll::-webkit-scrollbar {
        width: 4px;
    }

    .cart-items-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .cart-items-scroll::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

    .cart-items-scroll::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

    .cart-items-mini {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .cart-items-mini li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 12px;
        padding: 8px 0;
        border-bottom: 1px solid #f5f5f5;
        gap: 6px;
    }

    .cart-items-mini .item-name {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cart-items-mini .item-qty {
        color: #666;
        font-size: 11px;
        background: #f0f0f0;
        padding: 2px 6px;
        border-radius: 12px;
        min-width: 35px;
        text-align: center;
    }

    .cart-items-mini .item-price {
        font-weight: 500;
        color: #2c3e50;
        min-width: 45px;
        text-align: right;
    }

    .item-sum{
      white-space: nowrap;
    }

    .custom-modal {
        display: none;
        position: fixed;
        z-index: 10001;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        animation: fadeIn 0.2s ease;
    }

    .custom-modal-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: white;
        padding: 30px;
        border-radius: 12px;
        width: 90%;
        max-width: 400px;
        text-align: center;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        animation: slideIn 0.3s ease;
    }

    .custom-modal-close {
        position: absolute;
        right: 15px;
        top: 10px;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        color: #999;
        transition: color 0.2s;
    }

    .custom-modal-close:hover {
        color: #333;
    }

    .custom-modal-icon {
        font-size: 60px;
        margin-bottom: 20px;
    }

    .custom-modal-title {
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 15px;
        color: #2c3e50;
    }

    .custom-modal-message {
        font-size: 14px;
        color: #666;
        margin-bottom: 25px;
        line-height: 1.5;
    }

    .custom-modal-button {
        background: #0098db;
        color: white;
        border: none;
        padding: 10px 30px;
        border-radius: 25px;
        font-size: 16px;
        cursor: pointer;
        transition: background 0.2s;
    }

    .custom-modal-button:hover {
        background: #45a049;
    }

    .checkout-container {
        display: flex;
        flex-wrap: wrap;
        gap: 28px;
    }

    .cart-items-section {
        flex: 3;
        min-width: 280px;
        background: white;
        border-radius: 28px;
        padding: 24px 28px;
        border: 1px solid #eef3fc;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    }

    .order-summary-section {
        flex: 1;
        min-width: 280px;
    }

    .summary-card {
        background: white;
        border-radius: 28px;
        padding: 24px 28px;
        border: 1px solid #eef3fc;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
        position: sticky;
        top: 24px;
    }

    .section-title {
        font-size: 1.3rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        color: #1f4a6e;
    }

    .cart-table {
        width: 100%;
        border-collapse: collapse;
    }

    .cart-table th,
    .cart-table td {
        text-align: left;
        padding: 16px 12px;
        border-bottom: 1px solid #eff3f8;
        vertical-align: middle;
    }

    .cart-table th {
        background: #fafcff;
        font-weight: 600;
        color: #5e748c;
        font-size: 0.8rem;
    }

    .cart-table tr:hover {
        background: #fafcff;
    }

    .product-name {
        font-weight: 500;
        color: #1f3f52;
    }

    .product-sku {
        font-size: 0.7rem;
        color: #8a9bb0;
        margin-top: 4px;
    }

    .cart-qty-input {
        width: 70px;
        padding: 8px 8px;
        border: 1px solid #cde0ef;
        border-radius: 12px;
        text-align: center;
        font-size: 0.85rem;
    }

    .remove-item {
        background: none;
        border: none;
        font-size: 1.1rem;
        cursor: pointer;
        color: #c44;
        transition: 0.1s;
        padding: 4px 8px;
        border-radius: 20px;
    }

    .remove-item:hover {
        background: #fee;
    }

    .summary-row {
        display: flex;
        justify-content: space-between;
        padding: 12px 0;
        border-bottom: 1px solid #eef3fc;
        font-size: 1rem;
    }

    .summary-total {
        display: flex;
        justify-content: space-between;
        padding: 16px 0;
        font-size: 1.2rem;
        font-weight: 700;
        color: #1f4a6e;
        border-top: 2px solid #eef3fc;
        margin-top: 8px;
    }

    .checkout-btn {
        background: #0098db;
        color: white;
        border: none;
        padding: 14px 28px;
        border-radius: 40px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: 0.2s;
        width: 100%;
        margin-top: 24px;
    }

    .checkout-btn:hover {
        background: #0077b3;
        transform: translateY(-1px);
        box-shadow: 0 6px 12px rgba(0, 152, 219, 0.2);
    }

    .back-to-cart {
        background: none;
        border: 1px solid #cde0ef;
        padding: 8px 16px;
        border-radius: 30px;
        cursor: pointer;
        font-size: 0.8rem;
        margin-top: 16px;
        width: 100%;
        display: none;
    }

    .back-to-cart:hover {
        background: #f5f8fe;
    }

    .breadcrumb {
        background: white;
        border-radius: 20px;
        padding: 12px 24px;
        margin-bottom: 24px;
        font-size: 0.85rem;
        color: #6c819e;
        border: 1px solid #eef2f8;
    }

    .breadcrumb a {
        color: #0098db;
        text-decoration: none;
        cursor: pointer;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes slideIn {
        from {
            transform: translate(-50%, -60%);
            opacity: 0;
        }
        to {
            transform: translate(-50%, -50%);
            opacity: 1;
        }
    }

    .remove-item-mini {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 12px;
        opacity: 0.5;
        padding: 0 4px;
        transition: opacity 0.2s;
    }

    .remove-item-mini:hover {
        opacity: 1;
        color: #e74c3c;
    }

    .empty-mini {
        text-align: center;
        color: #999;
        padding: 20px;
        font-size: 12px;
    }

    .cart-buttons {
        display: flex;
        gap: 8px;
        margin-top: 8px;
    }

    .btn-mini-checkout,
    .btn-mini-clear {
        flex: 1;
        padding: 8px;
        border: none;
        border-radius: 20px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 500;
        transition: all 0.2s;
    }

    .btn-mini-checkout {
        background: #27ae60;
        color: white;
    }

    .btn-mini-checkout:hover {
        background: #219a52;
    }

    .btn-mini-clear {
        background: #dd007a;
        color: white;
    }

    .btn-mini-clear:hover {
        background: #d35400;
    }

    .cart-widget.attention {
        animation: shake 0.5s ease-in-out 0s 2;
        box-shadow: 0 0 0 3px #dd007a;
        padding: 8px;
    }

    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        25% { transform: translateX(-5px); }
        75% { transform: translateX(5px); }
    }


/* блок результатов поиска */
      .search-results-header {
          background: white;
          border-radius: 28px;
          padding: 24px 28px;
          margin-bottom: 28px;
          border: 1px solid #eef3fc;
          box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
      }

      .search-query {
          font-size: 1.3rem;
          font-weight: 600;
          color: #1f4a6e;
          margin-bottom: 20px;
      }

      .search-query span {
          color: #0098db;
      }

      /* БЛОК РАЗДЕЛОВ КАТАЛОГА */
      .catalog-sections-block {
          background: #f9fbfe;
          border-radius: 20px;
          padding: 16px 20px;
          margin-bottom: 24px;
          border: 1px solid #eef3fc;
      }

      .sections-title {
          font-weight: 600;
          font-size: 0.85rem;
          text-transform: uppercase;
          color: #6c819e;
          margin-bottom: 12px;
          letter-spacing: 0.5px;
      }

      .sections-list {
          display: flex;
          flex-wrap: wrap;
          gap: 12px;
      }

      .section-chip {
          background: white;
          border: 1px solid #cde0ef;
          border-radius: 40px;
          padding: 8px 18px;
          font-size: 0.85rem;
          font-weight: 500;
          cursor: pointer;
          transition: all 0.2s;
          display: inline-flex;
          align-items: center;
          gap: 8px;
          position: relative;
      }

      .section-chip a{
        text-decoration: none;
        color:#1e2a3a;
      }

      .section-chip:hover {
          border-color: #0098db;
          background: #f0f8ff;
      }

      .section-chip.active {
          background: #0098db;
          border-color: #0098db;
          color: white;
      }

      .section-chip.active.moreItems:hover{
          background: none;
      }

      .section-chip.active.moreItems:hover a{
        color: #0098db;
      }

      .section-chip.active.moreItems:hover .section-count{
        color: #0098db;
      }

      .section-chip.active a{
        color: white;
      }

      .section-count {
          background: #eef3fc;
          border-radius: 30px;
          padding: 2px 8px;
          font-size: 0.7rem;
          font-weight: 600;
          color: #1e5f7e;
      }

      .section-chip .remove{
        position: absolute;
        top: -8px;
        right: -8px;
        cursor: pointer;
      }

      .section-chip.hiddenItemSect{
        display: none;
      }

      .section-chip.active .section-count {
          background: rgba(255,255,255,0.25);
          color: white;
      }

      .filter-bar {
          display: flex;
          flex-wrap: wrap;
          gap: 12px;
          margin-bottom: 20px;
          align-items: center;
      }

      .filter-select {
          padding: 8px 16px;
          border: 1px solid #cde0ef;
          border-radius: 40px;
          background: white;
          font-size: 0.85rem;
          color: #2c3e50;
          cursor: pointer;
      }

      .filter-tag {
          background: #eff4fa;
          padding: 6px 14px;
          border-radius: 40px;
          font-size: 0.8rem;
          cursor: pointer;
          transition: 0.1s;
      }

      .filter-tag.active {
          background: #0098db;
          color: white;
      }

      .results-count {
          font-size: 0.85rem;
          color: #6c819e;
          margin-left: auto;
      }

      /* ТАБЛИЦА ТОВАРОВ */
      .products-table-wrapper {
          background: white;
          border-radius: 28px;
          border: 1px solid #eef3fc;
          margin-bottom: 32px;
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
      }

      .products-table {
          width: 100%;
          border-collapse: collapse;
          font-size: 0.9rem;
          background: #ffffff;
      }

      .products-table th,
      .products-table td {
          text-align: left;
          padding: 16px 14px;
          border-bottom: 1px solid #eff3f8;
          vertical-align: middle;
      }

      .products-table th {
          background: #fafcff;
          font-weight: 600;
          color: #5e748c;
          font-size: 0.8rem;
      }

      .dopinfoblock{
        margin-top: 10px;
        display: none;
      }

      .dopinfoblock strong{
        display: block;
      }

      .prodnameitem{
          cursor: pointer
       }

      .prodnameitem span{
          cursor: pointer;
          position: relative;
          display: inline-block;
          width: 10px;
          height: 10px;
          box-sizing: border-box;
      }

      .prodnameitem span::before {
          content: "";
          width: 2px;
          height: 10px;
          background: #2980b9;
          position: absolute;
          top: 50%;
          right: 50%;
          margin-right: -1px;
          margin-top: -5px;
      }

      .prodnameitem span::after {
          content: "";
          width: 10px;
          height: 2px;
          background: #2980b9;
          display: block;
          position: absolute;
          top: 50%;
          margin-top: -1px;
          right: 0px;
      }

      .prodnameitem span.active::before {
          transform: scale(0);
      }

      .products-table tr:hover {
          background: #fafcff;
      }

      .product-sku {
          white-space: nowrap;
          font-size: 0.8rem;
          color: #5e748c;
      }

      .product-name {
          font-weight: 500;
          color: #1f3f52;
          word-break: break-all;
      }

      .product-type {
          display: inline-block;
          background: #f0f5fa;
          padding: 4px 10px;
          border-radius: 20px;
          font-size: 0.7rem;
          color: #2c6a86;
      }

      .btn-primary.add-to-cart-btn.added{
        background: #dd007a;
        color: #fff;
      }

      .cart-clear-icon-item{
        font-style: normal;
        cursor: pointer;
      }



      /* Стили для кнопки очистки корзины */
      #clear-cart-btn {
          background: #f44336;
          color: white;
          border: none;
          padding: 10px 20px;
          border-radius: 4px;
          cursor: pointer;
          transition: background 0.3s;
          display: none;
      }

      .buttonBlock{
        white-space: nowrap;
      }

      #clear-cart-btn:hover {
          background: #d32f2f;
      }

      /* Или для иконки */
      .cart-clear-icon {
          font-size: 20px;
          transition: transform 0.3s;
      }

      .cart-clear-icon:hover {
          transform: scale(1.1);
      }

      /* Стили для input с нулевым значением */
      .qty-input[value="0"] {
          border-color: #ff9800;
          background-color: #fff3e0;
      }

      .product-price {
          font-weight: 600;
          color: #1e3a5f;
          white-space: nowrap;
      }

      .stock-positive {
          color: #2c6e3c;
          font-weight: 500;
          white-space: nowrap;
      }
      .stock-low {
          color: #c47a2e;
          font-weight: 500;
      }
      .stock-zero {
          color: #c44;
          font-weight: 500;
      }

      .qty-input {
          width: 80px;
          padding: 8px 10px;
          border: 1px solid #cde0ef;
          border-radius: 12px;
          text-align: center;
          font-size: 0.85rem;
      }

      .btn-primary {
          background: #0098db;
          border: none;
          padding: 8px 18px;
          border-radius: 30px;
          font-size: 0.75rem;
          font-weight: 500;
          color: white;
          cursor: pointer;
          transition: 0.2s;
          white-space: nowrap;
      }

      .btn-primary:hover {
          background: #0077b3;
          transform: translateY(-1px);
      }

      .btn-primary:disabled {
          background: #b0c4de;
          cursor: not-allowed;
      }

      /* пагинация */
      .pagination {
          display: flex;
          justify-content: center;
          gap: 8px;
          margin-top: 30px;
          flex-wrap: wrap;
          padding-bottom: 30px;
      }
      .page-btn {
          display: inline-block;
          padding: 8px 14px;
          background: white;
          border: 1px solid #ddd;
          border-radius: 8px;
          text-decoration: none;
          color: #333;
          transition: all 0.2s;
          font-size: 14px;
      }
      .page-btn:hover {
          background: #fff;
          border-color: #0098db;
          color: #0098db;
      }
      .page-btn.active {
          background: #dd007a;
          border-color: #dd007a;
          color: white;
      }
      .page-btn.disabled {
          opacity: 0.5;
          cursor: not-allowed;
          background: #f5f5f5;
      }
      .page-btn.disabled:hover {
          background: #f5f5f5;
          border-color: #ddd;
          color: #333;
      }
      .page-arrow {
          font-weight: 500;
      }
      .page-dots {
          padding: 8px 4px;
          color: #666;
      }




@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}


.search-input {
    flex: 3;
    min-width: 500px;
    padding: 10px 20px;
    border-radius: 60px;
    border: 1px solid #cde0ef;
    font-size: 0.95rem;
    margin-right: 10px;
}

.search-btn {
    background: #0098db;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 60px;
    font-weight: 600;
    cursor: pointer;
}

.popular-tags {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tag {
    background: #eff4fa;
    padding: 5px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    color: #2c6a86;
    cursor: pointer;
}

.footer {
    margin-top: 28px;
    text-align: center;
    color: #8a9bb0;
    font-size: 0.7rem;
    padding: 16px;
}

.cart-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0098db;
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    display: none;
    z-index: 1000;
}


.orders-container {
    padding: 20px;
}
.status-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    border-bottom: 1px solid #e0e0e0;
}
.status-tab {
    padding: 10px 20px;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
}
.status-tab.active {
    background: #0098db;
    color: white;
}
.status-tab:hover {
    background: #ddd;
}
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.status-N { background: #ff9800; color: white; }
.status-P { background: #2196f3; color: white; }
.status-F { background: #0098db; color: white; }
.status-DN { background: #9c27b0; color: white; }
.status-A { background: #00bcd4; color: white; }
.status-C { background: #f44336; color: white; }
.order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}
.order-header {
    padding: 15px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.order-header-left {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}
.order-number {
    font-weight: bold;
    font-size: 16px;
}
.order-date {
    color: #666;
    font-size: 14px;
}
.order-price {
    font-weight: bold;
    font-size: 18px;
    color: #0098db;
}
.order-body {
    padding: 20px;
}
.order-items-table {
    width: 100%;
    border-collapse: collapse;
}
.order-items-table th {
    text-align: left;
    padding: 10px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}
.order-items-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #0098db;
    font-size: 20px;
}
.order-items-detail {
    display: none;
    margin-top: 15px;
}
.order-items-detail.show {
    display: block;
}
.empty-orders {
    text-align: center;
    padding: 50px;
    background: #f9f9f9;
    border-radius: 12px;
}
.summary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    font-weight: bold;
    font-size: 18px;
    color: #0098db;
}


.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.section-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
    display: block;
}
.section-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    border-color: #0098db;
}
.section-icon {
    font-size: 40px;
    margin-bottom: 12px;
}
.section-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}
.section-count {
    color: #666;
    font-size: 13px;
}
.subsections-block {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.subsections-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
}
.subsections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.subsections-list li {
    margin: 0;
}
.subsections-list a {
    display: inline-block;
    padding: 6px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: all 0.2s;
}
.subsections-list a:hover {
    background: #0098db;
    border-color: #0098db;
    color: white;
}
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
}
.filter-tag {
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}
.filter-tag.active {
    background: #0098db;
    color: white;
}
.filter-tag:not(.active) {
    background: #f5f5f5;
    color: #333;
}
.results-count {
    margin-left: auto;
    color: #666;
}
.clear-filters {
    padding: 8px 15px;
    background: #ff9800;
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: #e8e8e8;
    color: #333;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}
.empty-products {
    text-align: center;
    padding: 50px;
    background: #f9f9f9;
    border-radius: 12px;
}
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.page-subtitle {
    color: #666;
    margin-bottom: 24px;
}

.loader {
    text-align: center;
    padding: 10px;
    color: #666;
    display: none;
}

.saveResults{
  display: none;
}

.loader::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.showMoreModels {
    margin-top: 10px;
    text-align: center;
    cursor: pointer;
}

.placeholder-models {
    color: #999;
    font-style: italic;
    padding: 8px;
    text-align: center;
}

.more-models-trigger {
    text-align: center;
    padding: 5px;
}

.show-more-models {
    background: none;
    border: none;
    color: #4caf50;
    cursor: pointer;
    font-size: 13px;
}

.show-more-models:hover {
    text-decoration: underline;
}


.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}
.profile-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 30px;
}
.profile-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #0077b3;
    color: #333;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}
.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}
.form-group input:focus {
    outline: none;
    border-color: #0098db;
}
.form-group input:disabled {
    background: #f5f5f5;
    color: #999;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
}
.phone-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}
.row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.row .form-group {
    flex: 1;
}
.password-requirements {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

a{
  color: #0098db
}
/* Стили для страницы прайс-листа */

.pricelist-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.pricelist-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.pricelist-title {
    background: #0098db;
    color: white;
    padding: 20px 25px;
    font-size: 20px;
    font-weight: 600;
}

.price-info {
    padding: 25px;
}

.price-info p {
    margin: 10px 0;
    font-size: 16px;
}

.group-badge {
    background: #0098db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: inline-block;
}

.product-count {
    font-size: 24px;
    font-weight: bold;
    color: #0098db;
}

/* ========== КНОПКИ СКАЧИВАНИЯ - РАВНОМЕРНО ПО ШИРИНЕ ========== */
.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 0 25px 25px 25px;
}

.download-buttons .btn-download,
.download-buttons .btn-xml {
    flex: 1;
    min-width: 180px;
    text-align: center;
    justify-content: center;
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.btn-download {
    display: inline-flex;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn-csv {
    background: #48bb78;
    color: white;
}

.btn-csv:hover {
    background: #38a169;
    transform: translateY(-2px);
}

.btn-xlsx {
    background: #0098db;
    color: white;
}

.btn-xlsx:hover {
    background: #0077b3;
    transform: translateY(-2px);
}

.btn-xml {
    background: #4a5568;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-xml:hover {
    background: #2d3748;
    transform: translateY(-2px);
}

.btn-disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    padding: 12px 24px;
    border-radius: 8px;
    display: inline-block;
}

.alert-warning {
    background: #fef5e7;
    border-left: 4px solid #f6ad55;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 0 25px 25px 25px;
}

.alert-warning strong {
    color: #744210;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #718096;
    font-size: 12px;
    border-top: 1px solid #e2e8f0;
    margin-top: 40px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .download-buttons {
        flex-direction: column;
    }

    .download-buttons .btn-download,
    .download-buttons .btn-xml {
        width: 100%;
    }
}
.alert-warning {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-top: 20px;
}
.toast-message {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #4caf50;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 1000;
    animation: fadeInOut 2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    15% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

@media (max-width: 768px) {
    .profile-container {
        padding: 20px 15px;
    }
    .profile-card {
        padding: 20px;
    }
    .row {
        flex-direction: column;
        gap: 0;
    }
}

    @media (max-width: 800px) {
        .app { flex-direction: column; }
        .sidebar {
            width: 100%;
            height: auto;
            position: relative;
            border-right: none;
            border-bottom: 1px solid #e6edf4;
            padding: 16px 0;
        }
        .nav-menu {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 0 16px;
        }
        .main-content { padding: 20px; }
        .data-table, .catalog-table { display: block; overflow-x: auto; }
    }
