/* TechEx Central Portal — Main Stylesheet
   Brand: Tech Executive Labs
   Font: Poppins | Colors: Navy #0D1117, Blue-Gray #4567B7, Light #C8D0E0 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* =====================================================
   CSS VARIABLES
   ===================================================== */
:root {
  /* Brand Colors */
  --navy:        #0D1117;
  --navy-800:    #111827;
  --navy-700:    #141B27;
  --navy-600:    #1A2335;
  --navy-500:    #1E2D45;
  --navy-400:    #243450;

  --blue:        #4567B7;
  --blue-dark:   #3557A7;
  --blue-light:  #5577C7;
  --blue-muted:  #2A3F70;

  --gray-light:  #C8D0E0;
  --gray-mid:    #8B9CB6;
  --gray-dim:    #4B5563;
  --gray-line:   #1E2D45;

  --white:       #FFFFFF;

  /* Status */
  --success:     #059669;
  --warning:     #D97706;
  --danger:      #DC2626;
  --info:        #0891B2;
  --purple:      #7C3AED;

  /* Layout */
  --sidebar-w:   260px;
  --header-h:    64px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-sm:   6px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.5);

  /* Transitions */
  --transition:  all 0.2s ease;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--navy);
  color: var(--gray-light);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--white); }

img { max-width: 100%; display: block; }

input, textarea, select, button {
  font-family: 'Poppins', sans-serif;
  font-size: 0.93rem;
}

/* =====================================================
   LAYOUT — SIDEBAR + MAIN
   ===================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy-700);
  border-right: 1px solid var(--gray-line);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--gray-line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--white);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-transform: uppercase;
}

.sidebar-brand-sub {
  font-size: 0.68rem;
  color: var(--blue);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-dim);
  padding: 12px 8px 6px;
  margin-top: 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--gray-mid);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  margin-bottom: 2px;
}

.sidebar-item:hover {
  background: var(--navy-500);
  color: var(--white);
}

.sidebar-item.active {
  background: var(--blue-muted);
  color: var(--white);
}

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

.sidebar-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-item.active svg,
.sidebar-item:hover svg { opacity: 1; }

.sidebar-badge {
  margin-left: auto;
  background: var(--danger);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  line-height: 1.6;
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid var(--gray-line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue-light);
  flex-shrink: 0;
  text-transform: uppercase;
}

.sidebar-user-info { flex: 1; overflow: hidden; }
.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 0.7rem;
  color: var(--blue);
  font-weight: 500;
  text-transform: capitalize;
}

.sidebar-logout {
  color: var(--gray-dim);
  transition: var(--transition);
  padding: 4px;
  border-radius: 4px;
}
.sidebar-logout:hover { color: var(--danger); }

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--header-h);
  background: var(--navy-700);
  border-bottom: 1px solid var(--gray-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left h1 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
}

.topbar-left p {
  font-size: 0.78rem;
  color: var(--gray-mid);
  margin-top: 1px;
}

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

.topbar-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy-500);
  border: 1px solid var(--gray-line);
  color: var(--gray-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.topbar-btn:hover { background: var(--navy-400); color: var(--white); }
.topbar-btn svg { width: 18px; height: 18px; }

.topbar-notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--navy-700);
}

.page-content {
  padding: 28px;
  flex: 1;
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
  background: var(--navy-700);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
}

.card-body { padding: 24px; }
.card-body-sm { padding: 16px 24px; }

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-line);
  background: var(--navy-800);
}

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

.stat-card {
  background: var(--navy-700);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-color, var(--blue));
  border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card:hover { border-color: var(--navy-400); transform: translateY(-1px); }

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-bottom: 10px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-change {
  font-size: 0.75rem;
  color: var(--gray-dim);
}

.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

.stat-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.08;
}
.stat-icon svg { width: 60px; height: 60px; }

/* =====================================================
   TABLES
   ===================================================== */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-dim);
  background: var(--navy-800);
  border-bottom: 1px solid var(--gray-line);
  white-space: nowrap;
}

tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-line);
  font-size: 0.875rem;
  color: var(--gray-light);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background 0.15s;
}
tbody tr:hover { background: rgba(69,103,183,0.04); }

