/* PanelWP Cliente — utilidades para las vistas custom de Filament */

.client-grid,
.client-page-grid,
.client-choice-grid {
    display: grid;
    gap: 1rem;
}

.client-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.client-grid-actions {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.client-grid-stats,
.client-grid-services {
    margin-bottom: 1.5rem;
}

.client-page-grid {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    align-items: start;
}

.client-panel,
.client-card {
    border: 1px solid rgb(226 232 240);
    border-radius: 1rem;
    background: rgb(255 255 255 / .82);
    box-shadow: 0 10px 30px rgb(15 23 42 / .04);
}

.client-panel {
    padding: 1.25rem;
}

.client-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    min-height: 7rem;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}

.client-card:hover,
.client-card:focus-visible {
    border-color: rgb(37 99 235 / .45);
    box-shadow: 0 14px 36px rgb(37 99 235 / .12);
    transform: translateY(-1px);
}

.client-card-icon {
    display: grid;
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border-radius: .75rem;
    background: rgb(37 99 235 / .1);
    color: #2563eb;
}

.client-card-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.client-card-body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: .35rem;
}

.client-card-body strong,
.client-panel h2,
.client-step h2 {
    color: rgb(15 23 42);
    font-size: 1rem;
    font-weight: 700;
}

.client-card-body span,
.client-muted,
.client-hint {
    color: rgb(100 116 139);
    font-size: .875rem;
    line-height: 1.45;
}

.client-panel-heading,
.client-toolbar,
.client-actions,
.client-inline-fields {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.client-panel-heading,
.client-toolbar {
    justify-content: space-between;
    margin-bottom: 1rem;
}

.client-actions {
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.client-inline-fields {
    align-items: flex-start;
}

.client-inline-fields > * {
    flex: 1;
}

.client-label {
    display: block;
    margin: 1rem 0 .35rem;
    color: rgb(71 85 105);
    font-size: .8rem;
    font-weight: 700;
}

.client-input {
    width: 100%;
    border: 1px solid rgb(203 213 225);
    border-radius: .65rem;
    background: #fff;
    color: rgb(15 23 42);
    font-size: .9rem;
    padding: .65rem .8rem;
    color-scheme: light;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.client-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgb(37 99 235 / .12);
    outline: none;
}

.dark .client-input {
    color-scheme: dark;
}

.client-select {
    max-width: 18rem;
}

.client-error {
    margin-top: .35rem;
    color: #dc2626;
    font-size: .8rem;
}

.client-hint {
    margin-top: .35rem;
    color: rgb(100 116 139);
    font-size: .75rem;
}

.client-hint {
    margin-top: .65rem;
}

.client-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.client-steps span {
    border: 1px solid rgb(226 232 240);
    border-radius: 999px;
    color: rgb(100 116 139);
    font-size: .78rem;
    font-weight: 700;
    padding: .45rem .75rem;
    text-align: center;
}

.client-steps .is-active {
    border-color: rgb(37 99 235 / .4);
    background: rgb(37 99 235 / .1);
    color: #2563eb;
}

.client-choice {
    display: flex;
    min-height: 8rem;
    cursor: pointer;
    flex-direction: column;
    gap: .5rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 1rem;
    padding: 1rem;
    transition: border-color .15s ease, background .15s ease;
}

.client-choice input {
    position: absolute;
    opacity: 0;
}

.client-choice strong {
    color: rgb(15 23 42);
}

.client-choice span {
    color: rgb(100 116 139);
    font-size: .85rem;
}

.client-choice.is-selected {
    border-color: rgb(37 99 235 / .55);
    background: rgb(37 99 235 / .08);
}

.client-summary {
    display: grid;
    gap: .75rem;
}

.client-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgb(226 232 240);
    padding-bottom: .75rem;
}

.client-summary dt {
    color: rgb(100 116 139);
    font-size: .85rem;
}

.client-summary dd {
    margin: 0;
    color: rgb(15 23 42);
    font-weight: 700;
}

.client-list {
    display: grid;
    gap: .5rem;
}

.client-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgb(226 232 240);
    border-radius: .75rem;
    color: inherit;
    padding: .75rem .9rem;
    text-decoration: none;
}

.client-list-item small {
    color: rgb(100 116 139);
}

