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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #64748b;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --sidebar-width: 260px;
  --header-height: 64px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
}

/* Pages */
.page { display: none; }
.page.active { display: flex; }

/* Login Page */
#loginPage, #registerPage {
  min-height: 100vh;
  display: none;
  padding: 0;
}
#loginPage.active, #registerPage.active { display: flex; }

.login-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Brand / Info Panel */
.login-brand {
  flex: 1 1 55%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
  overflow: hidden;
}

.login-brand::after {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
  top: -180px;
  right: -180px;
  border-radius: 50%;
}

.login-brand::before {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
  bottom: -150px;
  left: -130px;
  border-radius: 50%;
}

.brand-panel-content {
  position: relative;
  z-index: 1;
  max-width: 440px;
  width: 100%;
}

.brand-logo-lg {
  width: 96px;
  height: 96px;
  background: rgba(255,255,255,0.12);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
}

.brand-logo-lg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.brand-tagline {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 40px;
}

.brand-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.brand-feature i {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  background: rgba(255,255,255,0.14);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.brand-feature strong {
  display: block;
  font-size: 15px;
}

.brand-feature span {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.brand-footer {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

/* Form Panel */
.login-card-panel {
  flex: 1 1 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--gray-100);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 20px 40px rgba(15,23,42,0.08);
  text-align: center;
}

.login-card-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.login-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-card-title {
  font-size: 24px;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.login-card-sub {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 28px;
}

.btn-google-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: var(--gray-700);
  background: #fff;
  border: 1.5px solid var(--gray-300);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-google-login:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-google-login:active {
  transform: translateY(0);
}

.btn-google-login i {
  color: #ea4335;
  font-size: 18px;
}

.login-status {
  color: var(--warning);
  font-size: 13px;
  margin-top: 14px;
  min-height: 18px;
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: var(--gray-400);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.login-help {
  font-size: 12.5px;
  color: var(--gray-400);
  line-height: 1.6;
}

@media (max-width: 820px) {
  .login-wrapper {
    flex-direction: column;
  }
  .login-brand {
    flex: none;
    padding: 40px 28px;
  }
  .brand-features {
    display: none;
  }
  .brand-tagline {
    margin-bottom: 0;
  }
  .login-card-panel {
    flex: none;
    padding: 28px 18px;
  }
}

/* App Layout */
#appPage {
  min-height: 100vh;
  display: none;
}
#appPage.active { display: flex; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--dark);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(135deg, rgba(37,99,235,0.1) 0%, rgba(30,41,59,0.2) 100%);
}

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

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.brand-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-size: 20px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.3px;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 18px;
  cursor: pointer;
  display: none;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

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

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

.user-role {
  font-size: 12px;
  color: var(--gray-400);
}

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

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--gray-400);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

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

.sidebar-nav a.active {
  background: rgba(37,99,235,0.15);
  color: var(--primary);
  border-left-color: var(--primary);
}

.sidebar-nav a i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

/* Top Bar */
.topbar {
  background: white;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--gray-600);
}

.topbar-left h2 {
  font-size: 20px;
  font-weight: 600;
}

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

/* Notifications */
.notifications-dropdown { position: relative; }

.notif-btn {
  background: var(--gray-100);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  font-size: 18px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.notif-btn:hover { background: var(--gray-200); }

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.notif-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 360px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin-top: 8px;
  display: none;
  max-height: 400px;
  overflow: hidden;
  z-index: 200;
}

.notif-panel.show { display: block; }

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

.notif-header h4 { font-size: 14px; }

.notif-list {
  max-height: 340px;
  overflow-y: auto;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.2s;
  font-size: 13px;
}

.notif-item:hover { background: var(--gray-100); }
.notif-item.unread { background: var(--primary-light); }
.notif-item:last-child { border-bottom: none; }
.notif-empty {
  text-align: center;
  padding: 30px;
  color: var(--gray-400);
  font-size: 14px;
}

/* Content Area */
.content {
  padding: 24px;
}

