/* ========================================
   Museo BAS – Estilos principales
   ======================================== */

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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #ca8a04;
  --danger: #dc2626;
  --info: #0891b2;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

/* Navbar */
.navbar { background: #fff; border-bottom: 1px solid var(--gray-200); padding: .75rem 0; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; gap: 2rem; }
.nav-brand { font-weight: 700; font-size: 1.15rem; color: var(--primary); text-decoration: none; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--gray-600); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--primary); }

/* Main */
.main-content { max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; }
.container { width: 100%; }

/* Page header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.6rem; }
.subtitle { color: var(--gray-600); margin-top: .25rem; }

/* Cards */
.card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.card h2 { font-size: 1.1rem; margin-bottom: 1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border: none; border-radius: var(--radius); cursor: pointer; font-size: .9rem; font-weight: 500; text-decoration: none; transition: opacity .15s; }
.btn:hover { opacity: .88; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--gray-200); color: var(--gray-800); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: .3rem .7rem; font-size: .8rem; }

/* Filters */
.filters { display: flex; gap: 1rem; margin-bottom: 1.25rem; }
.filters select { padding: .4rem .75rem; border: 1px solid var(--gray-200); border-radius: var(--radius); font-size: .9rem; background: #fff; }

/* Table */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { background: var(--gray-50); padding: .6rem 1rem; text-align: left; font-weight: 600; border-bottom: 2px solid var(--gray-200); }
.table td { padding: .65rem 1rem; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.table tr:hover td { background: var(--gray-50); }
.cf-id { font-size: .78rem; background: var(--gray-100); padding: .2rem .4rem; border-radius: 4px; }
.actions { display: flex; gap: .5rem; white-space: nowrap; }
.text-muted { color: var(--gray-600); font-size: .85rem; }

/* Badges */
.badge { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-success { background: #dcfce7; color: var(--success); }
.badge-warning { background: #fef9c3; color: var(--warning); }
.badge-info { background: #e0f2fe; color: var(--info); }

/* Empty state */
.empty-state { text-align: center; padding: 3rem; color: var(--gray-600); }
.empty-state p { margin-bottom: 1rem; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.modal-content { position: relative; background: #fff; border-radius: var(--radius); padding: 2rem; width: 90%; max-width: 480px; box-shadow: 0 20px 60px rgba(0,0,0,.2); z-index: 1; }
.modal-content h2 { margin-bottom: 1.25rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: .35rem; color: var(--gray-600); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .5rem .75rem; border: 1px solid var(--gray-200); border-radius: var(--radius); font-size: .9rem; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.form-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.25rem; }

/* Alerts */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }
.alert-error { background: #fee2e2; color: var(--danger); border: 1px solid #fca5a5; }
.hidden { display: none !important; }

/* URL result */
.url-result { margin-top: 1rem; }
.url-result label { font-size: .88rem; font-weight: 500; display: block; margin-bottom: .35rem; }
.url-result textarea { width: 100%; font-size: .78rem; font-family: monospace; padding: .5rem; border: 1px solid var(--gray-200); border-radius: var(--radius); resize: vertical; }

/* Tabs */
.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--gray-200); padding-bottom: .5rem; }
.tab-btn { background: none; border: none; padding: .4rem .85rem; cursor: pointer; font-size: .9rem; border-radius: var(--radius); color: var(--gray-600); }
.tab-btn.active { background: var(--primary); color: #fff; }
.tab-content.hidden { display: none; }

/* Code blocks */
pre { background: var(--gray-800); color: #e5e7eb; padding: 1.25rem; border-radius: var(--radius); overflow-x: auto; font-size: .82rem; line-height: 1.6; margin: .75rem 0 .5rem; }
code { font-family: 'Fira Code', 'Cascadia Code', monospace; }

/* API response */
.api-response { background: var(--gray-800); color: #86efac; padding: 1.25rem; border-radius: var(--radius); font-size: .82rem; font-family: monospace; overflow-x: auto; white-space: pre-wrap; margin-top: .75rem; min-height: 80px; }

/* Status message */
.status-msg { margin-top: .75rem; font-size: .9rem; }
.video-wrapper { background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 2rem; text-align: center; }

/* Footer */
.footer { text-align: center; padding: 2rem; color: var(--gray-600); font-size: .85rem; border-top: 1px solid var(--gray-200); margin-top: 3rem; }
