/* ============================================================
   RR Construction - Ultra Fast Professional UI
   Red & White  |  Sharp Corners  |  Max Performance
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* - CSS Variables - */
:root {
  --red:          #C0392B;
  --red-dark:     #922B21;
  --red-deep:     #641E16;
  --red-light:    #E74C3C;
  --red-faint:    rgba(192, 57, 43, 0.05);

  --white:        #FFFFFF;
  --off-white:    #F8F9FA;
  --grey-100:     #F1F3F4;
  --grey-200:     #E0E3E7;
  --grey-400:     #9AA0A6;
  --grey-600:     #5F6368;
  --text:         #1A1A2E;
  --text-light:   #4A4A6A;

  --sidebar-w:    250px;
  
  /* Sharp Professional Corners */
  --radius-sm:    3px;
  --radius:       4px;
  --radius-lg:    6px;
  --radius-xl:    8px;

  /* Snappy fast transitions */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08);
  --shadow:       0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg:    0 4px 12px rgba(0,0,0,0.08);

  --transition:   all 0.1s ease-in-out;
}

/* - Reset & Base - */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: auto; } /* Disabled smooth scroll for instant snap */

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--off-white);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--red-dark); }
img { max-width: 100%; height: auto; display: block; }

/* - SPLIT LOGIN PAGE - */
.login-split {
  display: flex;
  min-height: 100vh;
  background: var(--white);
}

/* Left Panel */
.login-left {
  flex: 1;
  background: linear-gradient(135deg, #e74c3c 0%, #d35400 100%);
  color: white;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 60px;
  overflow: hidden;
}

.login-left-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.8;
  pointer-events: none;
}

.login-left-pattern::after {
  content: '';
  position: absolute;
  bottom: -150px;
  right: -150px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
}

.login-left-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: auto;
}
.brand-icon-box {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.brand-text strong { display: block; font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.brand-text span { display: block; font-size: 0.75rem; opacity: 0.8; }

.login-hero {
  margin-top: 80px;
  margin-bottom: 80px;
}
.login-hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}
.login-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 450px;
  line-height: 1.6;
}

.login-stats {
  display: flex;
  gap: 40px;
  margin-top: auto;
}
.stat-box h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; }
.stat-box p { font-size: 0.85rem; opacity: 0.9; font-weight: 500; }

/* Right Panel */
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--white);
}

.login-form-wrapper {
  width: 100%;
  max-width: 420px;
}

.login-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-subtitle {
  color: #7a828e;
  font-size: 0.95rem;
  margin-bottom: 36px;
}

.icon-input-group label {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-400);
  font-size: 0.9rem;
}

.form-control.with-icon {
  padding-left: 44px;
  height: 48px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  background: #fff;
}
.form-control.with-icon:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}
.form-control.with-icon:focus + i,
.form-control.with-icon:focus ~ i {
  color: var(--red);
}

.login-btn {
  height: 48px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 12px;
  background: #da291c; /* Sharp block red */
  border-radius: var(--radius-sm);
}
.login-btn:hover { background: #b81d12; }
.btn-block { width: 100%; display: flex; }

.login-copyright {
  text-align: center;
  margin-top: 60px;
  font-size: 0.75rem;
  color: var(--grey-400);
}

@media (max-width: 900px) {
  .login-left { display: none; }
  .login-right { padding: 20px; }
}

/* - FORMS - */
.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--grey-600);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 11px 15px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  font-family: inherit;
  transition: var(--transition);
  background: var(--white);
  outline: none;
}

.form-control:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

/* - BUTTONS - */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--red-dark);
}

