/* Matin Wireframe System - Base Styles */
/* Based on approved Design System */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Design System Colors */
:root {
  /* Primary Colors */
  --primary-900: #0D1B2A;
  --primary-800: #1B263B;
  --primary-600: #2D4A68;
  
  /* Accent */
  --accent-500: #C9A227;
  
  /* Semantic Colors */
  --success-500: #22774A;
  --warning-500: #B8860B;
  --danger-500: #B91C1C;
  --info-500: #0369A1;
  
  /* Neutral Scale */
  --neutral-50: #F8FAFC;
  --neutral-100: #F1F5F9;
  --neutral-200: #E2E8F0;
  --neutral-300: #CBD5E1;
  --neutral-400: #94A3B8;
  --neutral-500: #64748B;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1E293B;
  
  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 60px;
}

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

/* Base */
html {
  direction: rtl;
}

body {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--neutral-800);
  background: var(--neutral-100);
}

/* Typography */
.page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--neutral-500);
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--neutral-800);
}

.meta-text {
  font-size: 11px;
  color: var(--neutral-500);
}

/* Layout - Topbar */
.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: var(--topbar-height);
  background: var(--primary-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
}

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

.topbar-logo {
  width: 36px;
  height: 36px;
  background: var(--accent-500);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.topbar-title {
  color: white;
  font-size: 18px;
  font-weight: 600;
}

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

.topbar-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.topbar-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary-600);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

/* Layout - Sidebar */
.sidebar {
  position: fixed;
  top: var(--topbar-height);
  right: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--topbar-height));
  background: var(--primary-800);
  padding: 16px 0;
  overflow-y: auto;
  z-index: 900;
}

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-label {
  padding: 8px 20px;
  font-size: 10px;
  font-weight: 600;
  color: var(--neutral-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--neutral-300);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  cursor: pointer;
}

.sidebar-item:hover {
  background: rgba(255,255,255,0.05);
  color: white;
}

.sidebar-item.active {
  background: rgba(255,255,255,0.1);
  color: white;
  border-right: 3px solid var(--accent-500);
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}

/* Layout - Main Content */
.main {
  margin-right: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 24px;
  min-height: calc(100vh - var(--topbar-height));
}

.main.no-sidebar {
  margin-right: 0;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.page-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-header-actions {
  display: flex;
  gap: 12px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--neutral-500);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--primary-600);
  text-decoration: none;
}

.breadcrumb-separator {
  color: var(--neutral-400);
}

/* Cards */
.card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  margin-bottom: 20px;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--neutral-200);
  background: var(--neutral-50);
}

/* Stat Cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  background: rgba(45, 74, 104, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.success { background: rgba(34, 119, 74, 0.1); }
.stat-icon.warning { background: rgba(201, 162, 39, 0.1); }
.stat-icon.danger { background: rgba(185, 28, 28, 0.1); }

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--neutral-800);
}

.stat-label {
  font-size: 13px;
  color: var(--neutral-500);
}

/* Tables */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--neutral-50);
}

th {
  padding: 12px 16px;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  color: var(--neutral-600);
  border-bottom: 1px solid var(--neutral-200);
}

td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--neutral-100);
  vertical-align: middle;
}

tr:hover {
  background: var(--neutral-50);
}

.table-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-avatar {
  width: 32px;
  height: 32px;
  background: var(--neutral-200);
  border-radius: 50%;
}

.table-name {
  font-weight: 500;
  color: var(--neutral-800);
}

.table-meta {
  font-size: 11px;
  color: var(--neutral-500);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary-600);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-800);
}

.btn-secondary {
  background: white;
  color: var(--neutral-700);
  border: 1px solid var(--neutral-300);
}

.btn-secondary:hover {
  background: var(--neutral-50);
}

.btn-success {
  background: var(--success-500);
  color: white;
}

.btn-danger {
  background: var(--danger-500);
  color: white;
}

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

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--neutral-100);
  color: var(--neutral-600);
  border: 1px solid var(--neutral-200);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
}

.badge-success {
  background: rgba(34, 119, 74, 0.1);
  color: var(--success-500);
}

.badge-warning {
  background: rgba(201, 162, 39, 0.1);
  color: var(--warning-500);
}

