/* ============================================
   TICKET SYSTEM — PREMIUM DARK THEME
   ============================================ */

:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #12121e;
  --bg-card: rgba(20, 20, 35, 0.7);
  --bg-card-hover: rgba(30, 30, 50, 0.8);
  --bg-input: rgba(25, 25, 45, 0.6);
  --bg-sidebar: rgba(12, 12, 22, 0.95);

  --text-primary: #e8e8f0;
  --text-secondary: #8888a8;
  --text-muted: #555570;

  --accent: #7c5cfc;
  --accent-light: #9b7fff;
  --accent-dark: #5a3dd8;
  --accent-glow: rgba(124, 92, 252, 0.25);
  --accent-gradient: linear-gradient(135deg, #7c5cfc, #00d4ff);

  --green: #00d68f;
  --green-bg: rgba(0, 214, 143, 0.12);
  --yellow: #ffb547;
  --yellow-bg: rgba(255, 181, 71, 0.12);
  --orange: #ff7847;
  --orange-bg: rgba(255, 120, 71, 0.12);
  --red: #ff4757;
  --red-bg: rgba(255, 71, 87, 0.12);
  --blue: #00d4ff;
  --blue-bg: rgba(0, 212, 255, 0.12);

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);

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

  --sidebar-width: 260px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ============ LOGIN SCREEN ============ */

.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.login-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: orbFloat 12s ease-in-out infinite;
}

.login-bg-orb-1 {
  width: 400px; height: 400px;
  background: var(--accent);
  top: -100px; left: -100px;
  animation-delay: 0s;
}

.login-bg-orb-2 {
  width: 300px; height: 300px;
  background: var(--blue);
  bottom: -50px; right: -50px;
  animation-delay: -4s;
}

.login-bg-orb-3 {
  width: 200px; height: 200px;
  background: var(--green);
  top: 50%; left: 60%;
  animation-delay: -8s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out;
}

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

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.login-logo h1 {
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-logo p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ============ FORMS ============ */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

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

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.login-error {
  background: var(--red-bg);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: var(--red);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

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

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

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

.btn-danger:hover {
  background: #e63946;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--green);
  color: #0a0a12;
}

.btn-success:hover {
  transform: translateY(-1px);
}

/* ============ SIDEBAR ============ */

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

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  font-size: 1.75rem;
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: var(--accent-light);
  background: var(--accent-glow);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-user {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-logout:hover {
  color: var(--red);
  background: var(--red-bg);
}

/* ============ MOBILE HEADER ============ */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
  z-index: 99;
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-title {
  font-weight: 600;
  font-size: 1rem;
}

/* ============ MAIN CONTENT ============ */

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 2rem;
  min-height: 100vh;
}

.view {
  animation: fadeIn 0.3s ease;
}

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

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.view-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

.view-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  width: 100%;
}

/* ============ STATS CARDS ============ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition);
}

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

.stat-card:hover::before {
  opacity: 1;
}

.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.stat-card.green .stat-value {
  background: linear-gradient(135deg, var(--green), #00f0a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card.yellow .stat-value {
  background: linear-gradient(135deg, var(--yellow), #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card.red .stat-value {
  background: linear-gradient(135deg, var(--red), #ff6b7a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card.blue .stat-value {
  background: linear-gradient(135deg, var(--blue), #7df9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============ SECTIONS ============ */

.section {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

/* ============ TICKET LIST ============ */

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ticket-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.ticket-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.ticket-priority-bar {
  width: 4px;
  height: 100%;
  min-height: 40px;
  border-radius: 2px;
}

.ticket-priority-bar.dusuk { background: var(--green); }
.ticket-priority-bar.orta { background: var(--yellow); }
.ticket-priority-bar.yuksek { background: var(--orange); }
.ticket-priority-bar.kritik { background: var(--red); }

.ticket-info {
  min-width: 0;
}

.ticket-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.ticket-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.ticket-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

/* ============ BADGES ============ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-acik { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(0,212,255,0.2); }
.badge-devam { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(255,181,71,0.2); }
.badge-cozuldu { background: var(--green-bg); color: var(--green); border: 1px solid rgba(0,214,143,0.2); }
.badge-kapatildi { background: rgba(100,100,120,0.15); color: var(--text-muted); border: 1px solid rgba(100,100,120,0.2); }

.badge-dusuk { background: var(--green-bg); color: var(--green); }
.badge-orta { background: var(--yellow-bg); color: var(--yellow); }
.badge-yuksek { background: var(--orange-bg); color: var(--orange); }
.badge-kritik { background: var(--red-bg); color: var(--red); animation: criticalPulse 2s infinite; }

@keyframes criticalPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--red-bg); }
  50% { box-shadow: 0 0 0 4px var(--red-bg); }
}

/* ============ FILTERS ============ */

.filters-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  gap: 0.75rem;
}

.filter-select {
  padding: 0.55rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
  cursor: pointer;
}

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

.filter-search {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
}

.filter-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* ============ FILE UPLOAD ============ */

.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.file-upload-area:hover,
.file-upload-area.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--text-secondary);
}

