@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600&family=DM+Sans:wght@400;500&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-background-primary: #ffffff;
  --color-background-secondary: #f5f5f3;
  --color-background-tertiary: #ededea;
  --color-text-primary: #1a1a18;
  --color-text-secondary: #5f5e5a;
  --color-text-tertiary: #888780;
  --color-border-tertiary: rgba(0, 0, 0, 0.12);
  --color-border-secondary: rgba(0, 0, 0, 0.25);
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--color-background-tertiary);
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Topbar / Cornisa ── */
.topbar {
  height: 56px;
  width: 100%;
  background: #ffffff;
  border-bottom: 0.5px solid var(--color-border-tertiary);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 1.5rem;
  flex-shrink: 0;
  z-index: 10;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #0F6E56;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
}

/* ── Layout (debajo de la cornisa) ── */
.layout {
  display: flex;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 0.5px solid var(--color-border-tertiary);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.70rem;
  border-bottom: 0.5px solid var(--color-border-tertiary);
  min-height: 50px;
}

.sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.2s;
}

.sidebar.collapsed .sidebar-title {
  opacity: 0;
  width: 0;
}

.toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 0.5px solid var(--color-border-secondary);
  background: var(--color-background-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.toggle-btn:hover {
  background: var(--color-background-secondary);
}

.toggle-btn svg {
  transition: transform 0.3s;
}

.sidebar.collapsed .toggle-btn svg {
  transform: rotate(180deg);
}

.sidebar-body {
  flex: 2;
  overflow-y: auto;
  padding: 0.8 rem 1;
}

.sidebar.collapsed .sidebar-body {
    width: 70px;
  overflow: hidden;
}

.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  padding: 0.5rem 1rem 0.25rem;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.15s;
}

.sidebar.collapsed .section-label {
  opacity: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 1rem;
  cursor: pointer;
  transition: background 0.12s;
}

.nav-item:hover {
  background: var(--color-background-secondary);
}

.nav-item.active {
  background: #E1F5EE;
}

.nav-item.active .nav-icon {
  color: #0F6E56;
}

.nav-item.active .nav-label {
  color: #0F6E56;
  font-weight: 500;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 7px 0;
}

.nav-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.15s;
}

.sidebar.collapsed .nav-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.nav-badge {
  margin-left: auto;
  background: #E1F5EE;
  color: #0F6E56;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.15s;
}

.sidebar.collapsed .nav-badge {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.divider {
  height: 0.5px;
  background: var(--color-border-tertiary);
  margin: 0.5rem 0;
}

.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 0.5px solid var(--color-border-tertiary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar.collapsed .sidebar-footer {
  justify-content: center;
  padding: 0.75rem 0;
  width: 70px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #EEEDFE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: #534AB7;
  flex-shrink: 0;
}

.footer-text {
  font-size: 12px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.15s;
}

.sidebar.collapsed .footer-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  background: var(--color-background-primary);
}

.main-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.main-content p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.breadcrumb {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-bottom: 1.5rem;
}

.breadcrumb span {
  color: var(--color-text-secondary);
}

.card {
  background: var(--color-background-secondary);
  border-radius: var(--border-radius-md);
  padding: 1rem 1.25rem;
  border: 0.5px solid var(--color-border-tertiary);
  margin-bottom: 1rem;
}

.card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.card p {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #E1F5EE;
  color: #0F6E56;
  margin-right: 6px;
  margin-bottom: 8px;
}