/* Floor Plans overlay */
#fp-module {
  display: none; position: fixed;
  top: 56px; left: calc(var(--sb-w, 220px)); right: 0; bottom: 0;
  width: auto; background: rgba(7,13,11,.97);
  z-index: 150; flex-direction: column; overflow: hidden;
  animation: fp-fade-in .22s ease;
}
body.sb-icon-only #fp-module { left: 68px; }
#fp-module.visible { display: flex; }
@keyframes fp-fade-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }

.fp-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; border-bottom: 1px solid rgba(44,221,127,.15); background: rgba(11,20,16,.98); flex-shrink: 0; }
.fp-header-left { display: flex; align-items: center; gap: 12px; }
.fp-header-icon { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg,rgba(44,221,127,.2),rgba(119,233,214,.2)); border: 1px solid rgba(44,221,127,.3); display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 0 16px rgba(44,221,127,.2); }
.fp-header h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; font-weight: 700; color: #e4eee9; letter-spacing: .5px; }
.fp-header h2 span { font-size: .75rem; font-weight: 500; color: rgba(44,221,127,.7); margin-left: 8px; }
.fp-close-btn { background: rgba(255,77,109,.1); border: 1px solid rgba(255,77,109,.25); color: #ff4d6d; border-radius: 8px; padding: 6px 14px; font-size: .8rem; font-weight: 600; cursor: pointer; transition: all .2s; }
.fp-close-btn:hover { background: rgba(255,77,109,.2); box-shadow: 0 0 12px rgba(255,77,109,.3); }

.fp-body { flex: 1; overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 28px; }
.fp-body::-webkit-scrollbar { width: 5px; }
.fp-body::-webkit-scrollbar-thumb { background: rgba(44,221,127,.25); border-radius: 3px; }

.fp-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 20px; color: rgba(44,221,127,.4); font-size: .85rem; }
.fp-state svg { width: 48px; height: 48px; opacity: .4; }
.fp-spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid rgba(44,221,127,.15); border-top-color: rgba(44,221,127,.7); animation: fp-spin .8s linear infinite; }
@keyframes fp-spin { to { transform: rotate(360deg); } }

