:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #d9e0ea;
    --brand: #1f4f82;
    --brand-dark: #173a60;
    --shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.site-header {
    background: var(--brand);
    color: #ffffff;
    padding: 24px;
}

.site-header__inner {
    max-width: 1180px;
    margin: 0 auto;
}

.site-header h1 {
    margin: 0;
    font-size: 28px;
}

.site-header p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.site-nav a {
    color: #ffffff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
    padding: 9px 12px;
    border-radius: 10px;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.22);
}

.page {
    max-width: min(1920px, calc(100vw - 48px));
    margin: 0 auto;
    padding: 28px 24px 60px;
}

.hero-card,
.panel,
.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 28px;
    margin-bottom: 22px;
}

.hero-card h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.hero-card p {
    margin: 0;
    color: var(--muted);
    max-width: 780px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.stat-card {
    padding: 22px;
}

.stat-card__label {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-card strong {
    display: block;
    font-size: 34px;
    line-height: 1.1;
    margin-bottom: 10px;
    color: var(--brand-dark);
}

.stat-card p {
    margin: 0;
    color: var(--muted);
}

.panel {
    margin-top: 22px;
    padding: 24px;
}

.panel h3 {
    margin: 0 0 8px;
}

.panel p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .site-header {
        padding: 20px;
    }

    .page {
        padding: 20px;
    }
}

.notice {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.notice--success {
    border-color: #b6dfc2;
    background: #eefaf1;
    color: #225c34;
}

.notice--error {
    border-color: #e7b6b6;
    background: #fff1f1;
    color: #7a2727;
}

.schema-box {
    margin: 14px 0 20px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.schema-box p {
    margin: 0 0 6px;
}

.schema-box p:last-child {
    margin-bottom: 0;
}

.form {
    display: grid;
    gap: 16px;
    max-width: 560px;
}

.form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.form input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    background: #ffffff;
}

.form button {
    justify-self: start;
    padding: 11px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--brand);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.form button:hover {
    background: var(--brand-dark);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
    color: var(--text);
}

td {
    color: var(--muted);
}

.grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
}

.panel-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.panel-heading-row h3 {
    margin-bottom: 6px;
}

.panel-heading-row p {
    margin: 0;
    color: var(--muted);
}

.secondary-button,
.danger-button {
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.secondary-button {
    background: #e9eef6;
    color: var(--brand-dark);
}

.secondary-button:hover {
    background: #dbe5f2;
}

.danger-button {
    background: #fff1f1;
    color: #7a2727;
    border: 1px solid #e7b6b6;
}

.danger-button:hover {
    background: #ffe2e2;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.pill--active {
    background: #eefaf1;
    color: #225c34;
    border: 1px solid #b6dfc2;
}

.pill--inactive {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

@media (max-width: 700px) {
    .grid--two {
        grid-template-columns: 1fr;
    }

    .panel-heading-row {
        display: block;
    }

    .panel-heading-row form {
        margin-top: 14px;
    }
}

.grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
}

.panel-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.panel-heading-row h3 {
    margin-bottom: 6px;
}

.panel-heading-row p,
.muted-text {
    margin: 0 0 16px;
    color: var(--muted);
}

.form--wide {
    max-width: 820px;
}

.form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    background: #ffffff;
    resize: vertical;
}

.secondary-button,
.danger-button {
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.secondary-button {
    background: #e9eef6;
    color: var(--brand-dark);
}

.secondary-button:hover {
    background: #dbe5f2;
}

.danger-button {
    background: #fff1f1;
    color: #7a2727;
    border: 1px solid #e7b6b6;
}

.danger-button:hover {
    background: #ffe2e2;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.pill--active {
    background: #eefaf1;
    color: #225c34;
    border: 1px solid #b6dfc2;
}

.pill--inactive {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

@media (max-width: 700px) {
    .grid--two {
        grid-template-columns: 1fr;
    }

    .panel-heading-row {
        display: block;
    }

    .panel-heading-row form {
        margin-top: 14px;
    }
}

.checkbox-label {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.checkbox-label input {
    width: auto;
}

.progress-panel {
    border-color: #bfd2ea;
}

.progress-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 12px 0 14px;
    color: var(--muted);
}

.progress-track {
    width: 100%;
    min-height: 28px;
    background: #e9eef6;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-bar {
    min-height: 28px;
    width: 0%;
    background: var(--brand);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: width 0.35s ease;
    white-space: nowrap;
}

.form--inline {
    max-width: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}

.form select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    background: #ffffff;
}

.url-cell {
    max-width: 420px;
    word-break: break-word;
}

.domain-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.domain-chip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.domain-chip a {
    font-weight: 700;
    color: var(--brand-dark);
    overflow-wrap: anywhere;
}

.domain-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e9eef6;
    color: var(--brand-dark);
    font-weight: 700;
}

.compact-button {
    padding: 7px 9px;
    font-size: 13px;
}

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

    .domain-chip-grid {
        grid-template-columns: 1fr;
    }

    .domain-chip {
        grid-template-columns: 1fr;
    }
}

