/* Fonts */
@font-face {
    font-family: 'Ojuju';
    font-style: normal;
    font-weight: 200 800;
    src: url('fonts/Ojuju.ttf') format('truetype');
}

/* Status Badges */
.badge-available {
    background-color: #198754;
    color: #fff;
    font-weight: 700;
}

.badge-in-use {
    background-color: #dc3545;
    color: #fff;
}

.badge-not-in-use {
    background-color: #6c757d;
    color: #fff;
}

.badge-for-sale {
    background-color: #fd7e14;
    color: #000;
}


.badge-expiring {
    background-color: #ffc107;
    color: #000;
}

.badge-unknown {
    background-color: #e9ecef;
    color: #495057;
}

/* Share Code Input — uppercase for typed text, normal case for placeholder */
.share-code-input {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 700;
}

.verification-code-input {
    font-family: monospace;
    letter-spacing: 0.5em;
    font-size: 1.5rem;
}

.share-code-input::placeholder {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

/* Domain Table */
.domain-table td {
    vertical-align: middle;
}

.domain-table .material-symbols-outlined {
    vertical-align: middle;
    line-height: 1;
}

.domain-table td,
.domain-table th {
    border-right: 1px solid #dee2e6;
}

.domain-table td:last-child,
.domain-table th:last-child {
    border-right: none;
}

.domain-table .col-compact {
    white-space: nowrap;
    width: 1%;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

/* Sidebar Navigation */
.nav-scrollable {
    display: block;
    height: 100%;
    overflow-y: auto;
}

.nav-scrollable .nav-item {
    padding-bottom: 0.5rem;
}

.nav-scrollable .nav-item:first-of-type {
    padding-top: 1rem;
}

.nav-scrollable .nav-item:last-of-type {
    padding-bottom: 1rem;
}

.nav-scrollable .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.85);
    background: none;
    border: none;
    border-radius: 4px;
    min-height: 3rem;
    display: flex;
    align-items: center;
    line-height: 1.4;
    width: 100%;
    padding: 0.5rem 0.75rem;
    text-align: left;
    cursor: pointer;
}

.nav-scrollable .nav-item .nav-link.active {
    background-color: var(--df-primary);
    color: white;
}

.nav-scrollable .nav-item .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: white;
}

/* Error Pages (404, 403) */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--df-secondary);
    padding: 2rem;
}

.error-card {
    text-align: center;
    background-color: #fff;
    border-radius: 1rem;
    padding: 3rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.error-card h1 {
    font-family: 'Ojuju', sans-serif;
    font-size: 5rem;
    font-weight: 800;
    color: var(--df-primary);
    margin: 0.5rem 0;
    letter-spacing: 0.1em;
}

.error-card h3 {
    color: #212529;
    margin-bottom: 0.5rem;
}

.error-icon {
    font-size: 3rem;
    color: var(--df-primary);
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 5vh 2rem 2rem;
    background-color: var(--df-secondary);
}

.login-title {
    font-family: 'Ojuju', sans-serif;
    font-size: clamp(1.6rem, 9vw, 4rem);
    font-weight: 800;
    -webkit-text-stroke: clamp(2px, 0.6vw, 6px) #fff;
    paint-order: stroke fill;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.brand-domain {
    color: var(--df-primary);
}

.brand-diver {
    color: var(--df-primary-light);
}

.login-slogan {
    color: #fff;
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.login-body {
    width: 100%;
    max-width: 400px;
}

.login-body .form-label {
    color: var(--df-accent);
    font-weight: 600;
}

.login-body .form-control {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    color: #212529;
}

.login-body .form-control:focus {
    background-color: #fff;
    border-color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.4);
}

.login-body .btn-primary {
    background-color: var(--df-primary);
    border-color: var(--df-primary);
    color: #fff;
}

.login-body .btn-primary:hover {
    background-color: var(--df-primary-dark);
    border-color: var(--df-primary-dark);
}

.login-body .alert-info {
    background-color: var(--df-primary-light);
    border-color: var(--df-primary-light);
    color: #fff;
}

.login-body .alert-danger {
    background-color: #D35400;
    border-color: #D35400;
    color: #fff;
}

/* Marketing section below login */
.login-marketing {
    margin-top: 3rem;
    max-width: 1100px;
    width: 100%;
    text-align: center;
    color: #fff;
}

.login-marketing-title {
    font-family: 'Ojuju', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--df-primary);
    margin-bottom: 0.5rem;
}

.login-marketing-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.login-pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    text-align: left;
}

.login-pricing-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 2px solid transparent;
}

