@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --app-bg: #f4f7fb;
    --app-bg-accent: #e0f2fe;
    --text-main: #0f172a;
    --text-muted: #475569;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --surface-border: rgba(148, 163, 184, 0.2);
    --primary-700: #0f766e;
    --primary-500: #14b8a6;
    --primary-300: #67e8f9;
    --secondary-500: #f97316;
    --secondary-200: #fed7aa;
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 30px 80px rgba(15, 23, 42, 0.14);
}

html,
body {
    min-height: 100%;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(103, 232, 249, 0.32), transparent 28%),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, var(--app-bg) 45%, #eef4fb 100%);
    color: var(--text-main);
}

body {
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 {
    margin-bottom: 0.35rem;
    font-size: 1.6rem;
}

h1:focus {
    outline: none;
}

a {
    color: #0f766e;
    text-decoration: none;
}

a:hover {
    color: #0b5f59;
    text-decoration: none;
}

hr {
    border: 0;
    height: 1px;
    margin: 0.9rem 0 1.5rem;
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.35), rgba(148, 163, 184, 0.08));
}

.content {
    padding-top: 1rem;
}

.container {
    max-width: 100%;
    padding: 0;
}

.card {
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.card-header,
.card-body,
.card-footer {
    background: transparent;
    border-color: #e2e8f0;
}

.card-body {
    padding: 1.3rem;
}

.card-footer,
.card-header {
    padding: 1rem 1.3rem;
}

.form-group.row,
.form-row {
    gap: 0.75rem 0;
}

.form-control,
select.form-control,
.input-group-text,
.custom-select {
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: none;
}

.form-control:focus,
select.form-control:focus,
.custom-select:focus {
    border-color: rgba(14, 165, 233, 0.7);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.14);
}

.publicidad-file-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.2rem;
}

.publicidad-file-input {
    display: block;
    max-width: fit-content;
}

.publication-upload {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 1rem;
    border: 1px dashed rgba(15, 118, 110, 0.35);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.publication-upload:hover,
.publication-upload:focus-within {
    border-color: rgba(14, 165, 233, 0.75);
    box-shadow: 0 18px 34px rgba(14, 116, 144, 0.12);
    transform: translateY(-1px);
}

.publication-upload__content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.publication-upload__title {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 800;
}

.publication-upload__description {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.publication-upload__button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.75rem 1.1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-700), #0ea5e9);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 14px 24px rgba(14, 116, 144, 0.18);
}

.publication-upload__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1.2rem;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-700), #0ea5e9);
    box-shadow: 0 16px 28px rgba(14, 116, 144, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #ffffff;
    background: linear-gradient(135deg, #0d665f, #0284c7);
}

.btn-success {
    color: #ffffff;
    background: linear-gradient(135deg, #15803d, #22c55e);
    box-shadow: 0 14px 24px rgba(34, 197, 94, 0.18);
}

.btn-secondary {
    color: #0f172a;
    background: #e2e8f0;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.table {
    margin-bottom: 0;
    background: var(--surface-strong);
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.table thead th {
    border-bottom: 1px solid #dbe5f1;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    color: #0f172a;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.table th,
.table td {
    padding: 0.95rem 1rem;
    vertical-align: middle;
    border-color: #e2e8f0;
}

.table tbody tr:hover {
    background: #f8fbff;
}

.table-bordered th,
.table-bordered td {
    border-color: #e2e8f0;
}

.list-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    color: #475569;
}

.list-pagination > div {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.list-pagination__page {
    font-weight: 700;
    color: #0f172a;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #22c55e;
}

.invalid {
    outline: 1px solid #ef4444;
}

.validation-message {
    color: #dc2626;
}

.blank-layout-root {
    min-height: 100vh;
}

.login-shell {
    position: relative;
    min-height: 100vh;
    padding: 1.5rem;
    overflow: hidden;
}

.login-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(340px, 520px);
    gap: 1rem;
    align-items: stretch;
    justify-content: center;
    max-width: 1220px;
    min-height: calc(100vh - 3rem);
    margin: 0 auto;
}

.login-panel {
    border-radius: 30px;
    padding: clamp(1.5rem, 2.5vw, 2.4rem);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: var(--shadow-strong);
}

.login-eyebrow {
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-700);
    opacity: 1;
}

.login-form-copy {
    margin-top: 0.75rem;
    color: var(--text-muted);
    opacity: 1;
}

.login-panel-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
    min-height: 680px;
}

.login-help-text {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.93rem;
}

.login-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.8;
}

.login-orb-one {
    top: 3rem;
    left: 4rem;
    width: 220px;
    height: 220px;
    background: rgba(103, 232, 249, 0.28);
}

