:root {
    --bg-page: #F8FAFC;
    --bg-card: #FFF;
    --bg-subtle: #F1F5F9;
    --text-primary: #1E293B;
    --text-secondary: #374151;
    --text-muted: #6B7280;
    --accent: #0077FF;
    --accent-hover: #0062D1;
    --accent-light: #EBF4FF;
    --border: #D1D5DB;
    --border-subtle: #F1F5F9;
    --error: #DC2626;
    --error-bg: #FEF2F2;
    --error-border: #FECACA;
    --success: #16A34A;
    --success-bg: #F0FDF4;
    --success-border: #BBF7D0;
    --info: #2563EB;
    --info-bg: #EFF6FF;
    --info-border: #BFDBFE;
    --warning: #D97706;
    --warning-bg: #FFFBEB;
    --warning-border: #FDE68A;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 999px;
    --text-xs: 0.78rem;
    --text-sm: 0.85rem;
    --text-base: 0.95rem;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.09), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
    --transition: 0.17s ease;
    --font: "Inter", "Golos Text", "Roboto", system-ui, -apple-system, sans-serif;
    --max-width: 1200px;
    --header-height: 60px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    font-size: 19px;
    -webkit-font-smoothing: antialiased
}

body {
    font-family: var(--font);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition)
}

a:hover {
    color: var(--accent-hover)
}

img {
    max-width: 100%;
    display: block
}

h1, h2, h3, h4 {
    color: var(--text-primary);
    line-height: 1.3;
    font-weight: 600
}

h1 {
    font-size: 1.6rem
}

h2 {
    font-size: 1.25rem
}

h3 {
    font-size: 1.05rem
}

p {
    color: var(--text-secondary);
    line-height: 1.65
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px
}

main.site-main {
    flex: 1;
    padding: 32px 0 48px
}

.page-header {
    margin-bottom: 24px
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700
}

.page-header p {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.9rem
}

.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm)
}

.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px
}

.site-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent) !important;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    text-decoration: none
}

.site-logo:hover {
    color: var(--accent-hover) !important
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: flex-end
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--accent);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap
}

.site-nav a:hover {
    background: var(--accent-light);
    color: var(--accent-hover)
}

.site-nav a.active {
    background: var(--accent-light);
    color: var(--accent)
}

.nav-dropdown {
    position: relative
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap
}

.nav-dropdown-toggle:hover {
    background: var(--bg-subtle);
    color: var(--text-primary)
}

.nav-dropdown-toggle svg {
    width: 12px;
    height: 12px;
    opacity: 0.6;
    transition: transform var(--transition)
}

.nav-dropdown.open .nav-dropdown-toggle svg {
    transform: rotate(180deg)
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 160px;
    padding: 6px;
    z-index: 200
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block
}

.nav-dropdown-menu a {
    display: block;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
    color: var(--text-secondary);
    font-weight: 500
}

.nav-dropdown-menu a:hover {
    background: var(--bg-subtle);
    color: var(--text-primary)
}

.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 20px 0
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.site-footer p {
    font-size: 0.82rem;
    color: var(--text-muted)
}

.site-footer a {
    color: var(--text-muted);
    font-size: 0.82rem
}

.site-footer a:hover {
    color: var(--accent)
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent)
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 119, 255, 0.28)
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border-color: var(--border)
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
    border-color: #CBD5E1
}

.btn-danger {
    background: var(--bg-card);
    color: var(--error);
    border-color: var(--error-border)
}

.btn-danger:hover {
    background: var(--error-bg);
    border-color: #FCA5A5
}

.btn-accent {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent)
}

.btn-accent:hover {
    background: var(--accent-light);
    border-color: var(--accent-hover);
    color: var(--accent-hover);
    box-shadow: 0 2px 8px rgba(0, 119, 255, 0.15)
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent
}

.btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--text-primary)
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.82rem
}

