@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --cream: #F8F5EC;
  --olive: #3F4A34;
  --sage: #93A883;
  --mauve: #B98CA0;
  --ink: #2B2B26;
  --line: #E4DFD2;
  --white: #FFFFFF;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand {
  font-family: 'Fraunces', serif;
  color: var(--olive);
  letter-spacing: -0.01em;
}

a { color: inherit; }

/* --- Login --- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: var(--cream);
}

.login-screen .bg-heart {
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 420px;
  height: auto;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.login-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 60px -30px rgba(43, 43, 38, 0.25);
}

.login-card .brand-logo {
  height: 34px;
  width: auto;
  display: block;
  margin: 0 0 10px;
}

.login-card p.subtitle {
  margin: 0 0 28px;
  color: #6b6b60;
  font-size: 0.92rem;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--olive);
  margin-bottom: 6px;
}

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 18px;
  background: var(--cream);
}

input:focus {
  outline: 2px solid var(--sage);
  outline-offset: 1px;
}

button {
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  background: var(--olive);
  color: var(--white);
  border: none;
  padding: 12px;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 500;
}

.btn-primary:hover { background: #34402a; }

.error-msg {
  background: #FBEAEA;
  color: #A13B3B;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

/* --- App shell --- */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--olive);
  color: var(--cream);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
}

.sidebar .sidebar-logo {
  width: 132px;
  height: auto;
  display: block;
  margin: 0 0 10px;
}

.sidebar .client-name {
  color: var(--sage);
  font-size: 0.8rem;
  margin-bottom: 28px;
}

.nav-item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--cream);
  text-decoration: none;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.nav-item:hover { background: rgba(255,255,255,0.08); }
.nav-item.active { background: var(--mauve); color: var(--white); }

.logout-btn {
  margin-top: auto;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--cream);
  padding: 9px;
  border-radius: 8px;
  font-size: 0.82rem;
}

.main {
  padding: 40px 48px;
  max-width: 860px;
}

.section-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mauve);
  font-weight: 600;
  margin-bottom: 6px;
}

.section h2 { font-size: 1.7rem; margin: 0 0 6px; }
.section .desc { color: #6b6b60; margin-bottom: 28px; font-size: 0.95rem; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.card h3 { font-size: 1.05rem; margin: 0 0 10px; }

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--olive);
  font-size: 0.9rem;
  font-weight: 500;
}

.file-link:hover { border-color: var(--sage); }

/* --- Tasks --- */
.task-form { display: flex; gap: 10px; margin-bottom: 20px; }
.task-form input { margin-bottom: 0; flex: 1; }
.task-form button { background: var(--sage); color: var(--white); border: none; padding: 0 20px; border-radius: 9px; font-weight: 500; }

.task {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--white);
}

.task-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.task-title { font-weight: 500; }

.status-select {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 0.82rem;
  background: var(--cream);
}

.comments { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.comment { font-size: 0.85rem; margin-bottom: 8px; }
.comment .author { font-weight: 600; color: var(--olive); }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form input { margin-bottom: 0; font-size: 0.85rem; padding: 8px 10px; }
.comment-form button { border: none; background: var(--mauve); color: var(--white); padding: 0 14px; border-radius: 7px; font-size: 0.82rem; }

.toggle-comments { font-size: 0.8rem; color: var(--mauve); background: none; border: none; padding: 0; margin-top: 8px; cursor: pointer; text-decoration: underline; }

@media (max-width: 720px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; padding: 14px; }
  .sidebar .client-name, .sidebar .sidebar-logo { display: none; }
  .nav-item { white-space: nowrap; margin-bottom: 0; margin-right: 4px; }
  .logout-btn { margin-top: 0; margin-left: auto; }
  .main { padding: 24px 20px; }
}

/* --- Cómo trabajamos: cronograma y buenas prácticas --- */
.card h4 { font-size: 0.95rem; margin: 18px 0 8px; color: var(--olive); }
.card > p { font-size: 0.92rem; color: #4A5240; margin-bottom: 12px; }
.card ul.tips { margin: 0 0 14px; padding-left: 20px; font-size: 0.88rem; }
.card ul.tips li { margin-bottom: 5px; }
.card .note {
  background: var(--cream);
  border-left: 3px solid var(--sage);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin: 10px 0 16px;
}

.info-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 0.85rem; }
.info-table th, .info-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.info-table th { background: var(--olive); color: var(--cream); font-weight: 500; }
.info-table tr:nth-child(even) td { background: var(--cream); }

.practice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 18px; }
.practice-col { border-radius: 10px; padding: 14px 16px; }
.practice-col.good { background: #EAF3E7; }
.practice-col.bad { background: #F6ECEF; }
.practice-col h4 { font-size: 0.88rem; margin: 0 0 8px; }
.practice-col.good h4 { color: var(--olive); }
.practice-col.bad h4 { color: #8C4A5A; }
.practice-col ul { margin: 0; padding-left: 18px; font-size: 0.84rem; }
.practice-col ul li { margin-bottom: 6px; }

@media (max-width: 600px) {
  .practice-grid { grid-template-columns: 1fr; }
  .info-table { font-size: 0.78rem; }
}

.flow-figure { margin: 6px 0 22px; }
.flow-figure svg { width: 100%; height: auto; display: block; }
.flow-caption { font-size: 0.85rem; color: #6b6b60; margin-top: 10px; text-align: center; }
.flow-caption .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 3px -1px 6px; }
.flow-caption .dot.agencia { background: var(--olive); }
.flow-caption .dot.cliente { background: var(--mauve); }
