/* Shared spacing scale for admin, public checkout, authentication and dialogs. */
:root{--rep-field-gap:20px;--rep-label-gap:8px;--rep-action-gap:12px;--rep-section-gap:24px}
.field{display:grid;gap:var(--rep-label-gap)}
:where(.payment-form-grid,.modal-fields,.table-main-controls,.table-filter-grid){gap:var(--rep-field-gap)}
:where(.form-card label:not(.checkbox-label):not(.ux-check),.payment-create-form label:not(.checkbox-label),.public-shell form>label){display:grid;gap:var(--rep-label-gap)}
:where(.form-actions,.modal-actions,.action-group,.table-filter-actions,.row-actions,.page-actions){display:flex;align-items:center;flex-wrap:wrap;gap:var(--rep-action-gap)}
:where(.form-actions,.modal-actions){margin-top:var(--rep-section-gap)}
:where(form>.button,form>div>.button):not([type=button]){margin-top:var(--rep-action-gap)}
:where(.form-actions,.modal-actions,.table-filter-actions,.action-group,.row-actions)>.button{margin-top:0}
:where(.button,.row-action)+:where(.button,.row-action){margin-inline-start:var(--rep-action-gap)}
:is(.flex,.grid,.form-actions,.modal-actions,.action-group,.row-actions,.table-filter-actions,.page-actions)>:is(.button,.row-action)+:is(.button,.row-action){margin-inline-start:0}
:where(form>.field)+:where(.field){margin-top:var(--rep-field-gap)}
.form-card>h2,.app-modal>h2{margin-top:0;margin-bottom:var(--rep-field-gap)}
:where(.deactivation-dialog,.app-modal) form{display:grid;gap:var(--rep-field-gap)}
:where(.table-main-controls,.table-toolbar){row-gap:16px;column-gap:var(--rep-field-gap)}
:where(.login-form-wrap form){row-gap:var(--rep-label-gap)}
/* Keep disabled invoice fields from reserving space in the checkout. */
[hidden]{display:none!important}