.btn-outline {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-outline:hover {
  background: var(--red);
  color: white;
}

.btn-white {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-white:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

.btn-danger {
  background: #e74c3c;
  color: white;
}
.btn-danger:hover { background: #c0392b; color: white; }

.btn-success {
  background: #27ae60;
  color: white;
}
.btn-success:hover { background: #219150; color: white; }

.btn-warning {
  background: #f39c12;
  color: white;
}
.btn-warning:hover { background: #d68910; color: white; }

.btn-secondary {
  background: var(--grey-100);
  color: var(--grey-600);
  border-color: var(--grey-200);
}
.btn-secondary:hover { background: var(--grey-200); color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 0.78rem; }
.btn-lg { padding: 13px 28px; font-size: 0.95rem; width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* - APP LAYOUT - */
.app-wrapper { display: flex; min-height: 100vh; background: var(--off-white); }

/* - SIDEBAR - */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--red-deep) 0%, var(--red-dark) 45%, var(--red) 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

/* Sidebar glass overlay */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(0,0,0,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: relative;
}

.brand-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.sidebar-brand h2 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.sidebar-brand p {
  font-size: 0.7rem;
  opacity: 0.55;
  margin-top: 3px;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.sidebar-nav {
  padding: 18px 14px;
  flex: 1;
}

.nav-section-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 14px 10px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  font-size: 0.86rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 3px;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: white;
  border-radius: 0 3px 3px 0;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.nav-link i {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: var(--transition);
}

.nav-link:hover {
  background: rgba(255,255,255,0.12);
  color: white;
}

.nav-link.active {
  background: rgba(255,255,255,0.18);
  color: white;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.nav-link.active::before { transform: scaleY(1); }
.nav-link.active i, .nav-link:hover i { opacity: 1; }

.sidebar-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  position: relative;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  backdrop-filter: blur(10px);
}

.user-badge .avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-badge .info { flex: 1; min-width: 0; }
.user-badge .uname {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-badge .urole {
  font-size: 0.7rem;
  opacity: 0.6;
}

/* - MAIN CONTENT - */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: opacity 0.15s ease;
}

/* - TOPBAR - */
.topbar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 20px rgba(0,0,0,0.05);
}

.topbar h1 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

.topbar .breadcrumb {
  font-size: 0.75rem;
  color: var(--grey-400);
  margin-top: 2px;
}

.page-body {
  padding: 28px 32px;
  flex: 1;
}

/* - CARDS - */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  transition: var(--transition);
}

.card:hover { box-shadow: var(--shadow-lg); }

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--grey-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to right, rgba(192,57,43,0.02), transparent);
}

.card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i {
  color: var(--red);
  font-size: 0.9rem;
}

.card-body { padding: 24px; }

/* - STAT CARDS - */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.10s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.20s; }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--red-light));
}

.stat-card.green::before  { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.stat-card.blue::before   { background: linear-gradient(90deg, #2980b9, #3498db); }
.stat-card.orange::before { background: linear-gradient(90deg, #e67e22, #f39c12); }

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, rgba(192,57,43,0.1), rgba(192,57,43,0.05));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon i {
  font-size: 1.3rem;
  color: var(--red);
}

.stat-card.green  .stat-icon { background: linear-gradient(135deg, rgba(39,174,96,0.12), rgba(39,174,96,0.05)); }
.stat-card.green  .stat-icon i { color: #27ae60; }
.stat-card.blue   .stat-icon { background: linear-gradient(135deg, rgba(41,128,185,0.12), rgba(41,128,185,0.05)); }
.stat-card.blue   .stat-icon i { color: #2980b9; }
.stat-card.orange .stat-icon { background: linear-gradient(135deg, rgba(230,126,34,0.12), rgba(230,126,34,0.05)); }
.stat-card.orange .stat-icon i { color: #e67e22; }

.stat-info .stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
}

.stat-info .stat-label {
  font-size: 0.75rem;
  color: var(--grey-400);
  margin-top: 5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Stat card bg decoration */
.stat-card::after {
  content: '';
  position: absolute;
  right: -20px; bottom: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-faint), transparent);
  pointer-events: none;
}

/* - TABLES - */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

thead th {
  background: var(--grey-100);
  color: var(--grey-600);
  padding: 13px 18px;
  font-weight: 600;
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid var(--grey-200);
}

thead th:first-child { border-radius: 0; }
thead th:last-child  { border-radius: 0; }

tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--grey-100);
  vertical-align: middle;
  color: var(--text);
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover { background: rgba(192,57,43,0.03); }

.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* - BADGES - */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge-active   { background: rgba(39,174,96,0.1); color: #27ae60; }
.badge-inactive { background: rgba(192,57,43,0.1); color: var(--red); }
.badge-admin    { background: rgba(192,57,43,0.1); color: var(--red); }
.badge-user     { background: rgba(41,128,185,0.1); color: #2980b9; }

/* - ALERTS - */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.alert-success {
  background: rgba(39,174,96,0.08);
  color: #1e8449;
  border: 1px solid rgba(39,174,96,0.2);
}
.alert-error {
  background: rgba(192,57,43,0.08);
  color: var(--red-dark);
  border: 1px solid rgba(192,57,43,0.2);
}
.alert-info {
  background: rgba(41,128,185,0.08);
  color: #1a5276;
  border: 1px solid rgba(41,128,185,0.2);
}
.alert-warning {
  background: rgba(243,156,18,0.08);
  color: #9a7d0a;
  border: 1px solid rgba(243,156,18,0.2);
}

/* - PHOTO UPLOAD ZONE - */
.upload-zone {
  border: 2px dashed var(--grey-200);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: var(--grey-100);
  position: relative;
  overflow: hidden;
}

.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(192,57,43,0.05), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--red);
  border-style: solid;
  background: rgba(192,57,43,0.03);
}

.upload-zone:hover::before, .upload-zone.dragover::before { opacity: 1; }

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-zone .upload-icon {
  font-size: 2.2rem;
  color: var(--red);
  margin-bottom: 12px;
  opacity: 0.7;
}

.upload-zone .upload-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.upload-zone p {
  font-size: 0.8rem;
  color: var(--grey-400);
}

/* - PHOTO PREVIEW - */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.preview-slot {
  border: 2px dashed var(--grey-200);
  border-radius: var(--radius-sm);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-400);
  font-size: 0.78rem;
  flex-direction: column;
  gap: 6px;
  background: var(--grey-100);
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}

.preview-slot i { font-size: 1.6rem; opacity: 0.4; }

.preview-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: 6px;
  animation: scaleIn 0.3s ease;
}

.remove-btn {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(192,57,43,0.9);
  backdrop-filter: blur(6px);
  color: white;
  border: none;
  border-radius: 6px;
  width: 26px; height: 26px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: var(--transition);
}
.remove-btn:hover { background: var(--red-dark); transform: scale(1.1); }

/* - PHOTO COUNTER DOTS - */
.photo-counter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
}

.photo-dots { display: flex; gap: 7px; }

.photo-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--grey-200);
  background: white;
  transition: var(--transition);
}