.small-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.action-row--stacked {
    align-items: flex-start;
}

.mini-form {
    display: grid;
    gap: 8px;
}

.mini-form select,
.mini-form textarea {
    width: 100%;
    padding: 8px 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font: inherit;
    background: #ffffff;
}

.mini-form textarea {
    min-width: 220px;
    resize: vertical;
}

.ajax-notice {
    position: sticky;
    top: 12px;
    z-index: 50;
}

.row-muted {
    opacity: 0.45;
}

.row-saved-lead {
    outline: 2px solid #b6dfc2;
    outline-offset: -2px;
}

.row-next-focus {
    outline: 3px solid #bfd2ea;
    outline-offset: -3px;
    transition: outline 0.2s ease;
}

#url-candidates {
    scroll-margin-top: 18px;
}

.panel-focus {
    outline: 3px solid #bfd2ea;
    outline-offset: 4px;
    transition: outline 0.2s ease;
}

#top-active-domains {
    scroll-margin-top: 18px;
}

.domain-chip--hidden,
.row-hidden-review {
    background: #f3f4f6;
    opacity: 0.72;
}

.domain-chip--hidden a,
.row-hidden-review a {
    color: #6b7280;
}\n
#download-link-wrap {
    margin-top: 16px;
}

.preview-box {
    max-width: 900px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.preview-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.preview-box .table-wrap {
    margin-top: 12px;
    max-height: 360px;
    overflow: auto;
}\n
.form--review-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form--review-filters textarea {
    min-height: 85px;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.filter-count {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .form--review-filters {
        grid-template-columns: 1fr;
    }
}

.table-sort-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    padding: 0;
    cursor: pointer;
    text-align: left;
}

.table-sort-button:hover {
    text-decoration: underline;
}

.sort-indicator {
    font-weight: 900;
}

.sku-search-row {
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(280px, 520px) auto auto minmax(120px, 1fr);
    align-items: end;
    gap: 12px;
    margin: 18px 0 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.sku-search-label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.sku-search-label input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    background: #ffffff;
}

.table-wrap--url-review {
    overflow-x: auto;
}

.url-review-table {
    min-width: 1320px;
    table-layout: fixed;
}

.url-review-table .col-sku {
    width: 150px;
}

.url-review-table .col-product {
    width: 280px;
}

.url-review-table .col-domain {
    width: 220px;
}

.url-review-table .col-url {
    width: 260px;
}

.url-review-table .col-status {
    width: 115px;
}

.url-review-table .col-review {
    width: 105px;
}

.url-review-table .col-source {
    width: 90px;
}

.url-review-table .col-position {
    width: 75px;
}

.url-review-table .col-actions {
    width: 170px;
}

.table-sort-link {
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

.table-sort-link:hover {
    text-decoration: underline;
}

.domain-cell,
.url-cell {
    overflow: hidden;
}

.url-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 10px;
    background: #e8eef7;
    color: var(--brand-dark);
    font-weight: 800;
    text-decoration: none;
    margin-bottom: 6px;
}

.url-truncated {
    display: block;
    max-width: 100%;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-review-table td {
    vertical-align: top;
}

.url-review-table .action-row--stacked {
    gap: 8px;
}

.url-review-table .action-row--stacked button {
    width: 100%;
    padding: 9px 10px;
}

@media (max-width: 900px) {
    .sku-search-row {
        grid-template-columns: 1fr;
    }
}

/* Wide-monitor layout override */
.container,
.page,
.content,
main {
    max-width: min(1920px, calc(100vw - 48px));
}

@media (min-width: 1800px) {
    .container,
    .page,
    .content,
    main {
        max-width: min(2200px, calc(100vw - 64px));
    }
}

@media (max-width: 900px) {
    .container,
    .page,
    .content,
    main {
        max-width: calc(100vw - 24px);
    }
}

/* Consistent app button theme */
button,
.button-link,
.secondary-button,
.danger-button,
form button,
input[type="submit"],
input[type="button"] {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    font: inherit;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    background: #e8eef7;
    color: var(--brand-dark);
    box-shadow: none;
}

button:hover,
.button-link:hover,
.secondary-button:hover,
form button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: #dce6f3;
    text-decoration: none;
}

button:disabled,
.button-link:disabled,
.secondary-button:disabled,
.danger-button:disabled,
form button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Primary form action buttons */
.form > button,
.sku-search-row > button,
.preview-box button {
    background: var(--brand);
    color: #ffffff;
}

.form > button:hover,
.sku-search-row > button:hover,
.preview-box button:hover {
    background: var(--brand-dark);
}

/* Secondary buttons */
.secondary-button,
.button-link {
    background: #e8eef7;
    color: var(--brand-dark);
}

.secondary-button:hover,
.button-link:hover {
    background: #dce6f3;
}

/* Danger buttons */
.danger-button {
    background: #fff1f1;
    color: #8a2424;
    border: 1px solid #f0aaaa;
}

.danger-button:hover {
    background: #ffe4e4;
}

/* Compact buttons */
.compact-button {
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 14px;
}

/* Keep sortable table headers looking like header links, not filled buttons */
.table-sort-button,
.table-sort-link {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 800;
    padding: 0;
    min-height: 0;
    display: inline;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
}

.table-sort-button:hover,
.table-sort-link:hover {
    background: transparent;
    text-decoration: underline;
}

/* Search row spacing */
.sku-search-row button,
.sku-search-row .button-link {
    align-self: end;
}

.product-selection-panel {
    max-width: none;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #f8fafc;
}

.product-selection-panel h4 {
    margin: 0 0 12px;
    font-size: 20px;
}

.shared-product-search-row {
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(280px, 520px) auto auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 12px;
}

.shared-product-search-row label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.shared-product-search-row input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    background: #ffffff;
}