.btn-full {
    width: 100%
}

.btn-warning {
    background: var(--bg-card);
    color: var(--warning);
    border-color: var(--warning-border);
}

.btn-warning:hover {
    background: var(--warning-bg);
    border-color: #FBBF24
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary)
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.12)
}

.form-input::placeholder, .form-textarea::placeholder {
    color: var(--text-muted)
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px
}

.form-textarea {
    resize: vertical;
    min-height: 90px
}

.form-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer
}

.form-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer
}

.field-error {
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 2px
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    line-height: 1.5;
    border: 1px solid transparent;
    margin-bottom: 16px;
    word-break: break-word;
}

.alert p {
    color: inherit;
    margin: 0
}

.alert a {
    font-weight: 500;
    text-decoration: underline
}

.alert-error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: #991B1B
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: #15803D
}

.alert-info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: #1D4ED8
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm)
}

.card-body {
    padding: 24px
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px
}

.listings-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start
}

.filters-sidebar {
    width: 264px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 16px);
    max-height: calc(100vh - var(--header-height) - 32px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent
}

.filters-sidebar::-webkit-scrollbar {
    width: 4px
}

.filters-sidebar::-webkit-scrollbar-track {
    background: transparent
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px
}

.filter-card {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm)
}

.filter-card-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 14px
}

.filter-group {
    margin-bottom: 14px
}

.filter-group:last-child {
    margin-bottom: 0
}

.filter-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 14px 0
}

.filter-price-row {
    display: flex;
    gap: 8px
}

.filter-price-row .form-input {
    min-width: 0
}

.listings-main {
    flex: 1;
    min-width: 0
}

.listings-list {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
    color: var(--text-muted)
}

.favorite-btn .favorite-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0
}

.favorite-btn svg {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    transition: fill var(--transition)
}

.favorite-btn:hover {
    background: var(--error-bg);
    border-color: #FCA5A5;
    transform: scale(1.1);
    color: var(--error)
}

.favorite-btn:hover svg {
    fill: var(--error)
}

.favorite-btn[data-favorite="true"] {
    background: var(--error-bg);
    border-color: #FCA5A5;
    color: var(--error)
}

.favorite-btn[data-favorite="true"] svg {
    fill: var(--error)
}

.favorite-btn-detail {
    width: auto;
    border-radius: var(--radius);
    padding: 8px 16px;
    gap: 7px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-family: var(--font);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition)
}

.favorite-btn-detail svg {
    width: 15px;
    height: 15px
}

.favorite-btn-detail:hover {
    color: var(--error);
    transform: none;
    background: var(--error-bg);
    border-color: #FCA5A5
}

.favorite-btn-detail[data-favorite="true"] {
    color: var(--error);
    background: var(--error-bg);
    border-color: #FCA5A5
}

.delete-listing-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    border: 1px solid var(--error-border);
    background: transparent;
    color: var(--error);
    transition: background var(--transition)
}

.delete-listing-btn:hover {
    background: var(--error-bg)
}

#load-more-wrapper {
    text-align: center;
    margin-top: 20px
}

#load-more-btn {
    padding: 10px 32px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: var(--font);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition)
}

#load-more-btn:hover {
    background: var(--bg-subtle);
    border-color: #CBD5E1
}

#error-banner {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: #991B1B;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 16px
}

.auth-page {
    min-height: calc(100vh - var(--header-height) - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 36px 40px;
    width: 100%;
    max-width: 420px
}

.auth-card h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px
}

.auth-card .auth-subtitle {
    font-size: 0.87rem;
    color: var(--text-secondary);
    margin-bottom: 24px
}

.auth-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center
}

.auth-links a {
    font-size: 0.85rem;
    color: var(--text-secondary)
}

.auth-links a:hover {
    color: var(--accent)
}

.auth-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0
}

.account-layout {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.account-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px 28px;
}

.settings-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.current-email-card {
    padding: 16px 20px;
}

