/*PagosRed/src/main/resources/static/css/main.css*/
*, *::before, *::after {
    box-sizing: border-box;
}
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #0b1120;
    color: #e5e7eb;
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
}

.app-header {
    background-color: #0f172a;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1f2937;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #e5e7eb;
    text-decoration: none;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #020617;
    padding: 4px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.01em;
}

.brand-subtitle {
    font-size: 12px;
    color: #9ca3af;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    background: #111827;
    border: 1px solid #1f2937;
    color: #e5e7eb;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 16px;
}

.nav-checkbox {
    display: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.nav-item {
    position: relative;
}

.nav-menu a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 10px;
    display: inline-block;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
    color: #f8fafc;
    background-color: #1f2937;
    border-color: #27324a;
}

.nav-has-children .nav-submenu {
    display: none;
    position: absolute;
    top: 36px;
    left: 0;
    background-color: #0f172a;
    border: 1px solid #1f2937;
    box-shadow: 0 8px 16px rgba(0,0,0,0.35);
    border-radius: 10px;
    min-width: 210px;
    padding: 10px;
    flex-direction: column;
    z-index: 10;
    gap: 4px;
}

.nav-has-children:hover .nav-submenu,
.nav-has-children:focus-within .nav-submenu {
    display: flex;
}

.nav-submenu a {
    width: 100%;
    margin: 0;
}

.page-shell {
    flex: 1;
    width: 100%;
}

.container {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-soft {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #bfdbfe;
    border: 1px solid #1f2937;
    font-size: 12px;
}

.card {
    background-color: #111827;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid #1f2937;
    margin-bottom: 16px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 16px rgba(0,0,0,0.18);
}

.btn-primary {
    background-color: #2563eb;
    color: #f9fafb;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #374151;
    color: #e5e7eb;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-success {
    background-color: #16a34a;
    color: #f9fafb;
}

.btn-success:hover {
    background-color: #15803d;
}

.btn-warning {
    background-color: #d97706;
    color: #111827;
}

.btn-warning:hover {
    background-color: #b45309;
}

.btn-danger {
    background-color: #dc2626;
    color: #f9fafb;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

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

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

th, td {
    padding: 8px;
    border-bottom: 1px solid #1f2937;
}

th {
    text-align: left;
    color: #9ca3af;
    font-weight: 500;
}

.table-striped tbody tr:nth-child(odd) {
    background-color: #020617;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid #1f2937;
}

input, select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #1f2937;
    background-color: #020617;
    color: #e5e7eb;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

label {
    font-size: 13px;
    color: #9ca3af;
    display: block;
    margin-bottom: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 16px;
    margin-bottom: 12px;
}

.form-section {
    margin-bottom: 18px;
}

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

h2 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 12px;
}

h3 {
    font-size: 16px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.actions-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 16px;
}

.table-actions {
    white-space: nowrap;
    display: flex;
    gap: 8px;
    align-items: center;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.form-actions-sticky {
    position: sticky;
    bottom: 0;
    z-index: 30;
    background: linear-gradient(180deg, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0.98) 45%, rgba(15,23,42,1) 100%);
    padding: 10px 0 6px 0;
    backdrop-filter: blur(6px);
    border-top: 1px solid #1f2937;
}

.tipo-descripcion {
    display: none;
    font-size: 0.85rem;
    color: #4b5563;
}

.text-muted {
    color: #9ca3af;
}

.msg-error {
    color: #fca5a5;
    font-size: 13px;
    margin: 0 0 6px 0;
}

.msg-ok {
    color: #6ee7b7;
    font-size: 13px;
    margin: 0 0 6px 0;
}

.unstyled-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: 900;
}

.modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #020617;
    color: #e5e7eb;
    padding: 20px 24px;
    border-radius: 10px;
    max-width: 720px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 901;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    border: 1px solid #1f2937;
}

.modal-box h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #1f2937;
    padding-bottom: 6px;
}

.modal-box h4 {
    font-size: 15px;
    margin-top: 16px;
    margin-bottom: 6px;
    color: #f97373;
}

.modal-box ul,
.modal-box ol {
    margin: 0 0 10px 18px;
    padding: 0;
}

.modal-box li {
    margin-bottom: 4px;
    line-height: 1.35;
}

.modal-box hr {
    border: 0;
    border-top: 1px solid #1f2937;
    margin: 12px 0;
}

.modal-box .btn {
    font-size: 13px;
    padding: 6px 12px;
}

.action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.action-grid .btn {
    flex: 1 1 200px;
}

.stacked-table table {
    min-width: 720px;
}

@media (max-width: 960px) {
    .app-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .brand {
        width: 100%;
        justify-content: space-between;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-checkbox:not(:checked) + .nav-menu {
        display: none;
    }

    .nav-checkbox:checked + .nav-menu {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        background-color: #0f172a;
        padding: 10px 0;
        border-radius: 10px;
    }

    .nav-menu a {
        width: 100%;
    }

    .nav-has-children .nav-submenu {
        position: static;
        width: 100%;
        box-shadow: none;
        padding: 6px 0 0 0;
        border: none;
        background-color: transparent;
        gap: 6px;
    }
}

@media (max-width: 800px) {
    .stacked-table table {
        min-width: unset;
        border-collapse: separate;
    }

    .stacked-table thead {
        display: none;
    }

    .stacked-table tr {
        display: block;
        background: #0b1220;
        border: 1px solid #1f2937;
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 10px;
    }

    .stacked-table td {
        display: grid;
        grid-template-columns: 1fr 1.4fr;
        gap: 6px;
        padding: 6px 0;
        border: none;
    }

    .stacked-table td::before {
        content: attr(data-label);
        color: #9ca3af;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }

    .stacked-table input,
    .stacked-table select {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 16px;
    }

    .card {
        padding: 14px 16px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

