:root {
    --bg: #f5f7fb;
    --ink: #12263a;
    --muted: #4d5d73;
    --panel: #ffffff;
    --line: #d9e1eb;
    --accent: #ef8a17;
    --accent-deep: #b85f00;
    --paid: #ef6f25;
    --danger: #ba2c2c;
    --shadow: 0 12px 34px rgba(18, 38, 58, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top left, #fff6e6 0%, var(--bg) 46%);
    min-height: 100vh;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-deep);
}

a,
button {
    -webkit-tap-highlight-color: rgba(239, 138, 23, 0.2);
}

body::before {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(2px);
    width: 230px;
    height: 230px;
    top: -95px;
    left: -75px;
    background: linear-gradient(145deg, #f7b64a, #ffe3a8);
    opacity: 0.18;
    pointer-events: none;
}

.background-shape {
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(2px);
    opacity: 0.21;
}

.background-shape-a {
    width: 320px;
    height: 320px;
    top: -120px;
    right: -90px;
    background: linear-gradient(145deg, #ef8a17, #fdc600);
}

.background-shape-b {
    width: 260px;
    height: 260px;
    bottom: -90px;
    left: -70px;
    background: linear-gradient(145deg, #f5a03a, #ffe0ab);
}

.dashboard-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 1.25rem auto 2rem;
    display: grid;
    gap: 1rem;
}

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

.topbar {
    padding: 1.25rem 1.4rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.eyebrow {
    margin: 0 0 0.35rem 0;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    margin: 0 0 20px 0;
    line-height: 0;
}

.brand-logo img {
    display: block;
    width: min(172px, 43.5vw);
    max-width: 100%;
    height: auto;
}

h1 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: clamp(1.15rem, 2.6vw, 1.9rem);
}

.subtitle {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.top-links {
    display: flex;
    gap: 0.6rem;
}

.top-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    font-weight: 600;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}

.top-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.top-link:disabled,
.top-link[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.top-link.top-link-ready {
    color: #ffffff;
    border-color: #2d9b58;
    background: linear-gradient(135deg, #3abf6a 0%, #2f9c58 100%);
    box-shadow: 0 8px 18px rgba(47, 156, 88, 0.24);
}

.top-link.top-link-ready:hover {
    color: #ffffff;
    border-color: #27854b;
    background: linear-gradient(135deg, #35ae61 0%, #2a8e50 100%);
}

.top-link-danger:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.hero-panel {
    padding: 1.3rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.hero-kicker {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-panel h2 {
    margin: 0.35rem 0 0;
    font-size: clamp(1.05rem, 2.3vw, 1.55rem);
}

.hero-note {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.credit-box {
    min-width: 210px;
    background: linear-gradient(150deg, #d96f08 0%, #ef8a17 52%, #fdc600 100%);
    border-radius: 14px;
    color: #fff;
    padding: 0.9rem 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.credit-box p {
    margin: 0;
    opacity: 0.9;
}

.credit-box strong {
    display: block;
    margin-top: 0.35rem;
    font-family: "Sora", sans-serif;
    font-size: 1.7rem;
}

.credit-box a {
    display: inline-block;
    margin-top: 0.5rem;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.7);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card {
    padding: 1rem;
}

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

.stat-card strong {
    display: block;
    margin-top: 0.4rem;
    font-family: "Sora", sans-serif;
    font-size: clamp(1.2rem, 2.4vw, 1.9rem);
}

.actions {
    padding: 1.2rem 1.4rem 1.4rem;
}

.actions h3 {
    margin: 0 0 0.95rem;
    font-family: "Sora", sans-serif;
}

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

.action-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.85rem 0.9rem;
    background: #fff;
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.action-card span {
    display: block;
    font-weight: 700;
}

.action-card small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
}

.action-card:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(239, 138, 23, 0.18);
    transform: translateY(-2px);
}

.action-card-paid {
    border-color: #ffd5bc;
    background: #fff7f2;
}

.action-card-paid:hover {
    border-color: var(--paid);
    box-shadow: 0 10px 24px rgba(239, 111, 37, 0.14);
}

.listings-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1rem;
}

.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.85rem;
}

.listings-header h2 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 1.1rem;
}

.listings-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.listings-total {
    font-weight: 700;
    color: var(--muted);
}

.listings-intro-note {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.45rem;
    max-width: min(760px, 100%);
    border: 1px solid #f3d4a8;
    border-radius: 10px;
    background: #fff8ee;
    color: #8b4f00;
    padding: 0.45rem 0.6rem;
    font-weight: 600;
    line-height: 1.35;
}

.listings-intro-note .material-symbols-outlined {
    font-size: 1.06rem;
    color: #ef8a17;
    line-height: 1;
    margin-top: 0.03rem;
}

.listings-search {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.8rem;
}

.listings-search-input {
    flex: 1 1 340px;
    min-width: 220px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
    font: inherit;
    color: var(--ink);
    background: #fff;
}

.listings-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(239, 138, 23, 0.14);
}

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

.listings-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.listings-table th,
.listings-table td {
    border-bottom: 1px solid var(--line);
    padding: 0.7rem 0.55rem;
    vertical-align: top;
    text-align: left;
}

.listings-table th {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.admin-sort-link {
    color: inherit;
    text-decoration: none;
}

.admin-sort-link:hover {
    color: var(--ink);
    text-decoration: underline;
}

.admin-sort-link.is-active {
    color: var(--ink);
}

.listings-table tbody tr:hover {
    background: #fffaf3;
}

.id-cell {
    font-family: "Sora", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
}

.listings-table small {
    color: var(--muted);
}

.listing-title {
    font-weight: 600;
    max-width: 420px;
    line-height: 1.35;
}

.location-cell {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.location-flags {
    min-width: 68px;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.listing-flag {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid #ccd6e4;
    border-radius: 6px;
    color: #1f2937;
    background: #fff;
    font-size: 0.93rem;
    line-height: 1;
    text-align: center;
    padding: 0;
    font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
}

.listing-flag-pending {
    color: var(--danger);
}

.listing-flag-top {
    color: var(--accent);
}

.listing-flag-front {
    color: #1f8f4f;
}

.listing-flag-empty {
    display: inline-block;
    color: #9aa7ba;
    font-size: 0.85rem;
    line-height: 1;
}

.type-col {
    width: 72px;
}

.listings-table th.type-col,
.listings-table td.type-col {
    text-align: center;
}

.listings-table td.type-col {
    vertical-align: middle;
}

.type-icon {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #ccd6e4;
    color: #1f2937;
    background: #fff;
    font-size: 1.12rem;
    font-weight: 300;
    line-height: 1;
    text-align: center;
    padding: 0;
    margin: 0 auto;
    font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.badges {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    font-size: 0.73rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.badge-ok {
    background: #e9fbf0;
    border-color: #97dfb4;
    color: #14683b;
}

.badge-wait {
    background: #fff9e8;
    border-color: #efd37f;
    color: #7b5c00;
}

.badge-paid {
    background: #eaf2ff;
    border-color: #a9c4ff;
    color: #184ea8;
}

.badge-unpaid {
    background: #fff1e9;
    border-color: #ffc9ac;
    color: #ab4a17;
}

.badge-top {
    background: #f0ebff;
    border-color: #c2b1fb;
    color: #5a3bb4;
}

.badge-title {
    background: #e6faf8;
    border-color: #97ddd6;
    color: #11645d;
}

.row-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.row-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.28rem 0.55rem;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.83rem;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}

.row-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.row-link-danger {
    border-color: #f0c8c8;
    color: var(--danger);
}

.row-link-danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: #fff2f2;
}

.row-link:disabled,
.row-link[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.admin-modal[hidden] {
    display: none;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 0.9rem;
    background: rgba(18, 38, 58, 0.62);
}

.admin-modal-scrollable {
    place-items: start center;
    overflow: auto;
    padding: 0.55rem;
}

.admin-modal-card {
    width: min(430px, 100%);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
    padding: 1rem;
    display: grid;
    gap: 0.65rem;
}

.admin-modal-card h3 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 1.06rem;
}

.admin-modal-option {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 0.2rem 0.5rem;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.55rem 0.6rem;
    background: #fbfcff;
}

.admin-modal-option input {
    margin: 0.1rem 0 0;
}

.admin-modal-option span {
    font-weight: 700;
    color: var(--ink);
}

.admin-modal-option small {
    grid-column: 2;
    color: var(--muted);
    font-size: 0.8rem;
}

.admin-modal-note {
    margin: 0;
    color: #855c00;
    font-size: 0.83rem;
    line-height: 1.35;
    border: 1px solid #edd28b;
    background: #fff8e7;
    border-radius: 10px;
    padding: 0.45rem 0.55rem;
}

.admin-modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.pager {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.pager-link {
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.3rem 0.55rem;
    color: var(--ink);
    font-weight: 700;
    min-width: 34px;
    text-align: center;
}

.pager-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pager-link.current {
    border-color: var(--accent);
    background: #fff3e1;
    color: var(--accent);
}

.listing-legend {
    margin-top: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcff;
    padding: 0.75rem;
}

.listing-legend h3 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 0.98rem;
}

.listing-legend-grid {
    margin-top: 0.6rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.listing-legend-group {
    border: 1px solid #e2e9f2;
    border-radius: 10px;
    background: #ffffff;
    padding: 0.55rem;
}

.listing-legend-group h4 {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.listing-legend-items {
    margin-top: 0.42rem;
    display: grid;
    gap: 0.42rem;
}

.listing-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    color: var(--ink);
}

.listing-legend-item .type-icon {
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 7px;
    font-size: 0.95rem;
    font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 22;
}

.empty-state {
    border: 1px dashed var(--line);
    border-radius: 14px;
    padding: 1.2rem 1rem;
    background: #fbfcff;
}

.empty-state h3 {
    margin: 0 0 0.5rem;
    font-family: "Sora", sans-serif;
}

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

.empty-state-actions {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.auth-panel {
    padding: 1.1rem;
}

.auth-intro h2 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 1.15rem;
}

.auth-intro p {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.auth-grid {
    margin-top: 0.95rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.auth-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcff;
    padding: 0.85rem;
    display: grid;
    gap: 0.7rem;
}

.auth-card h3 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 1rem;
}

.auth-form {
    display: grid;
    gap: 0.6rem;
}

.auth-submit {
    justify-content: center;
    font-size: 1.02rem;
    font-weight: 700;
}

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.35;
}

.auth-terms input {
    margin-top: 0.1rem;
}

.auth-terms a {
    color: var(--accent);
    font-weight: 700;
}

.add-form-panel {
    padding: 1.1rem;
}

.admin-add-form {
    display: grid;
    gap: 1rem;
}

.admin-form-section {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcff;
    padding: 0.85rem;
    display: grid;
    gap: 0.7rem;
}

.admin-form-section-head h3 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 1rem;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.form-field {
    display: grid;
    gap: 0.35rem;
    position: relative;
}

.form-field > span {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--muted);
}

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    background: #fff;
    font: inherit;
    color: var(--ink);
}

.form-field input:not([type="checkbox"]):not([type="radio"]):focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(239, 138, 23, 0.14);
}

.form-field-wide {
    grid-column: span 3;
}

.account-type-field .account-type-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    width: 100%;
}

.account-type-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 0.62rem 0.7rem;
    cursor: pointer;
    width: 100%;
    min-height: 54px;
}

.account-type-option input {
    margin: 0.16rem 0 0;
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.account-type-option span {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.form-field-autocomplete {
    z-index: 4;
}

.autocomplete-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(18, 38, 58, 0.14);
    overflow: auto;
    max-height: 260px;
    display: grid;
    z-index: 22;
}

.autocomplete-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #eef3f8;
    background: #fff;
    text-align: left;
    padding: 0.48rem 0.62rem;
    cursor: pointer;
    display: grid;
    gap: 0.08rem;
    font: inherit;
}

.autocomplete-item:last-child {
    border-bottom: 0;
}

.autocomplete-item:hover,
.autocomplete-item.is-active {
    background: #fff6eb;
}

.autocomplete-item-title {
    font-weight: 600;
    color: var(--ink);
}

.autocomplete-item-sub {
    color: var(--muted);
    font-size: 0.79rem;
}

.admin-options-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
}

.admin-form-section .admin-options-grid {
    margin-top: 0.1rem;
}

.admin-options-grid label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 0.45rem 0.55rem;
    font-size: 0.9rem;
}

