/* ── BASE ── */
body {
    padding-top: 60px;
    padding-bottom: 40px;
    background: #f1f5f9;
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

.dl-horizontal dt {
    white-space: normal;
}

#contenedorImagenFactura img {
    padding: 0px;
}

.botonEliminar {
    background-color: rgb(255, 0, 0);
    border-color: transparent;
    border-radius: 42px;
    width: 26px;
    height: 27px;
    color: white;
}

/* ── NAVBAR OVERRIDE ── */
.navbar-antss {
    background: #0f172a !important;
    border: none !important;
    box-shadow: 0 2px 16px rgba(0,0,0,.4) !important;
    min-height: 60px !important;
}

.navbar-antss .navbar-brand {
    padding: 10px 15px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
}

.navbar-antss .navbar-brand img {
    height: 36px !important;
    width: auto !important;
    filter: brightness(0) invert(1);
}

.navbar-antss .navbar-nav > li > a {
    color: #94a3b8 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: .01em;
    padding: 20px 16px !important;
    transition: color .18s, background .18s;
}

.navbar-antss .navbar-nav > li > a:hover,
.navbar-antss .navbar-nav > li > a:focus {
    color: #e2e8f0 !important;
    background: rgba(59,130,246,.12) !important;
}

.navbar-antss .navbar-nav > li > a .nav-ico {
    margin-right: 5px;
    opacity: .75;
}

/* user pill */
.navbar-antss .nav-user-pill > a {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 12px 14px !important;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    vertical-align: middle;
}

.nav-user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    max-width: 180px;
    overflow: hidden;
}

.nav-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-user-role {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-antss .nav-user-pill .nav-caret {
    color: #94a3b8;
    transition: transform .15s;
}

.navbar-antss .nav-user-pill.open .nav-caret {
    transform: rotate(180deg);
}

.navbar-antss .nav-user-menu {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
    padding: 6px;
    min-width: 190px;
}

.navbar-antss .nav-user-menu > li > a {
    display: flex !important;
    align-items: center;
    gap: 9px;
    padding: 9px 12px !important;
    border-radius: 6px;
    color: #1e293b !important;
    font-size: 13px;
    font-weight: 500;
}

.navbar-antss .nav-user-menu > li > a:hover {
    background: #f1f5f9 !important;
}

.navbar-antss .nav-user-menu .divider {
    margin: 4px 0;
}

.navbar-antss .nav-user-menu .nav-salir > a {
    color: #dc2626 !important;
}

.navbar-antss .nav-user-menu .nav-salir > a:hover {
    background: #fef2f2 !important;
}

.navbar-antss .navbar-toggle {
    border-color: #334155 !important;
}

.navbar-antss .navbar-toggle .icon-bar {
    background-color: #94a3b8 !important;
}

/* ── HOME HEADER ── */
.home-header {
    padding: 28px 0 12px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.home-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
}

.home-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ── MODULE CARDS ── */
.module-row {
    margin-left: -10px;
    margin-right: -10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.module-row::before,
.module-row::after {
    display: none;
}

.module-col {
    padding: 10px !important;
    float: none !important;
    width: auto !important;
    display: flex;
}

.module-card {
    display: block;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    padding: 28px 16px 24px;
    text-align: center;
    text-decoration: none !important;
    transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1.5px solid transparent;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cc-a, #3b82f6), var(--cc-b, #6366f1));
    border-radius: 14px 14px 0 0;
}

.module-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0,0,0,.14);
    border-color: rgba(59,130,246,.2);
    text-decoration: none !important;
}

.module-card-icon {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--cc-a, #3b82f6), var(--cc-b, #6366f1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

.module-card-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.module-card-name {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: .05em;
    text-transform: uppercase;
    line-height: 1.3;
    display: block;
    min-height: 2.6em;
}

.module-card:hover .module-card-name {
    color: #2563eb;
}

/* color palette cycles */
.module-col:nth-child(6n+1) .module-card { --cc-a:#3b82f6; --cc-b:#6366f1; }
.module-col:nth-child(6n+2) .module-card { --cc-a:#10b981; --cc-b:#059669; }
.module-col:nth-child(6n+3) .module-card { --cc-a:#f59e0b; --cc-b:#d97706; }
.module-col:nth-child(6n+4) .module-card { --cc-a:#ef4444; --cc-b:#dc2626; }
.module-col:nth-child(6n+5) .module-card { --cc-a:#8b5cf6; --cc-b:#7c3aed; }
.module-col:nth-child(6n+6) .module-card { --cc-a:#06b6d4; --cc-b:#0284c7; }

/* ── FOOTER ── */
.antss-footer {
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

/* ── LOGIN ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    max-width: 220px;
    height: auto;
}

.login-caja-name {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin: -16px 0 24px;
    padding: 8px 16px;
    background: #f1f5f9;
    border-radius: 8px;
}

.login-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}

.login-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
    outline: none;
    box-sizing: border-box;
}

.login-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.login-form-group {
    margin-bottom: 20px;
}

.login-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .02em;
    transition: opacity .18s, transform .18s;
    margin-top: 8px;
}

.login-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.login-footer-text {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 28px;
}

/* ── LISTADOS RESPONSIVE: la tabla conserva un ancho mínimo y el contenedor desliza ── */
/* clear:both — el contenedor (overflow:auto) queda a 0px de ancho si va tras divs .col-xs-12 flotantes */
.table-responsive { -webkit-overflow-scrolling: touch; clear: both; }
.table-responsive > .table { min-width: 640px; }
