#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar / Rail */
#rail {
  width: 260px;
  flex: 0 0 260px;
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 10;
  transition: all 0.3s ease;
}
#rail.collapsed {
  margin-left: -260px;
  opacity: 0;
}

.brand { margin-bottom: 24px; padding: 0 4px; display: flex; align-items: center; justify-content: flex-start;}
.brand-logo { max-width: 140px; max-height: 36px; object-fit: contain; }

/* Sidebar Navigation */
.sidebar-nav { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
  background: transparent; color: var(--text-muted); border: 1px solid transparent;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all 0.2s; text-align: left; width: 100%;
}
.nav-item:hover { background: var(--bg-panel-hover); color: var(--text-main); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); border-right: 3px solid var(--accent); border-radius: 10px 0 0 10px; box-shadow: inset -4px 0 10px -4px var(--accent-glow); }
.nav-item.new-scan-btn { background: var(--accent); color: #fff; border: 1px solid var(--accent); margin-top: 8px; font-weight: 600; justify-content: center;}
.nav-item.new-scan-btn:hover { background: var(--accent-hover); box-shadow: 0 4px 15px var(--accent-glow); color: #fff;}

.rail-search { margin: 12px 0 16px; }
.rail-search input {
  width: 100%; background: var(--bg-base); border: 1px solid var(--border-dim); border-radius: 8px;
  padding: 10px 14px; color: var(--text-main); font-size: 13px; transition: border-color 0.2s;
}
.rail-search input:focus { outline: none; border-color: var(--accent); }

.rail-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--text-faint);
  margin: 12px 4px 8px; display: flex; justify-content: space-between; align-items: center;
}
.badge-rail { background: var(--border-dim); padding: 2px 8px; border-radius: 12px; font-size: 10px; color: var(--text-muted);}

.eng-list { flex: 1; overflow-y: auto; margin: 0 -8px; padding: 0 8px; }
.eng-item {
  padding: 12px 14px; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
  margin-bottom: 6px; transition: all 0.2s ease;
}
.eng-item:hover { background: var(--bg-panel-hover); }
.eng-item.active { background: var(--bg-panel-hover); border-color: var(--border-light); }
.eng-item .t { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff;}
.eng-item .m { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; margin-top: 6px; align-items: center;}

.rail-foot {
  border-top: 1px solid var(--border-dim); padding-top: 16px; margin-top: 16px;
  font-size: 12px; color: var(--text-muted); display: flex; gap: 10px; align-items: center;
}

/* Main Area */
#main { flex: 1; overflow-y: auto; position: relative; background: transparent; z-index: 5; }

/* Home View */
.home-view { padding: 40px 48px; max-width: 1200px; margin: 0 auto; }
.home-header { margin-bottom: 32px; }
.home-header h1 { font-family: var(--font-display); font-size: 28px; margin: 0 0 8px; font-weight: 600;}
.home-header p { color: var(--text-muted); margin: 0; }

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }
.metric-card {
  background: var(--bg-panel); border: 1px solid var(--border-light); border-radius: 16px;
  padding: 24px; display: flex; justify-content: space-between; align-items: center;
  backdrop-filter: blur(12px); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}
.metric-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.4), 0 0 12px rgba(255,255,255,0.05); }
.metric-title { color: var(--text-muted); font-size: 13px; font-weight: 500; margin-top: 4px; }
.metric-value { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: #fff; line-height: 1; }
.metric-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }

.charts-grid { display: grid; grid-template-columns: 1.2fr 2fr; gap: 20px; }
.chart-card { background: var(--bg-panel); border: 1px solid var(--border-light); border-radius: 16px; padding: 24px; backdrop-filter: blur(12px); transition: transform 0.3s, box-shadow 0.3s; }
.chart-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,0,0,0.4); }
.sect-title { margin: 0 0 20px; font-size: 16px; font-weight: 600; }
.chart-container { position: relative; width: 100%; }

