:root {
  --bg-primary: #0a0c10;
  --bg-secondary: #12161f;
  --bg-card: rgba(22, 28, 40, 0.75);
  --bg-card-hover: rgba(30, 38, 54, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-sub: #6b7280;

  --accent-primary: #6366f1;
  --accent-primary-glow: rgba(99, 102, 241, 0.35);
  --accent-success: #10b981;
  --accent-success-glow: rgba(16, 185, 129, 0.35);
  --accent-danger: #ef4444;
  --accent-danger-glow: rgba(239, 68, 68, 0.35);
  --accent-warning: #f59e0b;
  --accent-info: #38bdf8;
  --accent-purple: #a855f7;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.dark-mode {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* Sidebar */
.sidebar {
  width: 270px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-primary-glow);
}

.brand-text h2 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-sub {
  font-size: 0.72rem;
  color: var(--accent-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 24px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-normal);
  text-align: left;
  position: relative;
}

.nav-item i {
  width: 20px;
  height: 20px;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  transform: translateX(3px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.04));
  color: #818cf8;
  font-weight: 600;
  border-left: 3px solid var(--accent-primary);
}

.log-badge {
  margin-left: auto;
  background: var(--accent-danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px;
}

.avatar {
  width: 36px;
  height: 36px;
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-info {
  display: flex;
  flex-direction: column;
}

.admin-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.admin-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot-online {
  width: 7px;
  height: 7px;
  background-color: var(--accent-success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px var(--accent-success);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent 40%),
              radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.03), transparent 30%);
}

/* Header */
.top-header {
  height: 72px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(18, 22, 31, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 40;
}

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

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

.device-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.device-select {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
}

.device-select:focus {
  border-color: var(--border-focus);
}

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

.server-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--accent-primary-glow);
}

.btn-danger-glow {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-danger-glow);
}

.btn-danger-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-danger-glow);
}

.btn-success-glow {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-success-glow);
}

.btn-success-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-success-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 28px;
  flex: 1;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Status Card */
.hero-status-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 24px;
}

.hero-status-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.status-indicator-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--accent-success);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-success);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.status-indicator-ring.locked {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--accent-danger);
  color: var(--accent-danger);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
}

.device-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.device-title-row h1 {
  font-size: 1.45rem;
  font-weight: 700;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-dpc {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.hero-quick-actions {
  display: flex;
  gap: 12px;
}

.status-chip {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  gap: 16px;
  transition: var(--transition-normal);
}

.kpi-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.icon-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.icon-orange { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.icon-red { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.kpi-body {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.kpi-val {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.kpi-trend {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-trend.positive { color: var(--accent-success); }
.kpi-trend.negative { color: var(--accent-danger); }
.kpi-sub { font-size: 0.75rem; color: var(--text-sub); }

/* Dashboard Split Grid */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Card */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 700;
}

.card-title i {
  color: var(--accent-primary);
  width: 20px;
  height: 20px;
}

.card-badge {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.card-body {
  padding: 22px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* App Usage List */
.app-usage-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.usage-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.usage-item-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}

.usage-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.usage-time {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.85rem;
}

.progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #6366f1, #a855f7);
  transition: width 0.5s ease;
}

/* Switches Grid */
.switch-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.switch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.switch-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.switch-info strong {
  font-size: 0.92rem;
}

.switch-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Segmented Control */
.segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.seg-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.seg-btn.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-primary-glow);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.btn-group-row {
  display: flex;
  gap: 6px;
}

/* Section Title */
.section-title-row {
  margin-bottom: 24px;
}

.section-title-row h2 {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.section-title-row p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Remote Grid */
.remote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.app-permission-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-perm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.app-perm-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.app-perm-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.app-perm-pkg {
  font-size: 0.74rem;
  color: var(--text-sub);
}

/* Policy Status List */
.policy-status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.policy-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
}

.policy-item div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.policy-item div strong {
  font-size: 0.88rem;
}

.policy-item div span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Schedule List */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.schedule-time-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.timeline:before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 18px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

.timeline-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-danger);
  color: var(--accent-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
}

.timeline-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

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

.timeline-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-sub);
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Pairing Tab */
.pairing-container {
  max-width: 540px;
  margin: 0 auto;
}

.pairing-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
}

.pair-result-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px dashed var(--accent-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pair-code-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.big-pair-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 6px;
  color: #818cf8;
  text-shadow: 0 0 15px var(--accent-primary-glow);
}

.pair-instruction {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.qr-placeholder {
  width: 190px;
  height: 190px;
  background: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.time-select-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.time-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 6px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.time-btn.active, .time-btn:hover {
  background: var(--accent-success);
  border-color: var(--accent-success);
  color: #fff;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.88rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.success { border-left-color: var(--accent-success); }
.toast.danger { border-left-color: var(--accent-danger); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Analytics */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.chart-card .card-body {
  height: 300px;
  position: relative;
}

/* Responsive */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    top: 0; bottom: 0; left: -280px;
    z-index: 150;
    transition: var(--transition-normal);
  }
  .sidebar.open {
    left: 0;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  }
  .mobile-menu-btn {
    display: block;
  }
  .dashboard-split-grid, .remote-grid, .analytics-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 로그인 관문 ===== */
.login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #0a0c10;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 32px 28px;
  border: 1px solid #2a3449;
  border-radius: 20px;
  background: #161c28;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #6366f1;
}

.login-brand h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: #f3f4f6;
}

.login-desc {
  margin: 14px 0 22px;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  color: #9ca3af;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #2a3449;
  border-radius: 12px;
  background: #0a0c10;
  color: #f3f4f6;
  font-size: 15px;
}

.login-input:focus {
  outline: none;
  border-color: #6366f1;
}

.login-error {
  min-height: 18px;
  margin-top: 10px;
  font-size: 12.5px;
  text-align: center;
  color: #ef4444;
}

.login-submit {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
}
