/* ==========================================================================
   FLOUZ1.FUN CABINET DESIGN SYSTEM (1:1 REPLICATION)
   ========================================================================== */

:root,
[data-cabinet-theme="dark"] {
    --cb-fg: 247, 246, 248;
    --cb-bg: #0d0d0d;
    --cb-surface: #0f0e10;
    --cb-surface-hover: #181719;
    --cb-inner: #161518;
    --cb-border: rgba(247, 246, 248, 0.1);
    --cb-border-hover: rgba(247, 246, 248, 0.22);
    --cb-text: #f7f6f8;
    --cb-text-muted: rgba(247, 246, 248, 0.55);
    --cb-accent: #c0afde;
    --cb-accent-soft: rgba(192, 175, 222, 0.12);
    --cb-accent-border: rgba(192, 175, 222, 0.35);
    --cb-accent-glow: rgba(192, 175, 222, 0.15);
    --cb-danger: #f0736f;
    --cb-danger-rgb: 240, 115, 111;
    --cb-success: #5fd08a;
    --cb-success-rgb: 95, 208, 138;
    --cb-nav-bg: transparent;
    --cb-nav-active: rgba(192, 175, 222, 0.1);
    --cb-progress-track: rgba(247, 246, 248, 0.1);
    --cb-progress-fill: rgba(192, 175, 222, 0.45);
    --cb-shadow: 0 10px 30px -10px rgba(0,0,0,0.6);
    --cb-tag-bg: rgba(247, 246, 248, 0.06);
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-cabinet-theme="light"] {
    --cb-fg: 20, 18, 28;
    --cb-bg: #fafafc;
    --cb-surface: #ffffff;
    --cb-surface-hover: #f6f6f6;
    --cb-inner: #f4f2f8;
    --cb-border: rgba(20, 18, 28, 0.1);
    --cb-border-hover: rgba(20, 18, 28, 0.22);
    --cb-text: #14121c;
    --cb-text-muted: rgba(20, 18, 28, 0.55);
    --cb-accent: #6842c2;
    --cb-accent-soft: rgba(104, 66, 194, 0.08);
    --cb-accent-border: rgba(104, 66, 194, 0.3);
    --cb-accent-glow: rgba(104, 66, 194, 0.08);
    --cb-danger: #c93a36;
    --cb-danger-rgb: 201, 58, 54;
    --cb-success: #1f8a52;
    --cb-success-rgb: 31, 138, 82;
    --cb-nav-bg: transparent;
    --cb-nav-active: rgba(104, 66, 194, 0.08);
    --cb-progress-track: rgba(20, 18, 28, 0.08);
    --cb-progress-fill: rgba(104, 66, 194, 0.35);
    --cb-shadow: 0 4px 20px rgba(20, 18, 28, 0.08);
    --cb-tag-bg: rgba(20, 18, 28, 0.05);
}

/* Base resets & typography */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: var(--cb-bg);
    color: var(--cb-text);
    font-family: var(--font-inter);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Aurora Background */
.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: -10;
    overflow: hidden;
    pointer-events: none;
}

.aurora-bg .aurora-glow {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(191, 170, 227, 0.35), transparent),
                radial-gradient(ellipse 60% 40% at 80% 20%, rgba(227, 170, 225, 0.25), transparent),
                radial-gradient(ellipse 50% 60% at 60% 80%, rgba(170, 183, 227, 0.2), transparent);
    animation: aurora-shift 20s ease-in-out infinite alternate;
}

.aurora-bg .aurora-grid {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
}

@keyframes aurora-shift {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.06) translate(-1.5%, 1.5%); }
    100% { transform: scale(1) translate(0, 0); }
}