.login-orb-two {
    right: 6rem;
    bottom: 4rem;
    width: 260px;
    height: 260px;
    background: rgba(249, 115, 22, 0.18);
}

.dashboard-grid {
    display: grid;
    gap: 1.25rem;
}

.metrics-shell {
    display: grid;
    gap: 1rem;
}

.metrics-summary {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.5rem;
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.95));
    box-shadow: var(--shadow-soft);
}

.metrics-eyebrow {
    color: var(--primary-700);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metrics-copy {
    margin-top: 0.45rem;
    max-width: 760px;
    color: var(--text-muted);
}

.metrics-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 180px;
}

.metrics-total span {
    font-size: clamp(2.25rem, 5vw, 3.6rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-main);
}

.metrics-total small {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.metrics-alert {
    background: rgba(255, 255, 255, 0.78);
}

.dashboard-banner,
.feature-card {
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
    box-shadow: var(--shadow-soft);
}

.dashboard-banner {
    padding: 1.5rem;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.dashboard-card-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.feature-card {
    grid-column: span 4;
    display: grid;
    gap: 0.85rem;
    padding: 1.35rem;
}

.feature-icon {
    width: 46px;
    height: 46px;
    padding: 0.65rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(15, 118, 110, 0.14));
    color: var(--primary-700);
}

.metric-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    padding: 1.35rem;
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    box-shadow: var(--shadow-soft);
}

.metric-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(14, 165, 233, 0.18));
    color: var(--primary-700);
}

.metric-card__content {
    display: grid;
    gap: 0.35rem;
}

.metric-card__label {
    color: #64748b;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.metric-card__value {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-main);
}

.metric-card__copy {
    color: var(--text-muted);
}

.publication-summary {
    display: grid;
    gap: 1rem;
    min-width: 0;
    max-width: 100%;
}

.summary-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.5rem;
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.95));
    box-shadow: var(--shadow-soft);
}

.summary-total-grid {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.summary-mini-grid {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.summary-total {
    min-width: 128px;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(34, 197, 94, 0.24);
    border-radius: 18px;
    background: #f0fdf4;
    text-align: right;
}

.summary-total--muted {
    border-color: rgba(100, 116, 139, 0.22);
    background: #f8fafc;
}

.summary-total span {
    display: block;
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    color: var(--text-main);
}

.summary-total small {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.summary-tab-panel {
    padding-top: 1rem;
    min-width: 0;
}

.report-tabs {
    min-width: 0;
    max-width: 100%;
}

.report-tabs .mud-tabs-toolbar {
    min-width: 0;
}

.report-tabs .mud-tabs-toolbar-content {
    flex-wrap: wrap;
    gap: 0.25rem 0.35rem;
    min-width: 0;
}

.report-tabs .mud-tab {
    min-width: auto;
    max-width: 100%;
    padding: 0.75rem 0.85rem;
    font-size: 0.9rem;
}

.summary-table {
    width: 100%;
    table-layout: fixed;
}

.summary-table th,
.summary-table td {
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
}

.summary-table th:first-child,
.summary-table td:first-child {
    width: 9rem;
}

.summary-table th:last-child,
.summary-table td:last-child {
    width: 9rem;
}

.summary-table .summary-location {
    display: grid;
    gap: 0.2rem;
}

.summary-table .summary-location small {
    color: var(--text-muted);
}

.summary-type {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    max-width: 100%;
    min-width: 0;
}

.pending-locations {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.pending-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.pending-search {
    width: min(360px, 100%);
    flex: 0 1 360px;
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.table-pagination-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#blazor-error-ui {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    display: none;
    padding: 0.9rem 1.1rem;
    border-radius: 18px;
    background: #7f1d1d;
    color: #ffffff;
    box-shadow: var(--shadow-soft);
    z-index: 3000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    top: 0.65rem;
    right: 0.85rem;
}

.blazor-error-boundary {
    background:
        url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuOD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yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem center / 1.8rem,
        #991b1b;
    padding: 1rem 1rem 1rem 3.8rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Se produjo un error.";
}

@media (max-width: 1080px) {
    .login-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .metrics-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .metrics-total {
        align-items: flex-start;
    }

    .summary-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-total-grid {
        justify-content: flex-start;
    }

    .pending-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-pagination-actions {
        justify-content: flex-start;
    }

    .feature-card {
        grid-column: span 6;
    }
}

@media (max-width: 720px) {
    .login-shell {
        padding: 1rem;
    }

    .login-grid {
        min-height: auto;
    }

    .feature-card {
        grid-column: span 12;
    }

    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .publication-upload {
        align-items: stretch;
        flex-direction: column;
    }

    .publication-upload__button {
        width: 100%;
    }
}