.shared-product-preview-wrap {
    margin-top: 12px;
    max-height: 420px;
    overflow: auto;
}

.shared-product-preview-table {
    min-width: 900px;
}

.shared-product-preview-table th,
.shared-product-preview-table td {
    vertical-align: top;
}

@media (max-width: 900px) {
    .shared-product-search-row {
        grid-template-columns: 1fr;
    }
}

.selection-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.selection-cell {
    width: 76px;
    text-align: center;
}

.product-select-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.shared-product-preview-table .selection-cell {
    text-align: center;
}

/* Wider product search and selectable preview tables */
.product-selection-panel {
    width: 100%;
    max-width: none;
}

.shared-product-search-row {
    grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.8fr) auto auto;
    width: 100%;
}

.shared-product-preview-wrap {
    width: 100%;
    max-height: 65vh;
    overflow: auto;
}

.shared-product-preview-table {
    width: 100%;
    min-width: 1200px;
    table-layout: fixed;
}

.shared-product-preview-table th:nth-child(1),
.shared-product-preview-table td:nth-child(1) {
    width: 86px;
}

.shared-product-preview-table th:nth-child(2),
.shared-product-preview-table td:nth-child(2) {
    width: 220px;
}

.shared-product-preview-table th:nth-child(3),
.shared-product-preview-table td:nth-child(3) {
    width: auto;
}

.shared-product-preview-table tbody tr {
    cursor: pointer;
}

.shared-product-preview-table tbody tr:hover {
    background: #eef4fb;
}

.shared-product-preview-table td {
    vertical-align: top;
}

@media (min-width: 1600px) {
    .shared-product-search-row {
        grid-template-columns: minmax(340px, 0.8fr) minmax(560px, 2fr) auto auto;
    }

    .shared-product-preview-table {
        min-width: 1500px;
    }
}

