/* ============================================
   VERIFLOW & TIMEFLOW — Manual de Usuario
   Estilos globales
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Veriflow brand palette */
  --color-primary: #EBA982;
  --color-primary-dark: #d4895e;
  --color-primary-light: #F8EFE5;
  --color-secondary: #2c2420;
  --color-accent: #45b5eb;
  --color-accent-light: #d6eefb;
  --color-success: #16a34a;
  --color-success-light: #dcfce7;
  --color-danger: #dc2626;
  --color-danger-light: #fee2e2;
  --color-warning: #f59e0b;
  --color-warning-light: #fef9c3;
  --color-text: #2c2420;
  --color-text-light: #7a6e65;
  --color-bg: #fdfbf9;
  --color-white: #ffffff;
  --color-border: #E2D0BD;
  --color-sidebar: #4E4E4E;
  --color-sidebar-hover: #5e5e5e;
  --color-sidebar-active: #EBA982;
  --color-timeflow: #45b5eb;
  --color-timeflow-dark: #2a91c4;
  --color-timeflow-light: #d6eefb;
  --shadow-sm: 0 1px 2px rgba(44,36,32,.06);
  --shadow-md: 0 4px 6px -1px rgba(44,36,32,.1), 0 2px 4px -2px rgba(44,36,32,.08);
  --shadow-lg: 0 10px 15px -3px rgba(44,36,32,.1), 0 4px 6px -4px rgba(44,36,32,.08);
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-width: 280px;
  --header-height: 64px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Outfit', 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
}

/* ---- Layout ---- */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-sidebar);
  color: #cbd5e1;
  overflow-y: auto;
  z-index: 100;
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.sidebar-header .logo {
  font-family: 'Outfit', 'DM Sans', system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-header .logo span.v { color: #EBA982; }
.sidebar-header .logo span.t { color: #45b5eb; }
.sidebar-header .subtitle {
  font-size: .78rem;
  color: #94a3b8;
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar-nav .nav-section {
  padding: 8px 20px 4px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #b0b0b0;
  margin-top: 8px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: #94a3b8;
  text-decoration: none;
  font-size: .88rem;
  border-left: 3px solid transparent;
  transition: all .15s;
}

.sidebar-nav a:hover {
  background: var(--color-sidebar-hover);
  color: #e2e8f0;
}

.sidebar-nav a.active {
  background: rgba(235,169,130,.15);
  color: #EBA982;
  border-left-color: var(--color-primary);
  font-weight: 600;
}

.sidebar-nav a .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}

.sidebar-nav a.timeflow-link.active {
  color: #7bc8ee;
  border-left-color: var(--color-timeflow);
  background: rgba(69,181,235,.12);
}

.sidebar-nav a.timeflow-link:hover {
  color: #a0d9f4;
}

/* Main content */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
}

.content-header {
  position: sticky;
  top: 0;
  background: rgba(253,251,249,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: 0 40px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
}

.content-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--color-text-light);
}

.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: #cbd5e1; }

.content-body {
  padding: 32px 40px 60px;
  max-width: 900px;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: 'Outfit', 'DM Sans', system-ui, sans-serif; }
h1 { font-size: 1.85rem; font-weight: 800; line-height: 1.25; color: var(--color-secondary); }
h2 { font-size: 1.45rem; font-weight: 700; margin-top: 40px; margin-bottom: 12px; color: var(--color-secondary); }
h3 { font-size: 1.15rem; font-weight: 600; margin-top: 28px; margin-bottom: 8px; color: var(--color-secondary); }
h4 { font-size: 1rem; font-weight: 600; margin-top: 20px; margin-bottom: 6px; }

p { margin-bottom: 14px; }
p + p { margin-top: 0; }

strong { font-weight: 600; }

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dark); }

ul, ol {
  margin: 10px 0 16px 24px;
}

li {
  margin-bottom: 6px;
}

li > ul, li > ol {
  margin-top: 6px;
  margin-bottom: 0;
}

/* ---- Components ---- */

/* Image placeholder */
.img-placeholder {
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  border: 2px dashed #94a3b8;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  color: var(--color-text-light);
  font-size: .88rem;
  margin: 20px 0;
  position: relative;
}

.img-placeholder .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.img-placeholder .label {
  font-weight: 600;
  color: var(--color-text);
  display: block;
  margin-bottom: 4px;
}

.img-placeholder.small {
  padding: 20px 16px;
}

.img-placeholder.wide {
  padding: 48px 24px;
}

