/* Подключаемый CSS-файл */

@font-face {
    font-family: 'Montserrat';
    src: url('/static/fonts/Montserrat-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Montserrat';
    src: url('/static/fonts/Montserrat-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Montserrat';
    src: url('/static/fonts/Montserrat-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
  }
  
  * {
    font-family: 'Montserrat', sans-serif;
  }
  
  html,
  body {
    margin: 0;
    padding: 0;
    background-color: #f4f8fb;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  
  #auth {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
  }

  .auth-block {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    max-width: 320px;
    width: 100%;
    box-sizing: border-box;
  }

  .auth-block button {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    padding: 0.6rem;
  }
  
  .register-link {
    font-size: 0.9rem;
    text-align: center;
    text-decoration: underline;
    color: #007bff;
    cursor: pointer;
  }
  
  input,
  select,
  button {
    padding: 0.5rem;
    font-size: 1rem;
  }
  
  button {
    padding: 0.5rem 1rem;
    border: 1px solid #999;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  
  button:hover {
    background-color: #f0f0f0;
  }
  
  .logout-button,
  .add-button {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    width: 42px;
    height: 42px;
    border-radius: 21px;
    font-size: 20px;
  }
  
  .logout-button:hover,
  .add-button:hover {
    opacity: 0.7;
  }
  
  .input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    background: #f4f8fb;
    margin-top: 0.25rem;
  }
  
  .side-button {
    width: 42px;
    display: flex;
    justify-content: center;
  }
  
  .app-title {
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
  }
  
  .header-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f4f8fb;
    flex-shrink: 0;
  }
  
  .toggle-view-wrapper {
    position: sticky;
    top: 42px;
    background: #f4f8fb;
    z-index: 99;
    flex-shrink: 0;
  }
  
  .toggle-view {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    min-height: 32px;
  }
  
  .toggle-view button {
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1;
  }
  
  .toggle-view button.active {
    background-color: #4caf50;
    color: white;
    font-weight: bold;
  }
  
  .panel {
    padding: 1rem;
    border-right: 1px solid #ccc;
  }
  
  .panel.hidden {
    display: none;
  }
  
  .panel:last-child {
    border-right: none;
  }
  
  .content {
    padding: 16px;
    padding-bottom: 72px;
    box-sizing: border-box;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .category {
    margin-top: 1.5rem;
  }
  
  .category h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #888;
    margin: 0.5rem 0;
  }
  
  .product {
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid #eee;
    user-select: none;
    -webkit-user-select: none;
  }
  
  .product span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    cursor: pointer;
    position: relative;
    z-index: 2;
    pointer-events: auto;
    flex: 1;
  }
  
  .slider {
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 1;
  }
  
  .slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 1px;
    left: 1px;
    transform: translateX(0);
    transition: transform 0.3s ease;
  }
  
  .slider.active {
    background: #4caf50;
  }
  
  .slider.active::before {
    transform: translateX(20px);
  }
  
  .muted {
    opacity: 0.5;
  }
  
  .popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #ccc;
    padding: 2rem;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    max-width: 360px;
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
  }
  
  .popup h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
  }
  
  .popup input,
  .popup select {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
  }
  
  .popup .button-row {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .popup button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    box-sizing: border-box;
    flex: 1;
  }
  
  .popup .btn-ok {
    background-color: #4caf50;
    color: white;
  }
  
  .popup .btn-cancel {
    background-color: #f0f0f0;
    color: #333;
  }
  
  .popup .btn-delete {
    background-color: #f44336;
    color: white;
  }
  
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 5;
  }

  