/* =====================================================
   BADGES / PILLS
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-blue     { background: rgba(69,103,183,0.18); color: #7BA3F7; }
.badge-green    { background: rgba(5,150,105,0.18);  color: #34D399; }
.badge-yellow   { background: rgba(217,119,6,0.18);  color: #FBBF24; }
.badge-red      { background: rgba(220,38,38,0.18);  color: #F87171; }
.badge-purple   { background: rgba(124,58,237,0.18); color: #A78BFA; }
.badge-gray     { background: rgba(107,114,128,0.18);color: #9CA3AF; }
.badge-cyan     { background: rgba(8,145,178,0.18);  color: #22D3EE; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

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

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

.btn-secondary {
  background: var(--navy-500);
  color: var(--gray-light);
  border: 1px solid var(--gray-line);
}
.btn-secondary:hover { background: var(--navy-400); color: var(--white); }

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

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

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

.btn-ghost {
  background: transparent;
  color: var(--gray-mid);
  border: 1px solid var(--gray-line);
}
.btn-ghost:hover { background: var(--navy-500); color: var(--white); }

.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 13px 28px;
  font-size: 0.95rem;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-mid);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--navy-800);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-sm);
  color: var(--gray-light);
  font-size: 0.875rem;
  transition: var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(69,103,183,0.15);
}

.form-control::placeholder { color: var(--gray-dim); }

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238B9CB6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--gray-dim);
  margin-top: 4px;
}

.form-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 4px;
}

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

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-line);
}

/* File upload */
.file-upload {
  border: 2px dashed var(--gray-line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--navy-800);
}
.file-upload:hover { border-color: var(--blue); background: rgba(69,103,183,0.04); }
.file-upload.drag-over { border-color: var(--blue); background: rgba(69,103,183,0.08); }

/* =====================================================
   ALERTS / FLASH MESSAGES
   ===================================================== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-left: 4px solid;
}

.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

.alert-success { background: rgba(5,150,105,0.1);  border-color: var(--success); color: #34D399; }
.alert-danger   { background: rgba(220,38,38,0.1);  border-color: var(--danger);  color: #F87171; }
.alert-warning  { background: rgba(217,119,6,0.1);  border-color: var(--warning); color: #FBBF24; }
.alert-info     { background: rgba(8,145,178,0.1);  border-color: var(--info);    color: #22D3EE; }

/* =====================================================
   PAGE HEADER
   ===================================================== */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header-left h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.page-header-left p {
  font-size: 0.83rem;
  color: var(--gray-mid);
  margin-top: 4px;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--gray-dim);
  margin-bottom: 20px;
}
.breadcrumb-sep { opacity: 0.4; }
.breadcrumb a { color: var(--gray-dim); }
.breadcrumb a:hover { color: var(--gray-light); }
.breadcrumb span:last-child { color: var(--gray-light); }

/* =====================================================
   GRID LAYOUTS
   ===================================================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }

/* =====================================================
   TICKET THREAD / TIMELINE
   ===================================================== */
.thread { display: flex; flex-direction: column; gap: 16px; }

.thread-item {
  display: flex;
  gap: 14px;
}

.thread-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.thread-avatar.admin { background: var(--blue-muted); color: var(--blue-light); }
.thread-avatar.client { background: rgba(5,150,105,0.2); color: #34D399; }

.thread-bubble {
  flex: 1;
  background: var(--navy-600);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.thread-bubble.internal {
  background: rgba(124,58,237,0.08);
  border-color: rgba(124,58,237,0.25);
}

.thread-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.thread-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--white);
}

.thread-time {
  font-size: 0.72rem;
  color: var(--gray-dim);
}

.thread-bubble p {
  font-size: 0.875rem;
  color: var(--gray-light);
  line-height: 1.7;
}

/* =====================================================
   STATUS PIPELINE
   ===================================================== */
.pipeline {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
}

.pipeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pipeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--navy-500);
  border: 2px solid var(--gray-line);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.pipeline-step.done .pipeline-dot {
  background: var(--blue);
  border-color: var(--blue);
}

.pipeline-step.active .pipeline-dot {
  background: var(--warning);
  border-color: var(--warning);
  box-shadow: 0 0 0 4px rgba(217,119,6,0.2);
}

.pipeline-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--gray-dim);
  text-align: center;
  text-transform: uppercase;
}

.pipeline-step.done .pipeline-label,
.pipeline-step.active .pipeline-label { color: var(--gray-light); }

.pipeline-line {
  height: 2px;
  flex: 1;
  background: var(--gray-line);
  margin-bottom: 22px;
  position: relative;
}

.pipeline-line.done { background: var(--blue); }

/* =====================================================
   DROPDOWN
   ===================================================== */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: var(--navy-600);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
}

.dropdown-menu.open { display: block; animation: dropIn 0.15s ease; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--gray-light);
  cursor: pointer;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--navy-400); color: var(--white); }
.dropdown-item svg { width: 15px; height: 15px; opacity: 0.6; }
.dropdown-divider { height: 1px; background: var(--gray-line); margin: 4px 0; }

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--navy-700);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.open .modal { transform: scale(1); }

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

.modal-title { font-size: 1rem; font-weight: 700; color: var(--white); }

