/* ============================================
   GLOBAL
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; font-family: 'Roboto', sans-serif; }

/* ============================================
   LOGIN
   ============================================ */
.login-wrapper {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.login-box {
  background: #fff;
  padding: 4rem 3.5rem;
  border-radius: 8px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.login-title { text-align: center; margin-bottom: .4rem; color: #333; }
.login-subtitle { text-align: center; color: #888; margin-bottom: 2rem; font-size: 1.4rem; }
.login-error { color: #e74c3c; margin-bottom: 1rem; font-size: 1.3rem; }
.login-hint { text-align: center; margin-top: 1.5rem; color: #999; font-size: 1.2rem; }
.button-block { width: 100%; }

/* ============================================
   TOP BAR
   ============================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1a2e;
  color: #fff;
  padding: .8rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 1.2rem; }
.topbar-brand { font-size: 1.6rem; font-weight: 700; letter-spacing: .5px; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-user { font-size: 1.3rem; opacity: .85; }
.toggle-nav-btn { color: #fff; border-color: rgba(255,255,255,.4); font-size: 1.6rem; padding: 0 1rem; line-height: 1; }

/* ============================================
   APP BODY LAYOUT
   ============================================ */
.app-wrapper { display: flex; flex-direction: column; height: 100vh; }
.app-body { display: flex; flex: 1; overflow: hidden; }

/* ============================================
   LEFT NAV
   ============================================ */
.left-nav {
  width: 240px;
  min-width: 240px;
  background: #16213e;
  color: #ccc;
  overflow-y: auto;
  transition: margin-left .25s ease;
}
.left-nav.collapsed { margin-left: -240px; }
.left-nav ul { list-style: none; margin: 0; padding: 1rem 0; }
.left-nav li { margin: 0; }
.left-nav .nav-link {
  display: block;
  padding: 1.2rem 2rem;
  color: #b0bec5;
  text-decoration: none;
  font-size: 1.4rem;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.left-nav .nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.left-nav .nav-link.active {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-left-color: #9b59b6;
  font-weight: 700;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  flex: 1;
  padding: 2.5rem 3rem;
  overflow-y: auto;
  background: #f5f7fa;
}
.page-title { margin-bottom: 2rem; color: #333; }

/* ============================================
   CARDS & PANELS
   ============================================ */
.card {
  background: #fff;
  border-radius: 6px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.card-title { margin-top: 0; font-size: 1.8rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 1.5rem; }
.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.stat-number { font-size: 3rem; font-weight: 700; color: #9b59b6; }
.stat-label { font-size: 1.3rem; color: #888; margin-top: .5rem; }

/* ============================================
   TABLE OVERRIDES
   ============================================ */
.table-wrapper { overflow-x: auto; }
table { width: 100%; }
table th { background: #f0f0f0; font-size: 1.3rem; }
table td { font-size: 1.3rem; vertical-align: middle; }
table .button { margin-bottom: 0; font-size: 1.1rem; padding: .4rem 1.2rem; }

/* ============================================
   FORM PANELS
   ============================================ */
.form-panel {
  background: #fff;
  border-radius: 6px;
  padding: 2.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  margin-bottom: 2rem;
}
.form-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { font-weight: 700; font-size: 1.3rem; }

/* ============================================
   COMPARISON / SEARCH RESULTS
   ============================================ */
.match-badge {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}
.match-high { background: #27ae60; }
.match-medium { background: #f39c12; }
.match-low { background: #e74c3c; }

/* Fact importance styling */
.fact-importance-high {
  border-left: 4px solid #e74c3c;
  padding-left: 1rem;
  background-color: rgba(231, 76, 60, 0.05);
}
.fact-importance-medium {
  border-left: 4px solid #f39c12;
  padding-left: 1rem;
  background-color: rgba(243, 156, 18, 0.05);
}
.fact-importance-low {
  border-left: 4px solid #95a5a6;
  padding-left: 1rem;
  background-color: rgba(149, 165, 166, 0.05);
}

/* Reference cases styling */
.reference-cases-list {
  max-height: 300px;
  overflow-y: auto;
}
.reference-case-item {
  transition: all 0.2s ease;
}
.reference-case-item:hover {
  background-color: #e9ecef !important;
  border-color: #adb5bd !important;
}

/* View Case Page styling */
.view-case-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.info-row {
  padding: 0.8rem;
  background-color: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #007bff;
}
.info-row strong {
  color: #495057;
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

/* Tags and Facts styling for view page */
.tags-facts-list, .facts-list {
  margin: 1rem 0;
}
.tag-item, .fact-item {
  display: inline-block;
  margin: 0.3rem 0.2rem;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.comparison-item {
  background: #fafafa;
  padding: 1.2rem;
  border-radius: 6px;
  border: 1px solid #eee;
}
.comparison-item h5 { margin: 0 0 .5rem 0; font-size: 1.3rem; color: #555; }
.comparison-item .value { font-size: 1.4rem; }

.progress-bar-wrapper {
  background: #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  height: 20px;
  margin-top: .5rem;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width .4s ease;
}
.progress-green { background: #27ae60; }
.progress-orange { background: #f39c12; }
.progress-red { background: #e74c3c; }

/* ============================================
   PREDICTION
   ============================================ */
.prediction-result {
  text-align: center;
  padding: 3rem;
}
.prediction-percent {
  font-size: 6rem;
  font-weight: 700;
  color: #9b59b6;
}
.prediction-label {
  font-size: 1.6rem;
  color: #555;
  margin-top: .5rem;
}
.prediction-factors { margin-top: 2rem; text-align: left; }
.prediction-factors li { margin-bottom: .8rem; font-size: 1.3rem; }

/* ============================================
   TAGS
   ============================================ */
.tag {
  display: inline-block;
  background: #e8e8e8;
  color: #555;
  padding: .2rem .8rem;
  border-radius: 4px;
  font-size: 1.1rem;
  margin: .2rem .3rem .2rem 0;
}
.tag-purple { background: #9b59b6; color: #fff; }

/* ============================================
   DETAIL MODAL OVERLAY
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal-box {
  background: #fff;
  border-radius: 8px;
  padding: 3rem;
  width: 90%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.modal-box .modal-close {
  float: right;
  cursor: pointer;
  font-size: 2rem;
  background: none;
  border: none;
  color: #888;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .left-nav { position: fixed; top: 50px; left: 0; bottom: 0; z-index: 90; }
  .left-nav.collapsed { margin-left: -240px; }
  .main-content { padding: 1.5rem; }
  .comparison-grid { grid-template-columns: 1fr; }
}

/* ============================================
   COMPARISON PAGE STYLES
   ============================================ */
/* Header section */
.compare-header {
  margin-bottom: 2rem;
}

.compare-overview {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
}

.case-card {
  background: #fff;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.case-card:hover {
  transform: translateY(-2px);
}

.case-title {
  margin: 0 0 1rem 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.case-title.primary {
  color: #3498db;
}

.case-title.secondary {
  color: #9b59b6;
}

/* Similarity meter */
.similarity-meter {
  display: flex;
  justify-content: center;
  align-items: center;
}

.circle-progress {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(#3498db calc(var(--percent, 0) * 1%), #e5e5e5 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #2c3e50;
}

.circle-progress::before {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #fff;
  z-index: 1;
}

.percentage {
  position: relative;
  z-index: 2;
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
}

.label {
  position: relative;
  z-index: 2;
  font-size: 1rem;
  color: #95a5a6;
  margin-top: 0.2rem;
}

/* Reference actions */
.ref-actions {
  margin-top: 1.5rem;
  text-align: center;
}

/* Compare sections */
.compare-sections {
  margin: 2rem 0;
}

.compare-section {
  background: #fff;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.section-title {
  margin: 0 0 1.5rem 0;
  font-size: 1.6rem;
  color: #2c3e50;
  border-bottom: 2px solid #e1e8ed;
  padding-bottom: 0.5rem;
}

/* Similarity bars */
.similarity-bar {
  background: #f8f9fa;
  border-radius: 6px;
  height: 30px;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #e9ecef 0%, #adb5bd 50%, #6c757d 100%);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.bar-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #2c3e50;
  font-weight: 600;
  font-size: 1.2rem;
  z-index: 2;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

/* Facts comparison */
.facts-comparison {
  margin-top: 1rem;
}

.facts-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.fact-comparison-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e9ecef;
}

.fact-current,
.fact-matches {
  background: #fff;
  border-radius: 6px;
  padding: 1rem;
}

.fact-header {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.fact-content {
  color: #6c757d;
  line-height: 1.5;
  font-size: 1rem;
}

.fact-match {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 0.8rem;
  margin-bottom: 0.5rem;
}

.fact-no-match {
  color: #adb5bd;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

.match-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.match-high {
  background: #d4edda;
  color: #155724;
}

.match-medium {
  background: #fff3cd;
  color: #856404;
}

.match-low {
  background: #f8d7da;
  color: #721c24;
}

/* Tags comparison */
.tags-comparison {
  margin-top: 1rem;
}

.tags-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.8rem;
}

.tag-comparison {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  background: #fff;
}

.tag-comparison.match {
  background: #d4edda;
  border-color: #c3e6cb;
}

.tag-comparison.only-current {
  background: #cce7ff;
  border-color: #80bdff;
}

.tag-comparison.only-ref {
  background: #f3e5f5;
  border-color: #e1bee7;
}

.tag-name {
  font-weight: 600;
  color: #495057;
}

.tag-status {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Info grid */
.info-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.info-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.info-label {
  font-weight: 600;
  color: #495057;
}

.info-values {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.info-values .value {
  padding: 0.3rem 0.8rem;
  background: #e9ecef;
  border-radius: 4px;
  color: #495057;
}

.info-values .value.match {
  background: #d4edda;
  color: #155724;
}

.info-values .value.different {
  background: #f8d7da;
  color: #721c24;
}

.info-values .vs {
  font-weight: 600;
  color: #6c757d;
}

/* Court Assessment and Conclusion */
.court-assessment-grid, .court-conclusion-grid {
  display: grid; 
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.assessment-section, .conclusion-section {
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  overflow: hidden;
}

.assessment-header, .conclusion-header {
  background: #495057;
  color: white;
  padding: 1rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
}

.assessment-content, .conclusion-content {
  padding: 1rem;
}

.court-text-area {
  width: 100%;
  min-height: 150px;
  padding: 1rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1.4rem;
  line-height: 1.5;
  resize: vertical;
  background-color: #fff;
}

.court-text-area:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.court-text-area.empty {
  background-color: #f8f9fa;
  color: #6c757d;
  font-style: italic;
}

/* Responsive design for court sections */
@media (max-width: 768px) {
  .court-assessment-grid, .court-conclusion-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .court-text-area {
    min-height: 120px;
    font-size: 1.3rem;
  }
}

/* Compare actions */
.compare-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

/* Responsive design */
@media (max-width: 768px) {
  .compare-overview {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .fact-comparison-row {
    grid-template-columns: 1fr;
  }
  
  .info-row {
    grid-template-columns: 1fr;
  }
  
  .compare-actions {
    flex-direction: column;
  }
}

/* ============================================
   STRATEGY PAGE STYLES
   ============================================ */
.reference-cases-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f0 100%);
}

.reference-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.reference-case-card {
  background: #fff;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.reference-case-card.clickable:hover {
  border-color: #9b59b6;
  box-shadow: 0 4px 16px rgba(155, 89, 182, 0.2);
  transform: translateY(-4px);
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.ref-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.ref-code {
  font-weight: 600;
  color: #2c3e50;
  font-size: 1.2rem;
}

.ref-similarity {
  background: #d4edda;
  color: #155724;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
}

/* ============================================
   CUSTOM BUTTON STYLES
   ============================================ */
.button-primary {
  background-color: #9b59b6;
  border-color: #9b59b6;
  color: #fff;
}

.button-primary:hover,
.button-primary:focus {
  background-color: #8e44ad;
  border-color: #8e44ad;
  color: #fff;
}

/* ============================================
   REFERENCE ONLY SECTIONS
   ============================================ */
.reference-only-section {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 2rem;
}

.reference-content {
  background: #fff;
  border-radius: 6px;
  padding: 1.5rem;
  border: 1px solid #e9ecef;
}

.reference-content p strong {
  color: #9b59b6;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: block;
}

.court-text-display {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 1rem;
  font-size: 1.4rem;
  line-height: 1.6;
  color: #495057;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.no-data {
  text-align: center;
  padding: 2rem;
}

.no-data .text-muted {
  font-size: 1.3rem;
  color: #6c757d;
  font-style: italic;
}

.ref-title {
  color: #495057;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1rem;
  min-height: 2.8rem;
}

.ref-action {
  color: #9b59b6;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  padding: 0.8rem;
  background: #f3e5f5;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.reference-case-card.clickable:hover .ref-action {
  background: #9b59b6;
  color: #fff;
}

/* Reference strategy view */
.ref-strategy-header {
  background: linear-gradient(135deg, #f3e5f5 0%, #f8f9fa 100%);
  border-left: 4px solid #9b59b6;
}

.ref-strategy-header .card-title {
  color: #9b59b6;
}

.next-strategy-card {
  background: linear-gradient(135deg, #e8f8f5 0%, #f0fdf4 100%);
  border-left: 4px solid #27ae60;
}

.next-strategy-card .card-title {
  color: #27ae60;
}

.next-strategy-content h5 {
  font-size: 1.4rem;
  line-height: 1.6;
}

.next-strategy-content h6 {
  color: #2c3e50;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.benefits-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.benefits-list li {
  padding: 0.6rem 0 0.6rem 1.8rem;
  position: relative;
  color: #555;
  line-height: 1.5;
}

.benefits-list li:before {
  content: '✨';
  position: absolute;
  left: 0;
  font-size: 1rem;
}

/* ============================================
   MISC
   ============================================ */
.text-muted { color: #999; }
.text-center { text-align: center; }
.text-info { color: #3498db; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* ============================================
   WEIGHTED SEARCH COMPONENTS
   ============================================ */
.weight-section {
  border: 1px solid #e0e6ed;
  border-radius: 6px;
  padding: 1.5rem;
  background: #fafbfc;
}

.weight-section h5 {
  margin-bottom: 1rem;
  color: #2c3e50;
  font-size: 1.4rem;
  font-weight: 700;
}

.weights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.weight-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  background: #fff;
  border: 1px solid #e1e8ed;
  border-radius: 4px;
  transition: border-color .2s ease;
}

.weight-item:hover {
  border-color: #9b59b6;
}

.weight-label {
  flex: 1;
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 0 !important;
  font-weight: 500;
  cursor: help;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.relevance-label {
  font-size: 0.85rem;
  color: #999;
  font-weight: 400;
  font-style: italic;
  margin-left: 0.5rem;
}

.weight-slider {
  flex: 0 0 120px;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  outline: none;
  appearance: none;
  transition: background .2s ease;
}

.weight-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #9b59b6;
  cursor: pointer;
  transition: background .2s ease;
}

.weight-slider::-webkit-slider-thumb:hover {
  background: #8e44ad;
}

.weight-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #9b59b6;
  cursor: pointer;
  border: none;
}

.weight-value {
  flex: 0 0 40px;
  text-align: center;
  font-weight: 700;
  color: #9b59b6;
  font-size: 1.1rem;
}

/* Mini badges for tags/facts columns */
.mini-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #95a5a6;
  border-radius: 3px;
  white-space: nowrap;
}

/* Weight slider color coding based on value */
.weight-slider[value="0"] { background: #e74c3c; }
.weight-slider[value^="1"], .weight-slider[value^="2"], .weight-slider[value^="3"] { background: #e67e22; }
.weight-slider[value^="4"], .weight-slider[value^="5"], .weight-slider[value^="6"] { background: #f39c12; }
.weight-slider[value^="7"], .weight-slider[value^="8"], .weight-slider[value^="9"] { background: #27ae60; }
.weight-slider[value="100"] { background: #2ecc71; }

/* Weighted controls panel */
#weighted-controls {
  border-left: 4px solid #9b59b6;
  background: linear-gradient(135deg, #fafbfc 0%, #f4f6f8 100%);
}

#weighted-controls .card-title {
  color: #9b59b6;
}

/* Enhanced search results for weighted search */
.search-weighted-result {
  background: linear-gradient(90deg, #fff 0%, #f8f9fa 100%);
  border-left: 3px solid #9b59b6;
}

/* Button enhancements */
.button.button-outline.weighted {
  border-color: #9b59b6;
  color: #9b59b6;
}

.button.button-outline.weighted:hover {
  background: #9b59b6;
  color: #fff;
}

/* Weights summary styling */
.weights-summary {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #9b59b6;
}

.weight-info {
  display: inline-block;
  margin-right: 1.5rem;
  font-size: 1.2rem;
  color: #555;
  font-weight: 500;
}

/* Responsive adjustments for weighted search */
@media (max-width: 768px) {
  .weights-grid {
    grid-template-columns: 1fr;
  }
  
  .weight-item {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }
  
  .weight-slider {
    flex: none;
    width: 100%;
  }
}

/* Button enhancements */
.button.button-outline.weighted {
  border-color: #9b59b6;
  color: #9b59b6;
}

.button.button-outline.weighted:hover {
  background: #9b59b6;
  color: #fff;
}

/* Responsive adjustments for weighted search */
@media (max-width: 768px) {
  .weights-grid {
    grid-template-columns: 1fr;
  }
  
  .weight-item {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }
  
  .weight-slider {
    flex: none;
    width: 100%;
  }
  
  .weight-value {
    flex: none;
    text-align: left;
  }
}

/* ============================================
   TAGS & FACTS MANAGEMENT
   ============================================ */
.tags-facts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0;
  align-items: flex-start;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.1);
  min-height: 28px;
  white-space: nowrap;
}

.tag-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  border-color: rgba(0,0,0,0.2);
}

.tag-item .btn-remove-tag {
  margin-left: 0.3rem;
  padding: 0;
  border: none;
  background: rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.7);
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.tag-item .btn-remove-tag:hover {
  background: rgba(231, 76, 60, 0.8);
  color: #fff;
  transform: scale(1.1);
}

.facts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
  align-items: flex-start;
}

.fact-item {
  flex: 0 1 auto;
  min-width: 200px;
  max-width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border-left: 3px solid rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  position: relative;
  background: rgba(255,255,255,0.8);
}

/* For short facts, allow multiple on one line */
.fact-item.short {
  flex: 0 0 auto;
  max-width: 300px;
}

/* For long facts, take full width */
.fact-item.long {
  flex: 1 1 100%;
  min-width: 100%;
}

.fact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-left-width: 4px;
}

.fact-item div {
  margin-bottom: 0.6rem;
  line-height: 1.4;
  font-size: 0.9rem;
}

.fact-item .btn-remove-fact {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(231, 76, 60, 0.7);
  color: #fff;
  border: none;
  opacity: 0.7;
  min-width: auto;
  height: auto;
}

.fact-item .btn-remove-fact:hover {
  opacity: 1;
  background: rgba(231, 76, 60, 0.9);
  transform: scale(1.05);
}

/* Enhanced color coding for importance levels */
.tag-item[style*="ff6b6b"], .fact-item[style*="ff6b6b"] {
  border-left-color: #e74c3c !important;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%) !important;
  color: #fff !important;
  font-weight: 600;
}

.tag-item[style*="ffd93d"], .fact-item[style*="ffd93d"] {
  border-left-color: #f39c12 !important;
  background: linear-gradient(135deg, #ffd93d 0%, #ffcc02 100%) !important;
  color: #333 !important;
  font-weight: 500;
}

.tag-item[style*="adb5bd"], .fact-item[style*="adb5bd"] {
  border-left-color: #95a5a6 !important;
  background: linear-gradient(135deg, #adb5bd 0%, #95a5a6 100%) !important;
  color: #555 !important;
  font-weight: 400;
  opacity: 0.9;
}

/* Special styling for tag and fact content */
.tag-item span, .fact-item span {
  font-size: 0.75rem;
  opacity: 0.8;
  font-weight: 400;
  background: rgba(0,0,0,0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 8px;
  margin-left: 0.2rem;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
  .tags-facts-list, .facts-list {
    gap: 0.3rem;
  }
  
  .tag-item {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    min-height: 24px;
  }
  
  .fact-item {
    min-width: 150px;
    padding: 0.5rem 0.6rem;
  }
  
  .fact-item div {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
  }
}

/* ============================================
   NEW FEATURES - ANALYSIS PAGE
   ============================================ */
.similarity-overview {
  text-align: center;
  padding: 2rem;
}

.similarity-score-big {
  font-size: 5rem;
  font-weight: 700;
  color: #9b59b6;
}

.similarity-breakdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.breakdown-item {
  background: #f5f7fa;
  padding: 1rem 1.5rem;
  border-radius: 8px;
}

.breakdown-item span {
  color: #666;
  font-size: 1.2rem;
}

.breakdown-item strong {
  color: #9b59b6;
  font-size: 1.4rem;
}

.comparison-table {
  width: 100%;
}

.comparison-table th, .comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.laws-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1rem 0;
}

.law-item {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  padding: 1.5rem;
  border-radius: 10px;
  border-left: 4px solid #9b59b6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
}

.law-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #9b59b6, #3498db);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.law-item:hover {
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(155, 89, 182, 0.2);
  border-left-color: #8e44ad;
}

.law-item:hover::before {
  opacity: 1;
}

.law-code {
  font-weight: 700;
  color: #9b59b6;
  margin-right: 0.8rem;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  background: rgba(155, 89, 182, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
}

.court-reasoning {
  background: #fffbeb;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #f39c12;
  font-style: italic;
  line-height: 1.8;
}

/* ============================================
   STRATEGY PAGE
   ============================================ */
.strategy-recommended {
  border: 2px solid #9b59b6;
  background: linear-gradient(135deg, #fdfbff 0%, #f5f0ff 100%);
}

.strategy-main h3 {
  color: #9b59b6;
  margin-bottom: 0.5rem;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.pros, .cons {
  padding: 1rem;
  border-radius: 8px;
}

.pros {
  background: #e8f5e9;
}

.cons {
  background: #fff3e0;
}

.pros h5, .cons h5 {
  margin-bottom: 0.8rem;
}

.strategy-options {
  display: grid;
  gap: 1rem;
}

.strategy-option {
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #3498db;
}

.strategy-option h5 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.arguments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.argument-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.arg-rank {
  background: #9b59b6;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.arg-text {
  flex: 1;
  font-size: 1.3rem;
}

.arg-stats {
  font-size: 1.1rem;
  color: #666;
}

.action-steps {
  padding-left: 1.5rem;
}

.action-steps li {
  padding: 0.8rem 0;
  border-bottom: 1px solid #eee;
  font-size: 1.3rem;
}

.laws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.law-card {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  padding: 1.5rem;
  border-radius: 12px;
  border-top: 4px solid #9b59b6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.law-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #9b59b6, #3498db, #e74c3c);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.law-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(155, 89, 182, 0.2);
}

.law-card:hover::before {
  opacity: 1;
}

.law-card .law-code {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  background: rgba(155, 89, 182, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.law-card .law-name {
  font-size: 1.2rem;
  color: #333;
  line-height: 1.5;
}

/* ============================================
   ĐIỀU LUẬT ÁP DỤNG - APPLIED LAWS SECTION
   ============================================ */
.applied-laws-section {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  margin-top: 1.5rem;
}

/* Toggle methods buttons */
.law-input-methods {
  margin-bottom: 2rem;
}

.method-toggle {
  display: flex;
  background: #f8f9fa;
  border-radius: 8px; 
  padding: 0.4rem;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.method-toggle button {
  flex: 1;
  background: transparent;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  font-size: 1.3rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  color: #6c757d;
}

.method-toggle button:hover {
  background: #e9ecef;
  color: #495057;
  transform: translateY(-1px);
}

.method-toggle button.active {
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
  transform: translateY(-1px);
}

/* Input panels */
.law-input-panel {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #e9ecef;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Manual input styling */
#manual-law-input input {
  border-radius: 6px;
  border: 1px solid #ced4da;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#manual-law-input input:focus {
  border-color: #9b59b6;
  box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
  outline: none;
}

#btn-add-manual-law {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

#btn-add-manual-law:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

/* Reference laws grid */
.reference-laws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.reference-law-card {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid #e9ecef;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.reference-law-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #9b59b6, #3498db, #e74c3c);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reference-law-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #9b59b6;
}

.reference-law-card:hover::before {
  opacity: 1;
}

.reference-law-card .law-code {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #9b59b6;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reference-law-card .law-name {
  font-size: 1.2rem;
  color: #333;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reference-law-card .law-usage {
  font-size: 1.1rem;
  color: #6c757d;
  background: #e9ecef;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: inline-block;
  font-weight: 500;
}

.reference-law-card:hover .law-usage {
  background: #9b59b6;
  color: #fff;
}

/* Current applied laws */
.current-applied-laws {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid #e9ecef;
}

.current-applied-laws h5 {
  color: #333;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.applied-laws-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.applied-law-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.applied-law-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  border-color: #9b59b6;
}

.applied-law-content {
  flex: 1;
}

.applied-law-code {
  font-size: 1.3rem;
  font-weight: 700;
  color: #9b59b6;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.applied-law-name {
  font-size: 1.2rem;
  color: #333;
  line-height: 1.4;
}

.btn-remove-applied-law {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: #fff;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1.1rem;
}

.btn-remove-applied-law:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* Empty state styling */
.applied-laws-section .text-muted {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  border: 2px dashed #ced4da;
  text-align: center;
  font-size: 1.3rem;
  color: #6c757d;
  font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
  .applied-laws-section {
    padding: 1.5rem;
  }
  
  .method-toggle {
    flex-direction: column;
  }
  
  .method-toggle button {
    width: 100%;
  }
  
  .reference-laws-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .applied-law-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .btn-remove-applied-law {
    align-self: flex-end;
  }
}

/* ============================================
   DOCUMENTS PAGE
   ============================================ */
.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.doc-actions {
  display: flex;
  gap: 0.5rem;
}

.doc-content {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  line-height: 1.8;
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
}

/* ============================================
   TIMELINE PAGE
   ============================================ */
.progress-overview {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.progress-overview .progress-bar-wrapper {
  flex: 1;
}

.progress-text {
  font-weight: 700;
  color: #27ae60;
}

.timeline-container {
  position: relative;
  padding-left: 2rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #e0e0e0;
}

.timeline-item {
  position: relative;
  padding: 1rem 0 1rem 2rem;
  border-bottom: 1px solid #f0f0f0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 1.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e0e0e0;
  border: 3px solid #fff;
}

.timeline-item.completed::before {
  background: #27ae60;
}

.timeline-item.in-progress::before {
  background: #f39c12;
}

.timeline-item.pending::before {
  background: #bdc3c7;
}

.timeline-date {
  font-weight: 700;
  color: #9b59b6;
  font-size: 1.1rem;
}

.timeline-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.timeline-icon {
  font-size: 1.4rem;
}

.timeline-event {
  flex: 1;
  font-size: 1.3rem;
}

.timeline-status {
  font-size: 1.1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  background: #f0f0f0;
  color: #666;
}

.timeline-item.completed .timeline-status {
  background: #e8f5e9;
  color: #27ae60;
}

.timeline-item.in-progress .timeline-status {
  background: #fff3e0;
  color: #f39c12;
}

.evidence-missing {
  display: grid;
  gap: 0.8rem;
}

.evidence-item {
  padding: 1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.evidence-item.missing {
  background: #ffebee;
  border: 1px solid #ef9a9a;
}

.evidence-icon {
  font-size: 1.2rem;
}

.deadline-card {
  border: 2px solid #e74c3c;
  background: #fff5f5;
}

.deadline-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.deadline-date {
  font-size: 1.8rem;
  font-weight: 700;
  color: #e74c3c;
}

.deadline-event {
  font-size: 1.4rem;
}

/* ============================================
   SIMULATION PAGE
   ============================================ */
.simulation-area {
  background: linear-gradient(135deg, #f8f9fa 0%, #e8ecef 100%);
}

.court-scene {
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.court-dialogue {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.court-dialogue.judge {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
}

.court-dialogue.opponent {
  background: #fce4ec;
  border-left: 4px solid #e91e63;
}

.speaker {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.speaker-icon {
  font-size: 1.4rem;
}

.dialogue-content {
  font-size: 1.3rem;
  line-height: 1.6;
}

.response-area {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
}

.response-area h5 {
  margin-bottom: 1rem;
}

.response-area textarea {
  width: 100%;
  height: 100px;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.suggested-responses {
  display: grid;
  gap: 0.8rem;
}

.suggested-response {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.2rem;
  line-height: 1.6;
}

.suggested-response:hover {
  background: #e8f5e9;
  border-left: 3px solid #27ae60;
}

.resp-num {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: #9b59b6;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-size: 1rem;
  margin-right: 0.5rem;
}

.tips-list {
  padding-left: 0;
  list-style: none;
}

.tips-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid #eee;
  font-size: 1.3rem;
}

.ai-feedback {
  border: 2px solid #9b59b6;
  background: #fdfbff;
}

.feedback-content {
  font-size: 1.3rem;
  line-height: 1.8;
}

/* ============================================
   STATISTICS PAGE
   ============================================ */
.stat-positive {
  color: #27ae60;
  font-weight: 700;
}

.stat-negative {
  color: #e74c3c;
  font-weight: 700;
}

.judge-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.judge-card {
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-top: 4px solid #9b59b6;
}

.judge-card h5 {
  margin-bottom: 0.3rem;
  color: #2c3e50;
}

.judge-court {
  color: #666;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.judge-stats {
  display: grid;
  gap: 0.5rem;
}

.judge-stat {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.stat-label {
  color: #666;
}

.stat-value {
  font-weight: 700;
  color: #9b59b6;
}

.chart-placeholder {
  padding: 2rem;
}

.mock-chart {
  margin-top: 1.5rem;
}

.chart-bar-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart-label {
  width: 80px;
  font-size: 1.1rem;
  color: #666;
}

.chart-bar {
  height: 30px;
  border-radius: 4px;
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  padding-left: 1rem;
  font-size: 1.1rem;
  min-width: 50px;
}

/* ============================================
   BUTTON GROUP
   ============================================ */
.button-group {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* ============================================
   ENHANCED PREDICTION PAGE
   ============================================ */
.prediction-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.compensation-range {
  display: grid;
  gap: 1rem;
}

.comp-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.comp-label {
  color: #666;
}

.comp-value {
  font-weight: 700;
  color: #9b59b6;
}

.comp-value.highlight {
  font-size: 1.4rem;
  color: #27ae60;
}

.risk-level {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 8px;
  justify-content: center;
}

.risk-level.risk-thấp {
  background: #e8f5e9;
}

.risk-level.risk-trung {
  background: #fff3e0;
}

.risk-level.risk-cao {
  background: #ffebee;
}

.risk-icon {
  font-size: 2rem;
}

.risk-text {
  font-size: 1.6rem;
  font-weight: 700;
}

.timeline-estimate {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.timeline-phases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.phase-item {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
  border-top: 3px solid #9b59b6;
}

.phase-name {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.phase-duration {
  color: #666;
  font-size: 1.1rem;
}

/* Responsive for prediction details */
@media (max-width: 768px) {
  .prediction-details {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FEATURE GRID (HOME PAGE)
   ============================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature-item {
  background: #f8f9fa;
  border-radius: 8px;
  transition: all 0.2s;
  overflow: hidden;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.feature-item a {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 1.1rem;
  color: #666;
}

/* ============================================
   LEFT NAV ENHANCEMENTS
   ============================================ */
.left-nav ul {
  padding: 0.5rem 0;
}

.left-nav .nav-link {
  padding: 1rem 1.5rem;
  font-size: 1.3rem;
}

/* ============================================
   ACTION CELL IN TABLES
   ============================================ */
.action-cell {
  white-space: nowrap;
}

.action-cell .button {
  margin-right: 0.3rem;
  margin-bottom: 0.3rem;
}

/* ============================================
   TAB SYSTEM FOR CASE DETAILS
   ============================================ */
.case-detail-tabs {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  margin-bottom: 2rem;
  overflow: hidden;
}

.tab-nav {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  overflow-x: auto;
  margin: 0;
  padding: 0;
}

.tab-btn {
  background: none;
  border: none;
  padding: 1.5rem 2rem;
  font-size: 1.3rem;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 200px;
  text-align: center;
}

.tab-btn:hover {
  background: #e9ecef;
  color: #495057;
}

.tab-btn.active {
  background: #fff;
  color: #007bff;
  border-bottom-color: #007bff;
  font-weight: 600;
}

.tab-content {
  padding: 0;
  margin: 0;
}

.tab-pane {
  display: none;
  padding: 2rem;
  min-height: 400px;
}

.tab-pane.active {
  display: block;
}

/* Mobile responsive tabs */
@media (max-width: 768px) {
  .tab-nav {
    flex-direction: column;
  }
  
  .tab-btn {
    min-width: auto;
    padding: 1.2rem 1.5rem;
    font-size: 1.2rem;
  }
  
  .tab-pane {
    padding: 1.5rem;
  }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}