/* Cabinet Root Layout */
.cabinet-root {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.cabinet-sidebar-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.cabinet-sidebar {
    width: 250px;
    height: 100%;
    background-color: var(--cb-surface);
    border-right: 1px solid var(--cb-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.cabinet-brand-wrap {
    padding: 1.25rem;
    border-bottom: 1px solid var(--cb-border);
}

.cabinet-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cabinet-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    overflow: hidden;
    border: 1px solid var(--cb-border);
    background: var(--cb-inner);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.cabinet-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cabinet-brand-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cabinet-brand-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--cb-text);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cabinet-brand-sub {
    font-size: 11px;
    color: var(--cb-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cabinet-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.cabinet-nav-section {
    margin-bottom: 1.25rem;
}

.cabinet-nav-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.25rem;
    margin-bottom: 0.35rem;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cb-text-muted);
}

.cabinet-nav-section-bar {
    width: 3px;
    height: 11px;
    background-color: var(--cb-accent);
    border-radius: 9999px;
    display: inline-block;
}

.cabinet-nav-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cabinet-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--cb-text-muted);
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.cabinet-nav-link:hover {
    color: var(--cb-text);
    background-color: var(--cb-surface-hover);
}

.cabinet-nav-link.active,
.cabinet-sidebar-active {
    color: var(--cb-text) !important;
    background-color: var(--cb-nav-active) !important;
    border-color: var(--cb-accent-border) !important;
    box-shadow: 0 0 18px var(--cb-accent-glow);
}

.cabinet-nav-link svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.cabinet-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--cb-border);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cabinet-footer-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 11px;
    font-size: 12.5px;
    color: var(--cb-text-muted);
    transition: all 0.15s ease;
    border: 1px solid transparent;
    text-align: left;
}

.cabinet-footer-btn:hover {
    color: var(--cb-text);
    background-color: var(--cb-surface-hover);
}

.cabinet-footer-btn.admin-active {
    color: #facc15;
    background-color: rgba(250, 204, 21, 0.1);
    border-color: rgba(250, 204, 21, 0.3);
}

/* Main Content Area */
.cabinet-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cabinet-main {
    flex: 1;
    padding: 1.5rem 1rem 3rem;
}

.cabinet-main-inner {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* Mobile Header Bar */
.cabinet-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.15rem;
    background: var(--cb-surface);
    border-bottom: 1px solid var(--cb-border);
    position: sticky;
    top: 0;
    z-index: 35;
}

@media (max-width: 1024px) {
    .cabinet-sidebar-sticky {
        position: fixed;
        left: -280px;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
    }
    .cabinet-sidebar-sticky.mobile-open {
        left: 0;
    }
    .cabinet-mobile-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(4px);
        z-index: 99;
    }
    .cabinet-mobile-backdrop.open {
        display: block;
    }
    .cabinet-mobile-header {
        display: flex;
    }
}

/* Top bar pills & selectors */
.cabinet-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tma-subscription-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    background: var(--cb-surface);
    border: 1px solid var(--cb-border);
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cb-text);
    transition: all 0.2s ease;
}

.tma-subscription-pill:hover {
    border-color: var(--cb-border-hover);
    background: var(--cb-surface-hover);
}

.admin-badge-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.4);
    border-radius: 9999px;
    color: #fef08a;
    font-size: 12px;
    font-weight: 600;
}

/* Hero Section */
.cabinet-brand-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.2rem 1rem 1.8rem;
}

.cabinet-brand-hero-logo {
    width: 82px;
    height: 82px;
    border-radius: 24px;
    background: var(--cb-inner);
    border: 1px solid var(--cb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    margin-bottom: 1rem;
    overflow: hidden;
}

.cabinet-brand-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cabinet-hero-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.4rem;
    color: var(--cb-text);
}

.cabinet-hero-sub {
    font-size: 14px;
    color: var(--cb-text-muted);
    max-width: 580px;
    margin: 0;
    line-height: 1.5;
}

/* Notice Cards (.tma-notice-card) */
.cabinet-home-panel {
    background: var(--cb-surface);
    border: 1px solid var(--cb-border);
    border-radius: 18px;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--cb-shadow);
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cabinet-home-panel:hover {
    border-color: var(--cb-border-hover);
}

.tma-notice-card {
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.tma-notice-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--cb-accent-soft);
    border: 1px solid var(--cb-accent-border);
    color: var(--cb-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tma-notice-body {
    flex: 1;
    min-width: 0;
}

.tma-notice-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--cb-text);
    margin-bottom: 0.2rem;
}

.tma-notice-sub {
    font-size: 12.5px;
    color: var(--cb-text-muted);
    margin: 0;
    line-height: 1.4;
}

.tma-notice-btn {
    padding: 0.55rem 1.1rem;
    border-radius: 11px;
    background: var(--cb-inner);
    border: 1px solid var(--cb-border);
    color: var(--cb-text);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.tma-notice-btn:hover {
    background: var(--cb-accent-soft);
    border-color: var(--cb-accent-border);
    color: var(--cb-accent);
}

/* Subscription / Profile Card (.tma-sub-card) */
.tma-sub-card {
    padding: 1.6rem;
}

.sub-page-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.sub-page-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    border-radius: 9999px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cb-text-muted);
    border: 1px solid var(--cb-border);
    background: var(--cb-inner);
    transition: all 0.15s ease;
}