.modal-close {
  color: var(--gray-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}
.modal-close:hover { color: var(--white); background: var(--navy-400); }

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

/* =====================================================
   TABS
   ===================================================== */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--gray-line);
  margin-bottom: 24px;
}

.tab {
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-mid);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
  white-space: nowrap;
}
.tab:hover { color: var(--white); }
.tab.active { color: var(--white); border-bottom-color: var(--blue); }

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-dim);
}
.empty-state svg { width: 48px; height: 48px; opacity: 0.3; margin: 0 auto 16px; }
.empty-state h3 { font-size: 0.95rem; font-weight: 600; color: var(--gray-mid); margin-bottom: 6px; }
.empty-state p { font-size: 0.83rem; }

/* =====================================================
   SEARCH / FILTERS BAR
   ===================================================== */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--gray-dim);
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--navy-800);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-sm);
  color: var(--gray-light);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}
.search-input-wrap input:focus { border-color: var(--blue); }

.filter-select {
  padding: 9px 32px 9px 12px;
  background: var(--navy-800);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-sm);
  color: var(--gray-light);
  font-size: 0.83rem;
  cursor: pointer;
  outline: none;
  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='%238B9CB6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}

/* =====================================================
   NEGOTIATION THREAD (quotations)
   ===================================================== */
.negotiation-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.negotiation-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.negotiation-item.client { flex-direction: row-reverse; }

.negotiation-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.negotiation-item.admin .negotiation-bubble {
  background: var(--navy-500);
  border: 1px solid var(--gray-line);
  color: var(--gray-light);
}

.negotiation-item.client .negotiation-bubble {
  background: rgba(69,103,183,0.15);
  border: 1px solid var(--blue-muted);
  color: var(--gray-light);
  text-align: right;
}

.negotiation-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.negotiation-msg {
  font-size: 0.82rem;
  color: var(--gray-mid);
}

/* =====================================================
   RATING STARS
   ===================================================== */
.star-rating {
  display: flex;
  gap: 6px;
}

.star-rating input { display: none; }
.star-rating label {
  cursor: pointer;
  color: var(--gray-dim);
  font-size: 1.4rem;
  transition: color 0.15s;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label { color: var(--warning); }

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(69,103,183,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(69,103,183,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--navy-700);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-icon svg { width: 26px; height: 26px; fill: white; }

.login-logo-text h1 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.login-logo-text span {
  font-size: 0.68rem;
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.login-card > p {
  font-size: 0.83rem;
  color: var(--gray-mid);
  margin-bottom: 28px;
}

/* =====================================================
   NOTIFICATION PANEL
   ===================================================== */
.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 360px;
  background: var(--navy-600);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: none;
}
.notif-panel.open { display: block; animation: dropIn 0.15s ease; }
.notif-header { padding: 14px 18px; border-bottom: 1px solid var(--gray-line); display: flex; justify-content: space-between; align-items: center; }
.notif-header span { font-size: 0.85rem; font-weight: 600; color: var(--white); }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-line);
  cursor: pointer;
  transition: background 0.15s;
}
.notif-item:hover { background: var(--navy-400); }
.notif-item.unread { background: rgba(69,103,183,0.06); }
.notif-item-title { font-size: 0.82rem; font-weight: 600; color: var(--white); margin-bottom: 3px; }
.notif-item-msg { font-size: 0.77rem; color: var(--gray-mid); }
.notif-item-time { font-size: 0.7rem; color: var(--gray-dim); margin-top: 4px; }
.notif-empty { padding: 40px; text-align: center; color: var(--gray-dim); font-size: 0.83rem; }

/* =====================================================
   MISC UTILITIES
   ===================================================== */
.text-white  { color: var(--white); }
.text-muted  { color: var(--gray-mid); }
.text-dim    { color: var(--gray-dim); }
.text-blue   { color: var(--blue-light); }
.text-success{ color: #34D399; }
.text-danger { color: #F87171; }
.text-warning{ color: #FBBF24; }

.font-bold   { font-weight: 700; }
.font-semi   { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.83rem; }
.text-xs { font-size: 0.72rem; }
.text-lg { font-size: 1.1rem; }

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.mt-4  { margin-top: 32px; }

.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 8px; }
.mb-2  { margin-bottom: 16px; }
.mb-3  { margin-bottom: 24px; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }

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

.divider {
  height: 1px;
  background: var(--gray-line);
  margin: 20px 0;
}

.info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-line);
  gap: 16px;
}
.info-row:last-child { border-bottom: none; }
.info-row-label { font-size: 0.78rem; color: var(--gray-dim); font-weight: 500; flex-shrink: 0; }
.info-row-value { font-size: 0.875rem; color: var(--gray-light); text-align: right; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .grid-sidebar { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 28px 20px; }
}
