@charset "utf-8";
/* CSS Document */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #1f2933;
    font-size: 18px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px;
}

.card {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

h1 {
    margin-top: 0;
    font-size: 34px;
    color: #111827;
}

h2 {
    font-size: 24px;
    margin-top: 0;
}

p {
    line-height: 1.5;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #374151;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 18px;
    background: #ffffff;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

.form-group {
    margin-bottom: 20px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.money-field {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.money-field span {
    padding: 14px 16px;
    background: #e5e7eb;
    font-weight: bold;
    color: #111827;
    border-right: 1px solid #d1d5db;
}

.money-field input {
    border: none;
    border-radius: 0;
}

.btn {
    display: inline-block;
    padding: 14px 22px;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #4b5563;
}

.btn-secondary:hover {
    background: #374151;
}

.btn-back {
    background: #6b7280;
}

.btn-back:hover {
    background: #4b5563;
}

.btn-success {
    background: #16a34a;
}

.btn-success:hover {
    background: #15803d;
}

.btn-warning {
    background: #f59e0b;
    color: #111827;
}

.btn-warning:hover {
    background: #d97706;
    color: #ffffff;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #111827;
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    color: #ffffff;
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
    white-space: nowrap;
}

.main-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-menu a {
    color: #e5e7eb;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    font-size: 16px;
}

.main-menu a:hover,
.main-menu a.active {
    background: #2563eb;
    color: #ffffff;
}

.footer {
    text-align: center;
    padding: 24px;
    color: #6b7280;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 24px 0;
}

.summary-box {
    padding: 22px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.summary-box span {
    display: block;
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 8px;
}

.summary-box strong {
    font-size: 26px;
    color: #111827;
}

.summary-box.balance strong {
    color: #dc2626;
}

.documents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.document-box {
    border: 2px dashed #cbd5e1;
    padding: 18px;
    border-radius: 14px;
    background: #f8fafc;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 11px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f3f4f6;
}

.status {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 14px;
}

.status-pendiente {
    background: #fee2e2;
    color: #991b1b;
}

.status-abonada {
    background: #fef3c7;
    color: #92400e;
}

.status-pagada {
    background: #dcfce7;
    color: #166534;
}

.status-en_transito {
    background: #dbeafe;
    color: #1e40af;
}

.status-recibida {
    background: #ede9fe;
    color: #5b21b6;
}

.status-cerrada {
    background: #e5e7eb;
    color: #374151;
}

@media (max-width: 768px) {
    body {
        font-size: 17px;
    }

    .container {
        padding: 20px 14px;
    }

    .card {
        padding: 20px;
    }

    h1 {
        font-size: 28px;
    }

    .grid,
    .summary-grid,
    .documents-grid {
        grid-template-columns: 1fr;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .brand {
        text-align: center;
        font-size: 22px;
    }

    .main-menu {
        display: grid;
        grid-template-columns: 1fr;
    }

    .main-menu a {
        text-align: center;
        font-size: 17px;
        padding: 13px;
    }

    table {
        font-size: 15px;
    }

    th,
    td {
        padding: 10px;
    }
}
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f4f6f8;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.10);
}

.login-card h1 {
    margin-bottom: 10px;
}

.btn-full {
    width: 100%;
    text-align: center;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 14px;
    border-radius: 12px;
    margin: 18px 0;
    font-weight: bold;
}
.form-card {
    max-width: 920px;
    margin: 0 auto 28px auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.page-header h1 {
    margin-bottom: 6px;
}

.page-header p {
    margin: 0;
    color: #6b7280;
}

.compact-actions {
    margin: 0;
}

.form-section {
    padding: 18px 0;
    border-top: 1px solid #e5e7eb;
}

.form-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.form-section h2 {
    font-size: 19px;
    margin-bottom: 18px;
    color: #111827;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-group {
    margin-bottom: 16px;
}

input,
select,
textarea {
    padding: 12px 14px;
    font-size: 16px;
}

textarea {
    min-height: 78px;
}

.money-field span {
    padding: 12px 14px;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.file-card {
    background: #f8fafc;
    border: 1px solid #dbe3ea;
    border-radius: 16px;
    padding: 16px;
}

.file-card label {
    font-size: 16px;
    margin-bottom: 10px;
}

.file-card input[type="file"] {
    font-size: 15px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    cursor: pointer;
}

.file-card input[type="file"]::file-selector-button {
    border: none;
    background: #2563eb;
    color: #ffffff;
    padding: 9px 14px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    margin-right: 12px;
}

.file-card input[type="file"]::file-selector-button:hover {
    background: #1d4ed8;
}

.file-help {
    display: block;
    margin-top: 8px;
    color: #6b7280;
    font-size: 14px;
}

.save-bar {
    position: sticky;
    bottom: 0;
    background: rgba(255,255,255,0.94);
    border-top: 1px solid #e5e7eb;
    padding: 16px 0 0 0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    backdrop-filter: blur(8px);
}

.btn-save {
    min-width: 220px;
    font-size: 18px;
}

@media (max-width: 900px) {
    .grid,
    .grid-3,
    .documents-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
    }

    .save-bar {
        flex-direction: column-reverse;
    }

    .save-bar .btn,
    .btn-save {
        width: 100%;
        text-align: center;
    }
}

.action-cell {
    white-space: nowrap;
    width: 1%;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.btn-small {
    padding: 10px 16px;
    font-size: 15px;
    border-radius: 10px;
    min-width: 88px;
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .action-cell {
        white-space: normal;
    }

    .table-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .btn-small {
        width: 100%;
        min-width: 0;
    }
}

.filters-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
    margin: 22px 0;
}

.filters-grid {
    display: grid;
    grid-template-columns: 150px 150px 220px 170px auto;
    gap: 12px;
    align-items: end;
}

.filters-card .form-group {
    margin-bottom: 0;
}

.filters-card label {
    font-size: 14px;
    margin-bottom: 6px;
}

.filters-card input,
.filters-card select {
    height: 44px;
    padding: 8px 10px;
    font-size: 15px;
    border-radius: 10px;
}

.filters-actions {
    display: flex;
    gap: 8px;
    align-items: end;
    flex-wrap: nowrap;
}

.filters-actions .btn {
    height: 44px;
    padding: 10px 14px;
    font-size: 15px;
    white-space: nowrap;
}

.results-summary {
    margin: 14px 0 18px 0;
    color: #4b5563;
}

@media (max-width: 1100px) {
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filters-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filters-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-actions .btn {
        width: 100%;
        text-align: center;
    }
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.detail-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
}

.detail-box span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 6px;
}

.detail-box strong {
    color: #111827;
    font-size: 18px;
}

.info-section {
    margin-top: 28px;
}

.info-section h2 {
    margin-bottom: 12px;
}

.text-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

/* Vista detalle de importación más compacta */

.summary-grid {
    gap: 12px;
    margin: 16px 0;
}

.summary-box {
    padding: 10px 18px;
    border-radius: 14px;
}

.summary-box span {
    font-size: 14px;
    margin-bottom: 4px;
}

.summary-box strong {
    font-size: 22px;
}

.details-grid {
    gap: 12px;
    margin: 16px 0;
}

.detail-box {
    padding: 8px 16px;
    border-radius: 12px;
    min-height: auto;
}

.detail-box span {
    font-size: 13px;
    margin-bottom: 4px;
}

.detail-box strong {
    font-size: 16px;
}

.info-section {
    margin-top: 20px;
}

.info-section h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.text-box {
    padding: 12px 16px;
    border-radius: 12px;
    min-height: auto;
}

.card {
    padding: 15px;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Página pública OAuth / Home */

.public-home {
    min-height: 100vh;
    background: #f4f6f8;
}

.public-home-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.public-home-card {
    width: 100%;
    max-width: 760px;
    background: #ffffff;
    border-radius: 24px;
    padding: 42px;
    box-shadow: 0 12px 34px rgba(0,0,0,0.10);
    text-align: center;
}

.public-home-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #075985;
    font-weight: bold;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.public-home-card h1 {
    font-size: 38px;
    margin-bottom: 16px;
    color: #111827;
}

.public-home-lead {
    font-size: 20px;
    color: #374151;
    line-height: 1.55;
    max-width: 660px;
    margin: 0 auto 24px auto;
}

.public-home-info {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px 24px;
    margin: 24px 0;
    text-align: left;
}

.public-home-info p {
    margin: 0 0 12px 0;
    color: #4b5563;
}

.public-home-info p:last-child {
    margin-bottom: 0;
}

.public-home-actions {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.public-home-btn {
    font-size: 22px;
    padding: 18px 34px;
    border-radius: 16px;
    min-width: 320px;
    text-align: center;
}

.public-home-link {
    color: #2563eb;
    font-weight: bold;
    text-decoration: none;
}

.public-home-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .public-home-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .public-home-card h1 {
        font-size: 30px;
    }

    .public-home-lead {
        font-size: 17px;
    }

    .public-home-btn {
        width: 100%;
        min-width: 0;
        font-size: 19px;
    }
}

