:root {
    --navy: #0f1829;
    --navy-soft: #1a2540;
    --navy-muted: #8891a8;
    --gold: #c9a84c;
    --gold-dark: #b8953f;
    --text: #0f172a;
    --muted: #667085;
    --line: #e2e5eb;
    --bg: #f3f5f9;
    --card: #ffffff;
    --soft: #f0f2f7;
    --green: #10b981;
    --red: #ef4444;
    --amber: #f59e0b;
    --sky: #38bdf8;
    --orange: #f97316;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.admin-shell {
    min-height: 100vh;
    display: flex;
    background: var(--bg);
}

.sidebar {
    width: 264px;
    background: var(--navy);
    color: #c8ccd8;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    flex-shrink: 0;
}

.brand {
    height: 66px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--gold);
    color: var(--navy);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.brand-mark svg {
    width: 16px;
    height: 16px;
}

.brand-title {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.05;
}

.brand-subtitle {
    color: #6b7591;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-top: 4px;
}

.nav {
    padding: 22px 12px 16px;
    flex: 1;
    overflow-y: auto;
}

.nav-section {
    color: #3d4a63;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 0 10px 10px;
}

.nav-section-space { margin-top: 22px; }

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--navy-muted);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    transition: background .15s ease, color .15s ease;
}

.nav-link.active {
    background: var(--navy-soft);
    color: #fff;
}

.nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 3px;
    height: 21px;
    border-radius: 0 99px 99px 0;
    background: var(--gold);
}

.nav-link:hover {
    background: rgba(26,37,64,.72);
    color: #c8ccd8;
}

.nav-link.disabled { cursor: default; }

.nav-icon {
    width: 18px;
    height: 18px;
    color: #4a5570;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.nav-link.active .nav-icon {
    color: var(--gold);
}

.nav-icon svg {
    width: 17px;
    height: 17px;
}

.nav-with-badge span:nth-child(2) {
    flex: 1;
}

.nav-badge {
    width: 20px;
    height: 20px;
    border-radius: 99px;
    background: var(--gold);
    color: var(--navy);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 900;
}

.sidebar-user {
    border-top: 1px solid rgba(255,255,255,.06);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(201,168,76,.16);
    border: 1px solid rgba(201,168,76,.34);
    color: var(--gold);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
    flex-shrink: 0;
}

.sidebar-user-text { min-width: 0; }

.sidebar-user-name {
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    color: #4a5570;
    font-size: 10px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 66px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
}

.top-title h1 {
    font-size: 16px;
    font-weight: 850;
    margin: 0;
    letter-spacing: -.025em;
    line-height: 1.15;
}

.top-title p {
    font-size: 12px;
    color: var(--muted);
    margin: 5px 0 0;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-search {
    width: 258px;
    height: 40px;
    border: 1px solid var(--line);
    background: var(--soft);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
}

.top-search svg {
    width: 16px;
    height: 16px;
    color: #667085;
}

.top-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 13px;
}

