:root {
    color-scheme: dark;
    --background: #0d0c0b;
    --panel: #181614;
    --panel-soft: #24211f;
    --text: #f6f2ec;
    --muted: #c6beb4;
    --accent: #ff5a36;
    --border: #423b36;
    --danger: #ff8b73;
}

* {
    box-sizing: border-box;
}

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

a {
    color: inherit;
}

.page-shell {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
}

.brand span {
    color: var(--accent);
}

.page-content {
    padding-block: 56px 80px;
}

.dashboard-heading,
.login-panel {
    max-width: 620px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1;
}

.intro {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 18px;
}

.login-panel {
    margin: 5vh auto 0;
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
}

.login-form {
    display: grid;
    gap: 22px;
    margin-top: 34px;
}

.field-group {
    display: grid;
    gap: 8px;
}

label {
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--background);
    color: var(--text);
    font: inherit;
}

textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--background);
    color: var(--text);
    font: inherit;
}

textarea {
    min-height: 132px;
    resize: vertical;
}

input[type='checkbox'] {
    width: 18px;
    min-height: 18px;
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
    accent-color: var(--accent);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.button {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.button-primary {
    background: var(--accent);
    color: var(--background);
}

.button-secondary {
    border-color: var(--border);
    background: transparent;
    color: var(--text);
}

.account-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-right,
.admin-nav,
.page-heading-actions,
.form-actions,
.heading-with-status,
.social-account-heading,
.checkbox-group {
    display: flex;
    align-items: center;
}

.header-right {
    justify-content: flex-end;
    gap: 24px;
}

.admin-nav {
    gap: 2px;
}

.admin-nav-link,
.filter-link {
    border-radius: 7px;
    padding: 8px 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.admin-nav-link:hover,
.admin-nav-link.is-active,
.filter-link:hover,
.filter-link.is-active {
    background: var(--panel-soft);
    color: var(--text);
}

.account-actions form {
    margin: 0;
}

.account-name {
    color: var(--muted);
    font-size: 14px;
}

.notice {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    background: var(--panel-soft);
    transition: opacity 160ms ease, transform 160ms ease;
}

.notice.is-dismissing {
    opacity: 0;
    transform: translateY(-4px);
}

.notice-message {
    margin: 0;
}

.notice-dismiss {
    display: inline-grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    margin: -4px -6px -4px 0;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0;
    background: transparent;
    color: currentcolor;
    cursor: pointer;
    font: inherit;
    font-size: 22px;
    line-height: 1;
}

.notice-dismiss:hover {
    border-color: currentcolor;
    background: rgb(255 255 255 / 8%);
}

.notice-error,
.field-error {
    color: var(--danger);
}

.notice-success {
    border-color: #53684d;
    color: #d4e8c9;
}

.field-error {
    margin: 0;
    font-size: 14px;
}

.field-help {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.page-heading {
    max-width: 780px;
}

.page-heading h1 {
    margin-bottom: 12px;
}

.page-heading-actions {
    justify-content: space-between;
    gap: 24px;
}

.page-heading-actions > .button {
    flex: 0 0 auto;
}

.filter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 34px;
}

.filter-link {
    border: 1px solid var(--border);
}

.table-wrap {
    overflow-x: auto;
    margin-top: 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
}

.data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.table-primary-link,
.text-link {
    color: var(--text);
    font-weight: 700;
}

.table-primary-link:hover,
.text-link:hover {
    color: var(--accent);
}

.table-secondary,
.data-table td > span {
    display: block;
}

.table-secondary {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.table-action {
    text-align: right;
}

.pagination-wrap {
    margin-top: 20px;
}

.form-card,
.content-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
}

.form-card {
    max-width: 820px;
    margin-top: 34px;
    padding: 30px;
}

.admin-form,
.form-section,
.compact-form {
    display: grid;
    gap: 22px;
}

.form-section {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    padding-bottom: 0;
    border-bottom: 0;
}

.form-section h2,
.content-card h2,
.section-heading h2 {
    margin-bottom: 0;
    font-size: 22px;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.form-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-span-two {
    grid-column: span 2;
}

.form-actions {
    justify-content: flex-end;
    gap: 12px;
    padding-top: 6px;
}

.profile-grid,
.social-grid {
    display: grid;
    gap: 18px;
    margin-top: 34px;
}

.profile-grid {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.social-grid {
    grid-template-columns: minmax(0, 3fr) minmax(290px, 2fr);
}

.content-card {
    padding: 26px;
}

.heading-with-status {
    gap: 12px;
}

.heading-with-status h1 {
    margin: 0;
}

.status-badge,
.primary-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.status-pending {
    background: #5a4b24;
    color: #ffe5a1;
}

.status-approved {
    background: #294d3d;
    color: #c4efd7;
}

.status-rejected,
.status-inactive {
    background: #493b38;
    color: #e8c9c2;
}

.primary-badge {
    background: var(--panel-soft);
    color: var(--accent);
}

.detail-list {
    display: grid;
    gap: 14px;
    margin: 22px 0 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: minmax(130px, 0.7fr) minmax(0, 2fr);
    gap: 18px;
}

.detail-list dt {
    color: var(--muted);
    font-size: 14px;
}

.detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.internal-notes {
    margin-top: 26px;
    border-top: 1px solid var(--border);
    padding-top: 22px;
}

.internal-notes h3,
.social-account h3 {
    margin-bottom: 8px;
    font-size: 16px;
}

.internal-notes p {
    margin-bottom: 0;
    color: var(--muted);
    white-space: pre-wrap;
}

.compact-form {
    margin-top: 18px;
}

.compact-form .button {
    justify-self: start;
}

.checkbox-group {
    gap: 10px;
}

.checkbox-group label {
    font-weight: 400;
}

.section-heading {
    margin-top: 46px;
}

.social-account {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.social-account:first-of-type {
    padding-top: 16px;
}

.social-account:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.social-account-heading {
    justify-content: space-between;
    gap: 14px;
}

.social-platform,
.social-meta {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 13px;
}

.details-panel {
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.details-panel summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 700;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.metric-card {
    min-height: 158px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    background: var(--panel);
}

.metric-value {
    margin-bottom: 22px;
    color: var(--accent);
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
}

.metric-label {
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
}

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

    .header-right {
        gap: 12px;
    }

    .profile-grid,
    .social-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .page-shell {
        width: min(100% - 28px, 1120px);
    }

    .header-content {
        min-height: 68px;
    }

    .header-right {
        gap: 8px;
    }

    .admin-nav-link {
        padding-inline: 7px;
        font-size: 13px;
    }

    .account-name {
        display: none;
    }

    .page-content {
        padding-block: 36px 56px;
    }

    .login-panel {
        padding: 26px 20px;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .page-heading-actions,
    .heading-with-status,
    .form-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading-actions > .button,
    .form-actions .button {
        width: 100%;
        text-align: center;
    }

    .form-card,
    .content-card {
        padding: 22px 18px;
    }

    .form-grid-two {
        grid-template-columns: 1fr;
    }

    .field-span-two {
        grid-column: auto;
    }

    .detail-list div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* Influencer profile refinements */
body {
    font-size: 15px;
}

.header-content {
    min-height: 68px;
}

.page-content {
    padding-block: 42px 68px;
}

h1 {
    font-size: clamp(30px, 4vw, 42px);
}

.intro {
    font-size: 15px;
}

.button {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 14px;
}

.admin-nav-link,
.filter-link,
.account-name {
    font-size: 13px;
}

.profile-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.profile-identity {
    min-width: 0;
}

.profile-header h1 {
    margin-bottom: 0;
}

.profile-actions {
    justify-self: end;
}

.profile-section {
    margin-top: 34px;
}

.section-heading-compact {
    margin: 0 0 14px;
}

.section-heading h2 {
    font-size: 20px;
}

.section-intro {
    max-width: 620px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.content-card-compact {
    padding: 20px;
}

.content-card-compact h3 {
    margin: 0;
    font-size: 16px;
}

.detail-list {
    gap: 11px;
    margin-top: 16px;
}

.detail-list div {
    grid-template-columns: minmax(105px, 0.75fr) minmax(0, 2fr);
    gap: 12px;
}

.detail-list dt,
.social-meta,
.social-platform,
.status-label {
    font-size: 12px;
}

.internal-notes {
    margin-top: 14px;
    border-top: 0;
    padding-top: 0;
}

.status-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
    align-items: start;
    gap: 22px;
}

.activation-link-card {
    display: grid;
    gap: 16px;
    margin-top: 14px;
}

.activation-link-card label {
    font-size: 14px;
    font-weight: 700;
}

.activation-link-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--panel-soft);
    color: var(--text);
    font: inherit;
}

.status-label {
    margin-bottom: 7px;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.details-panel {
    margin-top: 14px;
    padding-top: 12px;
}

.status-change-panel {
    margin: 0;
}

.details-panel summary {
    font-size: 14px;
}

.social-section {
    padding-bottom: 8px;
}

.social-account-list {
    display: grid;
    gap: 10px;
}

.social-account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    background: var(--panel);
}

.social-account:first-of-type,
.social-account:last-child {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.social-account-summary h3 {
    margin: 0;
    font-size: 16px;
}

.social-platform,
.social-meta {
    margin: 0;
}

.social-account-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.details-panel-inline {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 0;
    border-top: 0;
}

.details-panel-inline[open] {
    margin-top: 2px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.details-panel-inline .social-account-form {
    max-width: 760px;
}

.empty-state {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 18px;
    color: var(--muted);
}

.empty-state p {
    margin: 0;
}

.add-social-panel {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
}

.add-social-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 14px 16px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.add-social-panel[open] summary {
    border-bottom: 1px solid var(--border);
}

.add-social-panel-content {
    padding: 18px;
}

.social-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.social-account-form {
    gap: 18px;
}

@media (max-width: 820px) {
    .profile-header,
    .profile-summary-grid,
    .status-card {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        justify-self: start;
    }

    .social-account {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .social-meta {
        justify-self: end;
    }

    .social-account-actions,
    .details-panel-inline {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .page-content {
        padding-block: 32px 52px;
    }

    .profile-header {
        gap: 16px;
    }

    .profile-actions,
    .profile-actions .button {
        width: 100%;
    }

    .profile-actions .button {
        text-align: center;
    }

    .profile-section {
        margin-top: 28px;
    }

    .content-card-compact,
    .add-social-panel-content {
        padding: 16px;
    }

    .social-account,
    .social-account:first-of-type,
    .social-account:last-child {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 14px 16px;
    }

    .social-meta {
        justify-self: start;
    }

    .social-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Campaigns */
.campaign-form-card {
    max-width: 920px;
}

.campaign-summary-grid,
.campaign-brief-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.campaign-deadline {
    margin: 18px 0 3px;
    color: var(--accent);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.campaign-deadline-time {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.campaign-copy p {
    margin: 16px 0 0;
    color: var(--muted);
    white-space: pre-wrap;
}

.campaign-link {
    display: inline-block;
    margin-top: 18px;
    font-size: 14px;
}

.status-draft {
    background: #49433d;
    color: #e8ddd0;
}

.status-active {
    background: #294d3d;
    color: #c4efd7;
}

.status-closed {
    background: #3c3b4b;
    color: #dbd8ee;
}

.status-assigned {
    background: #294451;
    color: #c8e7f3;
}

.status-cancelled {
    background: #493b38;
    color: #e8c9c2;
}

.assignment-list {
    display: grid;
    gap: 10px;
}

.assignment-row {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(150px, 0.7fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    background: var(--panel);
}

.assignment-summary h3,
.assignment-price p,
.assignment-status p {
    margin: 0;
}

.assignment-label {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.assignment-meta {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.assignment-links {
    margin: 7px 0 0;
    font-size: 13px;
}

.assignment-price {
    white-space: nowrap;
}

.assignment-status {
    justify-self: end;
    text-align: right;
}

.assignment-notes {
    grid-column: 1 / -1;
    margin: 0;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    color: var(--muted);
    font-size: 14px;
    white-space: pre-wrap;
}

.assignment-help {
    margin: 14px 0 0;
}

.assignment-panel {
    margin-top: 14px;
}

.assignment-form,
.assignment-option-list {
    display: grid;
    gap: 14px;
}

.assignment-option {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(160px, 0.65fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.assignment-option-select {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-top: 7px;
}

.assignment-option-select span {
    display: grid;
    gap: 2px;
}

.assignment-option-select small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.assignment-option .field-group {
    gap: 6px;
}

.assignment-option textarea {
    min-height: 92px;
}

.assignment-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.assignment-detail-notes p {
    margin: 0;
    color: var(--muted);
    white-space: pre-wrap;
}

.assignment-status-help {
    max-width: 360px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 820px) {
    .campaign-summary-grid,
    .campaign-brief-grid,
    .assignment-option,
    .assignment-detail-grid {
        grid-template-columns: 1fr;
    }

    .assignment-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .assignment-status {
        grid-column: 1 / -1;
        justify-self: start;
        text-align: left;
    }

    .assignment-option-select {
        padding-top: 0;
    }
}

@media (max-width: 560px) {
    .assignment-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px 16px;
    }

    .assignment-status {
        grid-column: auto;
    }

    .assignment-option {
        gap: 14px;
        padding: 14px;
    }
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.table-actions form {
    margin: 0;
}

.button-danger {
    border-color: #8b4037;
    background: transparent;
    color: #ffb4a5;
}

.button-danger:hover {
    border-color: #d97663;
    background: rgb(217 118 99 / 15%);
}

.confirmation-dialog {
    width: min(100% - 32px, 460px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 26px;
    background: var(--panel);
    color: var(--text);
}

.confirmation-dialog::backdrop {
    background: rgb(0 0 0 / 70%);
}

.confirmation-dialog h2 {
    margin-bottom: 10px;
    font-size: 22px;
}

.confirmation-dialog p {
    margin-bottom: 24px;
    color: var(--muted);
}

.confirmation-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