.file-upload-area svg {
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.upload-browse {
  color: var(--accent-light);
  font-weight: 600;
  text-decoration: underline;
}

.upload-hint {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.file-preview {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.file-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.file-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-item .remove-file {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.file-preview-item:hover .remove-file {
  opacity: 1;
}

/* ============ TICKET DETAIL ============ */

.ticket-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.ticket-detail-header .back-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  transition: var(--transition);
  margin-bottom: 1rem;
}

.ticket-detail-header .back-btn:hover {
  color: var(--accent-light);
}

.ticket-detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.ticket-detail-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.ticket-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ticket-detail-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.ticket-status-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ticket-status-actions .btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
}

/* Attachments */
.attachments-section {
  margin-bottom: 2rem;
}

.attachments-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.attachments-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.attachment-thumb {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.attachment-thumb:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Comments */
.comments-section {
  margin-bottom: 2rem;
}

.comments-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.comment-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.comment-author {
  font-weight: 600;
  font-size: 0.85rem;
}

.comment-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: auto;
}

.comment-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.comment-form {
  display: flex;
  gap: 0.75rem;
}

.comment-form textarea {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 60px;
  outline: none;
  transition: var(--transition);
}

.comment-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-form textarea::placeholder {
  color: var(--text-muted);
}

/* ============ ADMIN ============ */

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  border: 1px solid var(--border);
  width: fit-content;
}

.admin-tab {
  padding: 0.6rem 1.2rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.admin-tab.active {
  background: var(--accent);
  color: white;
}

.admin-tab:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

/* Users Grid */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.user-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.user-card:hover {
  border-color: var(--border-hover);
}

.user-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

.user-card-info {
  flex: 1;
  min-width: 0;
}

.user-card-info .name {
  font-weight: 600;
  font-size: 0.95rem;
}

.user-card-info .username {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.user-card-actions .btn {
  padding: 0.35rem 0.6rem;
}

.user-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ============ MODAL ============ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ============ LIGHTBOX ============ */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}

/* ============ TOAST ============ */

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }

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

.toast-exit {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(50px); }
}

/* ============ EMPTY STATE ============ */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state svg {
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state p {
  font-size: 0.95rem;
}

/* ============ TICKET FORM (scoped) ============ */

.ticket-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 700px;
}

/* ============ SPINNER ============ */

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-header {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
    padding-top: calc(56px + 1rem);
  }

  .view-header h1 {
    font-size: 1.35rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .ticket-card {
    grid-template-columns: auto 1fr;
  }

  .ticket-badges {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
  }

  .admin-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .filter-group {
    width: 100%;
  }

  .filter-select {
    flex: 1;
  }

  .comment-form {
    flex-direction: column;
  }
}

/* Sidebar mobile overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  display: none;
}

.sidebar-overlay.show {
  display: block;
}