.client-file {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.client-file-name {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.client-inline-icon {
    width: 1rem;
    height: 1rem;
    color: #2563eb;
}

.client-badge,
.client-status-badge {
    border-radius: 999px;
    background: rgb(16 185 129 / .1);
    color: #059669;
    font-size: .72rem;
    font-weight: 800;
    padding: .25rem .6rem;
    text-transform: uppercase;
}

.client-link {
    color: #2563eb;
    font-weight: 700;
}

.client-notice {
    margin-bottom: 1rem;
    border-radius: .8rem;
    font-size: .88rem;
    padding: .9rem 1rem;
}

.client-notice.is-warning {
    border: 1px solid rgb(245 158 11 / .35);
    background: rgb(245 158 11 / .1);
    color: #92400e;
}

.client-notice.is-info {
    border: 1px solid rgb(14 165 233 / .3);
    background: rgb(14 165 233 / .1);
    color: #0369a1;
}

.client-empty {
    border: 1px dashed rgb(203 213 225);
    border-radius: 1rem;
    color: rgb(100 116 139);
    padding: 1.25rem;
    text-align: center;
}

.client-empty strong {
    display: block;
    margin-bottom: .35rem;
    color: rgb(71 85 105);
}

.client-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 1rem;
    padding: 1rem;
}

.client-status.is-ready {
    border: 1px solid rgb(16 185 129 / .25);
    background: rgb(16 185 129 / .08);
}

.client-status.is-warning {
    border: 1px solid rgb(245 158 11 / .3);
    background: rgb(245 158 11 / .1);
}

.client-status p {
    margin: .25rem 0 0;
    color: rgb(100 116 139);
    font-size: .88rem;
}

.client-status code,
.client-path {
    border-radius: .4rem;
    background: rgb(15 23 42 / .06);
    color: rgb(15 23 42);
    font-size: .82rem;
    padding: .2rem .45rem;
}

.client-subpanel {
    width: 100%;
    border-top: 1px solid rgb(226 232 240);
    margin-top: .75rem;
    padding-top: .75rem;
}

.client-site-card {
    flex-direction: column;
}

.client-modal-overlay {
    position: fixed;
    z-index: 60;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    background: rgb(15 23 42 / .55);
    padding: 4rem 1rem 2rem;
}

.client-modal {
    width: 100%;
    max-width: 34rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 24px 60px rgb(15 23 42 / .25);
    padding: 1.25rem;
}

@media (max-width: 900px) {
    .client-page-grid {
        grid-template-columns: 1fr;
    }
}

.dark .client-panel,
.dark .client-card {
    border-color: rgb(255 255 255 / .1);
    background: rgb(15 23 42 / .62);
    box-shadow: none;
}

.dark .client-card:hover,
.dark .client-card:focus-visible {
    border-color: rgb(96 165 250 / .55);
    box-shadow: 0 14px 36px rgb(0 0 0 / .35);
}

.dark .client-card-icon {
    background: rgb(96 165 250 / .15);
    color: #93c5fd;
}

.dark .client-card-body strong,
.dark .client-panel h2,
.dark .client-step h2,
.dark .client-summary dd,
.dark .client-choice strong {
    color: rgb(248 250 252);
}

.dark .client-card-body span,
.dark .client-muted,
.dark .client-hint,
.dark .client-empty,
.dark .client-status p,
.dark .client-summary dt,
.dark .client-list-item small {
    color: rgb(148 163 184);
}

.dark .client-label {
    color: rgb(203 213 225);
}

.dark .client-input {
    border-color: rgb(255 255 255 / .12);
    background: rgb(255 255 255 / .06);
    color: rgb(248 250 252);
}

.dark .client-input option {
    background: #0f172a;
    color: #f8fafc;
}

.dark .client-steps span,
.dark .client-choice,
.dark .client-list-item,
.dark .client-subpanel {
    border-color: rgb(255 255 255 / .1);
}

.dark .client-choice.is-selected {
    border-color: rgb(96 165 250 / .6);
    background: rgb(96 165 250 / .12);
}

.dark .client-summary > div {
    border-color: rgb(255 255 255 / .1);
}

.dark .client-empty {
    border-color: rgb(255 255 255 / .16);
}

.dark .client-empty strong {
    color: rgb(203 213 225);
}

.dark .client-notice.is-warning {
    border-color: rgb(245 158 11 / .4);
    background: rgb(245 158 11 / .14);
    color: #fbbf24;
}

.dark .client-notice.is-info {
    border-color: rgb(14 165 233 / .4);
    background: rgb(14 165 233 / .14);
    color: #7dd3fc;
}

.dark .client-status.is-ready {
    border-color: rgb(52 211 153 / .35);
    background: rgb(52 211 153 / .1);
}

.dark .client-status.is-warning {
    border-color: rgb(245 158 11 / .4);
    background: rgb(245 158 11 / .12);
}

.dark .client-status code,
.dark .client-path {
    background: rgb(255 255 255 / .08);
    color: rgb(226 232 240);
}

.dark .client-modal {
    border-color: rgb(255 255 255 / .1);
    background: #0f172a;
    box-shadow: 0 24px 60px rgb(0 0 0 / .5);
}

/* Buzones de correo + wizard "vincular a mi app" */
.client-mailbox {
    align-items: flex-start;
    flex-wrap: wrap;
}

.client-mailbox-info {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.client-mailbox-side {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.client-status-badge.is-warning {
    background: rgb(245 158 11 / .15);
    color: #b45309;
}

.client-app-pick {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.client-app-pick button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    border: 1px solid rgb(226 232 240);
    border-radius: .8rem;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-weight: 700;
    padding: .9rem;
}

.client-app-pick button:hover {
    border-color: rgb(96 165 250 / .6);
}

.client-link-steps ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .6rem;
    counter-reset: linkstep;
}

.client-link-steps li {
    counter-increment: linkstep;
    border: 1px solid rgb(226 232 240);
    border-radius: .75rem;
    padding: .7rem .9rem;
    position: relative;
    padding-left: 2.6rem;
}

.client-link-steps li::before {
    content: counter(linkstep);
    position: absolute;
    left: .8rem;
    top: .65rem;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    background: rgb(226 232 240);
    color: rgb(71 85 105);
    font-size: .72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.client-link-steps li.is-current {
    border-color: rgb(37 99 235 / .5);
}

.client-link-steps li.is-current::before {
    background: #2563eb;
    color: #fff;
}

.client-link-steps li.is-done::before {
    background: rgb(16 185 129 / .2);
    color: #059669;
    content: "✓";
}

.client-link-steps p {
    margin: .3rem 0 0;
    color: rgb(100 116 139);
    font-size: .88rem;
}

.client-creds {
    margin: .6rem 0 0;
    border: 1px dashed rgb(203 213 225);
    border-radius: .6rem;
    padding: .7rem .9rem;
    display: grid;
    gap: .35rem;
}

.client-creds > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.client-creds dt {
    color: rgb(100 116 139);
    font-size: .82rem;
}

.client-creds dd {
    margin: 0;
    font-family: ui-monospace, monospace;
    font-size: .82rem;
    font-weight: 700;
    word-break: break-all;
    text-align: right;
}

.dark .client-app-pick button,
.dark .client-link-steps li {
    border-color: rgb(255 255 255 / .1);
}

.dark .client-link-steps li.is-current {
    border-color: rgb(96 165 250 / .55);
}

.dark .client-link-steps li::before {
    background: rgb(255 255 255 / .1);
    color: rgb(203 213 225);
}

.dark .client-link-steps li.is-current::before {
    background: #2563eb;
    color: #fff;
}

.dark .client-link-steps p {
    color: rgb(148 163 184);
}

.dark .client-creds {
    border-color: rgb(255 255 255 / .16);
}

.dark .client-creds dt {
    color: rgb(148 163 184);
}

.dark .client-creds dd {
    color: rgb(226 232 240);
}

.dark .client-status-badge.is-warning {
    background: rgb(245 158 11 / .18);
    color: #fbbf24;
}

/* Wizard dominio apex: nameservers + copy */
.client-ns-box {
    display: grid;
    gap: .5rem;
    margin: .75rem 0;
}

.client-ns-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgb(226 232 240);
    border-radius: .75rem;
    padding: .65rem .9rem;
}

.client-ns-row code {
    font-family: ui-monospace, monospace;
    font-size: .9rem;
    font-weight: 700;
}

.dark .client-ns-row {
    border-color: rgb(255 255 255 / .1);
}

/* ---------- plan de hosting (onboarding) ---------- */

.client-steps .is-done {
    border-color: rgb(16 185 129 / .4);
    background: rgb(16 185 129 / .1);
    color: #059669;
}

.client-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.client-plan-card {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 14px;
    background: #fff;
    padding: 1.25rem;
    transition: border-color .15s, box-shadow .15s;
}

.client-plan-card:hover {
    border-color: rgb(37 99 235 / .5);
    box-shadow: 0 8px 24px rgb(15 23 42 / .08);
}

.client-plan-card.is-current {
    position: relative;
    border-color: rgb(37 99 235 / .7);
    box-shadow: 0 0 0 3px rgb(37 99 235 / .12);
}

.client-plan-card.is-wide {
    grid-column: 1 / -1;
}

/* El botón siempre al fondo: las cards de una fila quedan alineadas
   aunque el texto de arriba tenga largos distintos. */
.client-card-cta {
    margin-top: auto;
}

.client-plan-badge {
    align-self: flex-start;
    border-radius: 999px;
    background: rgb(37 99 235 / .12);
    color: #1d4ed8;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    padding: .2rem .65rem;
    text-transform: uppercase;
}

.client-plan-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
}

.client-plan-price {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: #2563eb;
}

.client-plan-price small {
    font-size: .8rem;
    font-weight: 600;
    color: rgb(100 116 139);
}

.client-plan-features {
    list-style: none;
    margin: 0 0 .5rem;
    padding: 0;
    font-size: .85rem;
    color: rgb(71 85 105);
    flex: 1;
}

.client-plan-features li {
    padding: .25rem 0;
    border-bottom: 1px dashed rgb(226 232 240 / .6);
}

.client-plan-features li:last-child { border-bottom: 0; }

.client-radio {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    margin-right: 1rem;
}

.dark .client-plan-card {
    background: rgb(255 255 255 / .02);
    border-color: rgb(255 255 255 / .1);
}

.dark .client-plan-card.is-current {
    border-color: rgb(96 165 250 / .7);
    box-shadow: 0 0 0 3px rgb(96 165 250 / .15);
}

.dark .client-plan-badge {
    background: rgb(96 165 250 / .15);
    color: #93c5fd;
}

.dark .client-plan-card h3 { color: #f8fafc; }
.dark .client-plan-features { color: rgb(148 163 184); }
.dark .client-plan-features li { border-color: rgb(255 255 255 / .08); }

.client-badge.is-warn {
    background: rgb(245 158 11 / .12);
    color: #d97706;
}

.client-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 .25rem;
}

.client-svc-contracted {
    list-style: none;
    margin: 1rem 0 .75rem;
    padding: 0;
    border-top: 1px solid rgb(226 232 240 / .6);
}

.client-svc-contracted li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .55rem 0;
    border-bottom: 1px dashed rgb(226 232 240 / .6);
    font-size: .9rem;
}

