:root {
  --bg-primary: #f2f8ff;
  --bg-secondary: #ffffff;
  --bg-dark: #0a0e27;
  --bg-card: #ffffff;

  --text-primary: #0a0e27;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --accent-blue: #0066ff;
  --accent-cyan: #00d9ff;
  --accent-purple: #8b5cf6;
  --accent-orange: #ff6b35;
  --accent-green: #00e676;

  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--bg-dark);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  border-radius: var(--radius-sm);
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  margin-bottom: 4px;
  position: relative;
}

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

.nav-item.active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
}

.nav-icon {
  font-size: 20px;
}

.badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}

.badge-pro {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
}

.badge-notification {
  background: var(--accent-orange);
  color: white;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  min-height: 100vh;
}

.top-header {
  background: var(--bg-secondary);
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-header h1 {
  font-size: 28px;
  font-weight: 700;
}

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

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
}

.content-wrapper {
  padding: 32px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.blue {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.1), rgba(0, 217, 255, 0.1));
  color: var(--accent-blue);
}

.stat-icon.green {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.1), rgba(0, 230, 118, 0.1));
  color: var(--accent-green);
}

.stat-icon.purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.1));
  color: var(--accent-purple);
}

.stat-icon.orange {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 107, 53, 0.1));
  color: var(--accent-orange);
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

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

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

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s;
  background: var(--bg-secondary);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Table */
.table-responsive {
  overflow-x: auto;
}

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

.table thead {
  background: var(--bg-primary);
}

.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.table tbody tr:hover {
  background: var(--bg-primary);
}

.client-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.client-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.badge-success {
  background: rgba(0, 230, 118, 0.1);
  color: var(--accent-green);
}

.badge-secondary {
  background: var(--bg-primary);
  color: var(--text-secondary);
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.activity-item:hover {
  background: var(--bg-primary);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.activity-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.activity-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Welcome Section */
.welcome-section {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
  padding: 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.welcome-content h2 {
  font-size: 32px;
  margin-bottom: 8px;
}

.welcome-content p {
  opacity: 0.9;
}

.client-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: white;
  padding: 8px;
}

/* Apps Section */
.apps-section {
  margin-bottom: 32px;
}

.apps-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
}

.app-card.active {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.app-card.locked {
  opacity: 0.6;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.app-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.app-card h4 {
  font-size: 18px;
  margin-bottom: 8px;
}

.app-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

/* Messages */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.message-item.unread {
  background: rgba(0, 102, 255, 0.05);
  border-color: var(--accent-blue);
}

.message-item:hover {
  box-shadow: var(--shadow-sm);
}

.message-platform {
  font-size: 24px;
}

.message-content {
  flex: 1;
}

.message-sender {
  font-weight: 600;
  margin-bottom: 4px;
}

.message-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 4px;
}

.message-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Alerts */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.alert-success {
  background: rgba(0, 230, 118, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.alert-error {
  background: rgba(255, 107, 53, 0.1);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 107, 53, 0.2);
}

.text-muted {
  color: var(--text-muted);
}

/* User menu in header */
.user-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: capitalize;
}

/* Login Page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1f3a 100%);
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.login-header {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
  padding: 40px 32px;
  text-align: center;
}

.login-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-header p {
  opacity: 0.9;
  font-size: 16px;
}

.login-form {
  padding: 32px;
}

.form-remember {
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.btn-block {
  width: 100%;
}

.login-footer {
  padding: 24px 32px;
  background: var(--bg-primary);
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.login-footer p {
  color: var(--text-muted);
  font-size: 13px;
}

/* Login page responsive */
@media (max-width: 480px) {
  .login-card {
    border-radius: var(--radius-md);
  }

  .login-header {
    padding: 32px 24px;
  }

  .login-header h1 {
    font-size: 28px;
  }

  .login-form {
    padding: 24px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 240px;
  }

  .main-content {
    margin-left: 240px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
/* ==== Toast Notifications ==== */
.alert {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 280px;
  max-width: 400px;
  padding: 15px 20px;
  border-radius: 10px;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 9999;
  opacity: 0;
  transform: translateX(100%);
  animation: slideIn 0.5s forwards;
}

.alert-success {
  background-color: #28a745;
}

.alert-error {
  background-color: #dc3545;
}

.alert-info {
  background-color: #007bff;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.announcements-card {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 25px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.announcement-item h4 {
  color: #b22222;
  margin-bottom: 4px;
}
.announcement-item p {
  margin-bottom: 6px;
}