.sub-page-tab:hover {
    color: var(--cb-text);
    border-color: var(--cb-border-hover);
}

.sub-page-tab-active {
    color: var(--cb-text) !important;
    background: var(--cb-accent-soft) !important;
    border-color: var(--cb-accent-border) !important;
}

.sub-page-tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: var(--cb-accent);
}

.tma-sub-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tma-sub-head-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--cb-text);
}

.tma-sub-head-meta {
    font-size: 12px;
    color: var(--cb-text-muted);
    padding: 0.25rem 0.65rem;
    background: var(--cb-inner);
    border-radius: 8px;
    border: 1px solid var(--cb-border);
}

.tma-sub-chips {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.tma-sub-chip {
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    background: var(--cb-inner);
    border: 1px solid var(--cb-border);
    font-size: 12px;
    font-weight: 500;
    color: var(--cb-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.tma-sub-chip.highlight {
    color: var(--cb-success);
    border-color: rgba(95, 208, 138, 0.3);
    background: rgba(95, 208, 138, 0.08);
}

.tma-sub-link-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--cb-inner);
    border: 1px solid var(--cb-border);
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.tma-sub-link-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tma-sub-link-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cb-text-muted);
}

.tma-sub-link-value {
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--cb-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tma-sub-link-copy {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--cb-border);
    background: var(--cb-surface);
    color: var(--cb-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.tma-sub-link-copy:hover {
    color: var(--cb-text);
    border-color: var(--cb-border-hover);
    background: var(--cb-surface-hover);
}

.tma-sub-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tma-outline-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    background: var(--cb-inner);
    border: 1px solid var(--cb-border);
    color: var(--cb-text);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
}

.tma-outline-btn:hover {
    background: var(--cb-surface-hover);
    border-color: var(--cb-border-hover);
}

.tma-outline-btn.primary {
    background: var(--cb-accent);
    color: #0d0d0d;
    border-color: var(--cb-accent);
}

.tma-outline-btn.primary:hover {
    opacity: 0.92;
    box-shadow: 0 0 16px var(--cb-accent-glow);
}

/* ==========================================================================
   FUNPAY-STYLE MARKETPLACE / PRODUCTS STYLING
   ========================================================================== */

.products-header {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.products-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.products-title-wrap {
    flex: 1;
    min-width: 260px;
}

.products-page-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.products-page-sub {
    font-size: 13.5px;
    color: var(--cb-text-muted);
    margin: 0;
}

.btn-add-lot {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    background: var(--cb-accent);
    color: #0a0a0c;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px var(--cb-accent-glow);
}

.btn-add-lot:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(192, 175, 222, 0.4);
}

.btn-add-lot.locked {
    background: var(--cb-inner);
    color: var(--cb-text-muted);
    border: 1px dashed var(--cb-border);
    box-shadow: none;
    cursor: pointer;
}

.btn-add-lot.locked:hover {
    border-color: var(--cb-border-hover);
    color: var(--cb-text);
}

/* Filters & Search Toolbar */
.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.products-categories {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.category-pill {
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cb-text-muted);
    border: 1px solid var(--cb-border);
    background: var(--cb-surface);
    transition: all 0.15s ease;
}

.category-pill:hover {
    color: var(--cb-text);
    border-color: var(--cb-border-hover);
    background: var(--cb-surface-hover);
}

.category-pill.active {
    color: var(--cb-text);
    background: var(--cb-accent-soft);
    border-color: var(--cb-accent-border);
}

.products-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--cb-surface);
    border: 1px solid var(--cb-border);
    border-radius: 12px;
    padding: 0.45rem 0.85rem;
    width: 260px;
    transition: border-color 0.2s;
}

.products-search-wrap:focus-within {
    border-color: var(--cb-accent-border);
    box-shadow: 0 0 12px var(--cb-accent-glow);
}

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

.products-search-input::placeholder {
    color: var(--cb-text-muted);
}

/* Lots Grid (FunPay Style in Flouz Aesthetic) */
.lots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.15rem;
}