/* Recent Scans Table style */
.recent-scans-table { display: flex; flex-direction: column; gap: 12px; }
.rs-row { display: grid; grid-template-columns: 2fr 1fr 1fr; padding: 12px; border-radius: 8px; background: var(--bg-base); border: 1px solid var(--border-dim); align-items: center; font-size: 13px;}
.rs-row .target { font-weight: 500; color: #fff;}
.rs-row .date { color: var(--text-faint); text-align: right; }

/* View (Engagement Detail) */
.view { padding: 32px 40px 60px; max-width: 1200px; margin: 0 auto;}
.v-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px;}
.v-head h1 { margin: 0; font-size: 28px; font-weight: 600; font-family: var(--font-display);}
.v-sub { display: flex; gap: 12px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.v-actions { display: flex; gap: 12px; flex-wrap: wrap;}

.scan-progress-box { background: var(--bg-panel); backdrop-filter: blur(12px); border: 1px solid var(--border-light); border-radius: 16px; padding: 24px; margin-bottom: 32px;}
.progress-bar-bg { width: 100%; height: 8px; background: var(--border-dim); border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.progress-bar-fill { height: 100%; background: var(--low); transition: width 0.5s ease; box-shadow: 0 0 10px rgba(52,199,89,0.4);}
.progress-steps { display: flex; justify-content: space-between; font-size: 12px; font-weight: 500; color: var(--text-faint);}
.progress-steps .active { color: var(--low); }

.overview-grid { display: grid; grid-template-columns: 350px 1fr; gap: 20px; }
.overview-col { display: flex; flex-direction: column; gap: 20px; }

/* Tabs Layout */
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--border-dim); margin-bottom: 24px; padding-bottom: 8px;}
.tabpane { display: none; }
.tabpane.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes slideUpFade { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@media(max-width: 900px) { #rail { display: none; } .overview-grid, .charts-grid { grid-template-columns: 1fr; } }

/* Add these rules for RBAC UI */

#login-view {
    position: fixed; inset: 0; background: transparent; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}

.login-card {
    background: var(--bg-panel); border: 1px solid var(--border-light);
    border-radius: 20px; padding: 40px; width: 100%; max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 40px var(--accent-dim);
    backdrop-filter: blur(16px);
}

.data-table {
    width: 100%; border-collapse: collapse; font-size: 13px; text-align: left;
}
.data-table th {
    padding: 14px 20px; color: var(--text-faint); font-weight: 600; text-transform: uppercase;
    font-size: 11px; border-bottom: 1px solid var(--border-dim); background: rgba(0,0,0,0.2);
}
.data-table td {
    padding: 16px 20px; border-bottom: 1px solid var(--border-dim); color: var(--text-main);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-panel-hover); }

.data-table tr:hover td { background: var(--bg-panel-hover); }

.view-panel { display: none; }
.view-panel:not(.hidden) { display: block; animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

/* Cyber Security Static Background */
.cyber-bg-static {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-color: #05070a;
    background-image: 
        linear-gradient(rgba(123, 82, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(123, 82, 255, 0.07) 1px, transparent 1px),
        linear-gradient(rgba(123, 82, 255, 0.03) 2px, transparent 2px),
        linear-gradient(90deg, rgba(123, 82, 255, 0.03) 2px, transparent 2px);
    background-size: 25px 25px, 25px 25px, 100px 100px, 100px 100px;
    background-position: -1px -1px, -1px -1px, -2px -2px, -2px -2px;
}
.cyber-bg-static::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(123, 82, 255, 0.12), transparent 70%);
}

/* Login Animated Cyber Background - Professional & Subtle */
.login-animated-bg {
    position: absolute; inset: 0; z-index: 0; overflow: hidden;
    background-color: #040810; /* Very dark rich blue */
}

.grid-layer {
    position: absolute; inset: 0;
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
}

.floating-icons {
    position: absolute; width: 100%; height: 100%; top: 0; left: 0;
    pointer-events: none;
    z-index: 2;
}

.icon-float {
    position: absolute;
    width: 28px; height: 28px;
    fill: none;
    stroke: rgba(14, 165, 233, 0.25);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: floatIcon linear infinite;
    bottom: -50px;
}

@keyframes floatIcon {
    0% { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-110vh) rotate(360deg) scale(1.2); opacity: 0; }
}

