:root {
  --sky: #e6f2ff;
  --sky-deep: #cfe8ff;
  --primary: #1f6fd6;
  --text: #1f2a44;
  --white: #ffffff;
  --shadow: rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, var(--sky), var(--white));
  color: var(--text);
}

/* Header + nav */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--sky-deep);
  padding: 10px 16px;
  box-shadow: 0 2px 8px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand {
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 12px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
}

.nav-links a:hover {
  background: var(--white);
  box-shadow: 0 2px 6px var(--shadow);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
}

/* Responsive nav */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .header.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    right: 10px;
    background: var(--white);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 6px 16px var(--shadow);
  }
}

/* Page layout */
.container {
  max-width: 980px;
  margin: 20px auto;
  padding: 0 16px;
}

h1 {
  margin: 16px 0;
  color: var(--primary);
}

.section {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 6px 16px var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

/* Buttons */
.button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.button:hover { filter: brightness(1.05); }

/* Inputs & forms */
input, select, textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin: 8px 0 12px;
  background: #f9fbff;
}

label { font-weight: 600; }

/* Grid for modules */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 10px 24px var(--shadow);
  width: min(560px, 92vw);
  padding: 16px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  color: var(--primary);
  font-weight: 700;
}

.close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

/* Expandibles (Flujo de Trabajo) */
.expand {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.expand summary {
  cursor: pointer;
  padding: 10px 12px;
  background: #f0f7ff;
  color: var(--text);
  font-weight: 600;
}

.expand .content {
  padding: 12px;
  background: var(--white);
}

/* Chat box */
.chat-box {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f9fbff;
  padding: 10px;
  height: 280px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.chat-input {
  display: flex;
  gap: 8px;
}

.chat-input input { flex: 1; }