.settings-email-display {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 12px 16px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.settings-email-display strong {
    color: var(--text-primary);
}

.password-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.password-card form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.password-card .btn {
    align-self: flex-start;
    margin-top: 8px;
}

.subscriptions-layout {
    width: 100%
}

.subscription-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px;
    transition: box-shadow var(--transition)
}

.subscription-card:hover {
    box-shadow: var(--shadow-md)
}

.subscription-card-info {
    flex: 1;
    min-width: 0
}

.subscription-card-query {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary)
}

.subscription-card-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 3px
}

.subscription-form-card {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px
}

.subscription-form-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle)
}

.favorites-empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
    font-size: 0.92rem
}

.admin-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.admin-layout-single {
    max-width: 720px
}

.admin-list-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden
}

.admin-list-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.admin-list-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary)
}

.admin-list-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 99px
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem
}

.admin-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border)
}

.admin-table td {
    padding: 11px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle
}

.admin-table tr:last-child td {
    border-bottom: none
}

.admin-table tr:hover td {
    background: var(--bg-subtle)
}

.admin-table .cell-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end
}

.admin-form-card {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--header-height) + 24px);
    width: 320px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.admin-form-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary)
}

.admin-form-card-body {
    padding: 20px
}

.error-page {
    text-align: center;
    padding: 80px 24px
}

.error-page h1 {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 12px
}

.error-page p {
    margin-bottom: 24px
}

.text-muted {
    color: var(--text-muted)
}

.text-sm {
    font-size: 0.85rem
}

.text-center {
    text-align: center
}

.mt-0 {
    margin-top: 0
}

.mt-8 {
    margin-top: 8px
}

.mt-16 {
    margin-top: 16px
}

.mt-24 {
    margin-top: 24px
}

.mb-0 {
    margin-bottom: 0
}

.mb-8 {
    margin-bottom: 8px
}

.mb-16 {
    margin-bottom: 16px
}

.mb-24 {
    margin-bottom: 24px
}

.hidden {
    display: none !important
}

#listings-container .listings-list {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.listings-list + .listings-list {
    margin-top: 12px
}

article.listing-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
    min-height: 130px;
    cursor: pointer
}

article.listing-preview:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    transform: translateY(-2px)
}

.listing-image {
    width: 38%;
    flex-shrink: 0;
    height: 200px;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 14px
}

.listing-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm)
}

.listing-image span {
    font-size: 0.78rem;
    color: var(--text-muted)
}

.listing-info {
    flex: 1;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0
}

.listing-info header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.listing-info header strong {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 2px 8px;
    border-radius: 99px
}

.listing-info header span {
    font-size: 0.8rem;
    color: var(--text-muted)
}

.listing-info header time {
    font-size: 0.77rem;
    color: var(--text-muted);
    margin-left: auto
}

.listing-info p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    line-height: 1.5;
    margin: 0
}

.listing-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 6px
}

.listing-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.listing-price strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap
}

.listing-price em {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic
}

#listings-container hr {
    display: none
}

#listings-container > p {
    padding: 48px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem
}

#filters-section form hr {
    display: none
}

.listing-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding: 6px 0;
    transition: color var(--transition)
}

.listing-back-link:hover {
    color: var(--accent)
}

.listing-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden
}

.listing-detail-inner {
    display: flex;
    align-items: stretch;
    min-height: 340px
}

.listing-detail-img-col {
    width: 40%;
    flex-shrink: 0;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border-right: 1px solid var(--border-subtle);
    overflow: hidden
}

.listing-detail-img-col img {
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: var(--radius)
}

.listing-detail-img-placeholder {
    font-size: 0.85rem;
    color: var(--text-muted)
}

.listing-detail-content {
    flex: 1;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0
}

.listing-detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-bottom: 4px
}

.listing-detail-category {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 4px 14px;
    border-radius: 99px
}