.payphone-reference-preview{margin-top:20px;padding:16px;border:1px solid #cbd5e1;border-radius:10px;background:#f8fafc;overflow-wrap:anywhere}.payphone-reference-preview p{margin:8px 0}.payphone-failure-alert{border:1px solid #fca5a5;background:#fef2f2;color:#991b1b;margin-bottom:24px}.payphone-failure-alert p{margin:12px 0}

.billing-recipient-distinct{padding:8px 10px;border-left:3px solid #d97706;background:#fffbeb;border-radius:4px}.subscription-billing{margin:16px 0;padding:12px;border:1px solid #cbd5e1;border-radius:8px}

.subscription-compact{max-width:100%;min-width:0}.subscription-compact .table-main-controls{display:flex;flex-wrap:wrap;align-items:end;gap:12px}.subscription-compact .table-search{flex:1 1 220px;min-width:0}.subscription-compact .table-main-controls>label{min-width:0;max-width:100%}.subscription-compact .table-scroll{max-width:100%}.subscription-compact table{table-layout:auto;width:100%}.subscription-compact td{padding:12px;max-width:300px;overflow-wrap:anywhere}.subscription-compact td small{display:block;color:#64748b;margin-top:6px}.subscription-compact th:last-child,.subscription-compact td:last-child{position:sticky;right:0;background:#fff;z-index:2;box-shadow:-2px 0 4px #e2e8f0}.subscription-compact th:last-child{z-index:12}.subscription-compact [data-row-url]{cursor:pointer}.subscription-compact [data-row-url]:hover{background:#f0fdf4}.subscription-overdue{color:#b91c1c}.subscription-more-filters{margin:12px 0}.subscription-more-filters summary{cursor:pointer;font-weight:600}.subscription-more-filters>div{display:flex;flex-wrap:wrap;align-items:end;gap:12px;padding:12px 0}.subscription-compact .billing-recipient-distinct{margin-top:8px;font-size:12px}
@media(max-width:767px){.subscription-compact .table-scroll{max-height:none!important;overflow:visible!important}.subscription-compact table,.subscription-compact tbody{display:block}.subscription-compact thead{display:none}.subscription-compact tr{display:block;border:1px solid #cbd5e1;border-radius:12px;background:#fff;margin:12px 0;padding:12px}.subscription-compact td{display:block;max-width:none;padding:8px 0}.subscription-compact td:before{content:attr(data-label);display:block;font-weight:600;font-size:12px;color:#64748b;margin-bottom:4px}.subscription-compact td:last-child{position:static;box-shadow:none}.subscription-compact .table-main-controls>label{flex:1 1 140px}}

.payment-alert-types{display:grid;gap:12px;margin:20px 0}[data-alert-recipients]>.action-group{margin-bottom:12px}

.subscription-compact td[data-label="Vigencia"]{white-space:nowrap;max-width:none}@media(max-width:767px){.subscription-compact td[data-label="Vigencia"]{white-space:normal}}

/* Shared tables grow with their rows; only horizontal overflow is contained. */
.server-table>.table-scroll{height:auto;max-height:none;overflow-x:auto;isolation:isolate}
.payment-alert-actions{align-items:center}.payment-alert-actions>form{margin:0}.payment-alert-actions .button{margin:0}.form-card .payment-alert-history-title{margin-top:var(--rep-section-gap)}

.dashboard-period{margin-bottom:var(--rep-section-gap)}.direction-summary{margin:var(--rep-section-gap) 0}.dashboard-technical{margin:var(--rep-section-gap) 0}.dashboard-technical>summary{cursor:pointer;font-weight:700}.direction-summary .stat-card>small{display:block}

/* Dashboard presentation: one institutional card style, centered responsive rows. */
.dashboard-heading{flex-wrap:wrap;gap:20px}.dashboard-heading .section-heading-title{flex:1 1 400px}.dashboard-heading .page-actions{flex:0 1 auto}.dashboard-heading .date-label{display:none}.dashboard-heading p{font-size:12px;line-height:1.6}.dashboard-period-buttons{display:flex;flex-wrap:wrap;gap:4px;padding:4px;border:1px solid #ffffff70;border-radius:9px;background:#ffffff12}.dashboard-period-button{display:block;padding:9px 12px;border-radius:6px;color:#fff;font-size:13px;font-weight:650;text-decoration:none;white-space:nowrap}.dashboard-period-button:hover{background:#ffffff25}.dashboard-period-button.is-active{background:#fff;color:#1f5c2c;box-shadow:0 1px 4px #14391b25}.dashboard-period-button:focus-visible{outline:3px solid #fff;outline-offset:3px}
.dashboard-metrics-section{margin:0 0 28px}.dashboard-metrics-section>h2{margin:0 0 16px;font-size:20px}.dashboard-metrics{display:flex;flex-wrap:wrap;justify-content:center;gap:16px;align-items:stretch}.direction-dashboard .dashboard-stat{flex:0 0 100%;min-width:0;min-height:180px;margin:0;padding:18px;box-sizing:border-box}.dashboard-stat .stat-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;min-height:36px}.dashboard-stat .stat-top>span:first-child{font-size:11px;line-height:1.5;letter-spacing:.055em;text-transform:uppercase;color:#24415c;font-weight:750}.dashboard-stat .stat-icon{position:static;flex:0 0 32px;width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center}.dashboard-stat .stat-number{display:block;font-size:34px;line-height:1.2;margin:12px 0 10px;overflow-wrap:anywhere}.dashboard-stat .stat-number-text{font-size:24px}.dashboard-stat-subtitle,.dashboard-stat-subtitle small{font-size:13px;line-height:1.6;color:#405368}.dashboard-stat-subtitle small{display:block}.dashboard-stat-subtitle a{font-size:13px;color:#145b99;text-decoration:underline;text-underline-offset:3px}.dashboard-card-links{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:10px}.dashboard-card-help{flex-basis:100%}.dashboard-card-details{margin-top:12px}.dashboard-card-details summary{cursor:pointer;font-size:13px;font-weight:650}.dashboard-card-details p{margin:10px 0;overflow-wrap:anywhere}.direction-dashboard .dashboard-stat-attention{background:#fff4f3!important;border:1px solid #e2a49e!important}.dashboard-stat-attention .stat-top>span:first-child,.dashboard-stat-attention .stat-number{color:#942b24}.dashboard-support{scroll-margin-top:24px}
@media(min-width:768px){.direction-dashboard .dashboard-stat{flex-basis:calc((100% - 32px)/3)}}
@media(min-width:1280px){.dashboard-summary-grid .dashboard-stat{flex-basis:calc((100% - 64px)/5)}.dashboard-operation-grid .dashboard-stat{flex-basis:calc((100% - 80px)/6)}}
@media(max-width:767px){.dashboard-heading .section-heading-title,.dashboard-heading .page-actions{flex-basis:100%;width:100%}.dashboard-period-buttons{width:100%;justify-content:center}.dashboard-period-button{flex:1;text-align:center;padding:9px 7px}.dashboard-stat .stat-number{font-size:34px}}

.dashboard-stat .stat-top>span:first-child{min-width:0;overflow-wrap:anywhere}@media(min-width:1280px){.dashboard-operation-grid .dashboard-stat{padding:16px 12px}.dashboard-operation-grid .stat-top{gap:8px}.dashboard-operation-grid .stat-top>span:first-child{font-size:10px;letter-spacing:.025em}.dashboard-operation-grid .stat-icon{flex-basis:28px;width:28px;height:28px}}

.dashboard-support{display:grid;gap:24px;margin-top:24px}.dashboard-support>.panel{margin-top:0!important}.dashboard-support .dashboard-grid{margin-top:0}

.sale-type{display:inline-block;font-size:11px;font-weight:600;padding:2px 7px;border-radius:5px;white-space:nowrap}.sale-type-plan{background:#e8f0fa;color:#244b79}.sale-type-certification{background:#f0eafa;color:#684887}
