/* ============================================================
   Loxson - Enterprise Project Management System
   Theme: Tech Blue + Orange Accent
   ============================================================ */

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #3B82F6;
  --primary-50: #EFF6FF;
  --primary-100: #DBEAFE;
  --primary-200: #BFDBFE;
  --accent: #F97316;
  --accent-light: #FB923C;
  --accent-50: #FFF7ED;
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --info: #06B6D4;
  --info-light: #CFFAFE;
  --bg: #F8FAFC;
  --bg-dark: #0F172A;
  --bg-card: #FFFFFF;
  --bg-sidebar: #0F172A;
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --form-height: 40px;
  --transition: all 0.2s ease;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html {
  font-size: 14px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
}

button {
  cursor: pointer;
  font-family: var(--font);
}

input,
select,
textarea {
  font-family: var(--font);
}

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #0F172A 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(37, 99, 235, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(249, 115, 22, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-20px, -20px);
  }
}

.login-card {
  position: relative;
  width: 420px;
  padding: 48px 40px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 32px;
}

.logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 12px;
}

.sidebar-header .logo-img {
  width: 32px;
  height: 32px;
  margin-bottom: 0;
}

.login-logo h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
}

.login-logo p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin-top: 8px;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 500;
}

.login-form input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  color: #fff;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.login-form input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.login-form input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #EA580C;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #DC2626;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-50);
}

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

.btn-ghost:hover {
  background: var(--border-light);
  border-color: var(--text-muted);
}

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

.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--border-light);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   Layout - Sidebar + Main
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  color: #CBD5E1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: var(--transition);
}

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

.sidebar-header .logo-icon {
  width: 36px;
  height: 36px;
}

.sidebar-header h2 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

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

.nav-label {
  padding: 16px 12px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #475569;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #94A3B8;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
}

.nav-item.active {
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary-light);
  font-weight: 500;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

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

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

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

.sidebar-user-name {
  font-size: 13px;
  color: #E2E8F0;
  font-weight: 500;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-actions {
  display: flex;
  gap: 8px;
  font-size: 11px;
}

.sidebar-user-actions a {
  color: #64748B;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-user-actions a:hover {
  color: var(--primary-light);
}

.logout-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  cursor: pointer;
  transition: var(--transition);
}

.logout-btn:hover {
  color: var(--danger);
}

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

.topbar {
  display: none;
}

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

.topbar-left h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

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

.page-content {
  padding: 24px;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

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

.card-header h4 {
  font-size: 15px;
  font-weight: 600;
}

.card-body {
  padding: 20px;
}

/* ============================================================
   Avatar
   ============================================================ */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-sm {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.avatar-xl {
  width: 56px;
  height: 56px;
  font-size: 20px;
}

.user-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  white-space: nowrap;
}

.user-tag .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

/* ============================================================
   Status & Priority Tags
   ============================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
}

/* ============================================================
   Project List / Table
   ============================================================ */
.project-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.project-table thead th {
  background: var(--border-light);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.project-table thead th:first-child {
  border-radius: var(--radius) 0 0 0;
}

.project-table thead th:last-child {
  border-radius: 0 var(--radius) 0 0;
}

.project-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  vertical-align: middle;
}

.project-table tbody tr {
  transition: var(--transition);
}

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

.project-table .project-title {
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.project-table .project-title:hover {
  color: var(--primary);
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: var(--transition);
  outline: none;
}

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

.form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Radio Group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.radio-item:hover {
  border-color: var(--primary-200);
  background: var(--primary-50);
}

.radio-item.active {
  border-color: var(--primary);
  background: var(--primary-50);
}

.radio-item.negative {
  border-color: var(--danger);
  background: var(--danger-light);
}

.radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.radio-item.active .radio-dot {
  border-color: var(--primary);
}

.radio-item.active .radio-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.radio-item.negative .radio-dot {
  border-color: var(--danger);
}

.radio-item.negative .radio-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-lg {
  max-width: 800px;
}

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

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
}

.close-btn:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.close-btn svg {
  width: 16px;
  height: 16px;
}

/* Vertical Centering for items */
.bug-item-content,
.req-change-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-time {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.timeline-content {
  display: flex;
  align-items: center;
  line-height: 1.4;
}

/* ============================================================
   Timeline
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary-200);
}

.timeline-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-content {
  background: var(--border-light);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ============================================================
   Star Rating
   ============================================================ */
.star-rating {
  display: inline-flex;
  gap: 4px;
}

.star-rating .star {
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: #D1D5DB;
  transition: var(--transition);
}

.star-rating .star.active {
  color: #F59E0B;
}

.star-rating .star:hover {
  color: #F59E0B;
  transform: scale(1.15);
}

/* ============================================================
   File Cards
   ============================================================ */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.file-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.file-card:hover {
  border-color: var(--primary-200);
  background: var(--primary-50);
}

.file-card .file-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
}

.file-card .file-icon svg {
  width: 100%;
  height: 100%;
}

.file-card .file-name {
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.file-card .file-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
}

.file-card:hover .file-delete {
  display: flex;
}

.file-card .file-delete svg {
  width: 12px;
  height: 12px;
}

/* ============================================================
   Upload Area
   ============================================================ */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-50);
}