.fp-branch-block { background: rgba(15,28,23,.7); border: 1px solid rgba(44,221,127,.12); border-radius: 14px; overflow: hidden; transition: border-color .2s; }
.fp-branch-block:hover { border-color: rgba(44,221,127,.25); }
.fp-branch-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .28s ease; }
.fp-branch-body.collapsed { grid-template-rows: 0fr; }
.fp-branch-body > .fp-branch-body-inner { overflow: hidden; max-height: 352px; overflow-y: auto; }
.fp-branch-body > .fp-branch-body-inner::-webkit-scrollbar { width: 5px; }
.fp-branch-body > .fp-branch-body-inner::-webkit-scrollbar-track { background: transparent; }
.fp-branch-body > .fp-branch-body-inner::-webkit-scrollbar-thumb { background: rgba(44,221,127,.25); border-radius: 3px; }
.fp-branch-body > .fp-branch-body-inner::-webkit-scrollbar-thumb:hover { background: rgba(44,221,127,.45); }
.fp-branch-title { display: flex; align-items: center; gap: 10px; padding: 16px 20px; background: rgba(44,221,127,.05); border-bottom: 1px solid rgba(44,221,127,.1); cursor: pointer; user-select: none; transition: background .18s; }
.fp-branch-title:hover { background: rgba(44,221,127,.11); }
.fp-branch-block.collapsed .fp-branch-title { border-bottom-color: transparent; }
.fp-branch-toggle { margin-left: 6px; width: 18px; height: 18px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: rgba(44,221,127,.55); transition: transform .28s ease; }
.fp-branch-block.collapsed .fp-branch-toggle { transform: rotate(-90deg); }
.fp-branch-block.collapsed .fp-branch-title { border-bottom-color: transparent; }
.fp-branch-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); flex-shrink: 0; }
.fp-branch-name { font-family: 'Space Grotesk', sans-serif; font-size: .95rem; font-weight: 700; color: #e4eee9; letter-spacing: .3px; }
.fp-branch-code { font-size: .68rem; font-weight: 600; color: rgba(44,221,127,.6); background: rgba(44,221,127,.1); border: 1px solid rgba(44,221,127,.2); border-radius: 4px; padding: 2px 7px; }
.fp-branch-count { margin-left: auto; font-size: .68rem; color: rgba(44,221,127,.5); font-weight: 600; }

.fp-table { width: 100%; border-collapse: collapse; }
.fp-table thead tr { background: rgba(44,221,127,.04); border-bottom: 1px solid rgba(44,221,127,.1); }
.fp-table th { padding: 10px 20px; text-align: left; font-size: .68rem; font-weight: 700; color: rgba(44,221,127,.6); text-transform: uppercase; letter-spacing: 1px; }
.fp-table th:last-child { text-align: center; }
.fp-table tbody tr { border-bottom: 1px solid rgba(44,221,127,.06); transition: background .15s; }
.fp-table tbody tr:last-child { border-bottom: none; }
.fp-table tbody tr:hover { background: rgba(44,221,127,.04); }
.fp-table td { padding: 14px 20px; vertical-align: middle; }
.fp-table td:last-child { text-align: right; padding-right: 20px; }

.fp-floor-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(44,221,127,.1); border: 1px solid rgba(44,221,127,.25); font-size: .78rem; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.fp-floor-info { display: flex; align-items: center; }
.fp-floor-name { font-size: .9rem; font-weight: 600; color: #e2eee8; }
.fp-floor-desc { font-size: .73rem; color: rgba(120,195,155,.75); margin-top: 3px; }
.fp-floor-desc--warn { font-size: .73rem; color: rgba(255,100,100,.45); margin-top: 3px; }
.fp-file-name { font-size: .84rem; font-weight: 600; color: #cae0d5; word-break: break-all; }
.fp-file-label { font-size: .68rem; color: rgba(44,221,127,.5); margin-top: 3px; }

.fp-eye-btn { width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(44,221,127,.3); background: linear-gradient(135deg,rgba(44,221,127,.12),rgba(119,233,214,.12)); color: var(--accent); transition: all .22s; position: relative; }
.fp-eye-btn:hover { background: linear-gradient(135deg,rgba(44,221,127,.28),rgba(119,233,214,.28)); box-shadow: 0 0 18px rgba(44,221,127,.35); transform: scale(1.1); border-color: var(--accent); }
.fp-eye-btn:hover::after { content: 'View Map'; position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%); background: rgba(11,20,16,.95); border: 1px solid rgba(44,221,127,.2); border-radius: 5px; padding: 3px 8px; font-size: .6rem; font-weight: 600; color: var(--accent); white-space: nowrap; pointer-events: none; }
.fp-eye-btn svg { width: 18px; height: 18px; }
.fp-eye-btn.no-map { border: 1px dashed rgba(100,180,137,.2); background: transparent; color: rgba(100,180,137,.3); cursor: default; pointer-events: none; }

.fp-del-btn { width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,80,80,.3); background: linear-gradient(135deg,rgba(255,80,80,.08),rgba(200,40,40,.08)); color: rgba(255,100,100,.7); transition: all .22s; position: relative; }
.fp-del-btn:hover { background: linear-gradient(135deg,rgba(255,80,80,.25),rgba(200,40,40,.25)); box-shadow: 0 0 16px rgba(255,80,80,.3); transform: scale(1.1); border-color: rgba(255,80,80,.8); color: #ff5555; }
.fp-del-btn svg { width: 16px; height: 16px; }

#fp-del-confirm-overlay { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); align-items: center; justify-content: center; }
#fp-del-confirm-overlay.open { display: flex; }
#fp-del-confirm-box { background: #fff; border-radius: 18px; padding: 32px 28px 24px; width: 300px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
#fp-del-confirm-box h3 { margin: 0 0 10px; font-size: 1.25rem; font-weight: 700; color: #111; }
#fp-del-confirm-box p { margin: 0 0 24px; font-size: .88rem; color: #555; line-height: 1.5; }
#fp-del-confirm-box .fp-del-actions { display: flex; gap: 1px; border-top: 1px solid #eee; margin: 0 -28px -24px; border-radius: 0 0 18px 18px; overflow: hidden; }
#fp-del-confirm-box .fp-del-actions button { flex: 1; padding: 14px 0; font-size: .95rem; font-weight: 600; border: none; cursor: pointer; background: #fff; transition: background .15s; }
#fp-del-confirm-box .fp-del-actions button:first-child { color: #2cdd7f; border-right: 1px solid #eee; }
#fp-del-confirm-box .fp-del-actions button:first-child:hover { background: #f6f9f8; }
#fp-del-confirm-box .fp-del-actions button:last-child { color: #ff3b30; }
#fp-del-confirm-box .fp-del-actions button:last-child:hover { background: #fff5f5; }

#fp-map-modal { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(6,10,8,.92); backdrop-filter: blur(12px); align-items: center; justify-content: center; animation: fp-fade-in .2s ease; }
#fp-map-modal.visible { display: flex; }
.fp-modal-box { width: min(92vw,960px); height: min(88vh,640px); background: rgba(11,20,16,.98); border: 1px solid rgba(44,221,127,.25); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 0 60px rgba(44,221,127,.15), 0 24px 60px rgba(0,0,0,.8); }
.fp-modal-header { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid rgba(44,221,127,.15); background: rgba(44,221,127,.04); flex-shrink: 0; }
.fp-modal-title { flex: 1; font-family: 'Space Grotesk',sans-serif; font-size: .88rem; font-weight: 700; color: #e4eee9; }
.fp-modal-sub { font-size: .7rem; color: rgba(44,221,127,.6); }
.fp-modal-close { width: 32px; height: 32px; border-radius: 8px; border: none; background: rgba(255,77,109,.12); color: #ff4d6d; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: background .2s; flex-shrink: 0; }
.fp-modal-close:hover { background: rgba(255,77,109,.28); }
.fp-modal-actions { display: flex; align-items: center; gap: 8px; padding-right: 8px; }
.fp-modal-3d-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: .72rem; font-weight: 600; background: linear-gradient(135deg,rgba(44,221,127,.15),rgba(119,233,214,.15)); border: 1px solid rgba(44,221,127,.3); color: var(--accent); transition: all .2s; white-space: nowrap; }
.fp-modal-3d-btn:hover { background: linear-gradient(135deg,rgba(44,221,127,.28),rgba(119,233,214,.28)); box-shadow: 0 0 14px rgba(44,221,127,.25); }
.fp-modal-body { flex: 1; overflow: hidden; position: relative; background: #0d1914; }
.fp-modal-iframe { width: 100%; height: 100%; border: none; opacity: 0; transition: opacity .3s; }
.fp-modal-iframe.loaded { opacity: 1; }
.fp-modal-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: rgba(44,221,127,.5); font-size: .8rem; }
.fp-empty-floors { padding: 20px; text-align: center; color: rgba(100,180,137,.4); font-size: .78rem; }

.fp-stats-bar { display: flex; gap: 16px; padding: 14px 28px 0; flex-shrink: 0; }
.fp-stat { background: rgba(44,221,127,.06); border: 1px solid rgba(44,221,127,.15); border-radius: 10px; padding: 10px 18px; display: flex; align-items: center; gap: 10px; }
.fp-stat-num { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.fp-stat-label { font-size: .68rem; color: rgba(100,180,137,.7); font-weight: 600; }
