/* === ERP Clínica Dental - Estilos base === */

:root {
  --bg: #0b1220;
  --panel: #0f172a;
  --muted: #94a3b8;
  --acc: #4f46e5;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, Ubuntu, Arial, sans-serif;
  background: var(--bg);
  color: #e5e7eb;
}

/* --- Links --- */
a {
  color: inherit;
  text-decoration: none;
}

/* --- Layout --- */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--panel);
  padding: 16px;
  border-right: 1px solid #1f2937;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .5px;
  margin-bottom: 16px;
  color: #fff;
}

.nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  margin-bottom: 6px;
  transition: background 0.2s, color 0.2s;
}

.nav a.active,
.nav a:hover {
  background: #111827;
  color: #fff;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--panel);
  border-bottom: 1px solid #1f2937;
}

.container {
  padding: 20px;
}

/* --- Cards --- */
.card {
  background: var(--panel);
  border: 1px solid #1f2937;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

h1, h2 {
  margin: 0 0 12px 0;
  color: #fff;
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #1f2937;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1220;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #1f2937;
}

th {
  background: #111827;
  text-align: left;
  color: #cbd5e1;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #3730a3;
  background: #4f46e5;
  color: #fff;
  cursor: pointer;
}

.btn.alt {
  background: transparent;
  color: #c7d2fe;
  border-color: #3b82f6;
}

.btn:hover {
  opacity: 0.9;
}

/* --- Inputs --- */
.input, select, textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0b1220;
  color: #e5e7eb;
}

.input:focus {
  outline: 2px solid var(--acc);
}

/* >>> Forzar mayúsculas en captura (visual y global) <<< */
input:not([type="password"]),
select,
textarea {
  text-transform: uppercase;
}
/* (El guardado en MAYÚSCULAS ya se aplica con to_upper_array() en backend) */

/* --- Grid helpers --- */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.row > .col {
  flex: 1 1 240px;
}

/* --- Footer --- */
.footer {
  padding: 16px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid #1f2937;
}

/* --- Tags --- */
.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #111827;
  border: 1px solid #1f2937;
  color: #cbd5e1;
  font-size: 12px;
}

/* --- Notices --- */
.notice {
  padding: 10px;
  border-radius: 10px;
  background: #111827;
  border: 1px dashed #334155;
  color: #cbd5e1;
}

/* --- Login screen --- */
.login-wrap {
  max-width: 420px;
  margin: 10vh auto;
}

/* === Caja: acciones verticales (filtrar + ingreso + gasto) === */
.col-actions{
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;       /* asegura ancho cómodo */
}
.col-actions .btn{
  width: 100%;            /* que los 3 botones ocupen mismo ancho */
}

/* Botones debajo de "Filtrar" */
.col-actions {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

.col-actions .acciones-extra {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.col-actions .btn {
  width: 100%;
}