.upload-area svg {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.upload-area p {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ============================================================
   Bug Tracker
   ============================================================ */
.bug-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

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

.bug-level {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.bug-item.fixed {
  opacity: 0.6;
}

.bug-item.fixed .bug-title {
  text-decoration: line-through;
}

.bug-info {
  flex: 1;
}

.bug-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

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

/* ============================================================
   Stats Cards
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-bar .search-bar {
  flex: 1;
  min-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: var(--form-height);
  transition: var(--transition);
}

.filter-bar .search-bar svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.filter-bar .search-bar input {
  border: none !important;
  box-shadow: none !important;
  background: transparent;
  outline: none;
  height: 100%;
  flex: 1;
  padding: 0 8px;
  font-size: 14px;
}

.filter-bar .search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.filter-bar .filter-select,
.filter-bar .date-input,
.filter-bar .date-type-select {
  height: var(--form-height);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
  padding: 0 12px;
  transition: var(--transition);
  outline: none;
  cursor: pointer;
}

.filter-bar .filter-select:focus,
.filter-bar .date-input:focus,
.filter-bar .date-type-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.filter-bar .filter-select,
.filter-bar .date-type-select,
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px !important;
}

.user-selector-container {
  position: relative;
  width: 100%;
}

.user-selector {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 8px;
  min-height: var(--form-height);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #fff;
  cursor: text;
  transition: var(--transition);
  align-items: center;
}

.user-selector:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


.user-selector-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: var(--primary-50);
  color: var(--primary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--primary-100);
}

.user-selector-item .remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.user-selector-item .remove-btn:hover {
  background: var(--primary-100);
}

.user-selector-item .remove-btn svg {
  width: 10px;
  height: 10px;
}

.user-selector-input {
  border: none;
  outline: none;
  min-width: 60px;
  flex: 1;
  font-size: 13px;
  padding: 4px 0;
  background: transparent;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  max-height: 240px;
  overflow-y: auto;
  margin-top: 4px;
}

.user-option {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.user-option:hover {
  background: var(--bg);
}

.user-option.selected {
  background: var(--primary-50);
}

.selected-icon {
  margin-left: auto;
  color: var(--primary);
  display: flex;
  align-items: center;
}

.selected-icon svg {
  width: 16px;
  height: 16px;
}

.no-data {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}



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

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-info .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat-info .stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   Survey Page
   ============================================================ */
.survey-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #EFF6FF, #FFF7ED);
  padding: 40px 20px;
}

.survey-container {
  max-width: 680px;
  margin: 0 auto;
}

.survey-card {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  margin-bottom: 24px;
}

.survey-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.survey-card .subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.survey-dimension {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.survey-dimension:last-child {
  border-bottom: none;
}

.survey-dimension h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.survey-dimension p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 14px;
}

/* ============================================================
   Toast / Notification
   ============================================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  max-width: 360px;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

.toast-info {
  background: var(--primary);
}

.toast-warning {
  background: var(--warning);
}

/* ============================================================
   Loading
   ============================================================ */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

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

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.page-loading .loading-spinner {
  width: 36px;
  height: 36px;
  border-color: var(--border);
  border-top-color: var(--primary);
}

/* ============================================================
   Search Bar
   ============================================================ */
.search-bar {
  position: relative;
  width: 300px;
}

.search-bar input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* ============================================================
   Score Display
   ============================================================ */
.score-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 700;
}

.score-high {
  color: var(--success);
}

.score-medium {
  color: var(--warning);
}

.score-low {
  color: var(--danger);
}

/* ============================================================
   Filter Bar
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-bar .filter-select {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  outline: none;
  background: #fff;
  min-width: 120px;
}

/* ============================================================
   Countdown Badge
   ============================================================ */
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--warning-light);
  color: #92400E;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.countdown.overdue {
  background: var(--danger-light);
  color: var(--danger);
}