.login-pricing-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.login-pricing-name {
    display: block;
    font-family: 'Ojuju', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--df-primary);
}

.login-pricing-price {
    display: block;
    font-family: 'Ojuju', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--df-primary);
}

.login-pricing-price small {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.8;
}

.login-pricing-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    padding: 0.35rem 0;
}

.login-pricing-features .bi-check-lg {
    font-size: 1.1rem;
}

.login-pricing-features .bi-star-fill,
.login-pricing-features .bi-trophy-fill,
.login-pricing-features .bi-gem,
.login-pricing-features .bi-lightning-fill,
.login-pricing-features .bi-rocket-takeoff-fill {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .login-page {
        padding: 3vh 1rem 1.5rem;
    }

    .login-slogan {
        font-size: 1.1rem;
    }

    .login-marketing {
        margin-top: 2rem;
    }

    .login-marketing-title {
        font-size: 1.6rem;
    }

    .login-marketing-subtitle {
        font-size: 0.95rem;
    }

    .login-pricing {
        grid-template-columns: 1fr;
    }
}

/* Reusable utility classes */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content-white {
    background-color: #fff;
}

.text-muted-light {
    color: #888;
}

.text-muted-secondary {
    color: #6c757d;
}

.text-muted-placeholder {
    color: #adb5bd;
}

.share-code-badge {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
}

.font-sm {
    font-size: 0.85rem;
}

.font-xs {
    font-size: 0.75rem;
}

.iframe-preview {
    width: 100%;
    height: 70vh;
    border: none;
    border-radius: 0.5rem;
}

.iframe-preview-wrap {
    position: relative;
}

.iframe-preview-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.95);
    color: #6c757d;
    border-radius: 0.5rem;
}

.check-log {
    white-space: pre-wrap;
    font-size: 0.9rem;
    color: #212529;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.history-snippet {
    white-space: pre-wrap;
    font-size: 0.85rem;
    color: #212529;
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 0.5rem;
    max-height: 18rem;
    overflow-y: auto;
}

.history-details-cell {
    background-color: #f8f9fa;
}

.offer-price-link {
    font-weight: 700;
    text-decoration: none;
}

.status-icon-link {
    font-size: 1.6rem;
    cursor: pointer;
}

.status-icon-static {
    font-size: 1.6rem;
    cursor: default;
}

/* Clickable domain status indicator: looks like a real button so users can
   tell at a glance that the icon/price is interactive. */