@media (max-width: 900px) {
    .shared-product-search-row {
        grid-template-columns: 1fr;
    }

    .shared-product-preview-table {
        min-width: 900px;
    }
}

/* BigCommerce sync preview table */
#bigcommerce-sync-preview-results .shared-product-preview-table {
    min-width: 1400px;
}

/* Reports summary table */
.reports-filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.6fr) minmax(260px, 1fr) minmax(170px, 0.5fr) minmax(200px, 0.6fr) auto auto auto;
    align-items: end;
    gap: 12px;
}

.reports-filter-row label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.reports-filter-row input,
.reports-filter-row select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    background: #ffffff;
}

.reports-checkbox {
    align-self: center;
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px !important;
    white-space: nowrap;
}

.reports-table-wrap {
    max-height: 72vh;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.reports-table {
    width: 100%;
    min-width: 1850px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.reports-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.reports-table th,
.reports-table td {
    vertical-align: top;
}

.reports-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reports-col-sku {
    width: 140px;
}

.reports-col-product {
    width: 360px;
}

.reports-col-product span {
    display: block;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reports-col-price {
    width: 115px;
}

.reports-money {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.reports-col-url {
    width: 230px;
}

.reports-col-url a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.reports-col-date {
    width: 155px;
}

.reports-col-quality {
    width: 170px;
}

.reports-col-offers {
    width: 85px;
    text-align: right;
}

.report-row--not-analyzed {
    opacity: 0.72;
}

.report-row--disabled {
    background: #f3f4f6;
}

@media (max-width: 1200px) {
    .reports-filter-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 800px) {
    .reports-filter-row {
        grid-template-columns: 1fr;
    }
}

/* Workflow navigation */
.app-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: center;
    margin-top: 28px;
}

.app-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    line-height: 1.2;
}

.app-nav a:hover {
    background: rgba(255, 255, 255, 0.22);
    text-decoration: none;
}

/* Full BigCommerce sync panel */
.full-sync-panel {
    border-color: #b7c9e2;
}

.full-sync-form {
    max-width: 760px;
}

.full-sync-form button {
    width: fit-content;
}

/* Admin panel */
.admin-inline-form {
    margin: 16px 0 22px;
}

.admin-table-wrap {
    max-height: 62vh;
    overflow: auto;
}

.maintenance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.maintenance-card h4 {
    margin: 0 0 6px;
}

.maintenance-card p {
    margin: 0;
}

@media (max-width: 900px) {
    .maintenance-card {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Authentication */
.login-wrapper {
    display: flex;
    justify-content: center;
    padding: 48px 0;
}

.login-card {
    width: min(520px, 100%);
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.login-card h2 {
    margin-top: 0;
}

.user-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    color: #ffffff;
    font-weight: 800;
}

.user-menu a,
.user-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
}

.user-menu a:hover {
    background: rgba(255, 255, 255, 0.22);
    text-decoration: none;
}

.admin-table-wrap input,
.admin-table-wrap select {
    width: 100%;
    min-width: 120px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
}

/* User notification controls */
.email-user-cell {
    text-align: center;
}

.email-user-cell input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Account page */
.account-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
}

.account-summary > div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.account-label {
    display: block;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 6px;
}

.account-password-form {
    max-width: 560px;
}

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

/* Account page full-width layout */
.account-panel {
    width: 100%;
    max-width: none;
}

.account-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;
    width: 100%;
}

.account-summary > div {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.account-summary strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-label {
    display: block;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 6px;
}

.account-password-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr)) auto;
    align-items: end;
    gap: 16px;
    width: 100%;
    max-width: none;
}

.account-password-form label {
    display: grid;
    gap: 6px;
    font-weight: 800;
}

.account-password-form input {
    width: 100%;
}

.account-password-form button {
    width: fit-content;
    min-width: 170px;
}

@media (max-width: 1200px) {
    .account-summary {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .account-password-form {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 800px) {
    .account-summary,
    .account-password-form {
        grid-template-columns: 1fr;
    }
}

/* Full URL Discovery panel */
.full-url-discovery-panel {
    border-color: #b7c9e2;
}

.full-url-discovery-form {
    max-width: 860px;
}

.full-url-discovery-form button {
    width: fit-content;
}