.photo-dot.filled {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.15);
  transform: scale(1.15);
}

/* - PHOTO THUMBNAILS - */
.photo-thumb-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-thumb {
  width: 68px; height: 54px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--grey-100);
  cursor: pointer;
  transition: var(--transition);
}

.photo-thumb:hover {
  transform: scale(1.1) translateY(-2px);
  border-color: var(--red);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  z-index: 2;
  position: relative;
}

/* - LIGHTBOX - */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  backdrop-filter: blur(10px);
}

.lightbox.open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.lightbox img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
  animation: scaleIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.lightbox-close {
  position: absolute;
  top: 22px; right: 28px;
  color: rgba(255,255,255,0.7);
  font-size: 1.8rem;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
  color: white;
  transform: scale(1.05);
}

.lightbox-caption {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  font-weight: 500;
}

/* - FILTER BAR - */
.filter-bar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 22px;
  background: white;
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.filter-bar .form-group { margin-bottom: 0; min-width: 150px; flex: 1; }

/* - PROJECT CARDS (USER) - */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.project-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--red-light));
  transition: var(--transition);
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(192,57,43,0.03), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.project-card:hover::after { opacity: 1; }

.project-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.project-card .location {
  font-size: 0.8rem;
  color: var(--grey-400);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.project-card .location i { color: var(--red); }

/* - HISTORY CARDS - */
.history-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  border-left: 4px solid var(--red);
  transition: var(--transition);
}

.history-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateX(3px);
}

.history-card .history-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--grey-100);
  background: linear-gradient(to right, rgba(192,57,43,0.03), transparent);
}

.history-card .history-body { padding: 16px 20px; }

/* - ASSIGNMENTS - */
.assign-list { list-style: none; }

.assign-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  background: var(--off-white);
  border: 1px solid var(--grey-100);
  font-size: 0.86rem;
  transition: var(--transition);
}

.assign-list li:hover { border-color: var(--grey-200); background: white; }

.assign-list li span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* - PAGINATION - */
.pagination { display: flex; gap: 6px; margin-top: 22px; flex-wrap: wrap; }

.page-btn {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--grey-200);
  background: white;
  color: var(--text-light);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.page-btn:hover { border-color: var(--red); color: var(--red); }
.page-btn.active {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(192,57,43,0.3);
}

/* - CHECKBOX LIST - */
.checkbox-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.checkbox-list li label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--grey-200);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.86rem;
  font-weight: 500;
}

.checkbox-list li label:hover { border-color: var(--red); background: rgba(192,57,43,0.03); }
.checkbox-list li label:has(input:checked) {
  border-color: var(--red);
  background: rgba(192,57,43,0.05);
  color: var(--red);
}

input[type="checkbox"] { accent-color: var(--red); width: 15px; height: 15px; cursor: pointer; }

/* - EMPTY STATE - */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--grey-400);
}

.empty-state .empty-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  opacity: 0.3;
  color: var(--red);
}

.empty-state p {
  font-size: 0.9rem;
  font-weight: 500;
}

/* - UTILITIES - */
.text-red    { color: var(--red); }
.text-muted  { color: var(--grey-400); }
.text-small  { font-size: 0.78rem; }
.fw-bold     { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 12px; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.hidden { display: none; }

/* - SCROLLBAR - */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--grey-200); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--grey-400); }