.admin-option-hidden {
    display: none !important;
}

.photo-upload-box {
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: #fbfcff;
    padding: 0.9rem;
    display: grid;
    gap: 0.7rem;
}

.photo-upload-top h3 {
    margin: 0;
    font-family: "Sora", sans-serif;
}

.photo-upload-top p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.photo-upload-top .photo-upload-limit {
    margin-top: 0.4rem;
    color: #7a4f00;
    background: #fff7e8;
    border: 1px solid #ffd9a3;
    border-radius: 8px;
    padding: 0.35rem 0.55rem;
}

.upload-progress-panel {
    border: 1px solid #ffd9a3;
    background: #fff7e8;
    border-radius: 10px;
    padding: 0.55rem 0.6rem;
    display: grid;
    gap: 0.4rem;
}

.upload-progress-panel[hidden] {
    display: none !important;
}

.upload-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.upload-progress-head strong {
    font-size: 0.9rem;
    color: #7a4f00;
}

.upload-progress-head span {
    font-size: 0.84rem;
    font-weight: 700;
    color: #7a4f00;
}

.upload-progress-track {
    height: 8px;
    border-radius: 999px;
    background: #ffe7c2;
    overflow: hidden;
    position: relative;
}

.upload-progress-value {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #f5b14f 0%, #ef8a17 100%);
    transition: width 220ms ease;
}