.domain-status-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.55rem;
    border: 1px solid currentColor;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.65);
    text-decoration: none !important;
    line-height: 1;
    transition: background-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.domain-status-btn:hover {
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.domain-status-btn:active {
    transform: translateY(1px);
}

.domain-status-btn .material-symbols-outlined {
    font-size: 1.4rem;
    line-height: 1;
}

/* Sale price variant: filled with primary background */
.sale-price-btn {
    color: var(--df-primary);
    border-color: var(--df-primary);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.sale-price-btn:hover {
    background-color: var(--df-primary);
    color: #fff;
}

.sale-price-text {
    color: var(--df-primary);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.legend-icon {
    font-size: 1.4rem;
}

.legend-available { color: #198754; }
.legend-in-use { color: var(--df-danger); }
.legend-not-in-use { color: #6c757d; }
.legend-for-sale { color: var(--df-primary); }
.legend-expiring { color: #e5a100; }

.share-code-badge-large {
    letter-spacing: 0.2em;
}

.filter-count-badge {
    font-size: 1.4rem;
    padding: 0.5rem 0.85rem;
}

/* Editable domain name cell on the net detail page */
.domain-name-cell {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.125rem;
}

.col-actions {
    width: 1%;
    white-space: nowrap;
}

.lang-prefix {
    min-width: 3rem;
}

.translation-input {
    transition: background-color 0.3s ease;
}

.list-clickable {
    cursor: pointer;
}

.word-break-all {
    word-break: break-all;
}

.country-flag-icon {
    width: 1.5rem;
    height: auto;
    border-radius: 2px;
    vertical-align: middle;
}

.vat-rate-input {
    max-width: 120px;
}

.commerce-config {
    min-width: 180px;
    max-width: 220px;
}

.commerce-config .form-check-label {
    font-size: 0.9rem;
}

.imprint-editor {
    font-size: 0.85rem;
}

@media (max-width: 575.98px) {
    .vat-rate-input {
        max-width: 100%;
    }

    .commerce-config {
        min-width: 0;
        max-width: 100%;
    }
}

/* Member list (pending join requests, subscribers) — responsive list */
.member-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.member-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    flex-wrap: wrap;
}

.member-list-item:last-child {
    border-bottom: none;
}

.member-list-info {
    flex: 1 1 16rem;
    min-width: 0;
}

.member-list-name {
    font-weight: 600;
    word-break: break-word;
}

.member-list-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 575.98px) {
    .member-list-actions {
        width: 100%;
    }

    .member-list-actions .btn {
        flex: 1 1 auto;
    }
}

.language-picker-position {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.logo-login {
    width: 80vw;
    max-width: 500px;
}

.info-modal-icon {
    line-height: 1.5;
    min-width: 1em;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #000;
}

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

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Spinner in buttons: vertical alignment */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== Global Responsive Rules ===== */

/* Page title + button groups: wrap on mobile */
.d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Filter select used in page headers — capped on desktop, full-width on mobile */
.filter-select {
    max-width: 250px;
}

.filter-select.filter-active {
    background-color: var(--df-filter-active, #e8f4f8);
    border-color: var(--df-secondary);
}

/* Card with restricted content width (forms etc.) */
.card-narrow {
    max-width: 600px;
}

/* Two-pane editor layout (sidebar list + detail pane) used by translations / email templates.
   Desktop: side-by-side scrollable panes that fill the viewport.
   Mobile: stack vertically, no fixed height. */
.split-pane {
    height: calc(100vh - 12rem);
}

.split-pane > .split-pane-list {
    height: 100%;
    overflow: auto;
}

.split-pane > .split-pane-detail {
    height: 100%;
    overflow: auto;
}

/* Modal footer buttons stack on very small screens */
@media (max-width: 575.98px) {
    .modal-footer.d-flex.gap-2 {
        flex-direction: column;
    }

    .modal-footer .flex-fill {
        width: 100%;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .btn-lg {
        font-size: 0.95rem;
        padding: 0.5rem 0.75rem;
    }

    .table {
        font-size: 0.85rem;
    }

    .table .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }

    /* Filters inside flex headers go full-width */
    .filter-select {
        max-width: 100%;
        width: 100%;
    }

    /* Sort dropdown sits next to the counter badge on mobile */
    .filter-count-group {
        width: 100%;
    }

    .filter-count-group .filter-sort {
        flex: 1 1 auto;
        width: auto;
    }

    /* Page header button rows: full-width buttons, stacked */
    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1 1 auto;
    }

    /* Card with narrow form: full-width on mobile */
    .card-narrow {
        max-width: 100%;
    }
}

@media (max-width: 991.98px) {
    /* Two-pane layout becomes a vertical stack with natural height on tablet/phone */
    .split-pane {
        height: auto;
    }

    .split-pane > .split-pane-list,
    .split-pane > .split-pane-detail {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .split-pane > .split-pane-list {
        border-right: none !important;
        border-bottom: 1px solid #dee2e6;
        padding-right: 0 !important;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .split-pane > .split-pane-detail {
        padding-left: 0 !important;
    }
}

/* Stacked-card table: at small widths the table renders as one card per row.
   Uses a 12-column CSS grid so cells can be placed precisely:
     - row-number-cell (badge) and name-cell sit on the first row, vertically centered
     - td-half cells share one row 50/50
     - all other cells take a full row
   Add data-label="..." attributes on td elements; the label appears above the value. */
@media (max-width: 767.98px) {
    .table-mobile-stack thead {
        display: none;
    }

    .table-mobile-stack,
    .table-mobile-stack tbody {
        display: block;
        width: 100%;
    }

    .table-mobile-stack tr {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        column-gap: 0.25rem;
        row-gap: 0.4rem;
        align-items: center;
        width: 100%;
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        margin-bottom: 0.75rem;
        padding: 0.85rem 1rem;
        background-color: #fff;
    }

    /* Override Bootstrap's striped rule which paints cell backgrounds and would
       leave a visible inset rectangle inside the row card. Paint the row instead. */
    .table-mobile-stack.table-striped > tbody > tr > * {
        background-color: transparent !important;
        --bs-table-bg-type: transparent;
    }

    .table-mobile-stack.table-striped > tbody > tr:nth-of-type(odd) {
        background-color: rgba(169, 215, 248, 0.25);
    }

    .table-mobile-stack td {
        grid-column: 1 / -1;
        width: auto !important;
        min-width: 0;
        border: none !important;
        padding: 0 !important;
        text-align: left !important;
        white-space: normal !important;
    }

    .table-mobile-stack td:before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: var(--df-primary);
        font-size: 0.8rem;
        text-transform: uppercase;
        margin-bottom: 0.15rem;
    }

    .table-mobile-stack td:empty,
    .table-mobile-stack td[data-label=""] {
        display: none;
    }

    /* Visual order on mobile:
         1. row-number badge + domain name
         2. extensions (.com .school ...)
         3. half-width meta cells (Seit | Interessenten)
         4. actions
       Achieved via the grid `order` property, since the markup order is
       fixed by the desktop layout. */

    /* Row-number cell: shown as a primary badge, no label, narrow column.
       Sits on the first row alongside the name cell. */
    .table-mobile-stack td.row-number-cell {
        grid-column: 1 / span 2;
        align-self: center;
        order: 1;
    }

    .table-mobile-stack td.row-number-cell:before {
        display: none;
    }

    /* Name cell takes the rest of the first row, no label, vertically centered */
    .table-mobile-stack td.name-cell {
        grid-column: 3 / -1;
        align-self: center;
        order: 1;
    }

    .table-mobile-stack td.name-cell:before {
        display: none;
    }

    /* Extension cells: tight inline flow, second visually, with extra
       top spacing to separate them from the domain name above. Each cell stacks
       its label above the centered icon; horizontal padding gives the cells
       breathing room. align-self: start keeps the labels of all sibling cells
       aligned on the same baseline regardless of icon height differences. */
    .table-mobile-stack td.ext-cell {
        grid-column: span 2;
        align-self: start;
        order: 2;
        margin-top: 0.6rem;
        padding: 0 0.4rem !important;
        text-align: center !important;
    }

    .table-mobile-stack td.ext-cell:before {
        text-align: center;
        margin-bottom: 0.3rem;
    }

    /* Half-width meta cells (Seit | Interessenten) come after the extensions.
       The first one is forced to start at column 1 so the pair sits on its
       own row even when the previous (extensions) row has free trailing cells. */
    .table-mobile-stack td.td-half {
        grid-column: span 6;
        align-self: start;
        order: 3;
    }

    .table-mobile-stack td.td-half-start {
        grid-column: 1 / span 6;
    }

    /* Action cell: full-width row of equal-flex large buttons, last */
    .table-mobile-stack td.actions-cell {
        order: 4;
    }

    .table-mobile-stack td.actions-cell > .d-flex {
        width: 100%;
        gap: 0.5rem !important;
    }

    .table-mobile-stack td.actions-cell .btn {
        flex: 1 1 0;
        font-size: 1rem;
        padding: 0.6rem 0.75rem;
        min-height: 2.75rem;
    }
}

/* Mobile-only accordion that replaces the wide domain table on small screens.
   Each domain name is one collapsible item. All collapsed by default. */
.domain-accordion {
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #fff;
}

.domain-accordion-item + .domain-accordion-item {
    border-top: 1px solid #dee2e6;
}

.domain-accordion-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background-color: rgba(169, 215, 248, 0.25);
    cursor: pointer;
    user-select: none;
}

.domain-accordion-name {
    font-weight: 700;
    font-size: 1.05rem;
    word-break: break-all;
}

.domain-accordion-body {
    padding: 1rem;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
}

.domain-accordion-ext {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 4rem;
}

.domain-accordion-ext-label {
    font-weight: 600;
    color: var(--df-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Icon area below the label: gives a uniform vertical box so the smaller
   plain icons line up with the taller bordered status buttons. */
.domain-accordion-ext > :not(.domain-accordion-ext-label) {
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.domain-accordion-meta-label {
    font-weight: 600;
    color: var(--df-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.domain-accordion-meta-value {
    font-size: 1rem;
}

.domain-accordion-item.domain-row-archived .domain-accordion-name {
    opacity: 0.6;
    font-style: italic;
}

/* Cards that collapse on mobile (header click toggles body) */
.card-toggle-icon {
    display: none;
}

@media (max-width: 991.98px) {
    .card-collapsible-mobile > .card-header {
        cursor: pointer;
        user-select: none;
    }

    .card-collapsible-mobile.card-collapsed > .card-body {
        display: none;
    }

    .card-collapsible-mobile .card-toggle-icon {
        display: inline-block;
    }

    /* Group of cards that visually behaves like ONE joined accordion on mobile.
       Each section remains independently collapsible. Adjacent cards share borders
       and only the first/last card in the group has rounded corners. */
    .mobile-accordion-group .row.g-4 {
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
    }

    .mobile-accordion-group .card {
        margin-bottom: 0 !important;
        border-radius: 0;
        border-bottom: 0;
    }

    /* All card headers/bodies in the group default to no rounding */
    .mobile-accordion-group .card > .card-header,
    .mobile-accordion-group .card > .card-body {
        border-radius: 0;
    }

    /* First card in the group: round only its top corners (card + header).
       The current order is: row (DomainConfig + Goal) → optional Subscribers,
       so the first visible card is always the row's first column. */
    .mobile-accordion-group > .row:first-child > div:first-child > .card {
        border-top-left-radius: 0.75rem;
        border-top-right-radius: 0.75rem;
    }

    .mobile-accordion-group > .row:first-child > div:first-child > .card > .card-header {
        border-top-left-radius: 0.75rem;
        border-top-right-radius: 0.75rem;
    }

    /* Last card in the group: round only its bottom corners.
       If a Subscribers card is rendered after the row, it is the last; otherwise
       the row's last column (Goal) is. */
    .mobile-accordion-group > .card:last-child,
    .mobile-accordion-group > .row:last-child > div:last-child > .card {
        border-bottom-left-radius: 0.75rem;
        border-bottom-right-radius: 0.75rem;
        border-bottom: 1px solid #dee2e6;
    }

    .mobile-accordion-group > .card:last-child > .card-body,
    .mobile-accordion-group > .row:last-child > div:last-child > .card > .card-body {
        border-bottom-left-radius: 0.75rem;
        border-bottom-right-radius: 0.75rem;
    }

    /* When the LAST card is collapsed, its header carries the rounded bottom */
    .mobile-accordion-group > .card:last-child.card-collapsed > .card-header,
    .mobile-accordion-group > .row:last-child > div:last-child > .card.card-collapsed > .card-header {
        border-bottom-left-radius: 0.75rem;
        border-bottom-right-radius: 0.75rem;
    }
}

/* Input-group whose children stack vertically on phones */
@media (max-width: 575.98px) {
    .input-group-stack-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .input-group-stack-mobile > .form-control,
    .input-group-stack-mobile > .form-select,
    .input-group-stack-mobile > .btn,
    .input-group-stack-mobile > .input-group-text {
        width: 100%;
        border-radius: 0.375rem !important;
        margin-left: 0 !important;
    }
}

/* Tablet: login pricing 2 columns instead of 3 (only between 768 and 991) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .login-pricing {
        grid-template-columns: 1fr 1fr;
    }
}

/* Archived domain row */
.domain-row-archived {
    opacity: 0.55;
}

.domain-row-archived td {
    font-style: italic;
}

/* Net goal */
.goal-text {
    font-size: 1.0625rem;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--df-primary);
}

/* Collapsible goal in assistant modal */
.goal-collapsible {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: background-color 0.15s ease;
}

.goal-collapsible:hover {
    background-color: #f0f7fa;
}

.goal-collapsible-icon {
    color: var(--df-primary);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.goal-collapsible-text {
    color: var(--df-primary);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    white-space: pre-wrap;
    word-break: break-word;
}

.goal-collapsible.expanded .goal-collapsible-text {
    -webkit-line-clamp: unset;
    display: block;
}

/* Assistant suggestion grid */
.suggestion-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-item {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.95rem;
    background-color: #fff;
    margin-bottom: 0;
    flex: 0 0 auto;
    min-width: 180px;
    max-width: 100%;
    word-break: break-all;
}

@media (max-width: 575.98px) {
    .suggestion-item {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
    }

    .assistant-generate-btn {
        width: 100%;
    }

    .assistant-actions {
        align-items: stretch !important;
    }
}

.suggestion-item:hover:not(.disabled) {
    border-color: var(--df-primary-light);
    background-color: #f0f7fa;
}

.suggestion-item.selected {
    border-color: var(--df-primary);
    background-color: #e6f1f5;
    font-weight: 600;
}

.suggestion-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Creator label — admin-editable */
.creator-label-editable {
    cursor: pointer;
    border-radius: 0.25rem;
    padding: 0 0.25rem;
    transition: background-color 0.15s ease;
}

.creator-label-editable:hover {
    background-color: #f0f7fa;
    color: var(--df-primary);
}

.creator-label-editable .bi-pencil {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Imprint page */
.imprint-content {
    max-width: 56rem;
    line-height: 1.6;
}

.imprint-content h4 {
    color: var(--df-primary);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.imprint-content h4:first-child {
    margin-top: 0;
}

.imprint-content p {
    margin-bottom: 0.75rem;
}

/* Empty layout (login etc.) — full-height column so footer sticks to bottom */
.empty-layout-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.empty-layout-content {
    flex: 1 0 auto;
}

/* App footer (Impressum link, on every page) */
.app-footer {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    background-color: #fafafa;
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #6c757d);
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.app-footer a {
    color: inherit;
    text-decoration: none;
}

.app-footer a:hover {
    color: var(--df-primary);
    text-decoration: underline;
}
