:root {
    /* Paleta Verde Profesional (Tema Principal) */
    --primario: #059669;
    /* Verde esmeralda principal */
    --primario-hover: #047857;
    --secundario: #10b981;
    --fondo-app: #f3f4f6;
    /* Gris muy claro, clásico de cPanel */
    --fondo-tarjeta: #ffffff;
    --texto-principal: #1f2937;
    --texto-claro: #6b7280;
    --lineas: #e5e7eb;

    /* Colores de Alertas y Estados */
    --exito: #10b981;
    --alerta: #ef4444;
    --advertencia: #f59e0b;
    --info: #3b82f6;

    /* Sombras y bordes */
    --sombra: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radio: 8px;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--fondo-app);
    color: var(--texto-principal);
    margin: 0;
    padding: 20px;
}

/* Contenedores estilo "Cards" de cPanel */
.contenedor,
.caja {
    background: var(--fondo-tarjeta);
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    border: 1px solid var(--lineas);
}

.caja {
    max-width: 500px;
    /* Para formularios pequeños como el login o registro */
}

/* Navegación Superior */
.nav-superior {
    background: var(--fondo-tarjeta);
    max-width: 500px;
    margin: 0 auto 20px auto;
    padding: 15px 25px;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    display: flex;
    justify-content: space-between;
    /* Espacia los botones uniformemente */
    gap: 10px;
    border: 1px solid var(--lineas);
}

/* Tipografía */
h2,
h3 {
    color: var(--texto-principal);
    font-weight: 600;
    margin-top: 0;
}

/* Formularios */
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--texto-claro);
    margin-bottom: 5px;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--lineas);
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primario);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

/* Botones */
button,
.btn,
.btn-nav,
.btn-guardar,
.btn-accion {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.btn-nav {
    padding: 8px 12px;
    font-size: 13px;
    flex: 1;
}

/* Botones de la barra de navegación */
.btn-accion {
    padding: 6px 10px;
    font-size: 12px;
}

/* Botones pequeños para la tabla */

.btn-verde,
.btn-guardar {
    background: var(--primario);
    color: white;
}

.btn-verde:hover,
.btn-guardar:hover {
    background: var(--primario-hover);
}

.btn-azul {
    background: var(--info);
    color: white;
}

.btn-azul:hover {
    background: #2563eb;
}

.btn-rojo {
    background: #fee2e2;
    color: var(--alerta);
    border: 1px solid #f87171;
}

.btn-rojo:hover {
    background: var(--alerta);
    color: white;
}

.btn-naranja {
    background: var(--advertencia);
    color: white;
}

.btn-naranja:hover {
    background: #d97706;
}

.btn-gris {
    background: white;
    color: var(--texto-principal);
    border: 1px solid var(--lineas);
}

.btn-gris:hover {
    background: #f9fafb;
}

/* Tablas estilo cPanel */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

th {
    background: #f9fafb;
    color: var(--texto-claro);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid var(--lineas);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--lineas);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fafc;
}

.acciones-col {
    text-align: right;
    white-space: nowrap;
}

/* Badges (Etiquetas de estado) */
.badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

.badge.entregado {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

.badge.pendiente {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.badge.admin {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #818cf8;
}

.badge.bodega {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #9ca3af;
}

/* Filtros Grid */
.panel-filtros {
    background: #f8fafc;
    padding: 15px;
    border-radius: var(--radio);
    border: 1px solid var(--lineas);
    margin-bottom: 20px;
}

.grid-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}

.grid-filtros label {
    margin-top: 0;
}