*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fef7f7;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

/* Login */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #3d1520 50%, #1a1a1a 100%);
  padding: 24px;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 48px 40px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 20px 60px rgba(0,0,0,0.5);
  text-align: center;
}

.login-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 18px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 12px rgba(122,28,42,0.3);
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #1a1a1a;
}

.login-subtitle {
  font-size: 14px;
  color: #8a8a8a;
  margin-top: 4px;
  margin-bottom: 28px;
}

.login-error {
  background: #fef2f2;
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a4a4a;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  border: 1.5px solid #e2e0dc;
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus {
  border-color: #9b2335;
  box-shadow: 0 0 0 3px rgba(155,35,53,0.12);
}

.btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, #9b2335, #7a1c2a);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  margin-top: 4px;
}

.btn-primary:hover { opacity: 0.92; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; }

/* Layout */
.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: #1a1a1a;
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand .sidebar-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}

.sidebar-brand h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar-section {
  padding: 12px 20px;
}

.sidebar-section h3 {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.25);
  margin-bottom: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.04);
}

.nav-item.active {
  color: #fff;
  background: rgba(155,35,53,0.15);
  border-right: 2px solid #9b2335;
}

.nav-item .badge {
  margin-left: auto;
  background: rgba(255,255,255,0.1);
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 6px;
}

.status-badge.online {
  background: rgba(16,185,129,0.15);
  color: #34d399;
}

.status-badge.offline {
  background: rgba(239,68,68,0.15);
  color: #f87171;
}

.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-badge.online .dot { background: #34d399; }
.status-badge.offline .dot { background: #f87171; }

/* Sidebar Logout */
.sidebar-logout {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.btn-logout {
  width: 100%;
  padding: 9px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  color: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-logout:hover {
  color: #f87171;
  border-color: rgba(248,113,113,0.3);
}

/* Main */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.main-header {
  background: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0e0e2;
}

.main-header h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.main-header .meta {
  font-size: 13px;
  color: #8a8a8a;
}

.main-content {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
}

/* Menu Toggle (hidden on desktop) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  color: #1a1a1a;
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
}

/* Utilities */
.hidden { display: none !important; }
