* {
  font-family: 'Cairo', sans-serif;
}

body {
  background: #f0f2f5;
  margin: 0;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: #1a1a2e;
  min-height: 100vh;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 100;
  transition: all 0.3s;
}

.sidebar-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h4 {
  color: #25d366;
  margin: 0;
  font-weight: 700;
}

.sidebar .nav-link {
  color: rgba(255,255,255,0.7);
  padding: 12px 20px;
  font-size: 15px;
  border-radius: 0;
  transition: all 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #fff;
  background: rgba(37, 211, 102, 0.15);
  border-right: 3px solid #25d366;
}

.sidebar .nav-link i {
  margin-left: 10px;
  font-size: 18px;
}

/* Main Content */
.main-content {
  margin-right: 260px;
  width: calc(100% - 260px);
  min-height: 100vh;
}

.topbar {
  background: #fff;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 50;
}

.content-area {
  padding: 25px;
}

/* Cards */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card .icon {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

.stat-card .icon.bg-primary { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-card .icon.bg-success { background: linear-gradient(135deg, #25d366, #128c7e); }
.stat-card .icon.bg-warning { background: linear-gradient(135deg, #f093fb, #f5576c); }
.stat-card .icon.bg-info { background: linear-gradient(135deg, #4facfe, #00f2fe); }

.stat-card h3 {
  font-size: 28px;
  font-weight: 700;
  margin: 10px 0 0;
  color: #1a1a2e;
}

.stat-card p {
  color: #666;
  margin: 0;
  font-size: 14px;
}

/* Tables */
.table-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table-card .table {
  margin: 0;
}

.table th {
  background: #f8f9fa;
  font-weight: 600;
  font-size: 14px;
  color: #555;
  border: none;
}

.table td {
  vertical-align: middle;
  font-size: 14px;
}

/* Status Badges */
.badge-bot { background: #25d366; }
.badge-human { background: #0088cc; }
.badge-closed { background: #999; }
.badge-pending { background: #f0ad4e; }
.badge-confirmed { background: #0088cc; }
.badge-installing { background: #5bc0de; }
.badge-completed { background: #25d366; }
.badge-cancelled { background: #d9534f; }

/* Chat */
.chat-container {
  max-height: 500px;
  overflow-y: auto;
  padding: 15px;
  background: #e5ddd5;
  border-radius: 8px;
}

.chat-message {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-message.customer {
  background: #fff;
  margin-left: auto;
  border-top-left-radius: 0;
}

.chat-message.bot {
  background: #dcf8c6;
  margin-right: auto;
  border-top-right-radius: 0;
}

.chat-message.human {
  background: #cce5ff;
  margin-right: auto;
  border-top-right-radius: 0;
}

.chat-message .time {
  font-size: 11px;
  color: #999;
  text-align: left;
  margin-top: 4px;
}

/* QR Code */
.qr-container {
  text-align: center;
  padding: 20px;
}

.qr-container img {
  max-width: 300px;
  border: 3px solid #25d366;
  border-radius: 12px;
  padding: 10px;
}

/* Forms */
.form-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
}

.btn-whatsapp:hover {
  background: #128c7e;
  color: #fff;
}

/* Login */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-card h3 {
  color: #1a1a2e;
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
}

.login-card .brand {
  text-align: center;
  margin-bottom: 20px;
  font-size: 40px;
  color: #25d366;
}

/* Product Image */
.product-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 70px;
  }
  .sidebar-header h4 {
    font-size: 14px;
  }
  .sidebar .nav-link span {
    display: none;
  }
  .main-content {
    margin-right: 70px;
    width: calc(100% - 70px);
  }
}
