* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: auto;
  background: #ffffff;
  color: #121212;
}

.main-window {
  min-height: 100vh;
}

.sidebar-menu {
  position: fixed;
  left: 0;
  top: 70px;
  bottom: 0;
  width: 240px;
  background: white;
  z-index: 900;
  display: flex;
  flex-direction: column;
  padding: 0px 0;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.menu-nav a:nth-child(5) {
  margin-top: auto;
  margin-bottom: 15px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 0;
  text-decoration: none;
  color: #4a4a4a;
  border-radius: 8px;
  margin: 00px 00px 00px 16px;
  margin-bottom: 5px;
  transition: all 0.3s ease;
  height: 48px;
  font-family: 'Gilroy', sans-serif;
}

.applications-icon,
.library-icon,
.news-icon,
.settings-icon,
.loadings-icon {
  width: 20px;
  height: 20px;
}

.menu-item .menu-icon svg path {
  fill: #4a4a4a;
}

.menu-item.active .menu-icon svg path {
  fill: #ffffff;
}

.menu-item:hover .menu-icon svg path {
  fill: #121212;
}

.menu-item.active:hover .menu-icon svg path {
  fill: #ffffff;
}

.menu-item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #121212;
}

.menu-item.active {
  background: #121212;
  color: #ffffff;
  font-weight: 900;
}

