/* 
 * Основные стили для ERP-системы
 * Используется для всех страниц (index.html, OperatorForm.html, и т.д.)
 * Адаптирован для VPS, раздается через Nginx (/public/css/styles.css)
 * Зависимости: Font Awesome (иконки), SweetAlert2 (модальные окна), Chart.js (графики)
 */

/* Импорт шрифта Manrope */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

* {
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

/* Переменные стилей */
:root {
  --presentation-color: rgba(178, 178, 255, 0.4);
  --primary-100: rgba(178, 178, 255, 1);
  --primary-200: rgba(102, 102, 255, 1);
  --primary-300: rgba(54, 54, 240, 1);
  --primary-400: rgba(43, 43, 189, 1);
  --primarybase: rgba(54, 54, 240, 1);
  --secondary-100: rgba(211, 228, 240, 1);
  --secondary-200: rgba(173, 213, 240, 1);
  --secondary-300: rgba(125, 194, 240, 1);
  --secondary-400: rgba(77, 174, 240, 1);
  --secondarybase: rgba(29, 155, 240, 1);
  --alertserrorlight: rgba(255, 237, 236, 1);
  --alertserrorbase: rgba(224, 49, 55, 1);
  --alertserrordark: rgba(192, 35, 55, 1);
  --alerts-warning-light: rgba(255, 222, 101, 1);
  --alerts-warning-base: rgba(255, 208, 35, 1);
  --alerts-warning-dark: rgba(230, 187, 32, 1);
  --alertssuccesslight: rgba(85, 199, 144, 1);
  --alertssuccessbase: rgba(12, 175, 96, 1);
  --alertssuccessdark: rgba(11, 162, 89, 1);
  --alertssuccessligher-green: rgba(85, 199, 144, 0.2);
  --others-amber: rgba(255, 200, 55, 1);
  --otherslight-blue: rgba(235, 243, 255, 1);
  --others-teal: rgba(45, 212, 191, 1);
  --othersorange: rgba(254, 150, 74, 1);
  --otherswhite: rgba(255, 255, 255, 1);
  --others-portage: rgba(140, 98, 255, 1);
  --othersblue: rgba(47, 120, 238, 1);
  --greyscale-900: rgba(17, 24, 39, 1);
  --greyscale-800: rgba(31, 41, 55, 1);
  --greyscale-700: rgba(50, 59, 73, 1);
  --greyscale-600: rgba(104, 117, 136, 1);
  --greyscale-500: rgba(160, 174, 192, 1);
  --greyscale-400: rgba(203, 213, 224, 1);
  --greyscale-300: rgba(233, 234, 236, 1);
  --greyscale-200: rgba(241, 242, 244, 1);
  --greyscale-100: rgba(248, 248, 248, 1);
  --greyscale-50: rgba(250, 250, 250, 1);
  --greyscaleblue-black: rgba(2, 22, 56, 1);
  --transparantwhite-50: rgba(255, 255, 255, 0.5);
  --transparantwhite-30: rgba(255, 255, 255, 0.3);
  --transparantwhite-20: rgba(255, 255, 255, 0.2);
  --transparantwhite-10: rgba(255, 255, 255, 0.1);
  --transparantwhite-5: rgba(255, 255, 255, 0.05);
  --transparantblack-50: rgba(0, 0, 0, 0.5);
  --transparantblack-30: rgba(0, 0, 0, 0.3);
  --transparantblack-20: rgba(0, 0, 0, 0.2);
  --transparantblack-10: rgba(0, 0, 0, 0.1);
  --transparantblack-5: rgba(0, 0, 0, 0.05);
  --heading-h6-font-family: "Manrope", Helvetica;
  --heading-h6-font-weight: 700;
  --heading-h6-font-size: 18px;
  --heading-h6-letter-spacing: 0px;
  --heading-h6-line-height: 139.9999976158142%;
  --heading-h6-font-style: normal;
  --heading-h5-font-family: "Manrope", Helvetica;
  --heading-h5-font-weight: 700;
  --heading-h5-font-size: 20px;
  --heading-h5-letter-spacing: 0px;
  --heading-h5-line-height: 139.9999976158142%;
  --heading-h5-font-style: normal;
  --heading-h4-font-family: "Manrope", Helvetica;
  --heading-h4-font-weight: 700;
  --heading-h4-font-size: 24px;
  --heading-h4-letter-spacing: 0px;
  --heading-h4-line-height: 129.99999523162842%;
  --heading-h4-font-style: normal;
  --heading-h3-font-family: "Manrope", Helvetica;
  --heading-h3-font-weight: 700;
  --heading-h3-font-size: 32px;
  --heading-h3-letter-spacing: 0px;
  --heading-h3-line-height: 125%;
  --heading-h3-font-style: normal;
  --heading-h2-font-family: "Manrope", Helvetica;
  --heading-h2-font-weight: 700;
  --heading-h2-font-size: 40px;
  --heading-h2-letter-spacing: 0px;
  --heading-h2-line-height: 120.00000476837158%;
  --heading-h2-font-style: normal;
  --heading-h1-font-family: "Manrope", Helvetica;
  --heading-h1-font-weight: 700;
  --heading-h1-font-size: 48px;
  --heading-h1-letter-spacing: -0.5px;
  --heading-h1-line-height: 120.00000476837158%;
  --heading-h1-font-style: normal;
  --body-xlarge-regular-font-family: "Manrope", Helvetica;
  --body-xlarge-regular-font-weight: 400;
  --body-xlarge-regular-font-size: 18px;
  --body-xlarge-regular-letter-spacing: 0px;
  --body-xlarge-regular-line-height: 150%;
  --body-xlarge-regular-font-style: normal;
  --body-xlarge-medium-font-family: "Manrope", Helvetica;
  --body-xlarge-medium-font-weight: 500;
  --body-xlarge-medium-font-size: 18px;
  --body-xlarge-medium-letter-spacing: 0px;
  --body-xlarge-medium-line-height: 150%;
  --body-xlarge-medium-font-style: normal;
  --body-xlarge-semibold-font-family: "Manrope", Helvetica;
  --body-xlarge-semibold-font-weight: 600;
  --body-xlarge-semibold-font-size: 18px;
  --body-xlarge-semibold-letter-spacing: 0px;
  --body-xlarge-semibold-line-height: 150%;
  --body-xlarge-semibold-font-style: normal;
  --body-xlarge-bold-font-family: "Manrope", Helvetica;
  --body-xlarge-bold-font-weight: 700;
  --body-xlarge-bold-font-size: 18px;
  --body-xlarge-bold-letter-spacing: 0px;
  --body-xlarge-bold-line-height: 150%;
  --body-xlarge-bold-font-style: normal;
  --body-large-regular-font-family: "Manrope", Helvetica;
  --body-large-regular-font-weight: 400;
  --body-large-regular-font-size: 16px;
  --body-large-regular-letter-spacing: 0.20000000298023224px;
  --body-large-regular-line-height: 150%;
  --body-large-regular-font-style: normal;
  --body-large-medium-font-family: "Manrope", Helvetica;
  --body-large-medium-font-weight: 500;
  --body-large-medium-font-size: 16px;
  --body-large-medium-letter-spacing: 0.20000000298023224px;
  --body-large-medium-line-height: 150%;
  --body-large-medium-font-style: normal;
  --body-large-semibold-font-family: "Manrope", Helvetica;
  --body-large-semibold-font-weight: 600;
  --body-large-semibold-font-size: 16px;
  --body-large-semibold-letter-spacing: 0.30000001192092896px;
  --body-large-semibold-line-height: 150%;
  --body-large-semibold-font-style: normal;
  --body-large-bold-font-family: "Manrope", Helvetica;
  --body-large-bold-font-weight: 700;
  --body-large-bold-font-size: 16px;
  --body-large-bold-letter-spacing: 0.30000001192092896px;
  --body-large-bold-line-height: 150%;
  --body-large-bold-font-style: normal;
  --body-medium-regular-font-family: "Manrope", Helvetica;
  --body-medium-regular-font-weight: 400;
  --body-medium-regular-font-size: 14px;
  --body-medium-regular-letter-spacing: 0px;
  --body-medium-regular-line-height: 160.0000023841858%;
  --body-medium-regular-font-style: normal;
  --body-medium-medium-font-family: "Manrope", Helvetica;
  --body-medium-medium-font-weight: 500;
  --body-medium-medium-font-size: 14px;
  --body-medium-medium-letter-spacing: 0px;
  --body-medium-medium-line-height: 160.0000023841858%;
  --body-medium-medium-font-style: normal;
  --body-medium-semibold-font-family: "Manrope", Helvetica;
  --body-medium-semibold-font-weight: 600;
  --body-medium-semibold-font-size: 14px;
  --body-medium-semibold-letter-spacing: 0px;
  --body-medium-semibold-line-height: 160.0000023841858%;
  --body-medium-semibold-font-style: normal;
  --body-medium-bold-font-family: "Manrope", Helvetica;
  --body-medium-bold-font-weight: 700;
  --body-medium-bold-font-size: 14px;
  --body-medium-bold-letter-spacing: 0.20000000298023224px;
  --body-medium-bold-line-height: 160.0000023841858%;
  --body-medium-bold-font-style: normal;
  --body-small-regular-font-family: "Manrope", Helvetica;
  --body-small-regular-font-weight: 400;
  --body-small-regular-font-size: 12px;
  --body-small-regular-letter-spacing: 0px;
  --body-small-regular-line-height: 160.0000023841858%;
  --body-small-regular-font-style: normal;
  --body-small-medium-font-family: "Manrope", Helvetica;
  --body-small-medium-font-weight: 500;
  --body-small-medium-font-size: 12px;
  --body-small-medium-letter-spacing: 0px;
  --body-small-medium-line-height: 160.0000023841858%;
  --body-small-medium-font-style: normal;
  --body-small-semibold-font-family: "Manrope", Helvetica;
  --body-small-semibold-font-weight: 600;
  --body-small-semibold-font-size: 12px;
  --body-small-semibold-letter-spacing: 0px;
  --body-small-semibold-line-height: 160.0000023841858%;
  --body-small-semibold-font-style: normal;
  --body-small-bold-font-family: "Manrope", Helvetica;
  --body-small-bold-font-weight: 700;
  --body-small-bold-font-size: 12px;
  --body-small-bold-letter-spacing: 0.20000000298023224px;
  --body-small-bold-line-height: 160.0000023841858%;
  --body-small-bold-font-style: normal;
  --body-xsmall-regular-font-family: "Manrope", Helvetica;
  --body-xsmall-regular-font-weight: 400;
  --body-xsmall-regular-font-size: 10px;
  --body-xsmall-regular-letter-spacing: 0px;
  --body-xsmall-regular-line-height: 160.0000023841858%;
  --body-xsmall-regular-font-style: normal;
  --body-xsmall-medium-font-family: "Manrope", Helvetica;
  --body-xsmall-medium-font-weight: 500;
  --body-xsmall-medium-font-size: 10px;
  --body-xsmall-medium-letter-spacing: 0px;
  --body-xsmall-medium-line-height: 160.0000023841858%;
  --body-xsmall-medium-font-style: normal;
  --body-xsmall-semibold-font-family: "Manrope", Helvetica;
  --body-xsmall-semibold-font-weight: 600;
  --body-xsmall-semibold-font-size: 10px;
  --body-xsmall-semibold-letter-spacing: 0px;
  --body-xsmall-semibold-line-height: 160.0000023841858%;
  --body-xsmall-semibold-font-style: normal;
  --body-xsmall-bold-font-family: "Manrope", Helvetica;
  --body-xsmall-bold-font-weight: 700;
  --body-xsmall-bold-font-size: 10px;
  --body-xsmall-bold-letter-spacing: 0.20000000298023224px;
  --body-xsmall-bold-line-height: 160.0000023841858%;
  --body-xsmall-bold-font-style: normal;
  --card-50-5: 0px 40px 50px -20px rgba(0, 0, 0, 0.05);
  --icon-purple-10-20: 0px 6px 10px 0px rgba(54, 54, 240, 1);
  --floating-button-black-50-30: 0px 10px 50px 0px rgba(0, 0, 0, 0.2);
  --floating-card-black-40-10: 0px 5px 40px 0px rgba(0, 0, 0, 0.1);
  --floating-card-black-10-10: 0px 5px 10px 0px rgba(0, 0, 0, 0.1);
  --popup-light: 5px 5px 50px 0px rgba(26, 32, 44, 0.06);
  --popup-dark: 5px 5px 50px 0px rgba(26, 32, 44, 1);
  --variable-collection-on-off: none;
  --variable-collection-primary: rgba(255, 120, 45, 1);
  --variable-collection-grey: rgba(157, 157, 157, 1);
}

/* Основные стили для страницы */
body {
  font-family: var(--body-large-regular-font-family);
  color: var(--greyscale-900);
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Контейнер для логина */
.login-container {
  background-color: var(--greyscale-200, rgba(241, 242, 244, 1));
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
  width: 100%;
  position: relative;
}

.login-container::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(178, 178, 255, 0.4) 0%, rgba(255, 255, 255, 0.4) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 1;
  pointer-events: none;
}

.login-container .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  flex: 0 0 auto;
  margin-bottom: 1rem;
}

