:root {
  --ddc-green: #0b6b3a;
  --ddc-green-dark: #07512c;
  --ddc-orange: #f28a18;
  --ddc-navy: #08273f;
  --ddc-navy-dark: #041725;
  --surface: #ffffff;
  --surface-soft: #f4f7f8;
  --background: #eef3f5;
  --text: #1e2a33;
  --muted: #677681;
  --border: #dce5e9;
  --shadow: 0 18px 45px rgba(8, 39, 63, 0.10);
  --radius-lg: 24px;
  --radius-md: 16px;
  --sidebar-width: 92px;
}

body.dark-theme {
  --surface: #102838;
  --surface-soft: #0c2130;
  --background: #071824;
  --text: #eff6f8;
  --muted: #a8bac4;
  --border: #234253;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(242, 138, 24, 0.10), transparent 28%),
    radial-gradient(circle at 100% 5%, rgba(11, 107, 58, 0.12), transparent 28%),
    var(--background);
  transition: background .25s ease, color .25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font: inherit;
}

.portal-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px;
  background: linear-gradient(180deg, var(--ddc-navy), var(--ddc-navy-dark));
  color: #fff;
  box-shadow: 8px 0 28px rgba(0, 0, 0, .12);
}

.sidebar__brand {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 25px;
  border-radius: 17px;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  background: linear-gradient(145deg, var(--ddc-orange), #ffad46);
  color: var(--ddc-navy);
}

.sidebar__nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-link {
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  border-radius: 15px;
  color: #c7d4dc;
  font-size: .67rem;
  text-align: center;
  transition: .2s ease;
}

.nav-link i {
  font-size: 1.1rem;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.10);
  transform: translateY(-2px);
}

.sidebar__footer {
  margin-top: auto;
}

.icon-button,
.menu-button {
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,.10);
  color: #fff;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.main-content {
  grid-column: 2;
  min-width: 0;
  padding: 28px 36px 34px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(280px, 1fr);
  gap: 30px;
  align-items: center;
  margin-bottom: 28px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.identity__mark {
  position: relative;
  width: 66px;
  height: 58px;
  flex: 0 0 66px;
}

.identity__mark::before,
.identity__mark::after {
  content: "";
  position: absolute;
  left: 3px;
  border-radius: 100% 0 100% 0;
  transform: rotate(-16deg);
}

.identity__mark::before {
  top: 3px;
  width: 53px;
  height: 25px;
  background: var(--ddc-orange);
}

.identity__mark::after {
  top: 27px;
  width: 62px;
  height: 28px;
  background: var(--ddc-green);
}

.identity h1 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.2rem, 2.3vw, 2rem);
  line-height: 1;
}

.identity h1 span {
  color: var(--ddc-green);
}

.identity p {
  margin-top: 7px;
  color: var(--muted);
  font-size: .75rem;
}

.global-search {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 56px;
  padding: 0 8px 0 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(8,39,63,.07);
}

.global-search i {
  color: var(--muted);
}

.global-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.global-search button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  background: var(--ddc-green);
  color: #fff;
  font-weight: 700;
}

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: center;
  padding: 38px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, rgba(4,23,37,.97), rgba(8,39,63,.92)),
    var(--ddc-navy);
  color: #fff;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--ddc-orange);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.welcome h2,
.section-heading h2,
.contact-card h2 {
  font-family: "Montserrat", sans-serif;
}

.welcome h2 {
  max-width: 780px;
  font-size: clamp(1.9rem, 4vw, 3.3rem);
  line-height: 1.12;
}

.welcome p {
  max-width: 730px;
  margin-top: 16px;
  color: #c8d5dd;
  line-height: 1.7;
}

.welcome__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}

.button--primary {
  background: var(--ddc-orange);
  color: var(--ddc-navy-dark);
}

.button--ghost {
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
}

.button--light {
  background: #fff;
  color: var(--ddc-navy);
}

.status-card {
  padding: 24px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}

.status-card__label {
  display: block;
  margin-bottom: 16px;
  color: #b9c8d0;
  font-size: .72rem;
}

.status-card strong {
  font-size: 1.45rem;
}

.status-card p {
  margin-top: 9px;
  font-size: .75rem;
}

.progress {
  height: 7px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ddc-orange);
}

.quick-access {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin: 22px 0 38px;
}

.quick-card {
  min-height: 98px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(8,39,63,.06);
  font-size: .75rem;
  font-weight: 700;
  transition: .2s ease;
}

.quick-card i {
  color: var(--ddc-green);
  font-size: 1.4rem;
}

.quick-card:hover {
  transform: translateY(-4px);
  border-color: rgba(11,107,58,.35);
}