.lot-card {
    background: var(--cb-surface);
    border: 1px solid var(--cb-border);
    border-radius: 18px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.lot-card:hover {
    border-color: var(--cb-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.lot-header {
    display: flex;
    gap: 0.95rem;
    align-items: flex-start;
}

/* User requirement: "почти квадратную со средними закруглениями" */
.lot-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: var(--cb-inner);
    border: 1px solid var(--cb-border);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lot-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lot-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, rgba(192, 175, 222, 0.15), rgba(95, 208, 138, 0.15));
    color: var(--cb-accent);
}

.lot-info {
    flex: 1;
    min-width: 0;
}

.lot-top-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.lot-category-chip {
    font-size: 11px;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    background: var(--cb-tag-bg);
    border: 1px solid var(--cb-border);
    color: var(--cb-accent);
}

.lot-status-chip {
    font-size: 11px;
    font-weight: 500;
    color: var(--cb-success);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.lot-status-chip::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 9999px;
    background-color: var(--cb-success);
    display: inline-block;
}

.lot-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--cb-text);
    margin: 0 0 0.3rem;
    line-height: 1.35;
    word-break: break-word;
}

.lot-desc {
    font-size: 12.5px;
    color: var(--cb-text-muted);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lot-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--cb-border);
    margin-top: auto;
}

.lot-price-box {
    display: flex;
    flex-direction: column;
}

.lot-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--cb-text);
    letter-spacing: -0.01em;
}

.lot-price-sub {
    font-size: 11px;
    color: var(--cb-text-muted);
}

.lot-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-buy-lot {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: var(--cb-inner);
    border: 1px solid var(--cb-border);
    color: var(--cb-text);
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-buy-lot:hover {
    background: var(--cb-accent-soft);
    border-color: var(--cb-accent-border);
    color: var(--cb-accent);
}

.btn-admin-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--cb-border);
    background: var(--cb-inner);
    color: var(--cb-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.btn-admin-icon:hover {
    color: var(--cb-text);
    border-color: var(--cb-border-hover);
}

.btn-admin-icon.delete:hover {
    color: var(--cb-danger);
    border-color: rgba(240, 115, 111, 0.4);
    background: rgba(240, 115, 111, 0.1);
}

/* Empty State */
.lots-empty {
    grid-column: 1 / -1;
    padding: 3rem 1.5rem;
    text-align: center;
    background: var(--cb-surface);
    border: 1px dashed var(--cb-border);
    border-radius: 18px;
    color: var(--cb-text-muted);
}

/* ==========================================================================
   MODAL DIALOGS (ADMIN AUTH, ADD LOT, LOT DETAILS)
   ========================================================================== */

.cabinet-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cabinet-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.cabinet-modal-card {
    background: var(--cb-surface);
    border: 1px solid var(--cb-border-hover);
    border-radius: 22px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 24px var(--cb-accent-glow);
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.cabinet-modal-backdrop.open .cabinet-modal-card {
    transform: scale(1);
}

.cabinet-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--cb-border);
    background: rgba(255, 255, 255, 0.02);
}

.cabinet-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--cb-text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
}

.cabinet-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid var(--cb-border);
    color: var(--cb-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.cabinet-modal-close:hover {
    color: var(--cb-text);
    background: var(--cb-surface-hover);
}

.cabinet-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.cabinet-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cabinet-form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cb-text-muted);
}

.cabinet-form-input,
.cabinet-form-select,
.cabinet-form-textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    background: var(--cb-inner);
    border: 1px solid var(--cb-border);
    color: var(--cb-text);
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    transition: all 0.15s;
}

.cabinet-form-input:focus,
.cabinet-form-select:focus,
.cabinet-form-textarea:focus {
    border-color: var(--cb-accent-border);
    box-shadow: 0 0 14px var(--cb-accent-glow);
}

.cabinet-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.cabinet-form-hint {
    font-size: 11.5px;
    color: var(--cb-text-muted);
}