.listing-detail-city {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary)
}

.listing-detail-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: auto
}

.listing-detail-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary)
}

.listing-detail-price em {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    font-style: normal
}

.listing-detail-desc-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 4px
}

.listing-detail-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word
}

.listing-detail-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 8px
}

.listing-detail-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

.delete-listing-btn-detail {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius);
    border-color: var(--error-border);
    color: var(--error);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    background: var(--bg-card);
    transition: background var(--transition);
    text-decoration: none
}

.delete-listing-btn-detail:hover {
    background: var(--error-bg)
}

.listing-original-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    padding: 8px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--accent-light);
    background: var(--accent-light);
    transition: background var(--transition), border-color var(--transition);
    text-decoration: none
}

.listing-original-link:hover {
    background: #D9EAFF;
    border-color: #B8D8FF;
    color: var(--accent-hover)
}

.view-mode {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px
}

.subscription-card > .view-mode {
    flex: 1;
    min-width: 0
}

.subscription-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0
}

.subscription-card .delete-btn {
    color: var(--error);
    border-color: var(--error-border)
}

.subscription-card .delete-btn:hover {
    background: var(--error-bg)
}

.subscription-edit-form {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.subscription-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px
}

.admin-form-card h2 {
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 16px
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
    margin-bottom: 10px
}

.admin-card:hover {
    box-shadow: var(--shadow-md)
}

.admin-card .view-mode {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px
}

.admin-card-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary)
}

.admin-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: var(--text-xs);
    color: var(--text-muted)
}

.admin-card-keywords-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 6px
}

.admin-keywords-block {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    max-height: 120px;
    overflow-y: auto
}

.admin-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.admin-card .delete-btn {
    color: var(--error);
    border-color: var(--error-border)
}

.admin-card .delete-btn:hover {
    background: var(--error-bg)
}

.admin-edit-form {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 2px
}

.admin-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px
}

.admin-users-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start
}

.admin-users-filters {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 16px)
}

.admin-users-main {
    flex: 1;
    min-width: 0
}

.user-card .view-mode {
    flex-wrap: wrap;
    gap: 12px
}

.user-card-id-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

.user-badge-id {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 2px 8px;
    white-space: nowrap
}

.user-card-status-row {
    font-size: var(--text-xs);
    color: var(--text-muted)
}

.status-yes {
    font-weight: 600
}

.text-banned.status-yes {
    color: var(--error)
}

.text-verified.status-yes {
    color: var(--success)
}

.status-no {
    color: var(--text-secondary)
}

.admin-layout > section {
    flex: 1;
    min-width: 0;
}

@media (max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-form-card {
        width: 100%;
        position: static;
    }
}

.user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
}

.user-card .admin-card-body {
    flex: 1;
    min-width: 0;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.user-actions .toggle-verify-btn {
    width: 170px;
    text-align: center;
    justify-content: center;
}

.user-actions .toggle-ban-btn {
    width: 120px;
    text-align: center;
    justify-content: center;
}

.user-actions .delete-btn {
    width: 100px;
}

.categories-layout {
    flex-direction: column !important;
}

.categories-layout .admin-form-card {
    width: 100% !important;
    position: static !important;
    max-width: 100% !important;
}

.admin-card-keywords-block,
.text-keywords {
    max-height: 240px !important;
    overflow-y: auto;
}

.category-card {
    width: 100%;
    margin-bottom: 12px;
}

.category-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.category-keywords-section .admin-card-keywords-label {
    margin-top: 0;
    margin-bottom: 6px;
}

.category-card .edit-mode {
    display: none;
}

.category-card .view-mode {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.category-card.editing .view-mode {
    display: none;
}

.category-card.editing .edit-mode {
    display: block;
    width: 100%;
}

.category-card.editing .admin-edit-form {
    width: 100%;
}

#categories-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.category-card:not(.editing) .edit-mode {
    display: none;
}