/* =========================================================
   Estilos base - Sistema de Boletas
   Municipalidad de Jesús Nazareno
   ========================================================= */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f1efe8;
    color: #2c2c2a;
}

/* ---------- Login (tema claro institucional) ---------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8B0000 0%, #c41e3a 100%);
}

.login-wrap {
    width: 100%;
    max-width: 360px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 32px 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.login-logo {
    text-align: center;
    margin-bottom: 22px;
}

.login-logo img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 10px;
}

.login-logo p {
    font-size: 18px;
    font-weight: 700;
    color: #8B0000;
    letter-spacing: 0.2px;
}

.login-logo span {
    font-size: 12.5px;
    color: #6b1414;
    font-weight: 500;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: #6b1414;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap svg {
    display: none;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e8d5d5;
    border-radius: 9px;
    font-size: 14px;
    background: #FFFFFF;
    color: #2c2c2a;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input::placeholder {
    color: #b8a3a3;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #c41e3a;
    box-shadow: 0 0 0 3px rgba(196,30,58,0.15);
}

.btn-full {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: none;
    border-radius: 9px;
    background: linear-gradient(135deg, #c41e3a 0%, #8B0000 100%);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: opacity 0.15s, transform 0.1s;
}

.btn-full:hover {
    opacity: 0.92;
}

.btn-full:active {
    transform: scale(0.99);
}

.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.alert-error {
    background: #fcebeb;
    color: #8B0000;
    border: 1px solid #f3c9c9;
}

.alert-success {
    background: #eaf3de;
    color: #3b6d11;
    border: 1px solid #cfe3b8;
}

/* ---------- Layout general (admin / empleado) ---------- */
.topbar {
    background: #1a3a5c;
    color: #fff;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar .logo {
    font-size: 15px;
    font-weight: 600;
}

.topbar .user-info {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
}

.app-body {
    display: flex;
    min-height: calc(100vh - 56px);
}

.sidebar {
    width: 220px;
    min-width: 220px;
    background: #fff;
    border-right: 1px solid #e0ddd3;
    padding: 16px 0;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 14px;
    color: #5f5e5a;
    text-decoration: none;
}

.sidebar a:hover,
.sidebar a.active {
    background: #f1efe8;
    color: #1a3a5c;
    font-weight: 500;
}

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

.page-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.page-sub {
    font-size: 14px;
    color: #5f5e5a;
    margin-bottom: 24px;
}

/* ---------- Tarjetas y tablas ---------- */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e0ddd3;
    padding: 16px;
}

.stat-label {
    font-size: 13px;
    color: #5f5e5a;
    margin-bottom: 4px;
}

.stat-val {
    font-size: 24px;
    font-weight: 600;
}

.table-wrap {
    background: #fff;
    border: 1px solid #e0ddd3;
    border-radius: 10px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e0ddd3;
}

th {
    background: #f1efe8;
    font-size: 12px;
    color: #5f5e5a;
    font-weight: 500;
}

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

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.badge-success { background: #eaf3de; color: #3b6d11; }
.badge-warning { background: #faeeda; color: #854f0b; }
.badge-danger  { background: #fcebeb; color: #a32d2d; }
.badge-info    { background: #e6f1fb; color: #185fa5; }

.btn-primary {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: #1a3a5c;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-sec {
    padding: 8px 16px;
    border: 1px solid #d3d1c7;
    border-radius: 8px;
    background: #fff;
    color: #2c2c2a;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
