/* LOGIN */
.login-screen { min-height: 100vh; background: var(--black); display: flex; align-items: center; justify-content: center; padding: 40px 24px; position: relative; overflow: hidden; }
.login-screen::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,169,110,.15) 0%, transparent 70%); }
.login-container { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 400px; position: relative; z-index: 1; }
.login-brand { text-align: center; margin-bottom: 48px; }
.login-logo { font-family: var(--font-display); font-size: 52px; color: var(--white); letter-spacing: -2px; margin-bottom: 4px; }
.login-tagline { color: rgba(255,255,255,.35); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; }
.login-form { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 36px 32px; width: 100%; backdrop-filter: blur(20px); }
.login-form .form-group label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.4); }
.login-form .form-group input { width: 100%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; color: var(--white); font-size: 15px; padding: 14px 16px; }
.login-form .form-group input:focus { border-color: var(--accent); }
.login-form .form-group input::placeholder { color: rgba(255,255,255,.3); }
.login-form .btn-primary { width: 100%; background: var(--white); border: none; border-radius: 12px; color: var(--black); font-size: 15px; font-weight: 800; padding: 16px; margin-top: 8px; }
.login-form .btn-primary:hover { opacity: .9; }
.login-error { color: var(--red); font-size: 12px; text-align: center; margin-top: 12px; min-height: 20px; }

/* APP SHELL */
.app { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar { width: var(--sidebar-w); min-height: 100vh; background: var(--black); display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { padding: 24px 20px 20px; border-bottom: 1px solid rgba(255,255,255,.06); }
.sidebar-logo { font-family: var(--font-display); font-size: 26px; color: var(--white); letter-spacing: -.5px; display: block; }
.sidebar-badge { display: inline-block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.3); margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: rgba(255,255,255,.5); cursor: pointer; transition: all .15s; margin-bottom: 2px; font-size: 13px; font-weight: 600; text-align: left; position: relative; white-space: nowrap; }
.nav-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.8); }
.nav-item.active { background: rgba(255,255,255,.1); color: var(--white); }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; background: var(--accent); border-radius: 0 2px 2px 0; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.nav-category {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  padding: 16px 10px 6px;
}
.nav-category:first-child { padding-top: 8px; }
.nav-item { position: relative; }
.nav-badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--black);
  font-size: 10px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
}
.nav-badge.visible { display: flex; }

.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sidebar-user .avatar-sm { background: var(--accent); color: var(--black); font-weight: 800; }
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; }
.sidebar-user-name { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 10px; color: rgba(255,255,255,.3); }
.sidebar-footer .btn-icon { color: rgba(255,255,255,.3); }
.sidebar-footer .btn-icon:hover { color: var(--red); background: none; }

/* MAIN */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }

/* TOPBAR */
.topbar { background: rgba(247,246,244,.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 0 28px; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; flex-shrink: 0; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 15px; font-weight: 800; letter-spacing: -.3px; font-family: var(--font); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.sidebar-toggle { display: none; }

.search-box { position: relative; width: 240px; }
.search-box .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--light); font-size: 16px; }
.search-box input { width: 100%; padding: 8px 12px 8px 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); font-size: 13px; outline: none; transition: border-color .2s; }
.search-box input:focus { border-color: var(--black); }

.notification-btn { position: relative; }
.notification-badge { position: absolute; top: 2px; right: 2px; background: var(--red); color: white; font-size: 9px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* Content */
.content { flex: 1; overflow-y: auto; padding: 28px; }

/* Page animation */
.page { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 1024px) {
  .sidebar { position: fixed; left: 0; top: 0; height: 100vh; transform: translateX(-100%); z-index: 200; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
}
@media (max-width: 640px) {
  .content { padding: 16px; }
  .search-box { display: none; }
}