.upload-progress-track.is-indeterminate .upload-progress-value {
    width: 42%;
    animation: upload-progress-indeterminate 1.1s ease-in-out infinite;
    will-change: transform;
}

.upload-progress-panel p {
    margin: 0;
    color: #7a4f00;
    font-size: 0.82rem;
}

@keyframes upload-progress-indeterminate {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(320%);
    }
}

.photo-input-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    width: fit-content;
    cursor: pointer;
    font-weight: 600;
}

.photo-input {
    display: none;
}

.photo-input-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
    max-width: 220px;
    line-height: 1.3;
}

.profile-save-inline {
    width: 100%;
    max-width: 220px;
    justify-content: center;
    padding: 0.7rem 0.95rem;
    min-height: 44px;
    font-size: 0.96rem;
    font-weight: 700;
    color: #fff;
    border-color: var(--accent);
    background: linear-gradient(135deg, #ef8a17 0%, #fdc600 100%);
    box-shadow: 0 8px 18px rgba(239, 138, 23, 0.22);
}

.profile-save-inline:hover {
    color: #fff;
    border-color: var(--accent-deep);
    background: linear-gradient(135deg, #d9780f 0%, #f0b800 100%);
}

.photo-sorter {
    margin: 0;
    padding: 0;
    list-style: none;
    display: none;
    gap: 0.55rem;
}

.photo-sorter.is-active {
    display: grid;
}

.photo-sort-item {
    display: grid;
    grid-template-columns: 86px 1fr auto;
    gap: 0.6rem;
    align-items: center;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 0.4rem;
    cursor: move;
}

.photo-sort-item.is-over {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(239, 138, 23, 0.12);
}

.photo-sort-thumb-wrap {
    position: relative;
}

.photo-sort-thumb {
    width: 100%;
    height: 58px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.photo-sort-number {
    position: absolute;
    right: 6px;
    bottom: 6px;
    background: rgba(18, 38, 58, 0.85);
    color: #fff;
    border-radius: 99px;
    font-size: 0.72rem;
    line-height: 1;
    padding: 0.24rem 0.4rem;
}

.photo-sort-meta {
    min-width: 0;
}

.photo-sort-name {
    display: block;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-sort-size {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.photo-sort-kind {
    display: inline-block;
    margin-top: 0.2rem;
    padding: 0.08rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--muted);
    background: #f8fbff;
}

.photo-sort-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.photo-move {
    border: 1px solid var(--line);
    color: var(--ink);
    background: #fff;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.photo-move:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.photo-move:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.photo-remove {
    border: 1px solid #f0c8c8;
    color: var(--danger);
    background: #fff;
    border-radius: 8px;
    padding: 0.28rem 0.52rem;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
}

.photo-remove:hover {
    border-color: var(--danger);
    background: #fff2f2;
}

.terms-check {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
}

.terms-check a {
    color: var(--accent);
}

.form-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.profile-form-actions {
    margin-top: 0.2rem;
    justify-content: space-between;
    align-items: center;
}

.profile-save-main {
    min-height: 54px;
    min-width: 250px;
    padding: 0.85rem 1.6rem;
    font-size: 1.02rem;
    font-weight: 700;
    color: #fff;
    border-color: var(--accent);
    background: linear-gradient(135deg, #ef8a17 0%, #fdc600 100%);
    box-shadow: 0 12px 24px rgba(239, 138, 23, 0.2);
}

.profile-save-main:hover {
    color: #fff;
    border-color: var(--accent-deep);
    background: linear-gradient(135deg, #d9780f 0%, #f0b800 100%);
}

.profile-header-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--line);
    background: #fbfcff;
    border-radius: 14px;
    padding: 0.9rem;
}

.profile-avatar-wrap {
    display: grid;
    gap: 0.55rem;
    justify-items: center;
}

.profile-avatar {
    width: 132px;
    height: 132px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #fff;
}

.profile-head-text h2 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 1.1rem;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

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

.payment-card h2 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 1.1rem;
}

.payment-balance {
    margin: 0.25rem 0 0;
    font-family: "Sora", sans-serif;
    font-size: clamp(1.6rem, 3vw, 2rem);
}

.admin-payment-form {
    margin-top: 0.6rem;
    display: grid;
    gap: 0.7rem;
}

.payment-stripe-badge {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.payment-stripe-badge img {
    width: 220px;
    max-width: 100%;
    height: auto;
}

.promo-panel {
    padding: 1rem;
}

.promo-list {
    display: grid;
    gap: 0.85rem;
}

.promo-card {
    display: grid;
    grid-template-columns: minmax(220px, 270px) minmax(0, 1fr) 170px;
    gap: 0.85rem;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 0.7rem;
}

.promo-image-col,
.promo-text-col {
    min-width: 0;
}

.promo-image-button {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f9fbff;
    padding: 0.4rem;
    cursor: zoom-in;
}

.promo-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 9px;
}

.promo-copy {
    font-size: 0.94rem;
    line-height: 1.45;
    color: var(--ink);
    white-space: pre-line;
}

.promo-copy strong {
    display: block;
    margin-bottom: 0.25rem;
    font-family: "Sora", sans-serif;
    font-size: 1.03rem;
}

.promo-price-col {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcff;
    padding: 0.65rem;
}

.promo-price-col h4 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 1.2rem;
}

.promo-price-col p {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
    white-space: pre-line;
}

.promo-lightbox[hidden] {
    display: none;
}

.promo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(18, 38, 58, 0.85);
}

.promo-lightbox-inner {
    position: relative;
    width: min(1080px, 95vw);
}

.promo-lightbox-image {
    width: 100%;
    max-height: 88vh;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
}

.promo-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(18, 38, 58, 0.65);
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.promo-lightbox-close:hover {
    background: rgba(18, 38, 58, 0.9);
}

.result-block {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 0.95rem;
}

.result-success {
    border-color: #abd8bc;
    background: #f1fbf4;
}

.result-error {
    border-color: #efc1c1;
    background: #fff4f4;
}

.result-block ul {
    margin: 0;
    padding-left: 1.1rem;
}

.result-links {
    margin-top: 0.85rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-inline-form {
    margin: 0;
}

.admin-table-compact {
    min-width: 660px;
}

.admin-table-compact th,
.admin-table-compact td {
    padding: 0.52rem 0.5rem;
    font-size: 0.86rem;
}

.admin-table-users {
    min-width: 1020px;
}

.admin-credit-form {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.admin-credit-form input {
    width: 92px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.32rem 0.45rem;
    font: inherit;
    color: var(--ink);
}

.admin-credit-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(239, 138, 23, 0.14);
}

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

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

    .listings-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .form-field-wide {
        grid-column: span 2;
    }

    .admin-options-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .profile-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .promo-card {
        grid-template-columns: minmax(0, 1fr) 170px;
    }

    .promo-image-col {
        grid-column: 1 / -1;
    }

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

    .account-type-field .account-type-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .topbar,
    .hero-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .credit-box {
        width: 100%;
    }

    .actions-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-form-grid,
    .admin-options-grid {
        grid-template-columns: 1fr;
    }

    .form-field-wide {
        grid-column: span 1;
    }

    .photo-sort-item {
        grid-template-columns: 72px 1fr;
    }

    .photo-sort-actions {
        grid-column: span 2;
    }

    .form-actions {
        justify-content: flex-start;
    }

    .profile-form-actions {
        width: 100%;
    }

    .profile-save-main {
        width: 100%;
        min-width: 0;
    }

    .listing-legend-grid {
        grid-template-columns: 1fr;
    }

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

    .promo-card {
        grid-template-columns: 1fr;
    }

    .admin-credit-form {
        flex-wrap: wrap;
    }

    .admin-credit-form input {
        width: 100%;
    }
}

.xml-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.xml-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 1rem;
}