.login-container .logo .selam-new {
  width: 85.28px;
  height: 87.22px;
}

.login-container h2 {
  margin-bottom: 1.5rem;
  font-family: var(--heading-h4-font-family, "Manrope", Helvetica);
  font-weight: var(--heading-h4-font-weight, 700);
  font-size: var(--heading-h4-font-size, 24px);
  line-height: var(--heading-h4-line-height, 129.99999523162842%);
  color: var(--greyscale-900, rgba(17, 24, 39, 1));
}

.login-container input {
  width: 100%;
  padding: 0.75rem;
  margin: 0.75rem 0;
  border: 1px solid var(--greyscale-300, rgba(233, 234, 236, 1));
  border-radius: 10px;
  font-family: var(--body-medium-medium-font-family, "Manrope", Helvetica);
  font-weight: var(--body-medium-medium-font-weight, 500);
  font-size: var(--body-medium-medium-font-size, 14px);
  line-height: var(--body-medium-medium-line-height, 160.0000023841858%);
  color: var(--greyscale-900, rgba(17, 24, 39, 1));
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-container input:focus {
  border-color: var(--primarybase, rgba(54, 54, 240, 1));
  box-shadow: 0 0 5px rgba(54, 54, 240, 0.5);
  outline: none;
}

.login-container button {
  width: 100%;
  padding: 0.85rem;
  background-color: var(--primarybase, rgba(54, 54, 240, 1));
  color: var(--otherswhite, rgba(255, 255, 255, 1));
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--body-large-bold-font-family, "Manrope", Helvetica);
  font-weight: var(--body-large-bold-font-weight, 700);
  font-size: var(--body-large-bold-font-size, 16px);
  line-height: var(--body-large-bold-line-height, 150%);
  transition: background-color 0.3s ease;
}

