/* Custom Premium Stylesheet for QA/QC System Prototype */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #007A78;
  --primary-hover: #005B59;
  --primary-light: #E0F2F1;
  --accent-color: #2E7D32;
  --accent-light: #E8F5E9;
  --danger-color: #C62828;
  --danger-light: #FFEBEE;
  --warning-color: #EF6C00;
  --warning-light: #FFF3E0;
  --bg-color: #F4F7F6;
  --card-bg: #ffffff;
  --text-main: #2C3E50;
  --text-muted: #7F8C8D;
  --border-color: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

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

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

/* App Wrapper Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header & Role Switcher */
header.app-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #005654 100%);
  color: white;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  z-index: 100;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-circle {
  width: 38px;
  height: 38px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  border: 2px solid #80CBC4;
}

.logo-text h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-text span {
  font-size: 11px;
  opacity: 0.8;
  display: block;
}

.role-switcher-container {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.role-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.role-btn.active {
  background: white;
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

/* Dashboard Workspace Grid */
.workspace-wrapper {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
  width: 250px;
  background-color: var(--card-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0;
  transition: var(--transition);
}

.user-profile {
  padding: 0 20px 20px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

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

.user-info .user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.user-info .user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-menu {
  list-style: none;
  flex: 1;
}

.nav-item {
  margin: 4px 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 8px;
  transition: var(--transition);
  cursor: pointer;
}

.nav-link:hover {
  background-color: #F1F5F9;
  color: var(--primary-color);
}

.nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 600;
}

.nav-link-badge {
  margin-left: auto;
  background-color: var(--danger-color);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.sidebar-footer {
  padding: 20px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border-color);
}

/* Main Content Area */
main.main-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: #F8FAFC;
}

.screen-container {
  display: none;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

.screen-container.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

/* Cards & Generic Layout Elements */
.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: var(--transition);
}

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

.card-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

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

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

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: #F1F5F9;
  border-color: #CBD5E1;
}

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

.btn-danger:hover {
  background-color: #B71C1C;
}

.btn-success {
  background-color: var(--accent-color);
  color: white;
}

.btn-success:hover {
  background-color: #1B5E20;
}

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

/* Forms & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-main);
  background-color: #FFFFFF;
  transition: var(--transition);
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 122, 120, 0.15);
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-bg);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

th {
  color: var(--text-main);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

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

tr:hover td {
  background-color: #F8FAFC;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 30px;
}

.badge-success {
  background-color: var(--accent-light);
  color: var(--accent-color);
}

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

.badge-warning {
  background-color: var(--warning-light);
  color: var(--warning-color);
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

/* Dynamic Checkbox List Grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  background-color: #F8FAFC;
  padding: 16px;
  border-radius: 8px;
  border: 1px dashed var(--border-color);
}

.checkbox-card {
  background: white;
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.checkbox-card:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.checkbox-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary-color);
}

.checkbox-card-info {
  display: flex;
  flex-direction: column;
}

.checkbox-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.checkbox-card-code {
  font-size: 10px;
  color: var(--text-muted);
}

/* Split-View Workspace (Screen 4) */
.split-workspace {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 20px;
  height: calc(100vh - 180px);
}

.split-left {
  background-color: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.split-right {
  background-color: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.panel-header {
  padding: 14px 18px;
  background-color: #F8FAFC;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-body-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* File Tree / List inside Screen 4 */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.file-item:hover {
  background-color: #F8FAFC;
  border-color: var(--primary-color);
}

.file-item.selected {
  background-color: var(--primary-light);
  border-color: var(--primary-color);
}

.file-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.file-item-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* PDF Preview Simulator */
.pdf-viewer-container {
  flex: 1;
  background-color: #525659;
  /* Standard Chrome PDF reader grey background */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
  overflow-y: auto;
}

.pdf-mockup-page {
  background: white;
  width: 100%;
  max-width: 680px;
  min-height: 850px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  padding: 40px;
  font-family: 'Times New Roman', Times, serif;
  /* Make it look official */
  color: #111;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.pdf-official-header {
  text-align: center;
  font-weight: bold;
  border-bottom: 2px double #000;
  padding-bottom: 12px;
  font-size: 14px;
}

.pdf-stamp {
  position: absolute;
  top: 50px;
  right: 50px;
  border: 3px double #C62828;
  color: #C62828;
  font-weight: bold;
  padding: 8px 12px;
  transform: rotate(15deg);
  border-radius: 4px;
  font-size: 14px;
}

.pdf-title {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  margin: 20px 0;
  text-transform: uppercase;
}

.pdf-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.pdf-field-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted #ccc;
}

.pdf-placeholder-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

.pdf-line {
  height: 12px;
  background-color: #eef1f5;
  border-radius: 2px;
}

.pdf-line.short {
  width: 60%;
}

.pdf-sign-area {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  padding: 30px 40px 10px 40px;
  font-size: 12px;
}

.pdf-sign-box {
  text-align: center;
}

.pdf-sign-box .signature {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Brush Script MT', cursive, sans-serif;
  font-size: 26px;
  color: #1a237e;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 90%;
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

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

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
}

.modal-body {
  padding: 20px;
}

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

/* CHT Dropzone / Upload Fields style (Screen 6) */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.upload-field-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-field-card.rejected {
  border-color: var(--danger-color);
  background-color: var(--danger-light);
}

.upload-field-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upload-field-title {
  font-size: 13.5px;
  font-weight: 600;
}

.upload-dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background-color: #F8FAFC;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.upload-dropzone:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.upload-dropzone svg {
  color: var(--text-muted);
}

.upload-dropzone.has-file {
  border-color: var(--accent-color);
  background-color: var(--accent-light);
}

.upload-feedback-error {
  color: var(--danger-color);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

/* Search and Filters */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

/* Dashboard Metrics & Alerts Widget */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.stat-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.stat-icon-blue {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.stat-icon-orange {
  background-color: var(--warning-light);
  color: var(--warning-color);
}

.stat-icon-red {
  background-color: var(--danger-light);
  color: var(--danger-color);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

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

/* Alert system */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-item {
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  border-left: 4px solid transparent;
}

.alert-item-info {
  border-left-color: var(--primary-color);
  background-color: var(--primary-light);
  color: #004D40;
}

.alert-item-warning {
  border-left-color: var(--warning-color);
  background-color: var(--warning-light);
  color: #E65100;
}

.alert-item-danger {
  border-left-color: var(--danger-color);
  background-color: var(--danger-light);
  color: #B71C1C;
}

.alert-item-success {
  border-left-color: var(--accent-color);
  background-color: var(--accent-light);
  color: #1B5E20;
}

.sidebar-submenu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 10px 15px;
  background-color: #F8FAFC;
  border-radius: 8px;
  margin: 5px 12px 15px 12px;
  border: 1px solid var(--border-color);
}

.sidebar-submenu.hidden {
  display: none !important;
}

.submenu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.submenu-item:hover {
  background-color: var(--primary-light);
}

.submenu-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.submenu-item span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.2;
}

/* Dòng Chi B-B Grid Screen styling */
.dongchi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 10px;
}

.dongchi-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.dongchi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.dongchi-card.active-qaqc {
  background-color: #FFB74D;
  /* Elegant Orange matching the screenshot */
  color: #5D4037;
  border-color: #F57C00;
}

/* QA/QC 3-column progress grid */
.qaqc-phases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 15px;
}

