/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f1f5f9; color: #1e293b; min-height: 100vh; }

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

/* Sidebar */
.sidebar { width: 240px; background: #1e3a5f; color: #cbd5e1; flex-shrink: 0; display: flex; flex-direction: column; }
.sidebar-logo { padding: 24px 20px 18px; border-bottom: 1px solid #2d4f7c; }
.sidebar-logo h1 { font-size: 1.2rem; font-weight: 700; color: #fff; letter-spacing: 0.04em; }
.sidebar-logo span { font-size: 0.65rem; color: #7a9cbf; display: block; margin-top: 3px; letter-spacing: 0.1em; text-transform: uppercase; }
.sidebar-nav { padding: 12px 0; flex: 1; overflow-y: auto; }
.nav-section { padding: 14px 16px 3px; font-size: 0.63rem; text-transform: uppercase; letter-spacing: 0.1em; color: #4d6a8a; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 9px 20px; color: #94a3b8; text-decoration: none; font-size: 0.84rem; transition: all 0.13s; border-left: 3px solid transparent; }
.nav-item:hover { background: #243f6a; color: #e2e8f0; border-left-color: #3b82f6; }
.nav-item.active { background: #243f6a; color: #fff; border-left-color: #3b82f6; }
.nav-icon { font-size: 0.95rem; width: 16px; text-align: center; flex-shrink: 0; }
.sidebar-user { padding: 14px 20px; border-top: 1px solid #2d4f7c; }
.sidebar-user .uname { color: #e2e8f0; font-size: 0.84rem; font-weight: 500; }
.sidebar-user .urole { color: #4d6a8a; font-size: 0.7rem; margin-top: 2px; }
.sidebar-user a { color: #4d6a8a; text-decoration: none; font-size: 0.75rem; margin-top: 7px; display: inline-block; transition: color 0.13s; }
.sidebar-user a:hover { color: #94a3b8; }

/* Main */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 14px 32px; }
.topbar h2 { font-size: 1.05rem; font-weight: 600; color: #1e293b; }
.content { padding: 28px 32px; flex: 1; overflow-y: auto; max-width: 900px; }

/* Cards */
.card { background: #fff; border-radius: 8px; border: 1px solid #e2e8f0; padding: 22px 24px; margin-bottom: 20px; }
.card h3 { font-size: 0.95rem; font-weight: 600; color: #1e293b; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #f1f5f9; }
.card p { font-size: 0.875rem; line-height: 1.75; color: #475569; margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card ul, .card ol { padding-left: 18px; color: #475569; font-size: 0.875rem; line-height: 1.85; }

/* Principle */
.principle { border-left: 3px solid #3b82f6; padding: 13px 16px; margin-bottom: 12px; background: #f8fafc; border-radius: 0 6px 6px 0; }
.principle h4 { font-size: 0.875rem; font-weight: 600; color: #1e3a5f; margin-bottom: 5px; }
.principle p { font-size: 0.845rem; color: #475569; margin: 0; line-height: 1.65; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Stat card */
.stat-card { background: #fff; border-radius: 8px; border: 1px solid #e2e8f0; padding: 18px 20px; }
.stat-card .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #94a3b8; }
.stat-card .value { font-size: 1.4rem; font-weight: 700; color: #1e3a5f; margin-top: 5px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.84rem; font-weight: 500; color: #374151; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 8px 11px; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 0.875rem; color: #1e293b; background: #fff; transition: border 0.13s;
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-group textarea { min-height: 100px; resize: vertical; line-height: 1.6; }

/* Buttons */
.btn { padding: 8px 18px; border-radius: 6px; font-size: 0.855rem; font-weight: 500; cursor: pointer; border: none; text-decoration: none; display: inline-block; transition: all 0.13s; font-family: inherit; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-secondary { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-sm { padding: 4px 11px; font-size: 0.78rem; }

/* Table */
.table { width: 100%; border-collapse: collapse; font-size: 0.855rem; }
.table th { text-align: left; padding: 9px 13px; background: #f8fafc; color: #64748b; font-weight: 600; font-size: 0.77rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e2e8f0; }
.table td { padding: 11px 13px; border-bottom: 1px solid #f1f5f9; color: #374151; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8fafc; }
.table-actions { display: flex; gap: 6px; }

/* Badge */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-gray { background: #f1f5f9; color: #64748b; }
.badge-red { background: #fee2e2; color: #dc2626; }

/* Comments / Tablón */
.comment { padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 10px; background: #fff; }
.comment-meta { font-size: 0.78rem; color: #94a3b8; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-meta strong { color: #475569; }
.comment-body { font-size: 0.875rem; color: #374151; line-height: 1.65; white-space: pre-wrap; }

/* Alerts */
.alert { padding: 11px 15px; border-radius: 6px; font-size: 0.855rem; margin-bottom: 18px; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.alert-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }

/* Section title */
.section-title { font-size: 1.1rem; font-weight: 700; color: #1e3a5f; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid #e2e8f0; }

/* Placeholder / coming soon */
.placeholder { text-align: center; padding: 60px 20px; color: #94a3b8; }
.placeholder .ph-icon { font-size: 2rem; margin-bottom: 10px; }
.placeholder p { font-size: 0.875rem; max-width: 340px; margin: 0 auto; line-height: 1.65; }
.coming-soon { background: #f0f9ff; border: 1px dashed #7dd3fc; border-radius: 8px; padding: 36px; text-align: center; }
.coming-soon h3 { color: #0369a1; font-size: 0.95rem; font-weight: 600; }
.coming-soon p { color: #0284c7; font-size: 0.845rem; margin-top: 8px; line-height: 1.6; }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #1e3a5f; }
.login-box { background: #fff; border-radius: 12px; padding: 38px 34px; width: 100%; max-width: 370px; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 1.5rem; font-weight: 700; color: #1e3a5f; }
.login-logo span { font-size: 0.72rem; color: #94a3b8; letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-top: 3px; }

/* Quick links grid */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }

/* Two-column for qué es / qué no es */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Quote block */
.quote-block { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 18px 22px; margin-top: 20px; }
.quote-block p { color: #0369a1; font-style: italic; font-size: 0.9rem; line-height: 1.7; margin: 0; }
.quote-block .source { font-size: 0.78rem; color: #0284c7; margin-top: 8px; font-style: normal; display: block; }

/* Milestone */
.milestone { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.milestone:last-child { border-bottom: none; }
.milestone-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.dot-done { background: #22c55e; }
.dot-progress { background: #f59e0b; }
.dot-pending { background: #cbd5e1; }
.milestone-text h4 { font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.milestone-text p { font-size: 0.82rem; color: #64748b; margin-top: 2px; line-height: 1.5; }