.login-container button:hover {
  background-color: var(--primary-400, rgba(43, 43, 189, 1));
}

.error {
  color: var(--alertserrorbase, rgba(224, 49, 55, 1));
  margin-top: 1rem;
  font-family: var(--body-small-regular-font-family, "Manrope", Helvetica);
  font-size: var(--body-small-regular-font-size, 12px);
  line-height: var(--body-small-regular-line-height, 160.0000023841858%);
}

/* Контейнер для главного меню */
.container {
  display: none;
  background-color: var(--greyscale-200, rgba(241, 242, 244, 1));
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 600px;
  width: 100%;
  position: relative;
}

.container::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(178, 178, 255, 0.4) 0%, rgba(255, 255, 255, 0.4) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 1;
  pointer-events: none;
}

.btn-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
}

.btn {
  padding: 0.75rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: var(--otherswhite, rgba(255, 255, 255, 1));
  font-family: var(--body-large-regular-font-family, "Manrope", Helvetica);
  font-size: var(--body-large-regular-font-size, 16px);
  line-height: var(--body-large-regular-line-height, 150%);
  width: 80%;
  max-width: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.3s ease;
}

.btn-primary { background-color: var(--primary-300, rgba(54, 54, 240, 1)); }
.btn-primary:hover { background-color: var(--primary-400, rgba(43, 43, 189, 1)); }
.btn-green { background-color: var(--alertssuccessbase, rgba(12, 175, 96, 1)); }
.btn-green:hover { background-color: var(--alertssuccessdark, rgba(11, 162, 89, 1)); }
.btn-purple { background-color: var(--others-portage, rgba(140, 98, 255, 1)); }
.btn-purple:hover { background-color: var(--primary-400, rgba(43, 43, 189, 1)); }
.btn-danger { background-color: var(--alertserrorbase, rgba(224, 49, 55, 1)); }
.btn-danger:hover { background-color: var(--alertserrordark, rgba(192, 35, 55, 1)); }
.btn:hover {
  opacity: 0.9;
}

/* Адаптивные стили */
@media (max-width: 768px) {
  .container {
    width: 90%;
    margin: 10px auto;
    padding: 15px;
  }
  .login-container {
    width: 90%;
    max-width: 350px;
  }
  .btn {
    width: 100%;
    max-width: 100%;
  }
  .btn-container {
    width: 100%;
  }
}

@media (max-width: 600px) {
  h2 {
    font-size: 20px;
  }
  .login-container {
    padding: 1.5rem;
  }
  .container {
    padding: 1rem;
  }
  .btn {
    padding: 0.5rem;
    font-size: 14px;
  }
}