.xml-card h3 {
    margin: 0 0 0.8rem;
    font-family: "Sora", sans-serif;
    font-size: 1rem;
}

.xml-feed-cell {
    max-width: 380px;
    word-break: break-all;
}

.xml-feed-cell a {
    text-decoration: none;
}

.xml-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.xml-textarea {
    min-height: 180px;
    resize: vertical;
}

.xml-rule-actions {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
}

.xml-checkbox-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.xml-divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1rem 0;
}

.xml-helper {
    margin-top: 0.75rem;
    color: var(--muted);
}

.xml-helper code {
    font-size: 0.85rem;
}

.xml-key-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.xml-key-list code {
    display: inline-flex;
    align-items: center;
    padding: 0.24rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
    font-size: 0.8rem;
    word-break: break-all;
}

.cron-preset-row {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.cron-pre {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 0.75rem;
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--ink);
    max-height: 340px;
    overflow: auto;
    white-space: pre;
}

.emailing-preview-note {
    margin-bottom: 0.8rem;
}

.emailing-preview-frame {
    width: 100%;
    height: 84vh;
    min-height: 760px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
}

.emailing-test-address {
    font-size: clamp(0.95rem, 1.6vw, 1.2rem) !important;
    word-break: break-word;
}

.dashboard-shell-wide {
    width: calc(100% - 1rem);
    max-width: none;
}

