/**
 * Estilos del layout con sidebar (mark4/original/docker/frontend/public/includes/layout.php).
 * Solo presentación; sin lógica PHP.
 */

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

body.portal-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f5;
  display: flex;
  min-height: 100vh;
}

.portal-sidebar-host {
  display: contents;
}

.sidebar {
  width: 250px;
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
  font-size: 20px;
  font-weight: 600;
}

.sidebar-header p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 5px;
}

.sidebar-menu {
  list-style: none;
  padding: 10px 0;
}

.sidebar-menu li {
  margin: 5px 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: #3498db;
}

.sidebar-menu a.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-left-color: #3498db;
  font-weight: 500;
}

.sidebar-menu a span:first-child {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.sidebar-sep {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
  font-size: 13px;
  margin-bottom: 10px;
}

.user-info strong {
  display: block;
  margin-bottom: 5px;
}

.btn-logout {
  display: block;
  width: 100%;
  padding: 8px;
  background: rgba(231, 76, 60, 0.2);
  color: white;
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  transition: background 0.3s;
}

.btn-logout:hover {
  background: rgba(231, 76, 60, 0.3);
}

.main-content {
  flex: 1;
  margin-left: 250px;
  min-height: 100vh;
}

.top-header {
  background: white;
  padding: 15px 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-header h2 {
  color: #2c3e50;
  font-size: 24px;
}

.content-wrapper {
  padding: 30px;
}

.content-card {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}