.client-ver-mas {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-size: .9rem;
    align-self: flex-start;
}

.client-svc-features {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: rgb(51 65 85);
    flex: 1;
}

.client-svc-features li {
    padding: .5rem 0;
    border-bottom: 1px solid rgb(226 232 240 / .7);
}

.client-svc-features li:last-child { border-bottom: 0; }

.dark .client-svc-features { color: rgb(203 213 225); }
.dark .client-svc-features li { border-bottom-color: rgb(255 255 255 / .08); }

.dark .client-svc-contracted { border-top-color: rgb(255 255 255 / .1); }
.dark .client-svc-contracted li { border-bottom-color: rgb(255 255 255 / .08); }

/* Onboarding modal */
.client-onboarding {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

.client-onboarding li {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .8rem 1rem;
    border-radius: .75rem;
    background: rgb(148 163 184 / .08);
    font-size: .95rem;
    line-height: 1.5;
    color: rgb(51 65 85);
}

.dark .client-onboarding li {
    background: rgb(255 255 255 / .045);
    color: rgb(226 232 240);
}

.client-onboarding-step {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: rgb(37 99 235);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    line-height: 1;
}

.client-onboarding a {
    color: rgb(37 99 235);
    font-weight: 600;
    text-decoration: none;
}

.dark .client-onboarding a {
    color: rgb(96 165 250);
}

.client-onboarding a:hover {
    text-decoration: underline;
}


/* ---------- pestañas (página correo) ---------- */
.client-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    border-bottom: 1px solid rgb(226 232 240);
    margin-bottom: 1.25rem;
}

