:root {
  --primary: #1a3a5c;
  --primary-light: #234d7a;
  --primary-dark: #112644;
  --gold: #c8a84b;
  --gold-light: #e0c06b;
  --accent-green: #27ae60;
  --accent-red: #e74c3c;
  --accent-orange: #e67e22;
  --accent-blue: #2980b9;
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface2: #f7f9fc;
  --border: #dde3ee;
  --text: #1a2738;
  --text-secondary: #6b7a8d;
  --text-light: #a0abbe;
  --shadow: 0 2px 12px rgba(26,58,92,0.08);
  --shadow-md: 0 4px 24px rgba(26,58,92,0.13);
  --shadow-lg: 0 8px 40px rgba(26,58,92,0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --sidebar-w: 260px;
  --header-h: 64px;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html,body{height:100%;font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);font-size:15px;}
a{text-decoration:none;color:inherit;}
button{cursor:pointer;border:none;outline:none;font-family:'Inter',sans-serif;}
input,textarea,select{font-family:'Inter',sans-serif;outline:none;}
img{max-width:100%;display:block;}
#app{min-height:100vh;}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar{width:6px;height:6px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px;}
::-webkit-scrollbar-thumb:hover{background:var(--text-light);}

/* ===== LAYOUT ===== */
.app-layout{display:flex;min-height:100vh;background:var(--bg);}
.sidebar{width:var(--sidebar-w);background:linear-gradient(180deg,var(--primary-dark) 0%,var(--primary) 100%);display:flex;flex-direction:column;position:fixed;top:0;left:0;height:100vh;z-index:1000;transition:transform 0.3s ease;overflow-y:auto;box-shadow:4px 0 24px rgba(0,0,0,0.1);}
.sidebar-logo{padding:24px 20px;border-bottom:1px solid rgba(255,255,255,0.08);display:flex;align-items:center;gap:14px;background:rgba(0,0,0,0.2);}
.sidebar-logo-text{color:#fff;font-size:22px;font-weight:800;letter-spacing:-0.5px;line-height:1.1;}
.sidebar-logo-text span{color:var(--gold);display:block;font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;margin-top:2px;}
.sidebar-nav{flex:1;padding:16px 0;overflow-y:auto;}
.nav-group{margin-bottom:8px;}
.nav-group-label{color:rgba(255,255,255,0.35);font-size:10px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;padding:12px 20px 6px;display:flex;align-items:center;gap:8px;}
.nav-group-label::before{content:'';width:12px;height:1px;background:rgba(255,255,255,0.3);}
.nav-item{display:flex;align-items:center;gap:12px;padding:12px 20px;color:rgba(255,255,255,0.75);font-size:14px;font-weight:500;cursor:pointer;transition:all 0.2s;border-left:3px solid transparent;position:relative;}
.nav-item:hover{color:#fff;background:rgba(255,255,255,0.06);border-left-color:rgba(255,255,255,0.2);}
.nav-item.active{color:#fff;background:linear-gradient(90deg,rgba(200,168,75,0.15),transparent);border-left-color:var(--gold);}
.nav-item svg{width:19px;height:19px;flex-shrink:0;opacity:0.9;}
.nav-item.active svg{opacity:1;}
.nav-badge{background:var(--gold);color:var(--primary);font-size:10px;font-weight:700;padding:2px 7px;border-radius:20px;margin-left:auto;}
.sidebar-bottom{padding:16px 20px 20px;border-top:1px solid rgba(255,255,255,0.08);background:rgba(0,0,0,0.15);}
.sidebar-user{display:flex;align-items:center;gap:12px;padding:12px;border-radius:var(--radius-sm);cursor:pointer;transition:all 0.2s;background:rgba(255,255,255,0.05);}
.sidebar-user:hover{background:rgba(255,255,255,0.1);}
.sidebar-user-avatar{width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,var(--gold),var(--gold-light));display:flex;align-items:center;justify-content:center;color:var(--primary);font-weight:700;font-size:16px;flex-shrink:0;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,0.2);}
.sidebar-user-avatar img{width:100%;height:100%;object-fit:cover;}
.sidebar-user-info{flex:1;min-width:0;}
.sidebar-user-name{color:#fff;font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sidebar-user-role{color:rgba(255,255,255,0.5);font-size:11px;margin-top:2px;}
.main-content{margin-left:var(--sidebar-w);flex:1;display:flex;flex-direction:column;min-height:100vh;transition:margin-left 0.3s ease;}
.topbar{height:var(--header-h);background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:90;box-shadow:0 1px 8px rgba(0,0,0,0.04);}
.topbar-left{display:flex;align-items:center;gap:16px;flex:1;}
.topbar-title{font-size:19px;font-weight:700;color:var(--text);letter-spacing:-0.3px;}
.topbar-breadcrumb{font-size:12px;color:var(--text-secondary);margin-top:2px;font-weight:500;text-transform:capitalize;}
.topbar-right{display:flex;align-items:center;gap:10px;}
.topbar-btn{width:42px;height:42px;border-radius:var(--radius-sm);background:var(--bg);display:flex;align-items:center;justify-content:center;color:var(--text-secondary);cursor:pointer;transition:all 0.2s;position:relative;border:none;}
.topbar-btn:hover{background:#f0f4ff;color:var(--primary);box-shadow:0 2px 8px rgba(26,58,92,0.15);}
.topbar-btn .badge{position:absolute;top:6px;right:6px;width:8px;height:8px;background:var(--accent-red);border-radius:50%;border:2px solid var(--surface);}
.page-content{padding:28px;flex:1;background:var(--bg);min-height:calc(100vh - var(--header-h));}

/* ===== CARDS ===== */
.card{background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow);border:1px solid var(--border);}
.card-header{padding:20px 24px 0;display:flex;align-items:center;justify-content:space-between;}
.card-title{font-size:16px;font-weight:700;color:var(--text);}
.card-body{padding:20px 24px;}
.card-footer{padding:0 24px 20px;display:flex;align-items:center;gap:12px;}

/* ===== STAT CARDS ===== */
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:20px;margin-bottom:28px;}
.stat-card{background:var(--surface);border-radius:var(--radius-lg);padding:22px;border:1px solid var(--border);box-shadow:var(--shadow);display:flex;align-items:flex-start;gap:16px;transition:transform 0.2s,box-shadow 0.2s;}
.stat-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md);}
.stat-icon{width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.stat-icon svg{width:26px;height:26px;}
.stat-info{flex:1;}
.stat-value{font-size:26px;font-weight:800;color:var(--text);line-height:1.2;}
.stat-label{font-size:13px;color:var(--text-secondary);margin-top:3px;}
.stat-trend{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:600;margin-top:6px;}
.stat-trend.up{color:var(--accent-green);}
.stat-trend.down{color:var(--accent-red);}

/* ===== GRID LAYOUTS ===== */
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;}
.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;}
.grid-1-2{display:grid;grid-template-columns:1fr 2fr;gap:20px;}
.grid-2-1{display:grid;grid-template-columns:2fr 1fr;gap:20px;}