.content-section {
  padding: 36px 0 10px;
  scroll-margin-top: 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.section-heading h2,
.contact-card h2 {
  font-size: clamp(1.45rem, 2.6vw, 2.15rem);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--ddc-green);
  cursor: pointer;
  font-weight: 700;
}

.news-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

.news-card,
.tool-card {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.news-card--featured {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7,81,44,.95), rgba(8,39,63,.95)),
    var(--ddc-green);
}

.badge {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ddc-orange);
  color: var(--ddc-navy-dark);
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.badge--green {
  background: #dff4e8;
  color: var(--ddc-green);
}

.badge--orange {
  background: #fff0dc;
  color: #a65300;
}

.news-card h3,
.tool-card h3 {
  margin-bottom: 12px;
  font-size: 1.08rem;
  line-height: 1.45;
}

.news-card p,
.tool-card p {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.65;
}

.news-card--featured p {
  color: #d5e4e9;
}

.tool-card i {
  margin-bottom: 18px;
  color: var(--ddc-orange);
  font-size: 1.8rem;
}

.coming-soon {
  display: inline-block;
  margin-top: 22px;
  color: var(--ddc-green);
  font-size: .7rem;
  font-weight: 800;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.library-card {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(8,39,63,.06);
  font-weight: 700;
}

.library-card i {
  color: var(--ddc-green);
  font-size: 1.5rem;
}

.training-banner,
.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 30px;
  border-radius: var(--radius-lg);
}

.training-banner {
  background: linear-gradient(110deg, var(--ddc-green), var(--ddc-green-dark));
  color: #fff;
}

.training-banner p {
  margin-top: 8px;
  color: #d8ebe1;
}

.contact-card {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-card p {
  margin-top: 10px;
  color: var(--muted);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 230px;
}

.contact-actions a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ddc-green);
  font-weight: 700;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding: 22px 4px 4px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .72rem;
}

.search-message {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: 330px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--ddc-navy);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: .25s ease;
}

.search-message.show {
  opacity: 1;
  transform: translateY(0);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .quick-access {
    grid-template-columns: repeat(3, 1fr);
  }

  .news-grid,
  .tool-grid {
    grid-template-columns: 1fr 1fr;
  }

  .library-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --sidebar-width: 0px;
  }

  .portal-shell {
    display: block;
  }

  .sidebar {
    width: 250px;
    transform: translateX(-105%);
    transition: transform .25s ease;
  }

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

  .main-content {
    padding: 20px 16px 30px;
  }

  .topbar {
    grid-template-columns: auto 1fr;
    gap: 14px;
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .global-search {
    grid-column: 1 / -1;
  }

  .welcome {
    grid-template-columns: 1fr;
    padding: 28px 22px;
  }

  .news-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .training-banner,
  .contact-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .identity__mark {
    width: 48px;
    height: 46px;
    flex-basis: 48px;
  }

  .identity__mark::before {
    width: 40px;
    height: 20px;
  }

  .identity__mark::after {
    top: 22px;
    width: 46px;
    height: 22px;
  }

  .identity h1 {
    font-size: 1rem;
  }

  .identity p {
    font-size: .62rem;
  }

  .global-search button {
    padding: 10px 13px;
  }

  .quick-access {
    grid-template-columns: repeat(2, 1fr);
  }

  .library-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}


/* ===== MÓDULO DE NOTICIAS V1.1 ===== */
.news-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-control select {
  min-height: 42px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  outline: none;
}

.news-status {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: .76rem;
}

.news-card--dynamic {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 255px;
  transition: transform .2s ease, border-color .2s ease;
}

.news-card--dynamic:hover {
  transform: translateY(-4px);
  border-color: rgba(11,107,58,.38);
}

.news-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ddc-green);
  font-size: 1.2rem;
}

.news-card__date {
  display: block;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
}

.news-card--priority {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7,81,44,.97), rgba(8,39,63,.96)),
    var(--ddc-green);
}

.news-card--priority p,
.news-card--priority .news-card__date {
  color: #d4e5ea;
}

.news-card--priority .news-card__icon {
  background: rgba(255,255,255,.12);
  color: var(--ddc-orange);
}

.empty-state {
  padding: 45px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.empty-state i {
  margin-bottom: 12px;
  color: var(--ddc-orange);
  font-size: 2rem;
}

.empty-state p {
  margin-top: 8px;
  color: var(--muted);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 680px) {
  .news-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .news-controls {
    width: 100%;
    justify-content: space-between;
  }

  .select-control {
    flex: 1;
  }

  .select-control select {
    width: 100%;
  }
}


/* ===== DASHBOARD EJECUTIVO V1.2 ===== */
.dashboard-section {
  padding: 8px 0 30px;
  scroll-margin-top: 24px;
}

.dashboard-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.dashboard-intro h2 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.55rem, 2.8vw, 2.45rem);
}

