/* GENERAL */
:root {
  --primary-color: #0D47A1; /* Azul oscuro institucional */
  --secondary-color: #FFC107; /* Dorado para acentos */
  --light-gray: #f4f6f8;
  --dark-gray: #374151;
  --text-color: #111;
  --white: #fff;
  --border-color: #e5e7eb;
}

* {
  box-sizing: border-box;
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
}

body {
  background: var(--light-gray);
  color: var(--text-color);
  font-size: 16px;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 16px 0;
}

.muted {
  color: #6b7280;
}

.small {
  font-size: 13px;
}

/* LAYOUT */
.topbar {
  background: var(--white);
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-brand {
  display: flex;
  align-items: center;
}

.topbar-brand img {
  height: 50px;
  margin-right: 16px;
}

.brand-logo {
  height: 50px;
}

.topbar-brand h1 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .5px;
}

.layout {
  display: flex;
  min-height: calc(100vh - 65px);
}

.sidebar {
  width: 250px;
  background: var(--white);
  border-right: 1px solid var(--border-color);
  padding: 16px;
}

.sidebar a {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  color: var(--dark-gray);
  text-decoration: none;
  margin-bottom: 8px;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.sidebar a:hover, .sidebar a.active {
  background: var(--primary-color);
  color: var(--white);
}

.sidebar a:hover {
  transform: translateX(4px);
  transition: transform 0.2s;
}

.content {
  flex: 1;
  padding: 24px;
}

/* PANEL */
.panel {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.panel h2, .panel h3 {
  color: var(--primary-color);
  margin-bottom: 16px;
}

/* FORMS */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

label {
  font-size: 13px;
  color: var(--dark-gray);
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
}

input, select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

/* BUTTONS */
.btn {
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--primary-color);
  color: var(--white);
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn:hover {
  background: #0D3C84; /* Un poco más oscuro */
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--dark-gray);
}

.btn-secondary:hover {
    background-color: #FFCA28; /* Un poco más oscuro */
}


/* ALERTS */
.alert {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px;
  border-radius: 8px;
  margin: 10px 0;
}

/* PDF Viewer */

#pdfs {
  margin-top: 1rem;
}

#visorWrap {
  margin-top: 24px;
  display: none;
}

#visorWrap h3 {
  margin-bottom: 16px;
}
#visor {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}