/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --color-primary:       #1a73e8;
    --color-primary-dark:  #1557b0;
    --color-primary-light: #4a9ef8;
    --color-secondary:     #0d47a1;
    --color-accent:        #ff6d00;
    --color-text:          #1c1e21;
    --color-text-muted:    #6b7280;
    --color-bg:            #f8faff;
    --color-bg-white:      #ffffff;
    --color-border:        #e2e8f0;
    --color-border-light:  #f1f5f9;
    --color-success:       #16a34a;
    --color-error:         #dc2626;
    --color-warning:       #d97706;
    --color-unread:        #ef4444;
    --font-family:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm:4px; --radius-md:8px; --radius-lg:12px; --radius-xl:16px; --radius-full:9999px;
    --shadow-sm:0 1px 2px rgba(0,0,0,.06); --shadow-md:0 4px 12px rgba(0,0,0,.08);
    --shadow-lg:0 8px 24px rgba(0,0,0,.12); --shadow-xl:0 16px 40px rgba(0,0,0,.15);
    --transition:0.2s ease; --container-max:1280px; --navbar-height:72px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-family); color: var(--color-text); background: var(--color-bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width:100%; height:auto; display:block; }
a { color:var(--color-primary); text-decoration:none; transition:color var(--transition); }
a:hover { color:var(--color-primary-dark); }
ul, ol { list-style:none; }
button { cursor:pointer; font-family:inherit; }
input,textarea,select { font-family:inherit; }

.container { max-width:var(--container-max); margin:0 auto; padding:0 20px; }
.site-wrapper { min-height:100vh; display:flex; flex-direction:column; }
.site-content { flex:1; padding-top:calc(var(--navbar-height) + var(--wp-admin--admin-bar--height,0px)); }