.phase-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  overflow: hidden;
}

.phase-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--border-color);
}

.phase-card.active-step::before {
  background-color: var(--primary-color);
}

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

.phase-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.phase-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.phase-desc {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.phase-action {
  margin-top: auto;
}

/* Back button style */
.btn-back {
  background-color: var(--primary-color);
  color: white !important;
  border: none;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  transition: var(--transition);
  text-decoration: none;
  width: fit-content;
}

.btn-back:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}

/* Switch toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CBD5E1;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}

input:checked+.slider {
  background-color: var(--primary-color);
}

input:focus+.slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked+.slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Inline Excel Import Panel & Progress Bar */
.excel-import-panel {
  background-color: #F8FAFC;
  border: 1px dashed var(--primary-color);
  border-radius: 8px;
  padding: 20px;
  margin-top: 10px;
  margin-bottom: 15px;
  display: none;
  flex-direction: column;
  gap: 12px;
}

.excel-import-panel.active {
  display: flex;
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background-color: #E2E8F0;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
  display: none;
}

.progress-bar-container.active {
  display: block;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--primary-color);
  transition: width 0.05s linear;
}

/* Search Box Premium Styling */
.premium-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 450px;
}

.premium-search-box input {
  width: 100%;
  height: 40px;
  padding: 8px 16px 8px 40px;
  font-size: 13px;
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  transition: all 0.25s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.premium-search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background-color: #fff;
}

.premium-search-box svg.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.25s ease;
}

.premium-search-box input:focus+svg.search-icon {
  color: var(--primary-color);
}

/* ======== Modal Overlay & Card ======== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.modal-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

.modal-footer {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}