/*
	Ubicación esperada: <app>/<app>/public/css/requisas.css
	Se sirve como /assets/tu_app/css/requisas.css (referenciado en index.html)
*/

:root {
	--req-teal: #0f9aa4;
	--req-teal-dark: #0c7d85;
	--req-teal-light: #e6f6f7;
	--req-border: #e3e8ec;
	--req-text: #2f3a3f;
	--req-text-muted: #7c8a90;
	--req-bg: #ffffff;
	--req-bg-soft: #f7f9fa;

	--req-badge-borrador-bg: #fdf3e0;
	--req-badge-borrador-fg: #b9791b;
	--req-badge-resuelto-bg: #e5f6ea;
	--req-badge-resuelto-fg: #2f9e51;
	--req-badge-cerrado-bg: #e8f0fe;
	--req-badge-cerrado-fg: #3167d6;
	--req-badge-revision-bg: #fff1e0;
	--req-badge-revision-fg: #cc7a1e;
	--req-badge-aprobada-bg: #e5f6ea;
	--req-badge-aprobada-fg: #2f9e51;
	--req-badge-rechazada-bg: #fdeaea;
	--req-badge-rechazada-fg: #d33a3a;
	--req-badge-atendida-bg: var(--req-teal-light);
	--req-badge-atendida-fg: var(--req-teal-dark);
}

.requisas-home {
	color: var(--req-text);
	font-size: 13px;
	background: var(--req-bg-soft);
	min-height: 100vh;
}

/* Topbar */
.requisas-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--req-bg);
	border-bottom: 1px solid var(--req-border);
	padding: 12px 28px;
}

.requisas-brand {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.requisas-brand-mark {
	font-weight: 700;
	font-size: 15px;
	color: var(--req-teal-dark);
	letter-spacing: .03em;
}

.requisas-brand-sep {
	font-size: 12px;
	color: var(--req-text-muted);
}

.requisas-topbar-actions {
	display: flex;
	align-items: center;
	gap: 20px;
}

.requisas-link {
	color: var(--req-text-muted);
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
}

.requisas-link.is-active,
.requisas-link:hover {
	color: var(--req-teal-dark);
}

.requisas-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--req-bg-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

/* Body */
.requisas-body {
	max-width: 90vw;
	margin: 0 auto;
	padding: 24px 24px 40px;
}

/* Encabezado */
.requisas-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.requisas-heading-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.requisas-heading-icon {
	font-size: 20px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--req-teal-light);
	border-radius: 8px;
}

.requisas-heading h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
}

.requisas-subtitle {
	margin: 2px 0 0;
	color: var(--req-text-muted);
	font-size: 12.5px;
}

.btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--req-teal);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 9px 16px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.btn-primary:hover {
	background: var(--req-teal-dark);
	color: #fff;
}

/* Mías / Todas */
.requisas-quick-filters {
	display: inline-flex;
	background: var(--req-bg-soft);
	border: 1px solid var(--req-border);
	border-radius: 999px;
	padding: 3px;
	margin-bottom: 18px;
}

.btn-pill {
	border: none;
	background: transparent;
	padding: 6px 18px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 500;
	color: var(--req-text-muted);
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.btn-pill.is-active,
.btn-pill:hover {
	background: var(--req-teal);
	color: #fff;
}

/* Tabla */
.requisas-table-wrapper {
	border: 1px solid var(--req-border);
	border-radius: 10px;
	overflow: hidden;
	background: var(--req-bg);
}

.requisas-table {
	width: 100%;
	border-collapse: collapse;
}

.requisas-table thead th {
	text-align: left;
	background: var(--req-bg-soft);
	color: var(--req-text-muted);
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .02em;
	padding: 10px 14px;
	border-bottom: 1px solid var(--req-border);
	white-space: nowrap;
}

.requisas-filter-row th {
	background: var(--req-bg);
	padding: 8px 10px;
}

.filter-input,
.filter-select {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--req-border);
	border-radius: 6px;
	padding: 6px 8px;
	font-size: 12.5px;
	color: var(--req-text);
}

.filter-input:focus,
.filter-select:focus {
	outline: none;
	border-color: var(--req-teal);
	box-shadow: 0 0 0 3px var(--req-teal-light);
}

.requisas-date-filter {
	display: flex;
	gap: 6px;
}

.requisas-tbody td {
	padding: 10px 14px;
	border-bottom: 1px solid var(--req-border);
	vertical-align: middle;
}

.requisas-tbody tr:last-child td {
	border-bottom: none;
}

.requisas-tbody tr:hover {
	background: var(--req-bg-soft);
}

.req-link {
	color: var(--req-teal-dark);
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.req-link:hover {
	text-decoration: underline;
}

/* Badges de estado */
.req-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 600;
}

.req-badge.borrador,
.req-badge.pending { background: var(--req-badge-borrador-bg); color: var(--req-badge-borrador-fg); }
.req-badge.resuelto,
.req-badge.revisado { background: var(--req-badge-resuelto-bg); color: var(--req-badge-resuelto-fg); }
.req-badge.cerrado,
.req-badge.cancelado { background: var(--req-badge-cerrado-bg); color: var(--req-badge-cerrado-fg); }
.req-badge.en-revision,
.req-badge.en-revision-analitica,
.req-badge.pendiente-aprobacion,
.req-badge.revisar,
.req-badge.enviado-a-revision,
.req-badge.pendiente-revisar,
.req-badge.corregir { background: var(--req-badge-revision-bg); color: var(--req-badge-revision-fg); }
.req-badge.aprobada,
.req-badge.approved { background: var(--req-badge-aprobada-bg); color: var(--req-badge-aprobada-fg); }
.req-badge.rechazada,
.req-badge.rejected { background: var(--req-badge-rechazada-bg); color: var(--req-badge-rechazada-fg); }
.req-badge.atendida { background: var(--req-badge-atendida-bg); color: var(--req-badge-atendida-fg); }

.requisas-empty-state {
	padding: 32px 16px;
	text-align: center;
	color: var(--req-text-muted);
}

/* Footer / paginación */
.requisas-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 14px;
	color: var(--req-text-muted);
	font-size: 12.5px;
}

.requisas-pagination {
	display: flex;
	align-items: center;
	gap: 4px;
}

.page-btn {
	border: 1px solid var(--req-border);
	background: var(--req-bg);
	width: 28px;
	height: 28px;
	border-radius: 6px;
	cursor: pointer;
	color: var(--req-text);
}

.page-btn:hover {
	border-color: var(--req-teal);
	color: var(--req-teal-dark);
}

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

.page-numbers {
	display: inline-flex;
	gap: 4px;
	margin: 0 4px;
}

.page-number {
	border: 1px solid transparent;
	background: transparent;
	width: 26px;
	height: 26px;
	border-radius: 6px;
	cursor: pointer;
	color: var(--req-text-muted);
	font-size: 12.5px;
}

.page-number.is-active {
	background: var(--req-teal);
	color: #fff;
	font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
	.requisas-topbar { padding: 10px 14px; }
	.requisas-body { padding: 16px; }
	.requisas-heading { flex-direction: column; align-items: flex-start; gap: 12px; }
	.requisas-table-wrapper { overflow-x: auto; }
	.requisas-table { min-width: 720px; }
}