/* - MOBILE - */
@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }
  .page-body { padding: 20px; }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .main-content { margin-left: 0; }
  .app-wrapper { flex-direction: column; }
  .preview-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: column; }
  .topbar { padding: 14px 20px; }
  .page-body { padding: 16px; }
}

@media (max-width: 480px) {
  .preview-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 36px 24px; }
.project-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.project-card .location {
  font-size: 0.8rem;
  color: var(--grey-400);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.project-card .location i { color: var(--red); }

/* - HISTORY CARDS - */
.history-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  border-left: 4px solid var(--red);
  transition: var(--transition);
}

.history-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateX(3px);
}

.history-card .history-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--grey-100);
  background: linear-gradient(to right, rgba(192,57,43,0.03), transparent);
}

.history-card .history-body { padding: 16px 20px; }

/* - ASSIGNMENTS - */
.assign-list { list-style: none; }

.assign-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  background: var(--off-white);
  border: 1px solid var(--grey-100);
  font-size: 0.86rem;
  transition: var(--transition);
}

.assign-list li:hover { border-color: var(--grey-200); background: white; }

.assign-list li span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* - PAGINATION - */
.pagination { display: flex; gap: 6px; margin-top: 22px; flex-wrap: wrap; }

.page-btn {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--grey-200);
  background: white;
  color: var(--text-light);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.page-btn:hover { border-color: var(--red); color: var(--red); }
.page-btn.active {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(192,57,43,0.3);
}

/* - CHECKBOX LIST - */
.checkbox-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.checkbox-list li label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--grey-200);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.86rem;
  font-weight: 500;
}

.checkbox-list li label:hover { border-color: var(--red); background: rgba(192,57,43,0.03); }
.checkbox-list li label:has(input:checked) {
  border-color: var(--red);
  background: rgba(192,57,43,0.05);
  color: var(--red);
}

input[type="checkbox"] { accent-color: var(--red); width: 15px; height: 15px; cursor: pointer; }

/* - EMPTY STATE - */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--grey-400);
}

.empty-state .empty-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  opacity: 0.3;
  color: var(--red);
}

.empty-state p {
  font-size: 0.9rem;
  font-weight: 500;
}

/* - UTILITIES - */
.text-red    { color: var(--red); }
.text-muted  { color: var(--grey-400); }
.text-small  { font-size: 0.78rem; }
.fw-bold     { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 12px; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.hidden { display: none; }

/* - SCROLLBAR - */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--grey-200); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--grey-400); }

/* - MOBILE - */
@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }
  .page-body { padding: 20px; }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .main-content { margin-left: 0; }
  .app-wrapper { flex-direction: column; }
  .preview-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: column; }
  .topbar { padding: 14px 20px; }
  .page-body { padding: 16px; }
}

@media (max-width: 480px) {
  .preview-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 36px 24px; }
}

/* - REMOVED STAGGERED ANIMATIONS FOR SPEED - */

/* - PROJECT CARD STAGGER - */
/* - COLLAPSIBLE SIDEBAR - */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--off-white);
  transition: var(--transition);
}

.sidebar {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.main-content {
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Brand Layout */
.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-info .brand-icon {
  margin-bottom: 0;
}

/* The new collapse button in the red sidebar */
.sidebar-collapse-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.2rem;
}
.sidebar-collapse-btn:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

/* Collapsed State */
.app-wrapper.collapsed .sidebar {
  width: 75px;
}
.app-wrapper.collapsed .main-content {
  margin-left: 75px;
}
.app-wrapper.collapsed .sidebar-brand {
  padding: 24px 0;
  justify-content: center;
}
.app-wrapper.collapsed .brand-info,
.app-wrapper.collapsed .nav-section-label,
.app-wrapper.collapsed .nav-link-text,
.app-wrapper.collapsed .sidebar-footer .info,
.app-wrapper.collapsed .sidebar-footer .btn span {
  display: none;
}
.app-wrapper.collapsed .nav-link {
  justify-content: center;
  padding: 14px 0;
}
.app-wrapper.collapsed .nav-link i {
  margin: 0;
  font-size: 1.2rem;
}
.app-wrapper.collapsed .user-badge {
  padding: 0;
  justify-content: center;
}
.app-wrapper.collapsed .user-badge .avatar {
  margin-right: 0;
}
.app-wrapper.collapsed .sidebar-footer {
  padding: 15px 10px;
}
.app-wrapper.collapsed .sidebar-footer .btn {
  padding: 10px 0;
  justify-content: center;
}
.app-wrapper.collapsed .sidebar-footer .btn i {
  margin: 0;
}