/* Page Content */
.page-content { display: none; }
.page-content.active { display: block; }

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

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.orange { background: #ffedd5; color: #ea580c; }
.stat-icon.yellow { background: #fef9c3; color: #ca8a04; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.red { background: #fee2e2; color: #dc2626; }
.stat-icon.purple { background: #f3e8ff; color: #9333ea; }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--gray-500); }

/* Cards */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

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

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-actions { display: flex; gap: 8px; }

.card-body { padding: 24px; }

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

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  background: var(--gray-100);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  white-space: nowrap;
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: var(--gray-100);
}

.table .clickable {
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
}

.table .clickable:hover { text-decoration: underline; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-open { background: #dbeafe; color: #1d4ed8; }
.badge-in_progress { background: #fef9c3; color: #a16207; }
.badge-resolved { background: #dcfce7; color: #15803d; }
.badge-closed { background: var(--gray-200); color: var(--gray-600); }
.badge-on_hold { background: #fee2e2; color: #b91c1c; }

.badge-low { background: #dcfce7; color: #15803d; }
.badge-medium { background: #fef9c3; color: #a16207; }
.badge-high { background: #ffedd5; color: #c2410c; }
.badge-critical { background: #fee2e2; color: #b91c1c; }

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

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

.form-group .required { color: var(--danger); }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  color: var(--gray-800);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-group input:disabled {
  background: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

.form-group small {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.form-group input[type="file"] {
  font-size: 13px;
  padding: 8px 0;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #16a34a; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #d97706; }

.btn-sm { padding: 4px 10px; font-size: 12px; }

.btn-reorder {
  background: transparent;
  color: var(--gray-400);
  border: 1px solid transparent;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}
.btn-reorder:hover:not(:disabled) {
  background: var(--gray-100);
  color: var(--primary);
  border-color: var(--gray-200);
}
.btn-reorder:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.reorder-cell {
  white-space: nowrap;
  display: flex;
  gap: 2px;
  align-items: center;
}

.card-header .btn-sm {
  height: 36px;
  padding: 8px 16px;
  font-size: 14px;
}
.btn-block { width: 100%; justify-content: center; }

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
  border-radius: 6px;
}

/* Filters */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filters input,
.filters select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 13px;
  flex: 1;
  min-width: 150px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid var(--gray-300);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.pagination button:hover { background: var(--gray-100); }
.pagination button.active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

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

.modal.show { display: flex; }

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-sm { max-width: 400px; }

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

.modal-header h3 { font-size: 18px; }

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray-500);
  line-height: 1;
}

.modal .modal-content form {
  padding: 24px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gray-800);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 3000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* Ticket Detail */
.ticket-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.ticket-detail-header .btn {
  height: 40px;
  padding: 10px 18px;
  font-size: 14px;
}

.ticket-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--gray-100);
  border-radius: var(--radius);
}

.meta-item label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 4px;
  font-weight: 600;
}

.meta-item span { font-size: 14px; font-weight: 500; }

.ticket-description {
  background: var(--gray-100);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.7;
}

/* Comments */
.comments-section { margin-top: 24px; }

.comments-section h4 {
  font-size: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

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

.comment-body {
  flex: 1;
  background: var(--gray-100);
  padding: 12px 16px;
  border-radius: var(--radius);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 600;
  font-size: 13px;
}

.comment-date {
  font-size: 11px;
  color: var(--gray-500);
}

.comment-text {
  font-size: 14px;
  white-space: pre-wrap;
}

.comment.internal {
  background: #fef9c3;
  border-left: 3px solid var(--warning);
}

.add-comment {
  margin-top: 16px;
}

/* Attachments */
.attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--gray-100);
  border-radius: 6px;
  font-size: 13px;
}

.attachment-item i { color: var(--primary); }

.attachment-item a {
  color: var(--gray-700);
  text-decoration: none;
}

.attachment-item a:hover { color: var(--primary); }

/* Reports */
.report-table { margin-top: 16px; }

.report-table th {
  background: var(--gray-100);
  padding: 10px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
}

.report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-200);
}

/* Audit Logs */
.audit-action {
  font-weight: 500;
}

.audit-time {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
}

/* Responsive */
.mobile-new-ticket-btn {
  display: none;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-toggle { display: block; }
  
  .mobile-new-ticket-btn {
    display: inline-flex;
    height: 38px;
    padding: 8px 14px;
  }
  
  .mobile-menu-btn { display: block; }
  
  .main-content {
    margin-left: 0;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .filters {
    flex-direction: column;
  }
  
  .filters input,
  .filters select {
    min-width: 100%;
  }
  
  .content {
    padding: 16px;
  }
  
  .topbar {
    padding: 0 16px;
  }
  
  .notif-panel {
    width: 300px;
    right: -60px;
  }
  
  .ticket-detail-meta {
    grid-template-columns: 1fr 1fr;
  }

  /* Mobile collapsible table rows */
  .table, .table thead, .table tbody, .table th, .table td, .table tr {
    display: block;
  }
  
  .table thead {
    display: none;
  }
  
  .table tbody tr {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: box-shadow 0.2s;
  }
  
  .table tbody tr:active {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  }
  
  .table tbody tr td {
    display: none;
    border: none;
    padding: 6px 0;
    font-size: 13px;
  }
  
  .table tbody tr td:first-child,
  .table tbody tr td:nth-child(2) {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .table tbody tr td:first-child {
    padding: 0 0 4px 0;
  }
  
  .table tbody tr td:nth-child(2) {
    padding: 0 0 6px 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 6px;
  }
  
  .table tbody tr td:first-child::after,
  .table tbody tr td:nth-child(2)::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: var(--gray-400);
    transition: transform 0.2s;
  }
  
  .table tbody tr td:first-child::after {
    display: none;
  }
  
  .table tbody tr td:nth-child(2)::after {
    display: block;
  }
  
  .table tbody tr.expanded td:nth-child(2)::after {
    transform: rotate(180deg);
  }
  
  .table tbody tr.expanded td {
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }
  
  .table tbody tr td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--gray-500);
    flex-shrink: 0;
  }
  
  .table tbody tr td:first-child::before,
  .table tbody tr td:nth-child(2)::before {
    display: none;
  }
  
  .table tbody tr td .btn {
    pointer-events: auto;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .ticket-detail-meta {
    grid-template-columns: 1fr;
  }
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  gap: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.divider span {
  color: var(--gray-500);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Google Auth Badge */
.google-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #fff3e0;
  color: #e65100;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.google-badge i {
  color: #ea4335;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--gray-500);
}

.loading i {
  font-size: 24px;
  margin-bottom: 8px;
}

/* hr */
hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 16px 0;
}

h4 {
  margin-bottom: 12px;
}