.client-tabs button {
    border: 0;
    background: none;
    cursor: pointer;
    padding: .6rem 1.1rem;
    font-size: .85rem;
    font-weight: 700;
    color: rgb(100 116 139);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
}

.client-tabs button:hover {
    color: #2563eb;
}

.client-tabs button.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.dark .client-tabs {
    border-color: rgb(255 255 255 / .1);
}

.dark .client-tabs button {
    color: rgb(148 163 184);
}

.dark .client-tabs button:hover,
.dark .client-tabs button.is-active {
    color: #60a5fa;
}

.dark .client-tabs button.is-active {
    border-bottom-color: #60a5fa;
}

/* ---------- barras de cuota ---------- */
.client-progress {
    background: rgb(226 232 240);
    border-radius: 999px;
    height: .7rem;
    overflow: hidden;
}

.client-progress > i {
    display: block;
    height: 100%;
    min-width: .35rem;
    background: #2563eb;
    border-radius: 999px;
    transition: width .4s ease;
}

.client-progress.is-warn > i {
    background: #f59e0b;
}

.client-progress.is-over > i {
    background: #dc2626;
}

.dark .client-progress {
    background: rgb(255 255 255 / .12);
}

.dark .client-progress > i {
    background: #60a5fa;
}

@keyframes client-shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

.client-skeleton {
    border-radius: .5rem;
    background: rgb(148 163 184 / .18);
    animation: client-shimmer 1.6s ease-in-out infinite;
    min-height: 1rem;
}

.dark .client-skeleton {
    background: rgb(255 255 255 / .08);
}