.badge-danger {
  background: rgba(185, 28, 28, 0.1);
  color: var(--danger-500);
}

.badge-info {
  background: rgba(45, 74, 104, 0.1);
  color: var(--primary-600);
}

.badge-neutral {
  background: var(--neutral-100);
  color: var(--neutral-600);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--neutral-300);
  border-radius: 6px;
  background: white;
  color: var(--neutral-800);
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-600);
}

.form-input::placeholder {
  color: var(--neutral-400);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  padding-top: 16px;
  border-top: 1px solid var(--neutral-200);
  margin-top: 24px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-search {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.filter-search input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid var(--neutral-300);
  border-radius: 6px;
  font-size: 14px;
}

.filter-select {
  min-width: 150px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--neutral-200);
  margin-bottom: 20px;
}

.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-500);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--neutral-700);
}

.tab.active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
}

/* Profile Header */
.profile-header {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 24px;
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: var(--neutral-200);
  border-radius: 50%;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 4px;
}

.profile-role {
  font-size: 14px;
  color: var(--neutral-500);
}

.profile-meta {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}

.profile-meta-item {
  font-size: 13px;
  color: var(--neutral-600);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px;
  color: var(--neutral-500);
}

.info-value {
  font-size: 14px;
  color: var(--neutral-800);
}

/* Alerts */
.alert {
  padding: 14px 16px;
  border-radius: 6px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.alert-success {
  background: rgba(34, 119, 74, 0.1);
  border: 1px solid rgba(34, 119, 74, 0.2);
  color: var(--success-500);
}

.alert-warning {
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.2);
  color: var(--warning-500);
}

.alert-danger {
  background: rgba(185, 28, 28, 0.1);
  border: 1px solid rgba(185, 28, 28, 0.2);
  color: var(--danger-500);
}

.alert-info {
  background: rgba(3, 105, 161, 0.1);
  border: 1px solid rgba(3, 105, 161, 0.2);
  color: var(--info-500);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.pagination-info {
  font-size: 13px;
  color: var(--neutral-500);
}

.pagination-controls {
  display: flex;
  gap: 4px;
}

.pagination-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--neutral-200);
  background: white;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.pagination-btn.active {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Public Layout (No Sidebar) */
.public-header {
  background: white;
  border-bottom: 1px solid var(--neutral-200);
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.public-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-900);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.public-logo-mark {
  color: var(--accent-500);
  font-weight: 700;
  font-size: 18px;
}

.public-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-900);
}

.public-nav {
  display: flex;
  gap: 32px;
}

.public-nav a {
  color: var(--neutral-600);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.public-nav a:hover {
  color: var(--primary-600);
}

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

.public-main {
  padding: 0;
}

.public-footer {
  background: var(--primary-900);
  color: white;
  padding: 40px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 14px;
  color: var(--neutral-400);
  line-height: 1.6;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--neutral-400);
  text-decoration: none;
  font-size: 13px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  margin-top: 40px;
  text-align: center;
  color: var(--neutral-400);
  font-size: 13px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
  color: white;
  padding: 80px 40px;
  text-align: center;
}

.hero-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--neutral-300);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Features Grid */
.features-section {
  padding: 60px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.feature-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: rgba(45, 74, 104, 0.1);
  border-radius: 12px;
  margin: 0 auto 20px;
}

.feature-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 14px;
  color: var(--neutral-500);
  line-height: 1.6;
}

/* Auth Layout */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-100);
  padding: 40px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 12px;
  padding: 40px;
  border: 1px solid var(--neutral-200);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.auth-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--neutral-500);
  text-align: center;
  margin-bottom: 32px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--neutral-500);
}

.auth-footer a {
  color: var(--primary-600);
  text-decoration: none;
  font-weight: 500;
}

/* Onboarding */
.onboarding-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--neutral-100);
  padding: 40px;
}

.onboarding-card {
  width: 100%;
  max-width: 600px;
  background: white;
  border-radius: 12px;
  padding: 40px;
  border: 1px solid var(--neutral-200);
}

.onboarding-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.progress-step {
  width: 40px;
  height: 4px;
  background: var(--neutral-200);
  border-radius: 2px;
}

.progress-step.active {
  background: var(--primary-600);
}

