/*
 * Customer area, direction « Net » (November 2026): a sidebar listing every destination instead of two rows of
 * tabs, flat cards with thin lines, quieter tables and status pills, roomier forms.
 * Loaded after public/brand/dowebo.css on the customer, order and checkout pages (layouts/app.blade.php).
 */

.workspace.narrow {
    padding-top: 36px;
}

.portal-shell {
    max-width: var(--container);
}

/* Page heading */

.portal-heading {
    margin-bottom: 24px;
}

.portal-heading .eyebrow {
    margin-bottom: 6px;
}

.portal-heading h1,
.auth-card h1 {
    font-size: clamp(1.75rem, 2.6vw, 2.25rem);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.back-link {
    display: inline-flex;
    margin-bottom: 14px;
}

/* Sidebar */

.customer-sidebar ul {
    display: grid;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.customer-nav-group + .customer-nav-group {
    margin-top: 18px;
}

.customer-nav-heading {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 6px;
    padding: 0 12px;
}

.customer-nav-link {
    align-items: center;
    border-radius: 10px;
    color: var(--ink);
    display: flex;
    font-size: 0.92rem;
    font-weight: 500;
    gap: 10px;
    min-height: 40px;
    padding: 8px 12px;
    text-decoration: none;
}

.customer-nav-link svg {
    color: var(--muted);
    flex: 0 0 18px;
    height: 18px;
    width: 18px;
}

.customer-nav-link span {
    flex: 1 1 auto;
}

.customer-nav-link:hover {
    background: var(--surface-soft);
}

.customer-nav-link.active {
    background: var(--surface-blue);
    color: var(--blue);
    font-weight: 600;
}

.customer-nav-link.active svg {
    color: var(--blue);
}

.customer-nav-badge {
    background: var(--success-soft);
    border-radius: 999px;
    color: var(--success);
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 600;
    padding: 2px 7px;
    white-space: nowrap;
}

.customer-sidebar .portal-tab-badge {
    border: 0;
    box-shadow: none;
    font-size: 0.7rem;
    padding: 3px 7px;
    position: static;
}

.customer-nav-help {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--body);
    display: flex;
    font-size: 0.9rem;
    gap: 10px;
    margin-top: 18px;
    padding: 14px 12px 4px;
    text-decoration: none;
}

.customer-nav-help svg {
    height: 18px;
    width: 18px;
}

.customer-nav-help:hover {
    color: var(--blue);
}

.customer-nav-toggle {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    color: var(--ink);
    cursor: pointer;
    display: none;
    font: inherit;
    gap: 12px;
    min-height: 54px;
    padding: 8px 14px;
    text-align: left;
    width: 100%;
}

.customer-nav-toggle svg {
    flex: 0 0 20px;
    height: 20px;
    width: 20px;
}

.customer-nav-toggle span {
    font-weight: 600;
}

.customer-nav-toggle small {
    color: var(--muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
}

@media (min-width: 1101px) {
    .portal-shell:has(.customer-sidebar) {
        min-height: 760px;
        padding-left: 272px;
        position: relative;
    }

    .customer-sidebar {
        bottom: 0;
        left: 0;
        position: absolute;
        top: 0;
        width: 232px;
    }

    .customer-sidebar-inner {
        max-height: calc(100vh - 112px);
        overflow-y: auto;
        position: sticky;
        top: 96px;
    }

    /* The sidebar already lists the categories and account pages. */
    .portal-shell:has(.customer-sidebar) .customer-subnav {
        display: none;
    }
}

@media (max-width: 1100px) {
    .customer-sidebar {
        margin-bottom: 20px;
    }

    .js-nav .customer-nav-toggle {
        display: flex;
    }

    .customer-nav-list {
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 16px;
        margin-top: 8px;
        padding: 12px;
    }

    .js-nav .customer-sidebar:not(.is-open) .customer-nav-list {
        display: none;
    }
}

/* The hosting console keeps its own menu: no second sidebar and no category tabs there. */

.hosting-page .customer-sidebar,
.hosting-page .customer-subnav {
    display: none;
}

.hosting-page .portal-shell:has(.customer-sidebar) {
    min-height: 0;
    padding-left: 0;
}

/* Secondary tabs, when shown */

.product-subtabs {
    gap: 4px;
    margin: 0 0 24px;
}

.product-subtabs a,
.product-subtabs span {
    border-bottom: 2px solid transparent;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0 10px 12px;
}

.product-subtabs a.active {
    border-bottom-color: var(--blue);
    color: var(--ink);
    font-weight: 600;
}

/* Cards, notices and forms */

.metric-card,
.panel-card,
.notice,
.message-card,
.form,
.status-panel,
.table-wrap,
.product-panel,
.recap-card,
.payment-method-card {
    border-color: var(--line);
    border-radius: 18px;
    box-shadow: none;
}

.metric-grid {
    gap: 14px;
}

.metric-card {
    gap: 4px;
    padding: 20px 22px;
    transition: border-color 160ms ease;
}

.metric-card strong {
    font-size: 1.75rem;
    letter-spacing: -0.03em;
}

.metric-card span {
    color: var(--muted);
    font-size: 0.875rem;
}

.metric-card:hover {
    border-color: var(--blue);
}

.panel-card {
    padding: 24px;
}

.panel-card h2,
.panel-heading-line h2 {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.dashboard-summary-grid {
    gap: 16px;
}

.dashboard-services-panel,
.dashboard-quick-panel {
    min-height: 0;
}

/*
 * Long lists (services of the overview, orders, documents, sign-in history): the first rows are visible, then the
 * list scrolls in its card. data-visible-rows gives the number of rows; customer.partials.nav sets the exact height
 * from the rows themselves, which vary (documents). Without JavaScript the whole list shows.
 */
.dashboard-services-panel .table-wrap {
    max-height: none;
}

[data-visible-rows] {
    overflow: auto;
}

/* The column titles stay visible while a list scrolls. */
[data-visible-rows] thead th,
.dashboard-orders-panel thead th,
.dashboard-tickets-panel thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.notice {
    background: var(--surface-soft);
    border: 0;
    color: var(--ink);
    padding: 14px 18px;
}

.notice.danger {
    background: #fff4f4;
    color: #9f1239;
}

.muted-line {
    color: var(--muted);
}

.badge {
    background: var(--surface-blue);
    border: 0;
    border-radius: 999px;
    color: var(--blue);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0;
    padding: 4px 10px;
    text-transform: none;
}

.badge.is-success,
.is-success.badge {
    background: var(--success-soft);
    color: var(--success);
}

.form label {
    font-weight: 600;
}

.form input,
.form select,
.form textarea {
    border-color: var(--line-strong);
    border-radius: 12px;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(20, 92, 255, 0.14);
}

/* Tables */

.table-wrap {
    max-width: none;
}

.table-wrap th,
.panel-card th {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.table-wrap td,
.panel-card td {
    font-weight: 500;
}

.table-wrap th,
.table-wrap td {
    padding: 13px 16px;
}

.table-wrap tbody tr[data-service-row] {
    cursor: pointer;
}

.table-wrap tbody tr[data-service-row]:hover td {
    background: var(--surface-soft);
}

/* Overview: the services and orders get the wider column. */

.dashboard-summary-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}

.quick-action-list {
    display: grid;
    gap: 8px;
}

.quick-action-list a {
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: none;
    color: var(--ink);
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    text-decoration: none;
    transition: border-color 160ms ease;
}

.quick-action-list a:hover {
    border-color: var(--blue);
}

.quick-action-list strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.quick-action-list span {
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 1240px) {
    .dashboard-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Tables keep a minimum width for small screens only; beside the sidebar they fit the column. */

@media (min-width: 1101px) {
    .portal-shell:has(.customer-sidebar) .table-wrap > table {
        min-width: 0;
    }
}

/* Hosting console: the same palette, a flat heading instead of the blue gradient banner. */

.hosting-page {
    --hosting-blue: var(--blue);
    --hosting-blue-dark: var(--blue-dark);
    --hosting-blue-soft: var(--surface-blue);
    --hosting-ink: var(--ink);
    --hosting-line: var(--line);
    --hosting-muted: var(--muted);
    --hosting-shadow: none;
    --hosting-success: var(--success);
}

.hosting-page .hosting-service-hero {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: none;
    color: var(--ink);
    padding: 26px 28px;
}

.hosting-page .hosting-service-hero::after {
    content: none;
}

.hosting-page .hosting-service-kicker {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.hosting-page .hosting-service-title-line h1 {
    color: var(--ink);
}

.hosting-page .hosting-status-pill {
    background: var(--success-soft);
    border: 0;
    color: var(--success);
    font-weight: 600;
    text-transform: none;
}

.hosting-page .hosting-status-pill::before {
    background: var(--success);
    box-shadow: none;
}

.hosting-page .hosting-service-plan {
    color: var(--body);
}

.hosting-page .hosting-service-actions .button.ghost {
    background: #ffffff;
}

.hosting-page .hosting-console {
    border-radius: var(--radius-lg);
}

.hosting-page .hosting-sidebar-shell {
    background: var(--surface-soft);
}

.hosting-page .hosting-sidebar a {
    color: var(--ink);
    font-weight: 500;
}

.hosting-page .hosting-sidebar a:hover {
    background: #ffffff;
    border-color: var(--line);
    color: var(--blue);
    transform: none;
}

.hosting-page .hosting-sidebar a[aria-current="page"] {
    background: var(--surface-blue);
    border-color: transparent;
    color: var(--blue);
    font-weight: 600;
}

.hosting-page .hosting-sidebar a[aria-current="page"] .hosting-nav-icon {
    box-shadow: none;
}

.hosting-page .hosting-health-panel,
.hosting-page .hosting-resource-hero,
.hosting-page .hosting-mailbox-heading,
.hosting-page .hosting-mail-config-hero,
.hosting-page .hosting-deploy-launch,
.hosting-page .hosting-sftp-upgrade-hero {
    background: var(--surface-soft);
    border-color: var(--line);
}

.hosting-page .hosting-deploy-tabs {
    background: var(--surface-soft);
    border-color: var(--line);
}

/* Documents: number, status, date, amount and links on one line; only the type and its description wrap. */
.documents-table-wrap th,
.documents-table-wrap td:not(:nth-child(2)) {
    white-space: nowrap;
}

/*
 * Documents and payment methods: beside the customer sidebar, their own small menu (Factures, Avoirs, Archivage…)
 * becomes a bar above the list instead of a second column, so the table gets the full width.
 */
.portal-shell:has(.customer-sidebar) .account-layout {
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
}

.portal-shell:has(.customer-sidebar) .account-side-menu {
    align-items: center;
    border-radius: 16px;
    box-shadow: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    padding: 8px 12px;
    position: static;
}

.portal-shell:has(.customer-sidebar) .account-side-group {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.portal-shell:has(.customer-sidebar) .account-side-group + .account-side-group {
    border-left: 1px solid var(--line);
    border-top: 0;
    padding-left: 20px;
    padding-top: 0;
}

.portal-shell:has(.customer-sidebar) .account-side-group strong {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 6px;
}

.account-side-group a {
    font-weight: 500;
}

.account-side-group a.active {
    background: var(--surface-blue);
    font-weight: 600;
}