/* ===== BUTTONS ===== */
.btn{display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border-radius:var(--radius-sm);font-size:14px;font-weight:600;transition:all 0.2s;cursor:pointer;}
.btn svg{width:16px;height:16px;}
.btn-primary{background:var(--primary);color:#fff;}
.btn-primary:hover{background:var(--primary-light);}
.btn-gold{background:var(--gold);color:var(--primary);}
.btn-gold:hover{background:var(--gold-light);}
.btn-outline{background:transparent;color:var(--primary);border:1.5px solid var(--border);}
.btn-outline:hover{background:var(--bg);border-color:var(--primary);}
.btn-danger{background:var(--accent-red);color:#fff;}
.btn-danger:hover{opacity:0.88;}
.btn-success{background:var(--accent-green);color:#fff;}
.btn-success:hover{opacity:0.88;}
.btn-sm{padding:7px 14px;font-size:13px;}
.btn-lg{padding:13px 24px;font-size:15px;}
.btn-icon{padding:8px;border-radius:var(--radius-sm);}
.btn-block{width:100%;justify-content:center;}

/* ===== FORMS ===== */
.form-group{margin-bottom:18px;}
.form-label{display:block;font-size:13px;font-weight:600;color:var(--text);margin-bottom:7px;}
.form-control{width:100%;padding:10px 14px;border:1.5px solid var(--border);border-radius:var(--radius-sm);font-size:14px;color:var(--text);background:var(--surface);transition:border-color 0.2s;}
.form-control:focus{border-color:var(--primary);}
.form-control::placeholder{color:var(--text-light);}
textarea.form-control{resize:vertical;min-height:90px;}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.form-row-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;}
.form-select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:36px;}
.form-hint{font-size:12px;color:var(--text-secondary);margin-top:5px;}

/* ===== BADGES / STATUS ===== */
.badge{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:20px;font-size:12px;font-weight:600;}
.badge::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;}
.badge-available{background:#d4f8e4;color:#1a7a45;}
.badge-negotiating{background:#fff3d4;color:#9a6700;}
.badge-rented{background:#d4ecf7;color:#1a5276;}
.badge-sold{background:#f4d4d4;color:#7a1a1a;}
.badge-admin{background:#e8d4f8;color:#5a1a7a;}
.badge-broker{background:#d4e8f8;color:#1a4a7a;}
.badge-info{background:#e3f0ff;color:#1a5cb5;}

/* ===== TABLES ===== */
.table-wrap{overflow-x:auto;}
table{width:100%;border-collapse:collapse;}
th{text-align:left;padding:12px 16px;font-size:12px;font-weight:700;color:var(--text-secondary);text-transform:uppercase;letter-spacing:0.5px;border-bottom:2px solid var(--border);background:var(--surface2);}
td{padding:14px 16px;font-size:14px;color:var(--text);border-bottom:1px solid var(--border);}
tr:hover td{background:var(--surface2);}
tr:last-child td{border-bottom:none;}
.table-avatar{display:flex;align-items:center;gap:10px;}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;flex-shrink:0;overflow:hidden;}
.avatar img{width:100%;height:100%;object-fit:cover;}
.avatar-sm{width:28px;height:28px;font-size:11px;}
.avatar-lg{width:52px;height:52px;font-size:18px;}
.avatar-xl{width:80px;height:80px;font-size:26px;}

/* ===== MODALS ===== */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:1000;display:flex;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(3px);}
.modal{background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);width:100%;max-width:560px;max-height:90vh;display:flex;flex-direction:column;animation:modalIn 0.25s ease;}
.modal-lg{max-width:780px;}
.modal-xl{max-width:960px;}
.modal-header{padding:22px 24px 0;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;}
.modal-title{font-size:17px;font-weight:700;}
.modal-close{width:32px;height:32px;border-radius:var(--radius-sm);background:var(--bg);display:flex;align-items:center;justify-content:center;color:var(--text-secondary);cursor:pointer;transition:background 0.2s;flex-shrink:0;}
.modal-close:hover{background:var(--border);}
.modal-body{padding:20px 24px;overflow-y:auto;flex:1;}
.modal-footer{padding:0 24px 22px;display:flex;justify-content:flex-end;gap:10px;flex-shrink:0;}
@keyframes modalIn{from{opacity:0;transform:scale(0.95)translateY(-10px);}to{opacity:1;transform:none;}}

/* ===== SEARCH & FILTERS ===== */
.search-bar{display:flex;align-items:center;gap:12px;margin-bottom:20px;}
.search-input-wrap{flex:1;position:relative;}
.search-input-wrap svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--text-light);}
.search-input{width:100%;padding:10px 14px 10px 40px;border:1.5px solid var(--border);border-radius:var(--radius-sm);font-size:14px;background:var(--surface);}
.search-input:focus{border-color:var(--primary);}
.filter-tabs{display:flex;gap:4px;background:var(--bg);padding:4px;border-radius:var(--radius-sm);}
.filter-tab{padding:7px 14px;border-radius:6px;font-size:13px;font-weight:500;color:var(--text-secondary);cursor:pointer;transition:all 0.2s;}
.filter-tab.active{background:var(--surface);color:var(--primary);font-weight:600;box-shadow:var(--shadow);}

/* ===== PROPERTY CARDS ===== */
.property-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px;}
.property-card{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);overflow:hidden;transition:transform 0.2s,box-shadow 0.2s;cursor:pointer;}
.property-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);}
.property-img{height:180px;background:var(--primary);position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.property-img img{width:100%;height:100%;object-fit:cover;}
.property-img-placeholder{width:60px;height:60px;opacity:0.25;}
.property-status-badge{position:absolute;top:10px;right:10px;}
.property-info{padding:16px;}
.property-type{font-size:11px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:0.5px;margin-bottom:4px;}
.property-address{font-size:15px;font-weight:700;color:var(--text);margin-bottom:6px;line-height:1.3;}
.property-price{font-size:18px;font-weight:800;color:var(--primary);}
.property-meta{display:flex;align-items:center;gap:14px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border);}
.property-meta-item{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--text-secondary);}
.property-meta-item svg{width:14px;height:14px;}