.dashboard-intro p {
  margin-top: 8px;
  color: var(--muted);
  font-size: .82rem;
}

.dashboard-refresh {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ddc-green);
  cursor: pointer;
  font-weight: 700;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 16px;
}

.metric-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(8,39,63,.07);
}

.metric-card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 1.25rem;
}

.metric-card__value {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-size: 1.7rem;
  line-height: 1;
}

.metric-card__label {
  display: block;
  margin-top: 6px;
  font-size: .76rem;
  font-weight: 800;
}

.metric-card__detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .66rem;
}

.metric-card--green .metric-card__icon {
  background: #e3f4ea;
  color: var(--ddc-green);
}

.metric-card--blue .metric-card__icon {
  background: #e4f0f8;
  color: #1c78ad;
}

.metric-card--orange .metric-card__icon {
  background: #fff0dd;
  color: var(--ddc-orange);
}

.metric-card--navy .metric-card__icon {
  background: #e6edf2;
  color: var(--ddc-navy);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.3fr .85fr .85fr;
  gap: 16px;
}

.dashboard-panel {
  min-height: 310px;
  padding: 23px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dashboard-panel--spotlight {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background:
    radial-gradient(circle at 88% 15%, rgba(242,138,24,.42), transparent 26%),
    linear-gradient(135deg, #041725, #08273f 58%, #0b6b3a);
}

.dashboard-panel--spotlight::after {
  content: "";
  position: absolute;
  right: -75px;
  bottom: -95px;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  border: 38px solid rgba(255,255,255,.06);
}

.dashboard-panel__content {
  position: relative;
  z-index: 2;
  max-width: 520px;
}

.dashboard-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--ddc-orange);
  font-size: .69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.dashboard-panel--spotlight h3 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.15;
}

.dashboard-panel--spotlight p {
  margin: 14px 0 20px;
  color: #d1e0e6;
  line-height: 1.65;
}

.spotlight-mark {
  position: absolute;
  right: 20px;
  top: 16px;
  z-index: 1;
  font-family: "Montserrat", sans-serif;
  font-size: 4rem;
  font-weight: 800;
  opacity: .08;
}

.dashboard-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-panel__header h3 {
  font-size: 1rem;
}

.dashboard-panel__header > i {
  color: var(--ddc-green);
  font-size: 1.2rem;
}

.agenda-list,
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 11px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.agenda-item:last-child {
  border-bottom: 0;
}

.agenda-date {
  padding: 7px 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  background: var(--surface-soft);
}

.agenda-date strong {
  display: block;
  font-size: 1rem;
}

.agenda-date span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .58rem;
  text-transform: uppercase;
}

.agenda-copy h4 {
  font-size: .76rem;
  line-height: 1.4;
}

.agenda-copy p {
  margin-top: 5px;
  color: var(--muted);
  font-size: .65rem;
}

.alert-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.alert-item:last-child {
  border-bottom: 0;
}

.alert-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
}

.alert-dot--high {
  background: #d64545;
  box-shadow: 0 0 0 5px rgba(214,69,69,.10);
}

.alert-dot--medium {
  background: var(--ddc-orange);
  box-shadow: 0 0 0 5px rgba(242,138,24,.11);
}

.alert-dot--low {
  background: var(--ddc-green);
  box-shadow: 0 0 0 5px rgba(11,107,58,.10);
}

.alert-copy h4 {
  font-size: .76rem;
  line-height: 1.4;
}

.alert-copy p {
  margin-top: 5px;
  color: var(--muted);
  font-size: .65rem;
  line-height: 1.5;
}

.dashboard-status {
  margin-top: 12px;
  color: var(--muted);
  font-size: .68rem;
  text-align: right;
}

@media (max-width: 1180px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-panel--spotlight {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .dashboard-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel--spotlight {
    grid-column: auto;
  }
}


/* ===== FRAMEWORK DDC UI V1.3 ===== */
.version-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ddc-green);
  font-size: .72rem;
  font-weight: 800;
}