/* ============================================================
   Rich Text (Bug description)
   ============================================================ */
.rich-text img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 8px 0;
}

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

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

  .main-content {
    margin-left: 0;
  }

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

  .modal {
    max-width: 100%;
    margin: 10px;
  }

  .search-bar {
    width: 100%;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    padding: 0 16px;
  }

  .page-content {
    padding: 16px;
  }

  .login-card {
    width: 100%;
    padding: 32px 24px;
  }
}

/* ============================================================
   Tabs
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px;
}

.tab-item {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

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

.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ============================================================
   Flex Utilities
   ============================================================ */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.flex-1 {
  flex: 1;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-2 {
  margin-top: 8px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

.ml-auto {
  margin-left: auto;
}

.w-full {
  width: 100%;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* ============================================================
   Review Progress & Timeline
   ============================================================ */
.review-auditor-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.review-auditor-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--white);
  min-width: 160px;
  transition: var(--transition);
}

.review-auditor-card.approved {
  border-color: #86EFAC;
  background: #F0FDF4;
}

.review-auditor-card.rejected {
  border-color: #FCA5A5;
  background: #FEF2F2;
}

.review-auditor-card.pending {
  border-color: var(--border-light);
}

.review-auditor-status {
  margin-left: auto;
}

.review-progress-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.review-progress-badge.status-done {
  background: #DCFCE7;
  color: #16A34A;
}

.review-progress-badge.status-rejected {
  background: #FEE2E2;
  color: #DC2626;
}

.review-progress-badge.status-partial {
  background: #FEF3C7;
  color: #D97706;
}

.review-progress-badge.status-waiting {
  background: var(--border-light);
  color: var(--text-muted);
}

.review-timeline {
  position: relative;
  padding-left: 24px;
}

.review-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border-light);
}

.review-timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.review-timeline-item:last-child {
  padding-bottom: 0;
}

.review-timeline-dot {
  position: absolute;
  left: -21px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  background: var(--white);
  z-index: 1;
}

.review-timeline-dot.approved {
  border-color: #16A34A;
  background: #DCFCE7;
}

.review-timeline-dot.rejected {
  border-color: #DC2626;
  background: #FEE2E2;
}

.review-timeline-content {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.review-timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.review-timeline-round {
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-100);
  padding: 1px 6px;
  border-radius: 8px;
}

.review-timeline-detail {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.review-timeline-detail .item-pass {
  font-size: 12px;
  color: #16A34A;
  background: #F0FDF4;
  padding: 2px 8px;
  border-radius: 4px;
}

.review-timeline-detail .item-fail {
  font-size: 12px;
  color: #DC2626;
  background: #FEF2F2;
  padding: 2px 8px;
  border-radius: 4px;
}

.review-timeline-reason {
  margin-top: 6px;
  font-size: 12px;
  color: var(--danger);
  background: #FEF2F2;
  padding: 6px 10px;
  border-radius: 4px;
  line-height: 1.6;
}

.review-modal-progress {
  background: var(--bg-main);
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid var(--border-light);
}

.review-auditor-mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.review-auditor-mini {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid var(--border-light);
}

.review-auditor-mini.pass {
  background: #F0FDF4;
  border-color: #86EFAC;
}

.review-auditor-mini.fail {
  background: #FEF2F2;
  border-color: #FCA5A5;
}

.review-auditor-mini.wait {
  background: var(--white);
}

.info-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  font-size: 13px;
  align-items: center;
}

.search-bar svg {
  margin-right: 0 !important;
}

.filter-bar .search-bar input {
  padding-left: 8px !important;
}