.menu-icon {
  width: 48px;
  height: 48px;
  display: flex;
  margin-left: 10px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-icon svg {
  width: 20px;
  height: 20px;
}

.menu-text {
  font-size: 14px;
  font-weight: 500;
  padding-left: 10px;
  flex-grow: 1;
  text-align: left;
}

.menu-bottom {
  padding: 20px;
}

.user-info-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-menu {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-image-menu {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback-menu {
  width: 100%;
  height: 100%;
  background: url('https://storage.imgbly.com/imgbly/B0FQ2e3RdA.jpg');
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.username-menu {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.main-content {
  margin-left: 240px;
  min-height: 100vh;
  padding: 00px 20px 15px 20px;
  margin-top: 70px;
}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 109px;
  z-index: 1000;
  background: #ffffff;
  height: 70px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 1;
}

.logo {
  width: 35px;
  height: 35px;
  filter: brightness(0) invert(0);
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  gap: 30px;
}

.nav-link {
  text-decoration: none;
  color: #4a4a4a;
  font-weight: 400;
  font-size: 1rem;
  position: relative;
  transition: color 0.3s ease;
  font-family: 'Gilroy', sans-serif;
}

.nav-link:hover {
  color: #121212;
}

.app-divider {
  border: none;
  height: 0.9px;
  background-color: #dadada;
  margin: 0 -18px 6px -14px !important;
  width: calc(100% + 28px);
  transition: all 0.3s ease;
}

.app-card:hover .app-divider {
  background-color: #9e9e9e;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-right: -90px;
}

.header-search {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 8px 16px 12px 40px;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
  background: #e6e6e6;
  transition: all 0.3s ease;
  font-family: 'Gilroy', sans-serif;
  font-weight: 400;
}

.search-input:focus {
  outline: none;
  background: rgb(244, 244, 244);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0;
}

.icon-btn.notifications-btn path{
  fill: #4c4c4c;
  transition: all 0.3s ease;
}

.icon-btn.notifications-btn:hover path {
  fill: #121212;
}

.icon {
  width: 20px;
  height: 20px;
}

.icon path,
.icon circle,
.icon line {
  fill: #121212;
}

.account-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0px 0px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  border-radius: 8px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  background: url('https://storage.imgbly.com/imgbly/B0FQ2e3RdA.jpg');
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.username {
  font-family: 'Gilroy', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
}

.main-banner {
  display: flex;
  background: #121212;
  color: #ffffff;
  padding: 30px 27px;
  border-radius: 8px;
  margin: 00px 0 25px 0;
  width: 100%;
  align-items: center;
}

.banner-container {
  margin-top: 0;
}

.banner-content {
  flex: 1;
  max-width: 500px;
  margin: auto 0;
}

.banner-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.2;
  font-family: 'Gilroy', sans-serif;
}

.banner-description {
  font-size: 1rem;
  margin-bottom: 20px;
  opacity: 0.8;
  line-height: 1.6;
  font-family: 'Gilroy', sans-serif;
}

.banner-button {
  background: none;
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 10px 35px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Gilroy', sans-serif;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.banner-button:hover {
  border: 2px solid #cdcdcd;
  color: #cdcdcd;
}

.banner-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.image-placeholder {
  width: 320px;
  height: 200px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.banner-image-real {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apps-container {
  width: 100%;
}

.apps-section {
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #121212;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  width: 100%;
}

.app-card {
  background: white;
  border-radius: 8px;
  padding: 14px !important;
  transition: all 0.3s ease;
  border: 1.5px solid #dadada;
  font-family: 'Gilroy', sans-serif;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 180px !important;
  max-height: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.app-card:hover {
  background: rgb(247, 247, 247);
  border: 1.5px solid #9e9e9e;
}

.app-card.available .app-actions {
  display: flex;
  justify-content: space-between;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  min-height: 40px;
}

.app-title-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.app-logo-container {
  width: 33px;
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-logo {
  width: 33px;
  height: 33px;
  border-radius: 8px;
  object-fit: contain;
}

.app-name {
  font-size: 1.15rem !important;
  font-weight: 500;
  color: #121212;
  margin: 0;
  font-family: 'Gilroy', sans-serif;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: calc(100% - 45px);
}

.app-status {
  background: none;
  border: 2px solid #121212;
  color: #121212;
  font-size: 0.75rem !important;
  font-weight: 500;
  padding: 3px 10px !important;
  border-radius: 20px;
  font-family: 'Gilroy', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
  height: fit-content;
  line-height: 1.2;
}

.app-card.available .app-status {
  background: none;
  border: 2px solid #121212;
  color: #121212;
}

.app-description {
  color: #666;
  line-height: 1.4;
  margin: 0 0 6px 0 !important;
  font-size: 0.85rem;
  font-weight: 400;
  font-family: 'Gilroy', sans-serif;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
  min-height: 34px !important;
}

.app-actions {
  display: flex;
  gap: 8px;
  justify-content: left !important;
  align-items: center;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 5px;
  min-height: 50px;
  align-items: center;
}

.app-action-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  font-family: 'Gilroy', sans-serif;
}

.open-btn {
  background: #121212;
  color: #ffffff;
}

.open-btn:hover {
  background: #343434;
}

.extra-btn {
  background: none;
  color: #121212;
  border: 1.5px solid #121212;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-left: auto;
  order: 2;
  flex-shrink: 0;
}

.extra-btn:hover {
  border: 1.5px solid #4a4a4a;
  color: #4a4a4a;
}

.extra-btn:hover .otherfunc-icon path,
.extra-btn:hover .otherfunc-icon circle,
.extra-btn:hover .otherfunc-icon line {
  fill: #4a4a4a;
}

.otherfunc-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.otherfunc-icon path,
.otherfunc-icon circle,
.otherfunc-icon line {
  fill: #121212;
  transition: fill 0.3s ease;
}

.install-btn {
  background: #121212;
  color: #ffffff;
  padding: 8px 20px;
  border: none;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  font-family: 'Gilroy', sans-serif;
  min-width: 100px;
  order: 1;
}

.install-btn, .open-btn {
  padding: 8px 16px !important;
  font-size: 0.8rem !important;
  min-width: 90px !important;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-btn:hover {
  background: #343434;
}

.search-container {
  position: relative;
  width: 250px;
  flex-shrink: 0;
  margin: 20px 0px 20px 75px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.search-input::placeholder {
  color: #646464;
}

/* LOGIN_PAGE */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f9f9f9;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.login-card h1 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  font-weight: 700;
  color: #121212;
  font-family: 'Gilroy', sans-serif;
}

.login-card > p {
  color: #666;
  margin-bottom: 30px;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 400;
  font-family: 'Gilroy', sans-serif;
}

.login-icon-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.login-page-icon {
  width: 50px;
  height: 50px;
  fill: #121212;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.form-row label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  margin-left: 5px;
}

.form-row input {
  padding: 14px 16px;
  border: 1.5px solid #dadada;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Gilroy', sans-serif;
  transition: all 0.3s ease;
  background: white;
}

.form-row input:focus {
  outline: none;
  border-color: #121212;
}

.form-row input::placeholder {
  color: #999;
}

.error-text {
  color: #121212;
  padding: 10px 15px 10px 40px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-top: 0px;
  text-align: left;
  position: relative;
  display: flex;
  align-items: center;
  font-weight: 400;
  font-family: 'Gilroy', sans-serif;
}

.error-icon {
  position: absolute;
  left: 10px;
  width: 18px;
  height: 18px;
  fill: #d32f2f;
}

.login-card button[type="submit"] {
  background: #121212;
  color: white;
  border: none;
  padding: 16.4px 24px;
  border-radius: 15px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Gilroy', sans-serif;
  margin-top: 0px;
}

.login-card button[type="submit"]:hover:not(:disabled) {
  background: #252525;
}

.login-card button[type="submit"]:active:not(:disabled) {
  transform: translateY(0);
}

.login-card button[type="submit"]:disabled {
  background: #999;
  cursor: not-allowed;
  opacity: 0.7;
}

.login-card .signin-link {
  margin-top: 20px;
  color: #666;
  font-size: 0.9rem;
  font-family: 'Gilroy', sans-serif;
}

.login-card .signin-link a {
  color: #121212;
  text-decoration: none;
  font-weight: 500;
  margin-left: 5px;
  transition: color 0.3s ease;
}

.login-card .signin-link a:hover {
  color: #343434;
  text-decoration: underline;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 1;
}

.input-with-icon .input-icon svg {
  width: 100%;
  height: 100%;
  fill: #666;
}

.input-with-icon input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid #e3e3e3;
  border-radius: 15px;
  font-size: 1rem;
  font-family: 'Gilroy', sans-serif;
  transition: all 0.3s ease;
  background: white;
  box-sizing: border-box;
}

.input-with-icon.password-field input {
  padding-right: 48px !important;
}

.input-with-icon input:focus {
  outline: none;
  border-color: #121212;
}

.input-with-icon input:focus + .input-icon svg {
  fill: #121212;
}

.password-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  z-index: 2;
  color: #666;
}

.password-eye-icon {
  width: 100%;
  height: 100%;
  fill: #666;
  transition: fill 0.3s ease;
}

.password-toggle:hover .password-eye-icon {
  fill: #121212;
}

.password-toggle:focus {
  outline: none;
}

.password-toggle:focus-visible {
  outline: 2px solid #121212;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ПЕРЕЗАПИСАНО */
.app-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  align-items: center;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 8.1px !important;
  min-height: 36px !important;
  align-items: center;
  padding-bottom: 0 !important;
}

.install-btn, .open-btn {
  padding: 6px 14px !important;
  font-size: 0.75rem !important;
  min-width: 80px !important;
  height: 32px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.extra-btn {
  width: 30px !important;
  height: 30px !important;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.otherfunc-icon {
  width: 13px !important;
  height: 13px !important;
}

.app-description {
  margin: 0 0 6px 0 !important;
  min-height: 34px !important;
}

.app-header {
  margin-bottom: 6px !important;
  min-height: 32px !important
}

.app-card {
  padding: 14px !important;
}

@media (max-width: 1024px) {
  .main-content {
    margin-left: 200px;
    padding: 00px 18px;
    margin-top: 70px;
  }
  
  .sidebar-menu {
    top: 70px;
    width: 200px;
  }

  .search-container {
    position: relative;
    width: 250px;
    flex-shrink: 0;
    margin: 20px 0px 20px 52px;
  }

  .main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 89px;
    z-index: 1000;
    background: #ffffff;
    height: 70px;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: -71px;
  }

  .app-name {
    font-size: 1.1rem !important;
  }
  
  .app-description {
    -webkit-line-clamp: 2;
    font-size: 0.86rem;
  }
}

@media (max-width: 768px) {
  .sidebar-menu {
    display: none;
  }
  
  .main-content {
    margin-left: 0;
    padding: 00px 15px;
    margin-top: 70px;
  }

  .app-description {
    -webkit-line-clamp: 2
  }
  
  .main-header {
    padding: 0 20px;
  }
  
  .header-nav {
    display: none;
  }
  
  .search-input {
    width: 200px;
  }
  
  .search-input:focus {
    width: 250px;
  }
  
  .main-banner {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .banner-title {
    font-size: 1.8rem;
  }
  
  .banner-description {
    font-size: 0.95rem;
  }
  
  .apps-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .section-title {
    font-size: 1.5rem;
  }

  .app-card {
    min-height: 180px;
  }
  
  .app-name {
    font-size: 1rem !important;
  }
  
  .app-status {
    font-size: 0.7rem !important;
    padding: 2px 8px !important;
  }
  
  .app-description {
    -webkit-line-clamp: 2;
    font-size: 0.82rem;
    min-height: 36px;
  }
  
  .app-card {
    min-height: 160px !important;
    padding: 10px !important;
  }
  
  .app-actions {
    min-height: 32px !important;
    gap: 4px;
  }
  
  .install-btn, .open-btn {
    padding: 4px 10px !important;
    font-size: 0.68rem !important;
    min-width: 65px !important;
    height: 26px !important;
  }
  
  .extra-btn {
    width: 26px !important;
    height: 26px !important;
  }
  
  .otherfunc-icon {
    width: 12px !important;
    height: 12px !important;
  }
  
  .app-divider {
    margin: 0 -10px 4px -10px !important; /* Уменьшаем для мобильных */
    width: calc(100% + 20px);
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 0 15px;
  }
  
  .main-content {
    padding: 00px 12px;
    margin-top: 70px;
  }
  
  .header-right {
    gap: 8px;
  }
  
  .search-input {
    width: 150px;
  }
  
  .search-input:focus {
    width: 180px;
  }

  .app-description {
    -webkit-line-clamp: 2;
    font-size: 0.82rem;
  }
  
  .username {
    display: none;
  }
  
  .account-block {
    padding: 0px 0px;
  }
  
  .main-banner {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .banner-title {
    font-size: 1.6rem;
  }
  
  .banner-description {
    font-size: 0.9rem;
  }
  
  .banner-button {
    width: 100%;
    padding: 8px 16px;
  }
  
  .app-card {
    padding: 12px;
  }
  
  .app-name {
    font-size: 1rem;
  }

  .extra-btn {
    width: 32px;
    height: 32px;
    padding: 0;
  }
  
  .otherfunc-icon {
    width: 18px;
    height: 18px;
  }
}