/* Icon selector styling */
.icon-selection-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-preview-box {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background: var(--cb-inner);
    border: 1px solid var(--cb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.icon-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-presets-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.icon-preset-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--cb-inner);
    border: 1px solid var(--cb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.15s;
}

.icon-preset-btn:hover {
    border-color: var(--cb-accent-border);
    transform: scale(1.05);
}

.cabinet-modal-footer {
    padding: 1.15rem 1.5rem;
    border-top: 1px solid var(--cb-border);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.cabinet-btn-primary {
    padding: 0.65rem 1.35rem;
    border-radius: 11px;
    background: var(--cb-accent);
    color: #0b0b0e;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 4px 14px var(--cb-accent-glow);
}

.cabinet-btn-primary:hover {
    opacity: 0.93;
    transform: translateY(-1px);
}

.cabinet-btn-secondary {
    padding: 0.65rem 1.15rem;
    border-radius: 11px;
    background: var(--cb-inner);
    border: 1px solid var(--cb-border);
    color: var(--cb-text);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s;
}

.cabinet-btn-secondary:hover {
    background: var(--cb-surface-hover);
    border-color: var(--cb-border-hover);
}

/* Toast Notifications */
.cabinet-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
}

.cabinet-toast {
    pointer-events: auto;
    background: var(--cb-surface);
    border: 1px solid var(--cb-border);
    border-radius: 14px;
    padding: 0.85rem 1.15rem;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--cb-text);
    font-size: 13px;
    font-weight: 500;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cabinet-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.cabinet-toast.success {
    border-color: rgba(95, 208, 138, 0.4);
    box-shadow: 0 8px 24px rgba(95, 208, 138, 0.15);
}

.cabinet-toast.error {
    border-color: rgba(240, 115, 111, 0.4);
    box-shadow: 0 8px 24px rgba(240, 115, 111, 0.15);
}

/* ==========================================================================
   SUPPORT FOR EXISTING PAGES (Projects List, Minimal Pages, Subpages)
   ========================================================================== */

.minimal-page {
    background: var(--cb-bg) !important;
    color: var(--cb-text) !important;
    font-family: var(--font-inter) !important;
}

.minimal-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.minimal-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--cb-border);
}

.minimal-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    background: var(--cb-surface);
    border: 1px solid var(--cb-border);
    font-size: 12.5px;
    color: var(--cb-text-muted);
    transition: all 0.15s;
}

.minimal-back:hover {
    color: var(--cb-text);
    border-color: var(--cb-border-hover);
}

.minimal-nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.minimal-nav-link {
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--cb-text-muted);
    border: 1px solid transparent;
    transition: all 0.15s;
}

.minimal-nav-link:hover {
    color: var(--cb-text);
    background: var(--cb-surface-hover);
}

.minimal-nav-link.active {
    color: var(--cb-text);
    background: var(--cb-accent-soft);
    border-color: var(--cb-accent-border);
}

.minimal-heading {
    margin-bottom: 2rem;
}

.minimal-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.minimal-page-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.minimal-count {
    font-size: 13px;
    color: var(--cb-text-muted);
}

.minimal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.minimal-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cb-text-muted);
    border: 1px solid var(--cb-border);
    background: var(--cb-surface);
    transition: all 0.15s;
    cursor: pointer;
}

.tab-btn:hover {
    color: var(--cb-text);
    border-color: var(--cb-border-hover);
}

.tab-btn.active {
    color: var(--cb-text);
    background: var(--cb-accent-soft);
    border-color: var(--cb-accent-border);
}

.minimal-search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--cb-surface);
    border: 1px solid var(--cb-border);
    border-radius: 12px;
    padding: 0.45rem 0.85rem;
    width: 250px;
    transition: border-color 0.2s;
}

.minimal-search-box:focus-within {
    border-color: var(--cb-accent-border);
    box-shadow: 0 0 12px var(--cb-accent-glow);
}

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

.minimal-projects-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.project-card {
    background: var(--cb-surface) !important;
    border: 1px solid var(--cb-border) !important;
    border-radius: 16px !important;
    padding: 1.15rem 1.4rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: var(--cb-shadow) !important;
    text-decoration: none !important;
}

.project-card:hover {
    border-color: var(--cb-accent-border) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px var(--cb-accent-glow) !important;
}

.project-card-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.project-title-line {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.project-title-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--cb-text);
}

.project-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    background: var(--cb-accent-soft);
    border: 1px solid var(--cb-accent-border);
    color: var(--cb-accent);
}

.project-description {
    font-size: 13px;
    color: var(--cb-text-muted);
    margin: 0;
    line-height: 1.4;
}

.project-card-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-author-text {
    font-size: 12px;
    color: var(--cb-text-muted);
}

.project-arrow-icon {
    color: var(--cb-text-muted);
    transition: transform 0.2s, color 0.2s;
}

.project-card:hover .project-arrow-icon {
    transform: translate(2px, -2px);
    color: var(--cb-accent);
}

/* Subpage html/body styling */
.subpage-html, .subpage-body {
    background-color: var(--cb-bg) !important;
    color: var(--cb-text) !important;
    font-family: var(--font-inter) !important;
}

.subpage-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 5rem;
}

.diahem-bg {
    background-color: var(--cb-bg) !important;
}
