.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

.sidebar { background: var(--bg-elevated); border-right: 1px solid var(--border); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 20px; font-weight: 700; font-size: 15px; }
.sidebar-brand img { width: 26px; height: 26px; border-radius: 6px; }
.sidebar-brand .forger { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim-2); margin: 18px 10px 8px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text-dim); margin-bottom: 2px; }
.side-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.side-link:hover { background: var(--bg-elevated-2); color: var(--text); }
.side-link.active { background: var(--accent-soft); color: var(--accent); }
.side-link .soon { margin-left: auto; font-size: 9.5px; padding: 2px 6px; border-radius: 999px; background: var(--bg-elevated-2); color: var(--text-dim-2); }

.topbar { height: 64px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 26px; position: sticky; top: 0; background: rgba(10,10,12,0.9); backdrop-filter: blur(8px); z-index: 10; }
.topbar .crumbs { font-size: 13.5px; color: var(--text-dim); }
.topbar .crumbs b { color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #06201c; }

.content { padding: 28px 32px 60px; max-width: 1180px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; }
.page-head h1 { font-size: 22px; margin: 0 0 4px; }
.page-head p { font-size: 13.5px; color: var(--text-dim); margin: 0; }

.toolbar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.select, .input { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.proj-card { padding: 18px; }
.proj-card .top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.proj-card h3 { font-size: 15.5px; margin: 0 0 4px; }
.proj-card .addr { font-size: 12.5px; color: var(--text-dim-2); }
.proj-card .meta { display: flex; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--text-dim); }
.proj-card .meta b { color: var(--text); display: block; font-size: 15px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim-2); padding: 10px 14px; border-bottom: 1px solid var(--border); }
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr.clickable:hover { background: var(--bg-elevated-2); cursor: pointer; }
.tbl-wrap { overflow-x: auto; }

.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.floorplan-box { padding: 18px; height: 340px; }
.floorplan-box svg { width: 100%; height: 100%; }
.room-list .r-row { display: flex; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.room-list .r-row:last-child { border-bottom: none; }
.room-list .r-row .area { color: var(--text-dim); }
.panel-title { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.product-card { padding: 14px; }
.product-thumb { height: 100px; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--bg-elevated-2), var(--bg)); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-dim-2); font-size: 11px; margin-bottom: 10px; }
.product-card h4 { font-size: 13px; margin: 0 0 2px; }
.product-card .mk { font-size: 11.5px; color: var(--text-dim-2); margin-bottom: 8px; }
.product-card .price { font-size: 13.5px; font-weight: 700; color: var(--accent); }

.empty-state { text-align: center; padding: 70px 20px; color: var(--text-dim); }
.empty-state .icon { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--text-dim-2); }

.book-preview { padding: 30px; }
.book-preview h2 { font-size: 20px; margin: 0 0 4px; }
.book-preview .sub { color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }
.book-section { margin-bottom: 22px; }
.book-section h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim-2); margin: 0 0 10px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 640px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 12.5px; color: var(--text-dim); }
.swatches { display: flex; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--border); }

/* ---- Topbar widgets ---- */
.hamburger { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); width: 36px; height: 36px; align-items: center; justify-content: center; color: var(--text); }
.hamburger svg { width: 18px; height: 18px; }

.selector { position: relative; }
.selector-btn { display: flex; align-items: center; gap: 8px; background: var(--bg-elevated-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; font-size: 12.5px; color: var(--text); }
.selector-btn .lbl { color: var(--text-dim-2); font-size: 10.5px; margin-right: 2px; }
.selector-btn svg { width: 13px; height: 13px; color: var(--text-dim-2); }
.dropdown-panel {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 240px; max-width: 320px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5);
  z-index: 60; overflow: hidden; display: none;
}
.dropdown-panel.left { left: 0; right: auto; }
.dropdown-panel.open { display: block; }
.dropdown-head { padding: 12px 14px; font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--border); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--text); }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: var(--bg-elevated-2); cursor: pointer; }
.dropdown-item.active { color: var(--accent); }

.bell-btn { position: relative; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.bell-btn svg { width: 17px; height: 17px; }
.bell-dot { position: absolute; top: -3px; right: -3px; background: var(--danger); color: white; font-size: 9.5px; font-weight: 700; min-width: 15px; height: 15px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }

.notif-item { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.notif-item:last-child { border-bottom: none; }
.notif-item .t { color: var(--text); margin-bottom: 3px; }
.notif-item .m { color: var(--text-dim-2); font-size: 11.5px; }
.notif-item.unread { background: var(--accent-soft); }

.profile-trigger { display: flex; align-items: center; gap: 8px; }
.profile-trigger .name { font-size: 12.5px; text-align: right; }
.profile-trigger .role { font-size: 10.5px; color: var(--text-dim-2); }
.profile-head { padding: 14px; border-bottom: 1px solid var(--border); }
.profile-head .n { font-size: 13.5px; font-weight: 700; }
.profile-head .e { font-size: 11.5px; color: var(--text-dim-2); }

.theme-toggle { background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.theme-toggle svg { width: 16px; height: 16px; }

/* ---- Dashboard ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.kpi-card { padding: 18px; }
.kpi-card .lbl { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.kpi-card .val { font-size: 26px; font-weight: 700; }
.kpi-card .delta { font-size: 11.5px; color: var(--accent); margin-top: 4px; }
.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.activity-item { display: flex; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex-shrink: 0; }
.activity-item .txt { color: var(--text-dim); }
.activity-item .txt b { color: var(--text); font-weight: 600; }
.activity-item .time { color: var(--text-dim-2); font-size: 11px; margin-left: auto; white-space: nowrap; }

/* ---- Loading skeleton blocks ---- */
.skel-row { height: 14px; margin-bottom: 10px; }
.skel-card { height: 120px; }
.skel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* ---- Modal (import review, AI eredmények) ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto; }
.modal-card { width: 100%; max-width: 640px; padding: 24px; }
.modal-card h3 { margin: 0 0 4px; font-size: 16px; }
.modal-card .sub { color: var(--text-dim); font-size: 12.5px; margin: 0 0 18px; }
.diff-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.diff-row:last-child { border-bottom: none; }
.diff-group-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim-2); margin: 16px 0 6px; }
.diff-group-label:first-child { margin-top: 0; }

/* ---- Error state ---- */
.error-state { text-align: center; padding: 70px 20px; }
.error-state .icon { width: 46px; height: 46px; margin: 0 auto 16px; color: var(--danger); }
.error-state h3 { font-size: 16px; margin: 0 0 8px; }
.error-state p { color: var(--text-dim); font-size: 13px; margin: 0 0 18px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 80; transform: translateX(-100%); transition: transform .2s ease; width: 240px; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,0.6); }
  .hamburger { display: flex; }
  .detail-grid, .kpi-grid, .dash-grid { grid-template-columns: 1fr; }
  .profile-trigger .name, .profile-trigger .role { display: none; }
}
