/* ===== BASE ===== */
* { font-family: 'Inter', sans-serif; }

body {
  background: #0a0e1a;
  min-height: 100vh;
  color: #e0e0e0;
}

/* ===== GLASS CARDS ===== */
.glass-card {
  background: rgba(20, 25, 45, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ===== GLASS NAVBAR ===== */
.glass-nav {
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  padding: 0.75rem 1.5rem;
}

/* ===== GLASS INPUTS ===== */
.glass-input {
  background-color: #141928 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  color: #e0e0e0 !important;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.glass-input:focus {
  background-color: #1a1f35 !important;
  border-color: rgba(99, 132, 255, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(99, 132, 255, 0.15) !important;
}

.glass-input::placeholder { color: rgba(255,255,255,0.3) !important; }

/* ===== SELECT / DROPDOWN FIX ===== */
select.glass-input,
.form-select.glass-input {
  background-color: #141928 !important;
  color: #e0e0e0 !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23aaa' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
  padding-right: 2.5rem !important;
  cursor: pointer;
}

select.glass-input option,
.form-select.glass-input option {
  background-color: #1a1f35;
  color: #e0e0e0;
  padding: 8px 12px;
}

select.glass-input option:hover,
.form-select.glass-input option:hover,
select.glass-input option:checked,
.form-select.glass-input option:checked {
  background-color: #2a3050;
  color: #fff;
}

/* ===== 3D BUTTONS ===== */
.btn-3d {
  border-radius: 10px;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.15s, box-shadow 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  font-size: 0.85rem;
}

.btn-3d:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-3d:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== STAT CARDS ===== */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--bs-primary), var(--bs-info));
  border-radius: 16px 16px 0 0;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== ROLE BADGES ===== */
.badge-role {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.badge-admin {
  background: rgba(220, 53, 69, 0.15);
  color: #ff6b7a;
  border: 1px solid rgba(220, 53, 69, 0.25);
}

.badge-professor {
  background: rgba(255, 193, 7, 0.12);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.25);
}

.badge-ta {
  background: rgba(25, 135, 84, 0.15);
  color: #4ade80;
  border: 1px solid rgba(25, 135, 84, 0.25);
}

/* ===== STATUS BADGES ===== */
.status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-open {
  background: rgba(255, 193, 7, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(255, 193, 7, 0.25);
}

.status-in-progress {
  background: rgba(13, 202, 240, 0.12);
  color: #22d3ee;
  border: 1px solid rgba(13, 202, 240, 0.25);
}

.status-redirected {
  background: rgba(220, 53, 69, 0.12);
  color: #f87171;
  border: 1px solid rgba(220, 53, 69, 0.25);
}

.status-resolved {
  background: rgba(25, 135, 84, 0.12);
  color: #4ade80;
  border: 1px solid rgba(25, 135, 84, 0.25);
}

.status-closed {
  background: rgba(108, 117, 125, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(108, 117, 125, 0.25);
}

/* ===== TABLE ===== */
.table-dark {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.03);
}

.table-dark th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8b92a5;
  font-weight: 600;
}

.table-dark td { border-color: rgba(255, 255, 255, 0.04); }

.table-dark td a {
  color: #7c9fff;
  transition: color 0.2s;
}

.table-dark td a:hover { color: #a5bfff; }

/* ===== FILTER BUTTONS ===== */
.filter-btn {
  border-radius: 20px;
  font-size: 0.8rem;
  padding: 4px 14px;
  transition: all 0.2s;
}

.filter-btn.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: white;
  box-shadow: 0 2px 10px rgba(99, 132, 255, 0.3);
}

/* ===== SEARCH WRAPPER ===== */
.search-wrapper { width: 250px; }

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

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

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

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(99, 132, 255, 0.2);
}

/* ===== LIFECYCLE TRACKER ===== */
.lifecycle { padding-left: 20px; }

.lifecycle-step {
  position: relative;
  padding: 10px 0 10px 20px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
}

.lifecycle-step.active {
  color: #e0e0e0;
  border-left-color: var(--bs-primary);
}

.lifecycle-step.current { font-weight: 600; }