.ui-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ui-panel {
  min-height: 330px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ui-panel__header {
  margin-bottom: 20px;
}

.ui-panel__header h3 {
  font-size: 1rem;
}

.ui-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.ddc-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: .76rem;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ddc-button:hover {
  transform: translateY(-2px);
}

.ddc-button--primary {
  background: var(--ddc-green);
  color: #fff;
  box-shadow: 0 8px 20px rgba(11,107,58,.18);
}

.ddc-button--secondary {
  background: var(--ddc-orange);
  color: var(--ddc-navy-dark);
  box-shadow: 0 8px 20px rgba(242,138,24,.18);
}

.ddc-button--outline {
  background: transparent;
  color: var(--ddc-green);
  border-color: rgba(11,107,58,.35);
}

.ddc-button--danger {
  background: #b63c3c;
  color: #fff;
}

.status-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.ddc-alert {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 15px;
  border: 1px solid transparent;
}

.ddc-alert i {
  margin-top: 2px;
}

.ddc-alert strong,
.ddc-alert span {
  display: block;
}

.ddc-alert strong {
  font-size: .76rem;
}

.ddc-alert span {
  margin-top: 4px;
  font-size: .66rem;
  line-height: 1.45;
}

.ddc-alert--success {
  background: #e9f6ee;
  border-color: #cdebd9;
  color: #0b6b3a;
}

.ddc-alert--warning {
  background: #fff3e2;
  border-color: #ffe0b4;
  color: #99550b;
}

.ddc-alert--info {
  background: #e9f2f8;
  border-color: #d0e4f0;
  color: #276b93;
}

body.dark-theme .ddc-alert--success,
body.dark-theme .ddc-alert--warning,
body.dark-theme .ddc-alert--info {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface-soft);
}

.ddc-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ddc-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ddc-field > span {
  font-size: .7rem;
  font-weight: 800;
}

.ddc-field input,
.ddc-field select {
  min-height: 44px;
  width: 100%;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  outline: 0;
}

.ddc-field input:focus,
.ddc-field select:focus {
  border-color: rgba(11,107,58,.6);
  box-shadow: 0 0 0 4px rgba(11,107,58,.08);
}

.ddc-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.45;
}

.design-tokens {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.token-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
}

.token-card strong,
.token-card small {
  display: block;
}

.token-card strong {
  font-size: .72rem;
}

.token-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: .62rem;
}

.token-swatch {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.08);
}

.token-swatch--navy { background: #08273f; }
.token-swatch--green { background: #0b6b3a; }
.token-swatch--orange { background: #f28a18; }
.token-swatch--surface { background: var(--surface-soft); border-color: var(--border); }

.ddc-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  place-items: center;
  padding: 20px;
}

.ddc-modal.open {
  display: grid;
}

.ddc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,15,24,.70);
  backdrop-filter: blur(5px);
}

.ddc-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(460px, 100%);
  padding: 30px;
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 25px 70px rgba(0,0,0,.30);
}

.ddc-modal__dialog h2 {
  font-family: "Montserrat", sans-serif;
  margin-bottom: 10px;
}

.ddc-modal__dialog p {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.ddc-modal__close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 1050px) {
  .ui-showcase {
    grid-template-columns: 1fr 1fr;
  }

  .ui-panel:last-child {
    grid-column: 1 / -1;
  }

  .design-tokens {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .ui-showcase,
  .design-tokens {
    grid-template-columns: 1fr;
  }

  .ui-panel:last-child {
    grid-column: auto;
  }
}


/* ===== ENTERPRISE FRAMEWORK + LIBRARY MODULE V1.4 ===== */
.library-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 240px;
  gap: 14px;
  margin-bottom: 12px;
}

.library-search {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.library-search i {
  color: var(--muted);
}

.library-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.library-status {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: .74rem;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.knowledge-card {
  min-height: 315px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}

.knowledge-card:hover {
  transform: translateY(-4px);
  border-color: rgba(11,107,58,.35);
}

.knowledge-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 15px;
  background: var(--surface-soft);
  color: var(--ddc-green);
  font-size: 1.2rem;
}

.knowledge-card__category {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8f5ed;
  color: var(--ddc-green);
  font-size: .6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

body.dark-theme .knowledge-card__category {
  background: var(--surface-soft);
  color: var(--text);
}

.knowledge-card h3 {
  margin-bottom: 15px;
  font-size: .95rem;
  line-height: 1.45;
}

.knowledge-card__meta {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.knowledge-card__meta div {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 8px;
  font-size: .65rem;
}

.knowledge-card__meta dt {
  color: var(--muted);
  font-weight: 700;
}

.knowledge-card__meta dd {
  margin: 0;
  font-weight: 600;
}

.knowledge-card .ddc-button {
  margin-top: auto;
  align-self: flex-start;
}

.library-empty {
  grid-column: 1 / -1;
  padding: 48px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.library-empty i {
  margin-bottom: 12px;
  color: var(--ddc-orange);
  font-size: 2rem;
}

.library-empty p {
  margin-top: 7px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .knowledge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .library-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .knowledge-grid {
    grid-template-columns: 1fr;
  }
}