.top-search input::placeholder { color: #667085; }

.bell-button {
    position: relative;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #667085;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.bell-button:hover { color: var(--text); }

.bell-button svg {
    width: 19px;
    height: 19px;
}

.bell-button span {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 99px;
}

.logout-button {
    border: 0;
    border-radius: 11px;
    padding: 11px 15px;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    background: var(--soft);
    color: #334155;
}

.logout-button:hover { background: #e8ebf2; }

.content {
    padding: 24px;
    overflow: auto;
}

.notice {
    background: rgba(201,168,76,.13);
    border: 1px solid rgba(201,168,76,.30);
    color: #7c5d11;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card,
.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.stat-card {
    min-height: 132px;
    padding: 17px;
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.stat-label {
    color: #64708b;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 16px;
    height: 16px;
}

.stat-icon.gold { background: rgba(201,168,76,.12); color: var(--gold-dark); }
.stat-icon.green { background: rgba(16,185,129,.12); color: var(--green); }
.stat-icon.red { background: rgba(239,68,68,.12); color: var(--red); }
.stat-icon.amber { background: rgba(245,158,11,.12); color: var(--amber); }
.stat-icon.blue { background: rgba(56,189,248,.13); color: var(--sky); }
.stat-icon.orange { background: rgba(249,115,22,.12); color: var(--orange); }

.stat-value {
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.05em;
    color: #0f172a;
}

.stat-note {
    color: #64708b;
    font-size: 11px;
    font-weight: 800;
    margin-top: 9px;
}

.stat-note.positive { color: #059669; }

.panel {
    overflow: hidden;
    margin-bottom: 24px;
}

.panel-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.panel-header h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -.025em;
}

.panel-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.table-panel-header {
    align-items: center;
}

.panel-pill {
    background: var(--soft);
    border: 1px solid var(--line);
    color: #475569;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 850;
}

.table-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-pills {
    display: flex;
    align-items: center;
    gap: 3px;
    background: var(--soft);
    border-radius: 10px;
    padding: 4px;
}

.filter-pills button {
    border: 0;
    background: transparent;
    color: #667085;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.filter-pills button.active {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: 0 1px 3px rgba(15,24,41,.08);
}

.table-search {
    width: 178px;
    height: 34px;
    border: 1px solid var(--line);
    background: var(--soft);
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
}

.table-search svg {
    width: 14px;
    height: 14px;
    color: #667085;
}

.table-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 12px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    text-align: left;
    background: #f9fafb;
    color: #667085;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 13px 20px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    color: #111827;
}

tbody tr:hover { background: #fafbfc; }

.right { text-align: right; }

.mono-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: var(--soft);
    border: 1px solid var(--line);
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 12px;
}

.domain {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #315f93;
    font-size: 12px;
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 900;
    border: 1px solid var(--line);
}

.status.active {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.row-actions button {
    border: 0;
    background: transparent;
    color: #475569;
    border-radius: 7px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.row-actions button:hover { background: #f1f5f9; }
.row-actions .gold-text { color: var(--gold-dark); }
.row-actions .icon-action { letter-spacing: 1px; }

.table-footer {
    padding: 13px 20px;
    background: #f9fafb;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.table-footer button {
    border: 0;
    background: transparent;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 44px 20px;
    font-size: 14px;
}

.empty-state.small {
    padding: 34px 20px;
}

.event-list { padding: 8px 20px; }

.event-row {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.event-row:last-child { border-bottom: 0; }

.event-dot {
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 999px;
    margin-top: 7px;
}

.event-title {
    text-transform: capitalize;
    font-size: 13px;
    font-weight: 900;
}

.event-message {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.event-time {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

/* Login page preserved but aligned with same Figma colors */
.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(201,168,76,.20), transparent 32%),
        var(--navy);
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 430px);
    background: #fff;
    border-radius: 22px;
    padding: 28px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 28px;
}

.login-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.03em;
}

.login-subtitle {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .11em;
    font-weight: 850;
    margin-top: 2px;
}

.login-heading h1 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -.04em;
}

.login-heading p {
    margin: 7px 0 20px;
    color: var(--muted);
    font-size: 13px;
}

.error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-form label {
    color: #334155;
    font-size: 12px;
    font-weight: 850;
    margin-top: 8px;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--soft);
    border-radius: 11px;
    padding: 12px 13px;
    outline: none;
}

.login-form input:focus {
    border-color: rgba(201,168,76,.55);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

.remember-row {
    display: flex !important;
    align-items: center;
    gap: 9px;
    margin: 8px 0 8px !important;
    color: var(--muted) !important;
}

.primary-button {
    border: 0;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    background: var(--gold);
    color: var(--navy);
    width: 100%;
}

.primary-button:hover { background: var(--gold-dark); }

.login-footer {
    color: var(--muted);
    text-align: center;
    font-size: 11px;
    margin: 18px 0 0;
}

@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .top-search { width: 220px; }
}

@media (max-width: 860px) {
    .admin-shell { display: block; }
    .sidebar { width: 100%; min-height: auto; }
    .nav, .sidebar-user { display: none; }
    .topbar { height: auto; padding: 18px; align-items: flex-start; flex-direction: column; }
    .top-actions { width: 100%; }
    .top-search { flex: 1; width: auto; }
    .content { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .table-panel-header { align-items: flex-start; flex-direction: column; }
    .table-tools { width: 100%; flex-direction: column; align-items: stretch; }
    .filter-pills { overflow-x: auto; }
    .table-search { width: 100%; }
}

@media (max-width: 560px) {
    .top-actions { flex-wrap: wrap; }
    .logout-button { width: 100%; }
    .login-card { padding: 22px; }
}

/* === Phase 4G: Figma typography refinement === */
/* Make typography lighter and closer to the Figma React/Tailwind file. */

body {
    font-weight: 400;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.brand-title {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .01em;
}

.brand-subtitle {
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .14em;
}

.nav-section {
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .14em;
}

.nav-link {
    font-weight: 500;
    font-size: 14px;
}

.nav-badge {
    font-weight: 700;
}

.sidebar-user-name {
    font-weight: 600;
}

.sidebar-user-email {
    font-weight: 400;
}

.top-title h1 {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0;
}

.top-title p {
    font-weight: 400;
    font-size: 12px;
}

.top-search input,
.table-search input {
    font-weight: 400;
}

.logout-button {
    font-weight: 600;
}

.stat-label {
    font-weight: 500;
    font-size: 12px;
    color: #64708b;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.035em;
}

.stat-note {
    font-weight: 500;
    font-size: 11px;
}

.panel-header h2 {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0;
}

.panel-header p {
    font-weight: 400;
    font-size: 12px;
}

.panel-pill {
    font-weight: 600;
}

.filter-pills button {
    font-weight: 500;
}

th {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .06em;
}

td {
    font-weight: 400;
}

.mono-code,
.domain {
    font-weight: 400;
}

.status {
    font-weight: 500;
}

.row-actions button {
    font-weight: 500;
}

.table-footer p,
.table-footer button {
    font-weight: 500;
}

.empty-state {
    font-weight: 400;
}

.event-title {
    font-weight: 600;
}

.event-message,
.event-time {
    font-weight: 400;
}

.login-title {
    font-weight: 700;
}

.login-subtitle {
    font-weight: 600;
}

.login-heading h1 {
    font-weight: 650;
}

.login-form label {
    font-weight: 600;
}

.primary-button {
    font-weight: 600;
}

/* === Phase 4H: match Figma fixed app screen === */
/* Figma App.tsx uses h-screen + overflow-hidden shell. */

html,
body {
    height: 100%;
    overflow: hidden;
}

.admin-shell {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.sidebar {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.main {
    height: 100vh;
    overflow: hidden;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.stats-grid {
    margin-bottom: 18px;
}

.stat-card {
    min-height: 122px;
    padding: 16px;
}

.panel {
    margin-bottom: 0;
}

.table-wrap {
    max-height: calc(100vh - 420px);
    overflow: auto;
}

.empty-state {
    padding: 38px 20px;
}

/* === Phase 5A: Licenses page foundation === */

.licenses-panel {
    margin-bottom: 0;
}

.licenses-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-pills button span {
    margin-left: 5px;
    color: #98a2b3;
    font-size: 11px;
}

.filter-pills button.active span {
    color: #667085;
}

.licenses-search {
    width: 220px;
}

.clear-link {
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 500;
    padding: 0 4px;
}

.licenses-table-wrap {
    max-height: calc(100vh - 260px);
    overflow: auto;
}

.subtext {
    color: #667085;
    font-size: 11px;
    margin-top: 5px;
}

.mono-inline {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 12px;
}

.marketplace-pill,
.activation-count {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--soft);
    color: #475569;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 500;
}

.status.blocked {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.status.expired {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.status.pending {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.danger-text {
    color: #dc2626 !important;
}

.pagination-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #667085;
    font-size: 12px;
    font-weight: 500;
}

.pagination-mini a {
    color: var(--gold-dark);
}

@media (max-width: 900px) {
    .licenses-toolbar {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .licenses-search {
        width: 100%;
    }
}

/* === Phase 5B: License detail page === */

.detail-page {
    display: grid;
    gap: 18px;
}

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.back-link {
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 500;
}

.detail-header h2 {
    margin: 8px 0 4px;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 650;
    letter-spacing: -.03em;
}

.detail-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.detail-actions,
.safe-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.soft-action,
.danger-action,
.safe-action-buttons button {
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.soft-action,
.safe-action-buttons button {
    background: var(--soft);
    color: #334155;
}

.soft-action:hover,
.safe-action-buttons button:hover {
    background: #e8ebf2;
}

.danger-action,
.safe-action-buttons .danger-action {
    background: #fef2f2;
    color: #b91c1c;
}

.danger-action:hover,
.safe-action-buttons .danger-action:hover {
    background: #fee2e2;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 16px;
}

.detail-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
}

.detail-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.field-grid {
    display: grid;
    gap: 12px;
}

.field-row {
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 12px;
    align-items: center;
}

.field-row span,
.field-stack span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.field-row strong,
.field-stack strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    word-break: break-word;
}

.copy-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
}

.field-stack {
    display: grid;
    gap: 16px;
}

.field-stack div {
    display: grid;
    gap: 5px;
}

.detail-panel {
    margin-bottom: 0;
}

.detail-table-wrap {
    max-height: 250px;
    overflow: auto;
}

.detail-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.compact-list {
    padding: 8px 20px;
}

.compact-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.compact-row:last-child {
    border-bottom: 0;
}

.compact-row strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}

.compact-row p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.compact-row span {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.safe-action-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.safe-action-panel h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.safe-action-panel p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.status.deactivated {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.row-actions a {
    color: #475569;
    border-radius: 7px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 500;
}

.row-actions a:hover {
    background: #f1f5f9;
}

@media (max-width: 1120px) {
    .detail-grid,
    .detail-two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .detail-header,
    .safe-action-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

/* === Phase 5C: protected license action forms === */

.inline-confirm-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.soft-action.compact {
    padding: 7px 9px;
    font-size: 12px;
}

.action-forms-panel {
    align-items: flex-start;
}

.action-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 10px;
    width: min(100%, 820px);
}

.protected-form {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.protected-form label {
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.protected-form input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 9px;
    padding: 9px 10px;
    color: var(--text);
    outline: 0;
    font-size: 12px;
    font-weight: 400;
}

.protected-form input:focus {
    border-color: rgba(201,168,76,.55);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

.protected-form button {
    border: 0;
    background: var(--gold);
    color: var(--navy);
    border-radius: 9px;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

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

.protected-form.danger button {
    background: #fee2e2;
    color: #b91c1c;
}

.protected-form.danger button:hover {
    background: #fecaca;
}

@media (max-width: 1180px) {
    .action-form-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }
}

/* === Phase 5D: license issuing system foundation === */

.licenses-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gold-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--gold);
    color: var(--navy);
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.gold-action-link:hover {
    background: var(--gold-dark);
}

.license-create-page {
    display: grid;
    gap: 18px;
}

.issue-license-layout {
    display: grid;
    gap: 16px;
}

.issue-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
}

.issue-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 14px;
}

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

.issue-form-grid label {
    display: grid;
    gap: 7px;
}

.issue-form-grid label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.issue-form-grid input,
.issue-form-grid select,
.issue-form-grid textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    padding: 11px 12px;
    outline: 0;
    font-size: 13px;
    font-weight: 400;
}

.issue-form-grid textarea {
    min-height: 92px;
    resize: vertical;
}

.issue-form-grid input:focus,
.issue-form-grid select:focus,
.issue-form-grid textarea:focus {
    border-color: rgba(201,168,76,.55);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

.issue-submit-panel {
    margin-top: 0;
}

.safe-action-buttons a,
.safe-action-buttons button {
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.safe-action-buttons a {
    background: var(--soft);
    color: #334155;
}

.safe-action-buttons button {
    background: var(--gold);
    color: var(--navy);
}

.safe-action-buttons button:hover {
    background: var(--gold-dark);
}

.error-box ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.error-box li {
    margin: 3px 0;
}

@media (max-width: 900px) {
    .table-panel-header {
        align-items: stretch;
    }

    .licenses-header-actions {
        width: 100%;
    }

    .gold-action-link {
        width: 100%;
    }

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

/* === Phase 6B: marketplace claim logs admin page === */

.claims-page {
    display: grid;
    gap: 18px;
}

.claims-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 14px;
}

.mini-metric {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
}

.mini-metric span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.mini-metric strong {
    display: block;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.04em;
}

.mini-metric.success strong {
    color: #047857;
}

.mini-metric.denied strong {
    color: #b91c1c;
}

.mini-metric.warning strong {
    color: #b45309;
}

.claims-panel {
    margin-bottom: 0;
}

.claims-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.claim-filter-select {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    padding: 9px 10px;
    outline: 0;
}

.claim-filter-select:focus {
    border-color: rgba(201,168,76,.55);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

.claims-search {
    width: 240px;
}

.claim-alert-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 20px 14px;
}

.claim-alert-row div {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 400;
}

.claim-alert-row strong {
    font-weight: 650;
}

.claims-table-wrap {
    max-height: calc(100vh - 395px);
    overflow: auto;
}

.failure-reason {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
}

.status.success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.status.denied {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.status.error {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

@media (max-width: 1180px) {
    .claims-metrics-grid,
    .claim-alert-row {
        grid-template-columns: 1fr 1fr;
    }

    .claims-toolbar {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .claims-search {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .claims-metrics-grid,
    .claim-alert-row {
        grid-template-columns: 1fr;
    }
}

/* === Phase 6C: marketplace integrations settings foundation === */

.integrations-page {
    display: grid;
    gap: 18px;
}

.integrations-alert-row {
    margin: 0;
}

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

.integration-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    display: grid;
    gap: 16px;
}

.integration-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.integration-card-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.2;
    font-weight: 650;
    letter-spacing: -.02em;
}

.integration-card-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.integration-status-group {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
}

.mode-pill {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--soft);
    color: #475569;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .08em;
}

.credential-state-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 10px;
}

.credential-state-grid div {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
}

.credential-state-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 5px;
}

.credential-state-grid strong {
    display: block;
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    word-break: break-word;
}

.integration-form {
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.integration-toggle-row,
.integration-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.integration-toggle-row label,
.integration-form-grid label,
.integration-notes {
    display: grid;
    gap: 7px;
}

.integration-toggle-row label span,
.integration-form-grid label span,
.integration-notes span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.toggle-check {
    align-content: end;
}

.toggle-check input {
    width: auto !important;
    margin-right: 7px;
}

.toggle-check span {
    display: inline-flex;
    align-items: center;
    color: var(--text) !important;
    font-weight: 600 !important;
}

.integration-form input,
.integration-form select,
.integration-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    padding: 10px 11px;
    outline: 0;
    font-size: 12px;
    font-weight: 400;
}

.integration-form textarea {
    min-height: 74px;
    resize: vertical;
}

.integration-form input:focus,
.integration-form select:focus,
.integration-form textarea:focus {
    border-color: rgba(201,168,76,.55);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

.clear-credentials-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.clear-credentials-row label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.integration-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.integration-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.integration-footer button {
    border: 0;
    border-radius: 10px;
    background: var(--gold);
    color: var(--navy);
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
}

.integration-footer button:hover {
    background: var(--gold-dark);
}

.status.not_configured {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.status.configured {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.status.needs_review {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.status.disabled {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}

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

@media (max-width: 760px) {
    .integration-card-header,
    .integration-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .integration-status-group {
        align-items: flex-start;
        flex-direction: row;
    }

    .credential-state-grid,
    .integration-toggle-row,
    .integration-form-grid {
        grid-template-columns: 1fr;
    }
}

/* === Phase 6C-FIX: marketplace integrations pro UI === */

.integrations-pro-page {
    gap: 16px;
}

.integration-command-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.integration-command-copy span,
.eyebrow {
    display: inline-flex;
    color: var(--gold-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.integration-command-copy h3 {
    margin: 7px 0 4px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.15;
    font-weight: 650;
    letter-spacing: -.03em;
}

.integration-command-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.provider-select-form {
    width: min(100%, 380px);
}

.provider-select-form label {
    display: grid;
    gap: 7px;
}

.provider-select-form label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.provider-select-form select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 12px 13px;
    outline: 0;
    font-size: 13px;
    font-weight: 500;
}

.provider-select-form select:focus {
    border-color: rgba(201,168,76,.55);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

.provider-focus-shell {
    display: grid;
    grid-template-columns: 255px 1fr;
    gap: 16px;
    align-items: start;
}

.provider-status-rail {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
    display: grid;
    gap: 6px;
}

.provider-rail-item {
    display: grid;
    gap: 4px;
    border-radius: 11px;
    padding: 12px;
    color: #475569;
}

.provider-rail-item:hover {
    background: var(--soft);
}

.provider-rail-item.active {
    background: #f8f1df;
    color: var(--text);
    border: 1px solid rgba(201,168,76,.42);
}

.provider-rail-item span {
    font-size: 13px;
    font-weight: 650;
}

.provider-rail-item strong {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
}

.integration-focus-card {
    min-height: 520px;
    padding: 20px;
}

.integration-card-header.pro {
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
}

.integration-card-header.pro h3 {
    font-size: 22px;
    margin-top: 8px;
}

.credential-state-grid.pro {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.integration-form.pro {
    border-top: 0;
    padding-top: 0;
}

.integration-pro-controls {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 12px;
    align-items: end;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 14px;
}

.pro-toggle {
    min-height: 44px;
    display: flex !important;
    align-items: center;
}

.pro-toggle span {
    font-size: 13px !important;
}

.integration-form-grid.pro {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
}

.clear-credentials-row.pro {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 10px 12px;
}

.integration-footer.pro {
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.success-box {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #047857;
    border-radius: 12px;
    padding: 11px 13px;
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 1180px) {
    .provider-focus-shell {
        grid-template-columns: 1fr;
    }

    .provider-status-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .credential-state-grid.pro {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

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

    .provider-status-rail,
    .credential-state-grid.pro,
    .integration-pro-controls,
    .integration-form-grid.pro {
        grid-template-columns: 1fr;
    }
}

/* === Phase 6C-FIX 3: final pro marketplace integrations layout === */

.integrations-final-page {
    gap: 14px;
}

.integrations-clean-header h2 {
    margin-bottom: 4px;
}

.integrations-alert-row.compact {
    margin: 0;
}

.integrations-alert-row.compact div {
    padding: 10px 12px;
}

.provider-focus-shell.final {
    grid-template-columns: 270px 1fr;
    gap: 16px;
}

.provider-status-rail.final {
    padding: 10px;
}

.provider-rail-heading {
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
}

.provider-rail-heading span {
    display: block;
    color: var(--gold-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.provider-rail-heading strong {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.integration-focus-card.final {
    min-height: auto;
    padding: 20px;
}

.integration-card-header.final {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
}

.integration-card-header.final h3 {
    margin: 8px 0 5px;
    color: var(--text);
    font-size: 23px;
    line-height: 1.1;
    font-weight: 650;
    letter-spacing: -.035em;
}

.integration-card-header.final p {
    max-width: 650px;
}

.integration-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.integration-badge {
    width: 104px;
    min-height: 34px;
    border-radius: 999px;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7px 10px;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.integration-badge.disabled {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}

.integration-badge.not_configured {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.integration-badge.needs_review {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.integration-badge.configured {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.integration-badge.test {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.integration-badge.live {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.credential-state-grid.final {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 10px;
}

.integration-form.final {
    border-top: 0;
    padding-top: 0;
    gap: 13px;
}

.integration-pro-controls.final {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 12px;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 14px;
}

.final-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    min-height: 42px;
}

.final-toggle input {
    margin: 0 !important;
}

.final-toggle span {
    color: var(--text) !important;
    font-size: 13px !important;
    font-weight: 650 !important;
}

.integration-form-grid.final {
    grid-template-columns: repeat(2, minmax(210px, 1fr));
    gap: 12px;
}

.integration-notes.final textarea {
    min-height: 82px;
}

.clear-credentials-row.final {
    display: grid;
    grid-template-columns: repeat(2, minmax(210px, 1fr));
    gap: 10px;
    background: transparent;
    border: 0;
    padding: 0;
}

.clean-check-option {
    display: flex !important;
    align-items: center;
    gap: 12px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    border-radius: 12px;
    padding: 12px;
    color: #92400e;
}

.clean-check-option input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.clean-check-option span {
    display: grid;
    gap: 3px;
}

.clean-check-option strong {
    color: #92400e;
    font-size: 12px;
    line-height: 1.1;
    font-weight: 650;
}

.clean-check-option small {
    color: #b45309;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 400;
}

.integration-footer.final {
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

@media (max-width: 1180px) {
    .provider-focus-shell.final {
        grid-template-columns: 1fr;
    }

    .provider-status-rail.final {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .provider-rail-heading {
        grid-column: 1 / -1;
    }

    .credential-state-grid.final {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 760px) {
    .integration-card-header.final {
        flex-direction: column;
    }

    .integration-badge-row {
        width: 100%;
    }

    .integration-badge {
        flex: 1;
        width: auto;
    }

    .provider-status-rail.final,
    .credential-state-grid.final,
    .integration-pro-controls.final,
    .integration-form-grid.final,
    .clear-credentials-row.final {
        grid-template-columns: 1fr;
    }
}

/* === Phase 6E-1: Envato settings upgrade === */

.provider-settings-panel {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    padding: 15px;
    display: grid;
    gap: 13px;
}

.provider-settings-heading {
    display: grid;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.provider-settings-heading span {
    color: var(--gold-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.provider-settings-heading strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.15;
    font-weight: 650;
}

.provider-settings-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.provider-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 12px;
}

.envato-rule-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(210px, 1fr));
    gap: 10px;
}

.clean-check-option.neutral {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: var(--text);
}

.clean-check-option.neutral strong {
    color: var(--text);
}

.clean-check-option.neutral small {
    color: var(--muted);
}

@media (max-width: 960px) {
    .provider-settings-grid,
    .envato-rule-options {
        grid-template-columns: 1fr;
    }
}

/* === Phase 6E-3: Envato connection test button === */

.envato-test-result {
    border-radius: 13px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 13px 14px;
    display: grid;
    gap: 10px;
}

.envato-test-result strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    margin-bottom: 3px;
}

.envato-test-result p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.envato-test-result ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.envato-test-result.success {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.envato-test-result.success strong {
    color: #047857;
}

.envato-test-result.warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.envato-test-result.warning strong {
    color: #b45309;
}

.envato-test-result.error {
    background: #fef2f2;
    border-color: #fecaca;
}

.envato-test-result.error strong {
    color: #b91c1c;
}

.envato-test-result.info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.envato-test-result.info strong {
    color: #1d4ed8;
}

.envato-test-panel {
    margin-top: 16px;
    border: 1px solid #dbeafe;
    background: #f8fbff;
    border-radius: 14px;
    padding: 15px;
    display: grid;
    gap: 13px;
}

.envato-test-heading {
    display: grid;
    gap: 4px;
}

.envato-test-heading span {
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.envato-test-heading strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.15;
    font-weight: 650;
}

.envato-test-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.envato-test-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.envato-test-form label {
    display: grid;
    gap: 6px;
}

.envato-test-form label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.envato-test-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    padding: 11px 12px;
    outline: 0;
    font-size: 13px;
}

.envato-test-form input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147,197,253,.22);
}

.envato-test-form button {
    min-height: 41px;
    border: 0;
    border-radius: 10px;
    background: #1d4ed8;
    color: #fff;
    padding: 0 15px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 960px) {
    .envato-test-form {
        grid-template-columns: 1fr;
    }
}