.lifecycle-dot {
  position: absolute;
  left: -7px;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.lifecycle-step.active .lifecycle-dot {
  background: var(--bs-primary);
  box-shadow: 0 0 8px rgba(99, 132, 255, 0.5);
}

.lifecycle-step.current .lifecycle-dot {
  box-shadow: 0 0 12px rgba(99, 132, 255, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(99, 132, 255, 0.5); }
  50% { box-shadow: 0 0 16px rgba(99, 132, 255, 0.8); }
}

/* ===== UPLOAD AREA ===== */
.upload-area {
  position: relative;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: border-color 0.3s, background 0.3s;
  cursor: pointer;
}

.upload-area:hover {
  border-color: rgba(99, 132, 255, 0.4);
  background: rgba(99, 132, 255, 0.05);
}

/* ===== LOGIN PAGE ===== */
.login-page {
  background: #060914;
  overflow-x: hidden;
  overflow-y: auto;
}

.login-bg {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.cube {
  position: absolute;
  border: 1px solid rgba(99, 132, 255, 0.15);
  border-radius: 12px;
  animation: float 6s ease-in-out infinite;
}

.cube-1 {
  width: 100px;
  height: 100px;
  top: 15%;
  left: 10%;
  background: rgba(99, 132, 255, 0.03);
  animation-delay: 0s;
  transform: rotate(45deg);
}

.cube-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  background: rgba(139, 92, 246, 0.03);
  border-color: rgba(139, 92, 246, 0.12);
  animation-delay: 1.5s;
  transform: rotate(30deg);
}

.cube-3 {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 20%;
  background: rgba(16, 185, 129, 0.03);
  border-color: rgba(16, 185, 129, 0.12);
  animation-delay: 3s;
  transform: rotate(60deg);
}

.cube-4 {
  width: 120px;
  height: 120px;
  top: 25%;
  right: 25%;
  background: rgba(245, 158, 11, 0.03);
  border-color: rgba(245, 158, 11, 0.1);
  animation-delay: 4.5s;
  transform: rotate(15deg);
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50% { transform: translateY(-20px) rotate(50deg); }
}

.login-card {
  position: relative;
  z-index: 1;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border-radius: 20px;
  background: rgba(99, 132, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 32px rgba(99, 132, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ===== ALERTS ===== */
.glass-alert {
  background: rgba(20, 25, 45, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 10px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== ROLE SELECTOR CARDS ===== */
.role-card {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.25s ease;
}

.role-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.role-card-active {
  background: rgba(99, 132, 255, 0.1) !important;
  border-color: rgba(99, 132, 255, 0.5) !important;
  box-shadow: 0 0 20px rgba(99, 132, 255, 0.15);
}

/* ===== MULTI-SELECT LIST ===== */
.multi-select-wrapper {
  background: #141928;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.multi-select-list {
  max-height: 220px;
  overflow-y: auto;
}

.multi-select-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  margin: 0;
}

.multi-select-item:last-child {
  border-bottom: none;
}

.multi-select-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.multi-select-item input[type="checkbox"] {
  display: none;
}

.multi-select-label {
  flex: 1;
  font-size: 0.9rem;
  color: #ccc;
}

.multi-select-check {
  color: transparent;
  font-size: 0.85rem;
  transition: all 0.2s;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.multi-select-item input[type="checkbox"]:checked ~ .multi-select-check {
  color: #fff;
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  box-shadow: 0 0 10px rgba(99, 132, 255, 0.3);
}

.multi-select-item input[type="checkbox"]:checked ~ .multi-select-label {
  color: #fff;
  font-weight: 500;
}

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

/* Navbar mobile */
@media (max-width: 991.98px) {
  .glass-nav {
    padding: 0.5rem 1rem;
  }

  .navbar-collapse {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
  }

  .navbar-collapse .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0.5rem;
  }
}

/* Small screens */
@media (max-width: 767.98px) {
  /* Page padding */
  .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-top: 16px !important;
  }

  /* Login & Register cards */
  .login-card {
    width: 100% !important;
    max-width: 100%;
    margin: 0 12px;
    padding: 1.5rem !important;
  }

  .login-logo {
    width: 60px;
    height: 60px;
  }

  .login-logo i.fa-3x { font-size: 1.5rem !important; }
  .login-logo i.fa-2x { font-size: 1.25rem !important; }

  .login-card h2 { font-size: 1.4rem; }

  /* Dashboard header */
  .d-flex.justify-content-between {
    flex-direction: column;
    gap: 0.75rem;
  }

  .d-flex.justify-content-between .btn-3d {
    width: 100%;
    text-align: center;
  }

  /* Stat cards */
  .stat-card { padding: 1rem !important; }
  .stat-card h2 { font-size: 1.4rem; }
  .stat-icon { width: 40px; height: 40px; border-radius: 10px; }
  .stat-icon i { font-size: 1rem !important; }

  /* Filter bar */
  .filter-btn { font-size: 0.7rem; padding: 3px 10px; }

  .search-wrapper {
    width: 100% !important;
    margin-top: 8px;
    margin-left: 0 !important;
  }

  /* Table */
  .table th, .table td {
    font-size: 0.78rem;
    padding: 0.5rem 0.4rem !important;
    white-space: nowrap;
  }

  .table th:first-child, .table td:first-child { padding-left: 0.75rem !important; }
  .table th:last-child, .table td:last-child { padding-right: 0.75rem !important; }

  /* Glass cards reduce border-radius on mobile */
  .glass-card { border-radius: 12px; }

  /* Problem detail sidebar goes full-width */
  .col-lg-4, .col-lg-8 { padding-left: 0; padding-right: 0; }

  /* Problem detail header badges stack */
  .d-flex.align-items-center.gap-3 {
    flex-wrap: wrap;
    gap: 0.5rem !important;
  }

  /* Buttons in sidebar */
  .d-grid .btn { font-size: 0.8rem; }

  /* Admin cards */
  .col-lg-4 .glass-card,
  .col-lg-8 .glass-card { padding: 1rem !important; }

  /* Role selector */
  .role-card { padding: 0.75rem !important; }
  .role-card i { font-size: 1rem !important; }
  .role-card span { font-size: 0.8rem; }

  /* Upload area */
  .upload-area { padding: 20px 15px; }
  .upload-area i { font-size: 1.5rem !important; }
  .upload-area p { font-size: 0.85rem; }

  /* Comment cards */
  .comment-card { padding: 0.75rem !important; }

  /* Badge role text */
  .badge-role { font-size: 0.7rem; padding: 3px 8px; }

  /* Status badge */
  .status-badge { font-size: 0.65rem; padding: 3px 8px; }

  /* H3 headings */
  h3 { font-size: 1.2rem !important; }
  h5 { font-size: 1rem !important; }

  /* Hide cubes on mobile - performance */
  .cube { display: none; }
}

/* Extra small screens */
@media (max-width: 400px) {
  .login-card { padding: 1.25rem !important; }
  .form-control-lg { font-size: 0.9rem; padding: 0.5rem 0.75rem; }
  .btn-lg { font-size: 0.85rem; padding: 0.6rem; }

  .role-card span { font-size: 0.75rem; }

  .filter-btn { font-size: 0.65rem; padding: 2px 8px; }
}

