/* Admin Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #050505;
  --card: rgba(255,255,255,0.02);
  --border: rgba(255,255,255,0.06);
  --accent: #10b981;
  --accent-rgb: 16, 185, 129;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: #fff; min-height: 100vh; }

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: rgba(5,5,5,0.95);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.3);
  padding: 16px 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.nav-item.active {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 101;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-menu-toggle {
    display: flex;
  }
}

.bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-canvas::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 50%, rgba(16,185,129,0.08) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(139,92,246,0.06) 0%, transparent 40%); }

.logo-text { font-size: 18px; font-weight: 700; background: linear-gradient(135deg, #10b981, #34d399); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-badge { margin-left: auto; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.nav-badge.red { background: rgba(239,68,68,0.2); color: #ef4444; }

.main { margin-left: 260px; min-height: 100vh; position: relative; z-index: 1; padding: 32px; }

.header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.header h1 { font-size: 28px; font-weight: 700; }
.header-sub { color: rgba(255,255,255,0.4); margin-top: 4px; }
.header-actions { display: flex; gap: 12px; align-items: center; }

.search-box { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; color: rgba(255,255,255,0.4); }
.search-box input { background: none; border: none; outline: none; color: #fff; font-size: 14px; width: 200px; }
.search-box input::placeholder { color: rgba(255,255,255,0.3); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #059669); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.3); }
.btn-ghost { background: var(--card); border: 1px solid var(--border); color: rgba(255,255,255,0.7); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }
.btn-danger { background: rgba(239,68,68,0.2); color: #ef4444; }
.btn-danger:hover { background: rgba(239,68,68,0.3); }

.filters { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 8px; }
.filter-tab { padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 500; background: var(--card); border: 1px solid var(--border); color: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px; }
.filter-tab:hover { color: #fff; border-color: rgba(255,255,255,0.1); }
.filter-tab.active { background: rgba(var(--accent-rgb), 0.15); border-color: rgba(var(--accent-rgb), 0.3); color: var(--accent); }
.filter-tab .count { opacity: 0.6; }
.filter-select { padding: 10px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; color: #fff; font-size: 14px; cursor: pointer; }
.filter-select option { background: #111; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 16px; font-weight: 600; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 14px 24px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255,255,255,0.4); border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.table td { padding: 16px 24px; font-size: 14px; color: rgba(255,255,255,0.8); border-bottom: 1px solid var(--border); }
.table tr:last-child td { border: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }

.user { display: flex; align-items: center; gap: 12px; }
.user img { width: 40px; height: 40px; border-radius: 10px; }
.user-name { font-weight: 500; color: #fff; }
.user-email { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 2px; }

.badge { padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-green { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-yellow { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-red { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-blue { background: rgba(59,130,246,0.15); color: #3b82f6; }
.badge-purple { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.badge-gray { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }

.text-muted { color: rgba(255,255,255,0.4); }

.actions { display: flex; gap: 8px; }
.action-btn { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,0.05); border: none; color: rgba(255,255,255,0.5); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.action-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.action-btn.red:hover { background: rgba(239,68,68,0.2); color: #ef4444; }
.action-btn.green:hover { background: rgba(16,185,129,0.2); color: #10b981; }

.pagination { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--border); }
.pagination-info { font-size: 13px; color: rgba(255,255,255,0.4); }
.pagination-btns { display: flex; gap: 6px; }
.page-btn { min-width: 36px; height: 36px; padding: 0 12px; border-radius: 8px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: rgba(255,255,255,0.6); cursor: pointer; font-size: 13px; transition: all 0.2s; }
.page-btn:hover:not(:disabled) { background: rgba(255,255,255,0.1); color: #fff; }
.page-btn.active { background: rgba(var(--accent-rgb), 0.2); color: var(--accent); border-color: rgba(var(--accent-rgb), 0.3); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal { background: #0a0a0a; border: 1px solid var(--border); border-radius: 20px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,0.05); border: none; color: rgba(255,255,255,0.5); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; }

.form-group { margin-bottom: 20px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.7); margin-bottom: 8px; }
.form-input { width: 100%; padding: 12px 16px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 10px; color: #fff; font-size: 14px; transition: all 0.2s; }
.form-input:focus { outline: none; border-color: rgba(var(--accent-rgb), 0.5); background: rgba(255,255,255,0.08); }
.form-input::placeholder { color: rgba(255,255,255,0.3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Toast */
.toast-container { position: fixed; top: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; }
.toast { padding: 16px 20px; background: rgba(10,10,10,0.95); border: 1px solid var(--border); border-radius: 14px; backdrop-filter: blur(20px); display: flex; align-items: center; gap: 12px; min-width: 300px; animation: slideIn 0.3s ease; }
.toast.success { border-color: rgba(16,185,129,0.3); }
.toast.error { border-color: rgba(239,68,68,0.3); }
.toast-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.toast.success .toast-icon { background: rgba(16,185,129,0.15); color: #10b981; }
.toast.error .toast-icon { background: rgba(239,68,68,0.15); color: #ef4444; }
.toast-content { flex: 1; }
.toast-title { font-weight: 500; font-size: 14px; }
.toast-msg { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.toast.hiding { animation: slideOut 0.3s ease forwards; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }

/* Stats */
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; top: 0; right: 0; width: 100px; height: 100px; border-radius: 50%; filter: blur(40px); opacity: 0.4; }
.stat.blue::before { background: #3b82f6; }
.stat.green::before { background: #10b981; }
.stat.purple::before { background: #8b5cf6; }
.stat.amber::before { background: #f59e0b; }
.stat-value { font-size: 32px; font-weight: 700; margin-bottom: 4px; }
.stat-label { font-size: 14px; color: rgba(255,255,255,0.5); }

/* Product Cards */
.product-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: all 0.2s; }
.product-card:hover { border-color: rgba(255,255,255,0.1); transform: translateY(-2px); }
.product-image { height: 140px; background: linear-gradient(135deg, #1a1a2e, #16213e); position: relative; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-status { position: absolute; top: 12px; right: 12px; padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.product-body { padding: 20px; }
.product-name { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.product-desc { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.product-footer { display: flex; gap: 8px; }
.product-footer .btn { flex: 1; justify-content: center; padding: 10px; font-size: 13px; }

/* Tickets */
.ticket-list { display: flex; flex-direction: column; }
.ticket-item { display: flex; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.2s; }
.ticket-item:hover { background: rgba(255,255,255,0.02); }
.ticket-item:last-child { border: none; }
.ticket-priority { width: 4px; border-radius: 2px; }
.ticket-priority.high { background: #ef4444; }
.ticket-priority.medium { background: #f59e0b; }
.ticket-priority.low { background: #3b82f6; }
.ticket-content { flex: 1; min-width: 0; }
.ticket-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.ticket-id { font-size: 12px; color: rgba(255,255,255,0.4); font-family: monospace; }
.ticket-subject { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-preview { font-size: 13px; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-meta { display: flex; align-items: center; gap: 16px; margin-top: 12px; font-size: 12px; color: rgba(255,255,255,0.4); }

/* Responsive */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .main { margin-left: 0; padding: 80px 16px 16px; }
  .header { flex-direction: column; gap: 16px; align-items: flex-start; }
  .header-actions { width: 100%; flex-wrap: wrap; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .filters { flex-direction: column; align-items: stretch; }
  .filter-tabs { overflow-x: auto; padding-bottom: 8px; }
  .grid-4, .grid-3, .grid-2, .form-row { grid-template-columns: 1fr; }
  .modal { max-width: 100%; margin: 16px; }
}