.emailing-confirm-card {
    width: min(680px, 100%);
    max-height: 92vh;
    overflow: auto;
}

.emailing-confirm-list-wrap {
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcff;
    padding: 0.55rem;
}

.emailing-confirm-actions-top {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.emailing-confirm-list {
    margin: 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--ink);
}

.emailing-log-detail-card {
    width: min(1760px, 99vw);
    max-height: calc(100vh - 1.1rem);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.emailing-log-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.emailing-log-detail-preview {
    width: 100%;
    height: 56vh;
    min-height: 520px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.emailing-log-detail-listings-header h4 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 1rem;
}

.emailing-log-detail-table-wrap {
    max-height: none;
    overflow: visible;
}

@media (max-width: 980px) {
    .xml-editor-grid,
    .xml-form-grid {
        grid-template-columns: 1fr;
    }

    .xml-feed-cell {
        max-width: 230px;
    }

    .emailing-preview-frame {
        height: 78vh;
        min-height: 620px;
    }

    .emailing-confirm-list-wrap {
        overflow: visible;
    }

    .emailing-log-detail-preview {
        height: 50vh;
        min-height: 420px;
    }
}

@media (max-width: 720px) {
    .emailing-preview-frame {
        height: 72vh;
        min-height: 500px;
    }

    .emailing-log-detail-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .emailing-log-detail-preview {
        height: 46vh;
        min-height: 320px;
    }
}