/* Extracted Layout Styles */
.login-content-wrapper {
  position: relative; z-index: 10; padding: 60px; max-width: 600px; margin-top: -10%;
}

.login-logo {
  height: 48px; margin-bottom: 40px; display: block;
}

.login-animated-bg-modifier {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
}

.icon-float-modifier {
  left: 15%; animation-delay: -2s; animation-duration: 22s;
}

.icon-float-modifier-bc55 {
  left: 35%; animation-delay: -10s; animation-duration: 28s;
}

.icon-float-modifier-828f {
  left: 65%; animation-delay: -5s; animation-duration: 25s;
}

.icon-float-modifier-2597 {
  left: 85%; animation-delay: -15s; animation-duration: 30s;
}

.icon-float-modifier-7095 {
  left: 25%; animation-delay: -20s; animation-duration: 26s;
}

.icon-float-modifier-8f42 {
  left: 55%; animation-delay: -1s; animation-duration: 35s;
}

.icon-float-modifier-bfe9 {
  left: 75%; animation-delay: -12s; animation-duration: 21s;
}

.icon-float-modifier-c57d {
  left: 5%; animation-delay: -25s; animation-duration: 29s;
}

.login-form-wrapper {
  flex: 1; display: flex; align-items: center; justify-content: center; position: relative;
}

.login-header {
  text-align: left; margin-bottom: 32px;
}

.form-group-modifier {
  margin-bottom: 24px;
}

.brand-modifier {
  padding: 24px 20px; border-bottom: 1px solid #1A1A24;
}

.sidebar-logo {
  max-height: 42px;
}

.sidebar-nav-modifier {
  padding: 20px 16px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
}

.flex-row-center-12 {
  display: flex; gap: 12px; align-items: center;
}

.sidebar-bottom-svg {
  position:absolute; bottom:0; width:100%; height:100%; opacity:0.3
}

.top-navbar-right {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}

.main-wrapper {
  flex: 1; overflow-y: auto; position: relative;
}

.home-view-wrapper {
  padding: 24px 40px; max-width: 1400px; margin: 0 auto;
}

.view-header-wrapper {
  margin-bottom: 24px; position: relative;
}

.grid-4-cols {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px;
}

.flex-1 {
  flex: 1;
}

.flex-baseline-8 {
  display: flex; align-items: baseline; gap: 8px;
}

.grid-3-cols {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px;
}

.flex-col-16 {
  display: flex; flex-direction: column; gap: 16px;
}

.flex-between-top {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px;
}

.chart-container-220 {
  height: 220px; position: relative;
}

.chart-container-180 {
  height: 180px; position: relative;
}

.recent-scans-list-wrapper {
  display: flex; flex-direction: column; gap: 12px;
}

.rs-row-modifier {
  grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; border-radius: 10px; padding: 14px 16px;
}

.flex-row-center-12 {
  display:flex; align-items:center; gap: 12px;
}

.date-modifier {
  text-align: right;
}

.flex-between-top-mb24 {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px;
}

.top-vuln-list-wrapper {
  display: flex; flex-direction: column; gap: 16px;
}

.flex-between-center {
  display: flex; justify-content: space-between; align-items: center;
}

.view-panel-container {
  padding: 40px 48px; max-width: 1200px; margin: 0 auto;
}

.view-header-flex {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}

.p-0 {
  padding: 0;
}

.w-30 {
  width: 30px;
}

.home-header-modifier {
  display: flex; gap: 16px; align-items: center;
}

.act-back-users-wrapper {
  padding: 8px;
}

.card-modifier {
  padding: 0; max-height: 300px; overflow-y: auto;
}

.ud-scans-list-wrapper {
  max-height: 300px; overflow-y: auto;
}

.v-sub-modifier {
  margin-bottom: 8px;
}

.v-actions-modifier {
  display: flex; gap: 12px; flex-wrap: wrap;
}

.scan-progress-fill-wrapper {
  width: 0%;
}

.ov-scope-wrapper {
  max-height:140px; margin:0
}

.log-header-modifier {
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;
}

.flex-row-16 {
  display:flex; align-items:center; gap:16px;
}

.st-h4-46dcee {
  margin:0;
}