/* ===== PROFILE PAGE ===== */
.profile-cover{background:linear-gradient(135deg,var(--primary),var(--primary-light));height:160px;border-radius:var(--radius-lg) var(--radius-lg) 0 0;position:relative;}
.profile-header{background:var(--surface);border:1px solid var(--border);border-radius:0 0 var(--radius-lg) var(--radius-lg);padding:0 28px 24px;margin-bottom:24px;}
.profile-avatar-wrap{position:relative;width:96px;margin-top:-48px;margin-bottom:12px;}
.profile-avatar-wrap .avatar{width:96px;height:96px;font-size:32px;border:4px solid var(--surface);box-shadow:var(--shadow);}
.profile-name{font-size:22px;font-weight:800;}
.profile-role-badge{margin-top:4px;}
.profile-stats{display:flex;gap:24px;margin-top:16px;}
.profile-stat{text-align:center;}
.profile-stat-value{font-size:20px;font-weight:800;color:var(--primary);}
.profile-stat-label{font-size:12px;color:var(--text-secondary);}

/* ===== CHAT ===== */
.chat-layout{display:grid;grid-template-columns:280px 1fr;gap:0;height:calc(100vh - var(--header-h) - 56px);background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);overflow:hidden;}
.chat-sidebar{border-right:1px solid var(--border);display:flex;flex-direction:column;}
.chat-sidebar-header{padding:16px;border-bottom:1px solid var(--border);font-weight:700;}
.chat-room-list{flex:1;overflow-y:auto;}
.chat-room-item{padding:12px 16px;cursor:pointer;transition:background 0.2s;display:flex;align-items:center;gap:10px;border-left:3px solid transparent;}
.chat-room-item:hover{background:var(--bg);}
.chat-room-item.active{background:var(--bg);border-left-color:var(--primary);}
.chat-room-name{font-size:14px;font-weight:600;}
.chat-room-last{font-size:12px;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.chat-main{display:flex;flex-direction:column;}
.chat-header{padding:14px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;}
.chat-messages{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:16px;}
.chat-msg{display:flex;gap:10px;max-width:75%;}
.chat-msg.own{align-self:flex-end;flex-direction:row-reverse;}
.chat-msg-bubble{padding:11px 15px;border-radius:16px;font-size:14px;line-height:1.5;}
.chat-msg-bubble{background:var(--bg);border-radius:16px 16px 16px 4px;}
.chat-msg.own .chat-msg-bubble{background:var(--primary);color:#fff;border-radius:16px 16px 4px 16px;}
.chat-msg-meta{font-size:11px;color:var(--text-light);margin-top:4px;}
.chat-msg.own .chat-msg-meta{text-align:right;}
.chat-input-area{padding:14px 20px;border-top:1px solid var(--border);display:flex;gap:10px;align-items:flex-end;}
.chat-input{flex:1;padding:10px 14px;border:1.5px solid var(--border);border-radius:20px;font-size:14px;resize:none;min-height:42px;max-height:120px;}
.chat-input:focus{border-color:var(--primary);}
.chat-send-btn{width:42px;height:42px;background:var(--primary);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;cursor:pointer;flex-shrink:0;transition:background 0.2s;}
.chat-send-btn:hover{background:var(--primary-light);}

/* ===== IMOVILSON ===== */
.imovilson-fab{position:fixed;bottom:28px;right:28px;z-index:500;}
.imovilson-btn{width:60px;height:60px;border-radius:50%;background:var(--primary);box-shadow:var(--shadow-lg);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.2s;overflow:hidden;border:3px solid var(--gold);}
.imovilson-btn:hover{transform:scale(1.07);box-shadow:0 8px 32px rgba(26,58,92,0.35);}
.imovilson-panel{position:fixed;bottom:100px;right:28px;width:360px;background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);border:1px solid var(--border);z-index:500;display:none;flex-direction:column;max-height:520px;}
.imovilson-panel.open{display:flex;animation:modalIn 0.25s ease;}
.imovilson-header{padding:14px 16px;background:var(--primary);border-radius:var(--radius-lg) var(--radius-lg) 0 0;display:flex;align-items:center;gap:12px;}
.imovilson-header-info{flex:1;}
.imovilson-header-name{color:#fff;font-weight:700;font-size:15px;}
.imovilson-header-status{color:rgba(255,255,255,0.6);font-size:12px;display:flex;align-items:center;gap:4px;}
.imovilson-header-status::before{content:'';width:7px;height:7px;border-radius:50%;background:#2ecc71;flex-shrink:0;}
.imovilson-messages{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;}
.imov-msg{max-width:85%;}
.imov-msg.bot{display:flex;gap:8px;align-self:flex-start;}
.imov-msg.user{align-self:flex-end;}
.imov-bubble{padding:10px 13px;border-radius:14px;font-size:13px;line-height:1.5;}
.imov-msg.bot .imov-bubble{background:var(--bg);border-radius:14px 14px 14px 3px;}
.imov-msg.user .imov-bubble{background:var(--primary);color:#fff;border-radius:14px 14px 3px 14px;}
.imovilson-input-area{padding:12px;border-top:1px solid var(--border);display:flex;gap:8px;}
.imovilson-input{flex:1;padding:9px 13px;border:1.5px solid var(--border);border-radius:20px;font-size:13px;}
.imovilson-input:focus{border-color:var(--primary);}
.imovilson-send{width:36px;height:36px;background:var(--primary);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;cursor:pointer;}

/* ===== NOTES / TIMELINE ===== */
.note-list{display:flex;flex-direction:column;gap:12px;}
.note-item{background:var(--bg);border-radius:var(--radius-sm);padding:14px;border-left:3px solid var(--gold);position:relative;}
.note-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
.note-author{font-size:13px;font-weight:600;color:var(--primary);}
.note-date{font-size:11px;color:var(--text-light);}
.note-text{font-size:14px;color:var(--text);line-height:1.6;}
.note-photos{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}
.note-photo{width:72px;height:72px;border-radius:var(--radius-sm);overflow:hidden;cursor:pointer;background:var(--border);flex-shrink:0;}
.note-photo img{width:100%;height:100%;object-fit:cover;}

/* ===== NOTIFICATIONS ===== */
.notif-list{display:flex;flex-direction:column;gap:8px;}
.notif-item{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:14px 16px;display:flex;align-items:flex-start;gap:12px;transition:background 0.2s;}
.notif-item.unread{border-left:3px solid var(--primary);background:#f0f5ff;}
.notif-icon{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.notif-body{flex:1;}
.notif-title{font-size:14px;font-weight:600;margin-bottom:3px;}
.notif-desc{font-size:13px;color:var(--text-secondary);}
.notif-time{font-size:11px;color:var(--text-light);margin-top:5px;}

/* ===== PHOTO UPLOAD ===== */
.photo-upload-area{border:2px dashed var(--border);border-radius:var(--radius-sm);padding:28px;text-align:center;cursor:pointer;transition:all 0.2s;}
.photo-upload-area:hover{border-color:var(--primary);background:#f0f4ff;}
.photo-upload-area svg{width:40px;height:40px;color:var(--text-light);margin:0 auto 10px;}
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px;margin-top:12px;}
.photo-thumb{position:relative;aspect-ratio:1;border-radius:var(--radius-sm);overflow:hidden;background:var(--border);}
.photo-thumb img{width:100%;height:100%;object-fit:cover;}
.photo-remove{position:absolute;top:4px;right:4px;width:22px;height:22px;background:rgba(0,0,0,0.6);border-radius:50%;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:12px;}
.facade-badge{position:absolute;bottom:4px;left:4px;background:var(--gold);color:var(--primary);font-size:10px;font-weight:700;padding:2px 7px;border-radius:4px;}

/* ===== LOGIN PAGE ===== */
.login-wrap{min-height:100vh;display:flex;align-items:stretch;}
.login-left{flex:1;background:linear-gradient(160deg,var(--primary-dark) 0%,var(--primary) 60%,var(--primary-light) 100%);display:flex;align-items:center;justify-content:center;padding:48px;position:relative;overflow:hidden;}
.login-left-bg{position:absolute;inset:0;opacity:0.06;}
.login-brand{position:relative;z-index:1;color:#fff;}
.login-brand-logo{margin-bottom:32px;}
.login-brand-title{font-size:36px;font-weight:800;line-height:1.2;margin-bottom:12px;}
.login-brand-title span{color:var(--gold);}
.login-brand-sub{font-size:16px;color:rgba(255,255,255,0.7);line-height:1.6;}
.login-features{margin-top:40px;display:flex;flex-direction:column;gap:16px;}
.login-feature{display:flex;align-items:center;gap:12px;color:rgba(255,255,255,0.85);font-size:14px;}
.login-feature svg{width:20px;height:20px;color:var(--gold);flex-shrink:0;}
.login-right{width:460px;background:var(--surface);display:flex;align-items:center;justify-content:center;padding:48px;}
.login-form-wrap{width:100%;}
.login-title{font-size:26px;font-weight:800;margin-bottom:6px;}
.login-sub{font-size:14px;color:var(--text-secondary);margin-bottom:32px;}
.login-demo-accounts{background:var(--bg);border-radius:var(--radius-sm);padding:14px;margin-bottom:24px;}
.login-demo-title{font-size:12px;font-weight:600;color:var(--text-secondary);margin-bottom:8px;text-transform:uppercase;letter-spacing:0.5px;}
.demo-account{display:flex;align-items:center;justify-content:space-between;padding:7px 0;border-bottom:1px solid var(--border);cursor:pointer;}
.demo-account:last-child{border-bottom:none;}
.demo-account:hover .demo-use{color:var(--primary);}
.demo-credentials{font-size:13px;color:var(--text);}
.demo-credentials strong{font-weight:600;}
.demo-use{font-size:12px;color:var(--text-light);transition:color 0.2s;}

/* ===== DASHBOARD CHARTS ===== */
.chart-wrap{position:relative;height:280px;}
.chart-wrap-sm{height:200px;}
.leaderboard-item{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);}
.leaderboard-item:last-child{border-bottom:none;}
.leaderboard-rank{width:26px;height:26px;border-radius:50%;background:var(--bg);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:var(--text-secondary);flex-shrink:0;}
.leaderboard-rank.top{background:var(--gold);color:var(--primary);}
.leaderboard-info{flex:1;}
.leaderboard-name{font-size:14px;font-weight:600;}
.leaderboard-sub{font-size:12px;color:var(--text-secondary);}
.leaderboard-value{font-size:15px;font-weight:700;color:var(--primary);}
.progress-bar-wrap{display:flex;flex-direction:column;gap:10px;}
.progress-item{display:flex;flex-direction:column;gap:5px;}
.progress-label{display:flex;justify-content:space-between;font-size:13px;font-weight:600;}
.progress-label span:last-child{color:var(--text-secondary);}
.progress-bar{height:8px;background:var(--border);border-radius:4px;overflow:hidden;}
.progress-fill{height:100%;border-radius:4px;transition:width 1s ease;}

/* ===== MISC ===== */
.divider{border:none;border-top:1px solid var(--border);margin:16px 0;}
.text-center{text-align:center;}
.text-right{text-align:right;}
.flex{display:flex;}.flex-1{flex:1;}
.items-center{align-items:center;}
.justify-between{justify-content:space-between;}
.gap-2{gap:8px;}.gap-3{gap:12px;}.gap-4{gap:16px;}
.mt-1{margin-top:4px;}.mt-2{margin-top:8px;}.mt-3{margin-top:12px;}.mt-4{margin-top:16px;}.mt-6{margin-top:24px;}
.mb-2{margin-bottom:8px;}.mb-3{margin-bottom:12px;}.mb-4{margin-bottom:16px;}.mb-6{margin-bottom:24px;}
.fw-700{font-weight:700;}
.fs-13{font-size:13px;}
.text-muted{color:var(--text-secondary);}
.text-primary{color:var(--primary);}
.text-gold{color:var(--gold);}
.empty-state{text-align:center;padding:48px 24px;}
.empty-state svg{width:64px;height:64px;color:var(--border);margin:0 auto 16px;}
.empty-state h3{font-size:17px;font-weight:700;margin-bottom:8px;}
.empty-state p{font-size:14px;color:var(--text-secondary);}
.tooltip{position:relative;cursor:help;}
.chip{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:600;background:var(--bg);color:var(--text-secondary);}
.chip-primary{background:#e8f0fe;color:var(--primary);}
.section-title{font-size:18px;font-weight:800;margin-bottom:18px;display:flex;align-items:center;gap:10px;}
.section-title svg{width:20px;height:20px;color:var(--primary);}
.tag{display:inline-flex;padding:3px 10px;background:var(--bg);border-radius:20px;font-size:12px;font-weight:500;color:var(--text-secondary);}
.separator{display:flex;align-items:center;gap:12px;color:var(--text-light);font-size:13px;margin:16px 0;}
.separator::before,.separator::after{content:'';flex:1;height:1px;background:var(--border);}
.highlight-card{background:linear-gradient(135deg,var(--primary),var(--primary-light));color:#fff;border-radius:var(--radius-lg);padding:24px;}
.highlight-card .stat-value{color:#fff;}
.highlight-card .stat-label{color:rgba(255,255,255,0.7);}
.suggestion-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:14px;display:flex;align-items:flex-start;gap:12px;transition:all 0.2s;}
.suggestion-card:hover{border-color:var(--primary);box-shadow:var(--shadow);}
.suggestion-icon{width:40px;height:40px;border-radius:10px;background:#e8f0fe;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.suggestion-icon svg{width:20px;height:20px;color:var(--primary);}

/* ===== RESPONSIVE ===== */
@media(max-width:1100px){.grid-2{grid-template-columns:1fr;}.grid-2-1{grid-template-columns:1fr;}.grid-1-2{grid-template-columns:1fr;}.grid-3{grid-template-columns:1fr 1fr;}.property-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));}}
@media(max-width:768px){
  .sidebar{transform:translateX(-100%);box-shadow:none;}
  .sidebar.open{transform:none;box-shadow:4px 0 24px rgba(0,0,0,0.2);}
  .main-content{margin-left:0;}
  .page-content{padding:16px;}
  .stats-grid{grid-template-columns:1fr 1fr;}
  .login-left{display:none;}
  .login-right{width:100%;padding:24px;}
  .grid-3{grid-template-columns:1fr;}
  .chat-layout{grid-template-columns:1fr;}
  #menuToggle{display:flex !important;}
  .property-grid{grid-template-columns:1fr;}
  .search-bar{flex-direction:column;align-items:stretch;}
  .filter-tabs{overflow-x:auto;}
  .topbar{padding:0 16px;}
  .topbar-title{font-size:17px;}
  .modal{max-width:calc(100% - 20px) !important;max-height:calc(100vh - 20px) !important;}
  .sidebar-user-name{font-size:13px;}
  .sidebar-user-role{font-size:10px;}
}
@media(max-width:480px){
  .stats-grid{grid-template-columns:1fr;}
  .form-row,.form-row-3{grid-template-columns:1fr;}
  .btn-block{width:100%;}
  .topbar-right{gap:6px;}
  .topbar-btn{width:38px;height:38px;}
  .sidebar{width:280px;}
}
.avatar-xl{width:80px;height:80px;font-size:26px;margin:0 auto;}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}
.fade-in{animation:fadeIn 0.3s ease;}
@keyframes pulse{0%,100%{opacity:1;}50%{opacity:0.6;}}
.pulse{animation:pulse 2s infinite;}
@keyframes spin{to{transform:rotate(360deg);}}
.spin{animation:spin 1s linear infinite;}
.typing-indicator{display:flex;gap:4px;padding:4px 0;}
.typing-dot{width:7px;height:7px;border-radius:50%;background:var(--text-secondary);animation:typing 1.2s ease infinite;}
.typing-dot:nth-child(2){animation-delay:0.2s;}
.typing-dot:nth-child(3){animation-delay:0.4s;}
@keyframes typing{0%,60%,100%{transform:translateY(0);}30%{transform:translateY(-6px);}}

/* ===== MODAL ===== */
.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);display:flex;align-items:center;justify-content:center;z-index:1000;padding:20px;}
.modal{background:var(--surface);border-radius:var(--radius-lg);width:100%;max-width:500px;max-height:90vh;overflow-y:auto;box-shadow:0 8px 40px rgba(0,0,0,0.3);}
.modal-header{padding:20px 24px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;}
.modal-header h3{font-size:18px;font-weight:700;color:#1a2738;}
.modal-body{padding:24px;}
.modal-footer{padding:16px 24px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:12px;}

/* ===== DASHBOARD CEO ===== */
.dashboard-ceo { padding: 0; }
.dashboard-ceo .card { transition: transform 0.2s, box-shadow 0.2s; }
.dashboard-ceo .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dashboard-header { margin-bottom: 24px; }
.dashboard-metric { transition: transform 0.2s; }
.dashboard-metric:hover { transform: translateY(-3px); }

@media print {
  .dashboard-header { display: none !important; }
  .sidebar { display: none !important; }
  .topbar { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .card { break-inside: avoid; }
  .dashboard-ceo { padding: 20px !important; }
}

@media (max-width: 1024px) {
  .dashboard-ceo > div > div[style*="grid-template-columns:2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .dashboard-ceo > div > div[style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .dashboard-ceo > div > div[style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  .dashboard-ceo > div > div[style*="grid-template-columns:2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .dashboard-ceo > div > div[style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
}