/* NAVBAR */
.site-header { position:fixed; top:var(--wp-admin--admin-bar--height,0px); left:0; right:0; height:var(--navbar-height); background:var(--color-bg-white); border-bottom:1px solid var(--color-border); z-index:1000; box-shadow:var(--shadow-sm); }
.navbar { display:flex; align-items:center; height:100%; gap:20px; }
.navbar-brand { display:flex; align-items:center; gap:10px; font-size:1.25rem; font-weight:700; color:var(--color-primary); flex-shrink:0; }
.navbar-brand:hover { color:var(--color-primary-dark); }
.brand-icon { width:36px; height:36px; background:var(--color-primary); border-radius:var(--radius-md); display:flex; align-items:center; justify-content:center; color:#fff; font-size:18px; }
.navbar-search { flex:1; max-width:460px; position:relative; }
.navbar-search input { width:100%; padding:9px 16px 9px 40px; border:1.5px solid var(--color-border); border-radius:var(--radius-full); font-size:.875rem; background:var(--color-bg); transition:border-color var(--transition),box-shadow var(--transition); color:var(--color-text); }
.navbar-search input:focus { outline:none; border-color:var(--color-primary); box-shadow:0 0 0 3px rgba(26,115,232,.12); }
.navbar-search .search-icon { position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--color-text-muted); font-size:16px; pointer-events:none; }
.navbar-nav { display:flex; align-items:center; gap:2px; }
.navbar-nav a { padding:8px 14px; border-radius:var(--radius-md); font-size:.875rem; font-weight:500; color:var(--color-text); transition:background var(--transition),color var(--transition); }
.navbar-nav a:hover,.navbar-nav a.active { background:rgba(26,115,232,.08); color:var(--color-primary); }
.navbar-actions { display:flex; align-items:center; gap:6px; margin-left:auto; flex-shrink:0; }
.navbar-icon-btn { position:relative; width:40px; height:40px; border:none; background:transparent; border-radius:var(--radius-md); display:flex; align-items:center; justify-content:center; color:var(--color-text-muted); font-size:20px; transition:all var(--transition); text-decoration:none; }
.navbar-icon-btn:hover { background:var(--color-border-light); color:var(--color-primary); }
.navbar-badge { position:absolute; top:4px; right:4px; min-width:18px; height:18px; background:var(--color-unread); color:#fff; font-size:10px; font-weight:700; border-radius:var(--radius-full); display:flex; align-items:center; justify-content:center; padding:0 4px; border:2px solid #fff; }
.user-avatar { width:36px; height:36px; border-radius:var(--radius-full); background:var(--color-primary); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:600; font-size:.875rem; overflow:hidden; flex-shrink:0; }
.user-avatar img { width:100%; height:100%; object-fit:cover; }
.btn-login { padding:8px 18px; border:1.5px solid var(--color-primary); border-radius:var(--radius-md); color:var(--color-primary); font-size:.875rem; font-weight:500; transition:all var(--transition); background:transparent; }
.btn-login:hover { background:var(--color-primary); color:#fff; }
.btn-register { padding:8px 18px; background:var(--color-primary); border:1.5px solid var(--color-primary); border-radius:var(--radius-md); color:#fff; font-size:.875rem; font-weight:500; transition:all var(--transition); }
.btn-register:hover { background:var(--color-primary-dark); border-color:var(--color-primary-dark); color:#fff; }

/* BUTTONS */
.btn { display:inline-flex; align-items:center; gap:6px; padding:10px 20px; border-radius:var(--radius-md); font-size:.875rem; font-weight:500; border:none; cursor:pointer; transition:all var(--transition); text-decoration:none; line-height:1; white-space:nowrap; }
.btn-primary { background:var(--color-primary); color:#fff; }
.btn-primary:hover { background:var(--color-primary-dark); color:#fff; }
.btn-outline { background:transparent; border:1.5px solid var(--color-border); color:var(--color-text); }
.btn-outline:hover { border-color:var(--color-primary); color:var(--color-primary); }
.btn-ghost { background:transparent; color:var(--color-text-muted); border:none; }
.btn-ghost:hover { color:var(--color-primary); }
.btn-danger { background:var(--color-error); color:#fff; }
.btn-danger:hover { background:#b91c1c; color:#fff; }
.btn-success { background:var(--color-success); color:#fff; }
.btn-sm { padding:6px 14px; font-size:.75rem; }
.btn-lg { padding:14px 28px; font-size:1rem; }
.btn-block { width:100%; justify-content:center; }

/* FORMS */
.form-group { margin-bottom:20px; }
.form-label { display:block; font-size:.875rem; font-weight:500; margin-bottom:6px; }
.form-control { width:100%; padding:10px 14px; border:1.5px solid var(--color-border); border-radius:var(--radius-md); font-size:.875rem; color:var(--color-text); background:var(--color-bg-white); transition:border-color var(--transition),box-shadow var(--transition); }
.form-control:focus { outline:none; border-color:var(--color-primary); box-shadow:0 0 0 3px rgba(26,115,232,.1); }
.form-control::placeholder { color:var(--color-text-muted); }
.form-hint { font-size:.75rem; color:var(--color-text-muted); margin-top:4px; }
.form-error { font-size:.75rem; color:var(--color-error); margin-top:4px; }

/* CARDS */
.card { background:var(--color-bg-white); border-radius:var(--radius-lg); border:1px solid var(--color-border); overflow:hidden; }
.card-body { padding:20px; }
.card-header { padding:16px 20px; border-bottom:1px solid var(--color-border); }
.card-footer { padding:16px 20px; border-top:1px solid var(--color-border); background:var(--color-border-light); }

/* PROPERTY CARD */
.property-card { background:var(--color-bg-white); border-radius:var(--radius-lg); border:1px solid var(--color-border); overflow:hidden; display:flex; flex-direction:column; }
.property-card:hover { box-shadow:none; }
.property-card__image { position:relative; padding-top:62%; overflow:hidden; background:var(--color-border-light); flex-shrink:0; }
.property-card__image img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }

.property-card__image-placeholder { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:var(--color-border); font-size:48px; }
.property-card__badge { position:absolute; top:10px; left:10px; padding:4px 10px; border-radius:var(--radius-full); font-size:.75rem; font-weight:600; background:var(--color-primary); color:#fff; }
.property-card__badge--sale { background:var(--color-accent); }
.property-card__badge--new { background:var(--color-success); }
.property-card__fav { position:absolute; top:10px; right:10px; width:34px; height:34px; border-radius:var(--radius-full); background:rgba(255,255,255,.9); border:none; display:flex; align-items:center; justify-content:center; color:var(--color-text-muted); cursor:pointer; box-shadow:0 1px 4px rgba(0,0,0,.15); }
.property-card__fav:hover { color:var(--color-error); background:rgba(255,255,255,1); } .property-card__fav.active { color:var(--color-error); background:rgba(255,255,255,1); }
.property-card__body { padding:12px 14px 14px; flex:1; display:flex; flex-direction:column; gap:6px; }
.property-card__price { font-size:1.125rem; font-weight:700; color:var(--color-primary); margin-bottom:0; }
.property-card__title { font-size:.9375rem; font-weight:600; color:var(--color-text); margin-bottom:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.35; }
.property-card__meta { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:0; }
.property-card__meta-item { display:flex; align-items:center; gap:4px; font-size:.75rem; color:var(--color-text-muted); }
.property-card__location { display:flex; align-items:center; gap:4px; font-size:.75rem; color:var(--color-text-muted); margin-top:auto; }

/* GRID */
.properties-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:20px; }

/* SEARCH BAR */
.search-bar { background:var(--color-bg-white); border-radius:var(--radius-xl); padding:20px; box-shadow:var(--shadow-md); border:1px solid var(--color-border); }
.search-bar__tabs { display:flex; gap:4px; margin-bottom:16px; border-bottom:1px solid var(--color-border); padding-bottom:12px; }
.search-tab { padding:6px 16px; border-radius:var(--radius-full); border:none; background:transparent; font-size:.875rem; font-weight:500; color:var(--color-text-muted); cursor:pointer; transition:all var(--transition); }
.search-tab.active,.search-tab:hover { background:var(--color-primary); color:#fff; }
.search-bar__fields { display:grid; grid-template-columns:1fr 1fr 1fr auto; gap:12px; align-items:end; }
.filter-select { appearance:none; -webkit-appearance:none; padding:10px 36px 10px 14px; border:1.5px solid var(--color-border); border-radius:var(--radius-md); font-size:.875rem; color:var(--color-text); background:var(--color-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 12px center; cursor:pointer; transition:border-color var(--transition); width:100%; }
.filter-select:focus { outline:none; border-color:var(--color-primary); }

/* SIDEBAR FILTERS */
.sidebar-filters { background:var(--color-bg-white); border-radius:var(--radius-lg); border:1px solid var(--color-border); overflow:hidden; }
.sidebar-filters__header { padding:16px 20px; border-bottom:1px solid var(--color-border); display:flex; align-items:center; justify-content:space-between; }
.sidebar-filters__header h3 { font-size:1rem; font-weight:600; }
.sidebar-filters__body { padding:20px; }
.filter-section { margin-bottom:20px; }
.filter-section:last-child { margin-bottom:0; }
.filter-section__title { font-size:.875rem; font-weight:600; margin-bottom:10px; }
.price-range { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.checkbox-list { display:flex; flex-direction:column; gap:8px; }
.checkbox-item { display:flex; align-items:center; gap:10px; cursor:pointer; }
.checkbox-item input[type="checkbox"] { width:16px; height:16px; accent-color:var(--color-primary); cursor:pointer; }
.checkbox-item label { font-size:.875rem; cursor:pointer; flex:1; display:flex; align-items:center; justify-content:space-between; }
.checkbox-count { font-size:.75rem; color:var(--color-text-muted); background:var(--color-border-light); padding:2px 6px; border-radius:var(--radius-full); }

/* LAYOUT */
.page-layout { display:grid; grid-template-columns:280px 1fr; gap:24px; padding:24px 0; }
.page-layout__sidebar { position:sticky; top:calc(var(--navbar-height) + 20px); align-self:start; }

/* SINGLE PROPERTY */
.property-single { background:var(--color-bg-white); border-radius:var(--radius-xl); border:1px solid var(--color-border); overflow:hidden; }
.property-gallery { position:relative; background:#000; }
.property-gallery__main { width:100%; max-height:500px; object-fit:cover; }
.property-gallery__thumbs { display:flex; gap:8px; padding:12px; overflow-x:auto; background:#111; }
.property-gallery__thumb { width:80px; height:60px; object-fit:cover; border-radius:var(--radius-sm); cursor:pointer; opacity:.7; transition:opacity var(--transition); flex-shrink:0; }
.property-gallery__thumb:hover,.property-gallery__thumb.active { opacity:1; }
.property-info { padding:28px; }
.property-info__price { font-size:1.875rem; font-weight:700; color:var(--color-primary); margin-bottom:8px; }
.property-info__title { font-size:1.5rem; font-weight:700; margin-bottom:12px; }
.property-info__location { display:flex; align-items:center; gap:6px; color:var(--color-text-muted); font-size:.875rem; }
.property-params { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:12px; padding:20px; background:var(--color-bg); border-top:1px solid var(--color-border); border-bottom:1px solid var(--color-border); margin-bottom:24px; }
.property-param { text-align:center; padding:12px; background:var(--color-bg-white); border-radius:var(--radius-md); border:1px solid var(--color-border); }
.property-param__value { font-size:1.25rem; font-weight:700; }
.property-param__label { font-size:.75rem; color:var(--color-text-muted); margin-top:2px; }
.contact-card { background:var(--color-bg-white); border:1px solid var(--color-border); border-radius:var(--radius-xl); padding:24px; position:sticky; top:calc(var(--navbar-height) + 20px); }
.contact-card__seller { display:flex; align-items:center; gap:14px; padding-bottom:20px; margin-bottom:20px; border-bottom:1px solid var(--color-border); }
.contact-card__seller-info h4 { font-weight:600; margin-bottom:2px; }
.contact-card__seller-info span { font-size:.75rem; color:var(--color-text-muted); }
.contact-card__phone { font-size:1.25rem; font-weight:700; display:flex; align-items:center; gap:8px; margin-bottom:16px; color:var(--color-text); }

/* OFFERS TABS */
.offers-tabs { display:flex; gap:4px; margin-bottom:20px; flex-wrap:wrap; }
.offer-tab { padding:8px 18px; border-radius:var(--radius-full); border:1.5px solid var(--color-border); background:transparent; font-size:.875rem; font-weight:500; color:var(--color-text-muted); cursor:pointer; transition:all var(--transition); }
.offer-tab.active,.offer-tab:hover { border-color:var(--color-primary); background:var(--color-primary); color:#fff; }
.offers-table { width:100%; border-collapse:collapse; }
.offers-table th { padding:10px 14px; text-align:left; font-size:.75rem; font-weight:600; color:var(--color-text-muted); background:var(--color-bg); border-bottom:1px solid var(--color-border); text-transform:uppercase; letter-spacing:.5px; }
.offers-table td { padding:12px 14px; font-size:.875rem; border-bottom:1px solid var(--color-border-light); }
.offers-table tr:hover td { background:rgba(26,115,232,.03); }

/* INBOX / MESSAGES */
.inbox-layout { display:grid; grid-template-columns:320px 1fr; height:calc(100vh - var(--navbar-height) - 48px); background:var(--color-bg-white); border:1px solid var(--color-border); border-radius:var(--radius-xl); overflow:hidden; }
.conversations-list { border-right:1px solid var(--color-border); overflow-y:auto; }
.conversations-list__header { padding:20px; border-bottom:1px solid var(--color-border); position:sticky; top:0; background:var(--color-bg-white); z-index:1; }
.conversation-item { display:flex; align-items:center; gap:12px; padding:14px 20px; cursor:pointer; transition:background var(--transition); border-bottom:1px solid var(--color-border-light); }
.conversation-item:hover,.conversation-item.active { background:rgba(26,115,232,.06); }
.conversation-info { flex:1; min-width:0; }
.conversation-info__name { font-size:.875rem; font-weight:500; margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conversation-item.unread .conversation-info__name { font-weight:700; }
.conversation-info__preview { font-size:.75rem; color:var(--color-text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conversation-info__meta { display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex-shrink:0; }
.conversation-info__time { font-size:.75rem; color:var(--color-text-muted); }
.conversation-info__unread { width:20px; height:20px; background:var(--color-primary); border-radius:var(--radius-full); font-size:.75rem; color:#fff; font-weight:600; display:flex; align-items:center; justify-content:center; }
.chat-area { display:flex; flex-direction:column; }
.chat-header { padding:16px 24px; border-bottom:1px solid var(--color-border); display:flex; align-items:center; gap:14px; }
.chat-header__property { flex:1; min-width:0; }
.chat-header__property h3 { font-size:.875rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-messages { flex:1; overflow-y:auto; padding:24px; display:flex; flex-direction:column; gap:16px; }
.message { display:flex; gap:10px; max-width:70%; }
.message--out { align-self:flex-end; flex-direction:row-reverse; }
.message__bubble { padding:10px 14px; border-radius:var(--radius-lg); font-size:.875rem; line-height:1.5; background:var(--color-bg); border:1px solid var(--color-border); }
.message--out .message__bubble { background:var(--color-primary); color:#fff; border-color:var(--color-primary); }
.message__time { font-size:.75rem; color:var(--color-text-muted); align-self:flex-end; }
.discount-request { background:linear-gradient(135deg,rgba(255,109,0,.08),rgba(255,109,0,.04)); border:1px solid rgba(255,109,0,.2); border-radius:var(--radius-lg); padding:14px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.discount-request__title { font-size:.875rem; font-weight:600; color:var(--color-accent); margin-bottom:2px; }
.discount-request__text { font-size:.75rem; color:var(--color-text-muted); }
.discount-request__actions { display:flex; gap:8px; }
.chat-input-area { padding:16px 24px; border-top:1px solid var(--color-border); background:var(--color-bg-white); }
.chat-input-row { display:flex; gap:10px; align-items:flex-end; }
.chat-input { flex:1; padding:10px 14px; border:1.5px solid var(--color-border); border-radius:var(--radius-lg); font-size:.875rem; resize:none; max-height:120px; min-height:42px; font-family:inherit; color:var(--color-text); background:var(--color-bg); transition:border-color var(--transition); }
.chat-input:focus { outline:none; border-color:var(--color-primary); }

/* NOTIFICATIONS */
.notifications-dropdown { position:absolute; top:calc(100% + 8px); right:0; width:360px; background:var(--color-bg-white); border:1px solid var(--color-border); border-radius:var(--radius-xl); box-shadow:var(--shadow-xl); z-index:1001; overflow:hidden; }
.notifications-header { padding:16px 20px; border-bottom:1px solid var(--color-border); display:flex; align-items:center; justify-content:space-between; }
.notifications-list { max-height:400px; overflow-y:auto; }
.notification-item { padding:14px 20px; display:flex; gap:12px; border-bottom:1px solid var(--color-border-light); cursor:pointer; transition:background var(--transition); }
.notification-item:hover { background:var(--color-bg); }
.notification-item.unread { background:rgba(26,115,232,.04); }
.notification-item__icon { width:38px; height:38px; border-radius:var(--radius-full); display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
.notification-item__icon--message { background:rgba(26,115,232,.1); color:var(--color-primary); }
.notification-item__icon--discount { background:rgba(255,109,0,.1); color:var(--color-accent); }
.notification-item__icon--view { background:rgba(22,163,74,.1); color:var(--color-success); }
.notification-item__body { flex:1; min-width:0; }
.notification-item__text { font-size:.875rem; margin-bottom:2px; }
.notification-item__time { font-size:.75rem; color:var(--color-text-muted); }
.notification-item__dot { width:8px; height:8px; border-radius:var(--radius-full); background:var(--color-primary); flex-shrink:0; margin-top:6px; }

/* DASHBOARD */
.dashboard-layout { display:grid; grid-template-columns:240px 1fr; gap:24px; padding:24px 0; }
.dashboard-sidebar { background:var(--color-bg-white); border:1px solid var(--color-border); border-radius:var(--radius-xl); overflow:hidden; align-self:start; position:sticky; top:calc(var(--navbar-height) + 20px); }
.dashboard-sidebar__user { padding:24px; text-align:center; border-bottom:1px solid var(--color-border); }
.dashboard-sidebar__avatar { width:72px; height:72px; border-radius:var(--radius-full); background:var(--color-primary); color:#fff; font-size:1.5rem; font-weight:700; display:flex; align-items:center; justify-content:center; margin:0 auto 12px; overflow:hidden; }
.dashboard-sidebar__avatar img { width:100%; height:100%; object-fit:cover; }
.dashboard-sidebar__name { font-weight:600; margin-bottom:4px; }
.dashboard-sidebar__role { font-size:.75rem; color:var(--color-primary); background:rgba(26,115,232,.1); padding:2px 10px; border-radius:var(--radius-full); display:inline-block; }
.dashboard-nav { padding:8px; }
.dashboard-nav__item { display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:var(--radius-md); color:var(--color-text); font-size:.875rem; font-weight:500; transition:all var(--transition); position:relative; text-decoration:none; }
.dashboard-nav__item:hover,.dashboard-nav__item.active { background:rgba(26,115,232,.08); color:var(--color-primary); }
.dashboard-nav__badge { margin-left:auto; background:var(--color-primary); color:#fff; font-size:.75rem; font-weight:600; padding:1px 6px; border-radius:var(--radius-full); min-width:20px; text-align:center; }
.stat-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:16px; margin-bottom:24px; }
.stat-card { background:var(--color-bg-white); border:1px solid var(--color-border); border-radius:var(--radius-lg); padding:20px; text-align:center; }
.stat-card__value { font-size:1.875rem; font-weight:700; color:var(--color-primary); }
.stat-card__label { font-size:.75rem; color:var(--color-text-muted); margin-top:4px; }

/* TABS */
.tabs { border-bottom:1px solid var(--color-border); margin-bottom:24px; display:flex; }
.tab-link { padding:12px 20px; font-size:.875rem; font-weight:500; color:var(--color-text-muted); border-bottom:2px solid transparent; cursor:pointer; transition:all var(--transition); background:none; border-top:none; border-left:none; border-right:none; text-decoration:none; display:inline-block; }
.tab-link:hover { color:var(--color-primary); }
.tab-link.active { color:var(--color-primary); border-bottom-color:var(--color-primary); }

/* BREADCRUMBS */
.breadcrumbs { display:flex; align-items:center; gap:6px; font-size:.875rem; color:var(--color-text-muted); padding:16px 0; flex-wrap:wrap; }
.breadcrumbs a { color:var(--color-text-muted); }
.breadcrumbs a:hover { color:var(--color-primary); }
.breadcrumbs__sep { color:var(--color-border); }

/* ALERTS */
.alert { padding:12px 16px; border-radius:var(--radius-md); font-size:.875rem; display:flex; align-items:flex-start; gap:10px; margin-bottom:16px; }
.alert--success { background:rgba(22,163,74,.08); border:1px solid rgba(22,163,74,.2); color:#166534; }
.alert--error { background:rgba(220,38,38,.08); border:1px solid rgba(220,38,38,.2); color:#991b1b; }
.alert--info { background:rgba(26,115,232,.08); border:1px solid rgba(26,115,232,.2); color:#1d4ed8; }
.alert--warning { background:rgba(217,119,6,.08); border:1px solid rgba(217,119,6,.2); color:#92400e; }

/* PAGINATION */
.pagination { display:flex; align-items:center; justify-content:center; gap:6px; padding:24px 0; }
.pagination a,.pagination span { width:38px; height:38px; display:flex; align-items:center; justify-content:center; border-radius:var(--radius-md); font-size:.875rem; font-weight:500; border:1.5px solid var(--color-border); color:var(--color-text); text-decoration:none; transition:all var(--transition); }
.pagination a:hover { border-color:var(--color-primary); color:var(--color-primary); }
.pagination .current { background:var(--color-primary); color:#fff; border-color:var(--color-primary); }

/* MODAL */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.5); backdrop-filter:blur(4px); z-index:2000; display:flex; align-items:center; justify-content:center; padding:20px; }
.modal { background:var(--color-bg-white); border-radius:var(--radius-xl); box-shadow:var(--shadow-xl); width:100%; max-width:480px; overflow:hidden; animation:modalIn .2s ease; }
@keyframes modalIn { from{opacity:0;transform:scale(.95) translateY(-10px)} to{opacity:1;transform:scale(1) translateY(0)} }
.modal__header { padding:20px 24px; border-bottom:1px solid var(--color-border); display:flex; align-items:center; justify-content:space-between; }
.modal__header h3 { font-size:1.125rem; font-weight:600; }
.modal__close { width:32px; height:32px; border:none; background:transparent; border-radius:var(--radius-md); color:var(--color-text-muted); font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all var(--transition); }
.modal__close:hover { background:var(--color-border-light); }
.modal__body { padding:24px; }
.modal__footer { padding:16px 24px; border-top:1px solid var(--color-border); display:flex; gap:12px; justify-content:flex-end; }

/* TAGS */
.tag { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:var(--radius-full); font-size:.75rem; font-weight:500; background:var(--color-border-light); color:var(--color-text-muted); }
.tag--primary { background:rgba(26,115,232,.1); color:var(--color-primary); }
.tag--success { background:rgba(22,163,74,.1); color:var(--color-success); }
.tag--warning { background:rgba(217,119,6,.1); color:var(--color-warning); }

/* FOOTER */
.site-footer { background:#1c1e21; color:#9ca3af; padding:48px 0 24px; margin-top:60px; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:40px; margin-bottom:40px; }
.footer-brand { color:#fff; font-size:1.25rem; font-weight:700; margin-bottom:12px; display:block; }
.footer-desc { font-size:.875rem; line-height:1.7; }
.footer-col h4 { color:#fff; font-size:.875rem; font-weight:600; margin-bottom:14px; }
.footer-links { display:flex; flex-direction:column; gap:8px; }
.footer-links a { font-size:.875rem; color:#9ca3af; transition:color var(--transition); }
.footer-links a:hover { color:#fff; }
.footer-bottom { border-top:1px solid #374151; padding-top:24px; display:flex; align-items:center; justify-content:space-between; font-size:.875rem; }

/* HERO */
.hero { background:linear-gradient(135deg,#0d47a1 0%,#1a73e8 50%,#4a9ef8 100%); color:#fff; padding:80px 0; text-align:center; }
.hero__title { font-size:2.5rem; font-weight:800; margin-bottom:16px; line-height:1.2; }
.hero__subtitle { font-size:1.125rem; opacity:.85; margin-bottom:40px; }

/* UTILS */
.section-title { font-size:1.5rem; font-weight:700; margin-bottom:24px; }
.empty-state { text-align:center; padding:60px 20px; color:var(--color-text-muted); }
.empty-state__icon { font-size:64px; margin-bottom:16px; opacity:.4; }
.empty-state__title { font-size:1.25rem; font-weight:600; color:var(--color-text); margin-bottom:8px; }
.text-muted { color:var(--color-text-muted); }
.text-primary { color:var(--color-primary); }
.d-flex { display:flex; } .align-center { align-items:center; } .justify-between { justify-content:space-between; }
.gap-8 { gap:8px; } .gap-12 { gap:12px; } .gap-16 { gap:16px; }
.mt-16 { margin-top:16px; } .mt-24 { margin-top:24px; } .mb-16 { margin-bottom:16px; } .mb-24 { margin-bottom:24px; }
.fw-600 { font-weight:600; } .fw-700 { font-weight:700; }

/* RESPONSIVE */
@media(max-width:1024px){
    .page-layout,.dashboard-layout { grid-template-columns:1fr; }
    .page-layout__sidebar { position:static; }
    .footer-grid { grid-template-columns:1fr 1fr; }
}
@media(max-width:768px){
    :root { --navbar-height:56px; }
    .navbar-search,.navbar-nav { display:none; }
    .hero__title { font-size:1.875rem; }
    .properties-grid { grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); }
    .inbox-layout { grid-template-columns:1fr; }
    .conversations-list { display:none; }
    .footer-grid { grid-template-columns:1fr; }
    .search-bar__fields { grid-template-columns:1fr 1fr; }
    .contact-card { position:static; }
    .property-params { grid-template-columns:repeat(2,1fr); }
    .stat-cards { grid-template-columns:repeat(2,1fr); }

    /* Навбар на мобиле */
    .navbar { gap:8px; }
    .navbar-brand__text { display:none; }
    .navbar-brand { gap:0; }
    .brand-icon { width:34px; height:34px; font-size:16px; }

    /* Кнопки авторизации — компактнее */
    .btn-login  { padding:7px 12px; font-size:.8125rem; }
    .btn-register { padding:7px 12px; font-size:.8125rem; }

    /* Иконки в navbar-actions */
    .navbar-actions { gap:4px; }
    .navbar-icon-btn { width:36px; height:36px; }

    /* Кнопка + Разместить */
    .navbar-post-btn .btn-label { display:none; }
    .navbar-post-btn { padding:7px 10px; min-width:36px; justify-content:center; }
}
@media(max-width:480px){
    .container { padding:0 12px; }
    .properties-grid { grid-template-columns:1fr; }
    .search-bar__fields { grid-template-columns:1fr; }
}

/* ERROR 404 */
.error-page { min-height:calc(100vh - var(--navbar-height) - 200px); display:flex; align-items:center; justify-content:center; padding:60px 20px; }
.error-page-inner { text-align:center; max-width:640px; width:100%; }
.error-code { font-size:8rem; font-weight:900; color:var(--color-primary); opacity:.15; line-height:1; margin-bottom:-20px; }
.error-title { font-size:2rem; font-weight:700; margin-bottom:12px; }
.error-description { color:var(--color-text-muted); margin-bottom:32px; font-size:1.0625rem; }
.error-search { margin-bottom:28px; }
.error-search .search-group { display:flex; gap:8px; max-width:440px; margin:0 auto; }
.error-search .search-input { flex:1; padding:10px 16px; border:2px solid var(--color-border); border-radius:var(--radius); font-size:.9375rem; outline:none; }
.error-search .search-input:focus { border-color:var(--color-primary); }
.error-actions { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-bottom:48px; }
.error-recent h2 { font-size:1.25rem; font-weight:700; margin-bottom:20px; }
.properties-grid--small { grid-template-columns:repeat(3,1fr); }
@media(max-width:600px){ .properties-grid--small { grid-template-columns:1fr; } .error-code { font-size:5rem; } }

/* SEARCH RESULTS HEADER */
.search-results-header { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.search-title { font-size:1.375rem; font-weight:700; flex:1; min-width:200px; }
.results-count { color:var(--color-text-muted); font-size:.875rem; white-space:nowrap; }

/* NO RESULTS */
.no-results { text-align:center; padding:80px 20px; }
.no-results-icon { font-size:64px; margin-bottom:20px; }
.no-results h2 { font-size:1.5rem; font-weight:700; margin-bottom:12px; }
.no-results p { color:var(--color-text-muted); margin-bottom:28px; }

/* FORM INPUT (universal) */
.form-input { width:100%; padding:9px 13px; border:1.5px solid var(--color-border); border-radius:var(--radius-md); font-size:.875rem; color:var(--color-text); background:var(--color-bg-white); transition:border-color var(--transition); box-sizing:border-box; }
.form-input:focus { outline:none; border-color:var(--color-primary); box-shadow:0 0 0 3px rgba(26,115,232,.1); }
select.form-input { appearance:none; -webkit-appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; padding-right:34px; cursor:pointer; }

/* PAGE WRAP — wrapper with top padding for fixed navbar */
.page-wrap { padding-top:var(--navbar-height); }

/* PROPERTY CARD footer fix */
.property-card__footer { padding:12px 16px; border-top:1px solid var(--color-border-light); display:flex; justify-content:flex-end; }

/* ================================================================
   AUTH PAGES — login / register / forgot password
================================================================ */

.auth-page {
    min-height: calc(100vh - var(--navbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%);
}

.auth-card {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 40px 40px 36px;
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--color-border-light);
}

.auth-card--wide { max-width: 620px; }

/* Logo */
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo a {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 1.125rem; font-weight: 700; color: var(--color-primary);
    text-decoration: none;
}
.auth-logo .brand-icon {
    width: 40px; height: 40px; border-radius: var(--radius-md);
    background: var(--color-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}

/* Heading */
.auth-title {
    font-size: 1.5rem; font-weight: 800; text-align: center;
    color: var(--color-text); margin-bottom: 6px;
}
.auth-subtitle {
    text-align: center; font-size: .875rem;
    color: var(--color-text-muted); margin-bottom: 24px;
}
.auth-subtitle a { font-weight: 600; }

/* Alerts */
.auth-alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-radius: var(--radius-md);
    font-size: .875rem; line-height: 1.5; margin-bottom: 20px;
}
.auth-alert--error  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert--success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.auth-alert svg { flex-shrink: 0; margin-top: 1px; }

/* Form layout */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Field */
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
    font-size: .8125rem; font-weight: 600; color: var(--color-text);
    display: flex; align-items: center; justify-content: space-between;
}
.auth-required { color: var(--color-error); margin-left: 2px; }
.auth-label-link { font-size: .75rem; font-weight: 500; color: var(--color-primary); }

/* Input wrap */
.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-icon {
    position: absolute; left: 12px; color: var(--color-text-muted);
    display: flex; align-items: center; pointer-events: none; z-index: 1;
}
.auth-input {
    width: 100%; padding: 10px 14px 10px 38px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: .9375rem; color: var(--color-text);
    background: #fff; transition: border-color var(--transition), box-shadow var(--transition);
    box-sizing: border-box;
}
.auth-input:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,.1);
}
.auth-input--error { border-color: var(--color-error) !important; }
.auth-input--ok    { border-color: var(--color-success) !important; }

/* Toggle password button */
.auth-toggle-pwd {
    position: absolute; right: 10px;
    background: none; border: none; padding: 4px;
    color: var(--color-text-muted); cursor: pointer;
    display: flex; align-items: center;
    transition: color var(--transition);
}
.auth-toggle-pwd:hover { color: var(--color-primary); }

/* Phone input — wider right padding (no toggle btn) */
.auth-input--phone { padding-right: 14px; }

/* Hints */
.auth-field-hint { font-size: .75rem; color: var(--color-text-muted); margin-top: 2px; }
.auth-field-hint--ok    { color: var(--color-success); }
.auth-field-hint--error { color: var(--color-error); }
.auth-match-hint { font-size: .75rem; margin-top: 2px; }

/* Password strength bar */
.auth-password-strength { margin-top: 4px; }
.sbar { height: 4px; background: var(--color-border-light); border-radius: 2px; margin-bottom: 4px; overflow: hidden; }
.sbar-fill { height: 100%; border-radius: 2px; transition: width .3s ease, background .3s ease; }

/* Checkbox */
.auth-checkbox {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: .8125rem; color: var(--color-text); cursor: pointer; line-height: 1.5;
    user-select: none;
}
.auth-checkbox input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-checkbox-box {
    flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px;
    border: 2px solid var(--color-border); border-radius: 4px;
    background: #fff; transition: all var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.auth-checkbox input:checked ~ .auth-checkbox-box {
    background: var(--color-primary); border-color: var(--color-primary);
}
.auth-checkbox input:checked ~ .auth-checkbox-box::after {
    content: ''; display: block;
    width: 4px; height: 8px;
    border: 2px solid #fff; border-top: none; border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}

/* Submit */
.auth-submit { margin-top: 4px; padding: 12px; font-size: 1rem; font-weight: 600; }

/* Divider */
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0; color: var(--color-text-muted); font-size: .8125rem;
}
.auth-divider::before,.auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--color-border-light);
}

/* Footer links / back link */
.auth-footer-links { display: flex; flex-direction: column; gap: 8px; }
.auth-back { text-align: center; margin-top: 24px; font-size: .875rem; }
.auth-back a { display: inline-flex; align-items: center; gap: 4px; color: var(--color-text-muted); }
.auth-back a:hover { color: var(--color-primary); }

/* Responsive */
@media (max-width: 500px) {
    .auth-card { padding: 28px 20px 24px; }
    .auth-row  { grid-template-columns: 1fr; gap: 18px; }
}

/* MESSAGES PAGE — aliases & missing pieces */
.conversations-list { overflow-y:auto; border-right:1px solid var(--color-border); }
.conversation-item { text-decoration:none; color:inherit; }
.conversation-item.active { background:rgba(26,115,232,.08); border-left:3px solid var(--color-primary); }
.conversation-item.unread .conversation-name { font-weight:700; }
.conversation-avatar { position:relative; width:44px; height:44px; border-radius:var(--radius-full); background:var(--color-primary); color:#fff; font-weight:700; font-size:1rem; display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden; }
.conversation-avatar img { width:100%;height:100%;object-fit:cover; }
.conversation-dot { position:absolute; top:0; right:0; width:10px; height:10px; background:var(--color-unread,#ef4444); border-radius:var(--radius-full); border:2px solid #fff; }
.conversation-info { flex:1; min-width:0; }
.conversation-name { font-size:.875rem; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conversation-post { font-size:.75rem; color:var(--color-text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }
.conversation-preview { font-size:.75rem; color:var(--color-text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
.conversation-time { font-size:.7rem; color:var(--color-text-muted); white-space:nowrap; flex-shrink:0; align-self:flex-start; padding-top:2px; }

/* Chat header */
.chat-header__avatar { width:40px; height:40px; border-radius:var(--radius-full); background:var(--color-primary); color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden; }
.chat-header__avatar img { width:100%;height:100%;object-fit:cover; }
.chat-header__name { font-size:.9375rem; font-weight:600; }
.chat-header__sub { font-size:.75rem; color:var(--color-text-muted); }
.chat-header__sub a { color:var(--color-primary); }

/* Chat messages */
.chat-message { display:flex; flex-direction:column; }
.chat-message--out { align-items:flex-end; }
.chat-message--in  { align-items:flex-start; }
.chat-message__author { font-size:.72rem; color:var(--color-text-muted); margin-bottom:3px; padding-left:4px; }
.chat-bubble { max-width:72%; padding:10px 14px; border-radius:var(--radius-lg); font-size:.9rem; line-height:1.55; position:relative; }
.chat-message--out .chat-bubble { background:var(--color-primary); color:#fff; border-bottom-right-radius:4px; }
.chat-message--in  .chat-bubble { background:var(--color-border-light,#f3f4f6); color:var(--color-text); border-bottom-left-radius:4px; }
.chat-bubble__time { font-size:.65rem; opacity:.65; margin-top:4px; text-align:right; }

/* Chat input */
.chat-input-area { padding:14px 20px; border-top:1px solid var(--color-border); display:flex; gap:10px; align-items:flex-end; background:#fff; }
.chat-textarea { flex:1; padding:10px 14px; border:1.5px solid var(--color-border); border-radius:var(--radius-lg); font-size:.9rem; resize:none; min-height:44px; max-height:120px; font-family:inherit; color:var(--color-text); transition:border-color var(--transition); }
.chat-textarea:focus { outline:none; border-color:var(--color-primary); }

/* NAVBAR — внутренние отступы и выравнивание */
.navbar { padding:0 4px; } /* небольшой горизонтальный отступ внутри */
.navbar-brand { padding:4px 0; }
.navbar-actions { display:flex; align-items:center; gap:8px; padding:4px 0; }

/* Когда WP admin bar показан — хедер смещается корректно */
.admin-bar .site-header { top:32px; }
@media screen and (max-width:782px) {
    .admin-bar .site-header { top:46px; }
}
.admin-bar .site-content { padding-top:calc(var(--navbar-height) + 32px); }
@media screen and (max-width:782px) {
    .admin-bar .site-content { padding-top:calc(var(--navbar-height) + 46px); }
}

/* Sticky sidebar корректировка при admin bar */
.admin-bar .page-layout__sidebar { top:calc(var(--navbar-height) + 32px + 20px); }
.admin-bar .contact-card         { top:calc(var(--navbar-height) + 32px + 20px); }

/* DASHBOARD — улучшения */
.dashboard-layout { display:grid; grid-template-columns:260px 1fr; gap:24px; padding:0; }
@media(max-width:900px) { .dashboard-layout { grid-template-columns:1fr; } }

/* SINGLE OFFER — gallery thumbs */
.gallery-thumb { opacity:.85; }
.gallery-thumb:hover { opacity:1; }
.gallery-thumb--active { border-color:var(--color-primary) !important; opacity:1; }

/* SINGLE PROPERTY LAYOUT — main слева широкий, сайдбар справа узкий */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
    padding: 24px 0;
}
.single-layout__sidebar {
    position: sticky;
    top: calc(var(--navbar-height) + 20px);
    align-self: start;
}
.admin-bar .single-layout__sidebar {
    top: calc(var(--navbar-height) + 32px + 20px);
}
@media (max-width: 1024px) {
    .single-layout {
        grid-template-columns: 1fr;
    }
    .single-layout__sidebar {
        position: static;
        order: -1; /* сайдбар вверх на мобиле */
    }
}

/* Совместимость — старый inline grid на single estate object */
.property-single-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    padding-bottom: 40px;
    align-items: start;
}
@media (max-width: 1024px) {
    .property-single-layout { grid-template-columns: 1fr; }
}

/* PROPERTY CARD — дополнительные классы */
.property-card__type { font-size:.72rem; font-weight:600; color:var(--color-primary); text-transform:uppercase; letter-spacing:.04em; }
.property-card__params { display:flex; flex-wrap:wrap; gap:8px; }
.property-card__param { display:flex; align-items:center; gap:4px; font-size:.75rem; color:var(--color-text-muted); background:var(--color-border-light); padding:3px 8px; border-radius:var(--radius-sm); }
.property-card__param-icon { display:flex; align-items:center; color:var(--color-text-muted); }



.property-card__gradient { display:none; }
.property-card__price-overlay { display:none; }
.property-card__price-main { display:none; }
.property-card__price-sqm { display:none; }
.property-card__img-link { display:block; height:100%; }
