/* Подобрени стилови за sidebar систем */
.platform-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    135deg,
    var(--bg-primary, #0a0a0f) 0%,
    var(--bg-secondary, #1a1a2e) 50%,
    var(--bg-tertiary, #16213e) 100%
  );
}

.platform-main-wrapper {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 20px;
  padding: 20px;
  max-width: 1920px;
  margin: 0 auto;
  width: 100%;
  transition: grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.platform-main-wrapper.left-collapsed {
  grid-template-columns: 0 1fr 320px;
}

.platform-main-wrapper.right-collapsed {
  grid-template-columns: 280px 1fr 0;
}

.platform-main-wrapper.both-collapsed {
  grid-template-columns: 0 1fr 0;
}

.left-sidebar {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  height: fit-content;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  position: sticky;
  top: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.left-sidebar.collapsed {
  width: 0;
  padding: 0;
  border: none;
  opacity: 0;
  pointer-events: none;
}

.right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: fit-content;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  position: sticky;
  top: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.right-sidebar.collapsed {
  width: 0;
  opacity: 0;
  pointer-events: none;
}

.sidebar-controls {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(10px);
}

.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 8px;
  color: var(--primary-color, #00ffff);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.sidebar-toggle-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
}

.sidebar-toggle-btn.collapsed {
  opacity: 0.6;
}

.sidebar-toggle-btn i {
  font-size: 1.1rem;
}

/* Responsive подобрувања */
@media (max-width: 1400px) {
  .platform-main-wrapper {
    grid-template-columns: 250px 1fr 300px;
  }
}

@media (max-width: 1200px) {
  .platform-main-wrapper {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .left-sidebar,
  .right-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 768px) {
  .platform-main-wrapper {
    padding: 10px;
  }
}

/* Додадени модерни стилови за error картички */
.error-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  max-width: 600px;
  margin: 4rem auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.6s ease-out;
}

.error-card.access-denied {
  border-color: rgba(255, 165, 0, 0.3);
  background: linear-gradient(135deg, rgba(255, 165, 0, 0.1) 0%, rgba(255, 140, 0, 0.05) 100%);
}

.error-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.2) 0%, rgba(255, 69, 58, 0.1) 100%);
  border-radius: 50%;
  border: 2px solid rgba(255, 59, 48, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

.access-denied .error-icon {
  background: linear-gradient(135deg, rgba(255, 165, 0, 0.2) 0%, rgba(255, 140, 0, 0.1) 100%);
  border-color: rgba(255, 165, 0, 0.3);
}

.error-icon i {
  font-size: 2.5rem;
  color: #ff3b30;
}

.access-denied .error-icon i {
  color: #ff9500;
}

.error-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ff3b30 0%, #ff6b6b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.access-denied .error-title {
  background: linear-gradient(135deg, #ff9500 0%, #ffb84d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.error-message {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-message code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  color: #00ffff;
  font-size: 0.95rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.error-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.error-actions .btn-primary {
  background: linear-gradient(135deg, #00ffff 0%, #00cccc 100%);
  color: #0a0a0f;
  box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.error-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 255, 0.4);
}

.error-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.error-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(255, 59, 48, 0);
  }
}

@media (max-width: 768px) {
  .error-card {
    padding: 2rem;
    margin: 2rem 1rem;
  }

  .error-title {
    font-size: 1.5rem;
  }

  .error-message {
    font-size: 1rem;
  }

  .error-actions {
    flex-direction: column;
  }

  .error-actions .btn {
    width: 100%;
  }
}