.progress-step.completed {
  background: var(--success-500);
}

.role-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.role-card {
  border: 2px solid var(--neutral-200);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.role-card:hover {
  border-color: var(--primary-600);
}

.role-card.selected {
  border-color: var(--primary-600);
  background: rgba(45, 74, 104, 0.05);
}

.role-icon {
  width: 48px;
  height: 48px;
  background: var(--neutral-100);
  border-radius: 12px;
  margin: 0 auto 12px;
}

.role-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.role-desc {
  font-size: 12px;
  color: var(--neutral-500);
}

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--neutral-200);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  overflow: hidden;
}

.calendar-header {
  background: var(--neutral-50);
  padding: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
}

.calendar-cell {
  background: white;
  padding: 12px;
  min-height: 100px;
}

.calendar-day {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

.calendar-event {
  background: rgba(45, 74, 104, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-bottom: 4px;
  color: var(--primary-600);
}

/* Schedule Table */
.schedule-grid {
  display: grid;
  grid-template-columns: 80px repeat(5, 1fr);
  gap: 1px;
  background: var(--neutral-200);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  overflow: hidden;
}

.schedule-time {
  background: var(--neutral-50);
  padding: 16px 12px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.schedule-day-header {
  background: var(--primary-900);
  color: white;
  padding: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
}

.schedule-cell {
  background: white;
  padding: 8px;
  min-height: 60px;
}

.schedule-class {
  background: rgba(45, 74, 104, 0.1);
  border-right: 3px solid var(--primary-600);
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
}

.schedule-class-name {
  font-weight: 600;
  color: var(--primary-600);
}

.schedule-class-room {
  font-size: 11px;
  color: var(--neutral-500);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: var(--neutral-100);
  border-radius: 50%;
  margin: 0 auto 20px;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-desc {
  color: var(--neutral-500);
  margin-bottom: 20px;
}

/* Loading State */
.skeleton {
  background: linear-gradient(90deg, var(--neutral-200) 25%, var(--neutral-100) 50%, var(--neutral-200) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 22px;
  width: 60%;
  margin-bottom: 16px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* Settings Layout */
.settings-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

.settings-nav {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 8px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  color: var(--neutral-600);
  cursor: pointer;
  font-size: 14px;
}

.settings-nav-item:hover {
  background: var(--neutral-50);
}

.settings-nav-item.active {
  background: rgba(45, 74, 104, 0.1);
  color: var(--primary-600);
}

.settings-content {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 24px;
}

/* Toggle Switch */
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--neutral-100);
}

.toggle-info {
  flex: 1;
}

.toggle-label {
  font-weight: 500;
  margin-bottom: 4px;
}

.toggle-desc {
  font-size: 13px;
  color: var(--neutral-500);
}

.toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--neutral-300);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
}

.toggle-switch.active {
  background: var(--success-500);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  top: 2px;
  right: 2px;
  transition: all 0.2s;
}

.toggle-switch.active::after {
  right: 22px;
}

/* Placeholder */
.placeholder {
  background: var(--neutral-100);
  border: 2px dashed var(--neutral-300);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-400);
  font-size: 13px;
}

.placeholder-video {
  height: 400px;
}

.placeholder-image {
  height: 200px;
}

.placeholder-chart {
  height: 300px;
}

.placeholder-map {
  height: 350px;
}

/* Action Buttons in Table */
.action-buttons {
  display: flex;
  gap: 6px;
}

/* Status Indicator */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 6px;
}

.status-dot.online { background: var(--success-500); }
.status-dot.offline { background: var(--neutral-400); }
.status-dot.busy { background: var(--warning-500); }

/* Progress Bar */
.progress-bar {
  height: 8px;
  background: var(--neutral-200);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-600);
  border-radius: 4px;
}

.progress-fill.success { background: var(--success-500); }
.progress-fill.warning { background: var(--warning-500); }
.progress-fill.danger { background: var(--danger-500); }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: var(--neutral-100);
  cursor: pointer;
  font-size: 18px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--neutral-200);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(100%);
    transition: transform 0.3s;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main {
    margin-right: 0;
  }
  
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .settings-layout {
    grid-template-columns: 1fr;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
}