/* Callout / alert boxes */
.callout {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: .92rem;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.callout .callout-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout-info {
  background: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  color: #8b5e3c;
}

.callout-tip {
  background: var(--color-success-light);
  border-left: 4px solid var(--color-success);
  color: #166534;
}

.callout-warning {
  background: var(--color-warning-light);
  border-left: 4px solid var(--color-warning);
  color: #92400e;
}

.callout-danger {
  background: var(--color-danger-light);
  border-left: 4px solid var(--color-danger);
  color: #991b1b;
}

/* Step list */
.steps {
  counter-reset: step-counter;
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.steps > li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 48px;
  margin-bottom: 20px;
  min-height: 36px;
}

.steps > li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
}

.steps > li strong {
  font-weight: 700;
}

/* Nested lists inside steps: normal bullet style */
.steps > li ul {
  list-style: disc;
  margin: 8px 0 4px 20px;
}

.steps > li ul li {
  padding-left: 0;
  min-height: auto;
  margin-bottom: 6px;
}

.steps > li ul li::before {
  display: none;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: .9rem;
}

table th {
  background: var(--color-primary-light);
  color: #6b4a30;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--color-primary);
}

table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
}

table tr:hover td {
  background: #fdfbf9;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

.badge-blue { background: var(--color-primary-light); color: #8b5e3c; }
.badge-green { background: var(--color-success-light); color: var(--color-success); }
.badge-yellow { background: var(--color-warning-light); color: #92400e; }
.badge-red { background: var(--color-danger-light); color: var(--color-danger); }
.badge-gray { background: #f1f5f9; color: #475569; }

/* Keyboard shortcut */
kbd {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .82rem;
  color: var(--color-text);
  box-shadow: 0 1px 0 #cbd5e1;
}

/* Card */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}

.card h3 { margin-top: 0; }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.feature-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: box-shadow .2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
}

.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.feature-card h4 {
  margin: 0 0 6px;
  font-size: .95rem;
}

.feature-card p {
  font-size: .82rem;
  color: var(--color-text-light);
  margin: 0;
}

/* Page intro */
.page-intro {
  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: 28px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
}

/* Section divider */
.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 32px 0;
}

/* Navigation footer */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.page-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  flex: 1;
  max-width: 48%;
  transition: border-color .2s, box-shadow .2s;
}

.page-nav a:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.page-nav a .nav-dir {
  font-size: .75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.page-nav a .nav-title {
  font-weight: 600;
  color: var(--color-primary);
}

.page-nav a.next { text-align: right; margin-left: auto; }

/* Mobile hamburger */
.hamburger {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  background: var(--color-sidebar);
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 90;
}

/* Index page hero */
.hero {
  background: linear-gradient(135deg, #EBA982, #d4895e);
  color: #fff;
  padding: 48px 40px;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

.hero h1 { color: #fff; font-size: 2rem; margin-bottom: 12px; }
.hero p { color: #fce8d8; font-size: 1.05rem; margin-bottom: 0; }

.index-section {
  margin-bottom: 32px;
}

.index-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.index-section h2 .section-icon {
  font-size: 1.3rem;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.index-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  transition: all .2s;
}

.index-link:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.index-link .link-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.index-link .link-text h4 {
  margin: 0;
  font-size: .95rem;
  color: var(--color-primary);
}

.index-link .link-text p {
  margin: 2px 0 0;
  font-size: .8rem;
  color: var(--color-text-light);
}

.index-link.timeflow-item:hover {
  border-color: var(--color-timeflow);
}

.index-link.timeflow-item .link-text h4 {
  color: var(--color-timeflow-dark);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .hamburger {
    display: flex;
  }
  .main-content {
    margin-left: 0;
  }
  .content-header {
    padding: 0 20px 0 64px;
  }
  .content-body {
    padding: 24px 20px 48px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 32px 24px;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  .page-nav {
    flex-direction: column;
  }
  .page-nav a {
    max-width: 100%;
  }
  .index-grid {
    grid-template-columns: 1fr;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  table {
    font-size: .82rem;
  }
  table th, table td {
    padding: 8px 10px;
  }
}

/* Print */
@media print {
  .sidebar, .hamburger, .sidebar-overlay { display: none !important; }
  .main-content { margin-left: 0; }
  .content-header { position: static; }
  .page-nav { display: none; }
}

/* Screenshot images */
.img-figure {
  margin: 20px 0;
  text-align: center;
}

.img-figure .screenshot {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.img-figure figcaption {
  font-size: .82rem;
  color: var(--color-text-light);
  margin-top: 8px;
  font-style: italic;
}
