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

:root {
  --primary: #4a90e2;
  --primary-dark: #357abd;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --critical: #c0392b;
  --high: #e67e22;
  --medium: #3498db;
  --low: #95a5a6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #F6F8FC 0%, #D4D1F9 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
.header {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.header h1 {
  font-size: 32px;
  color: var(--gray-800);
  margin-bottom: 10px;
}

.project-info {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 15px;
  color: var(--gray-600);
  font-size: 14px;
}

.project-info span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.project-info a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.project-info a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Statistics Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card .number {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 5px;
}

.stat-card .label {
  color: var(--gray-600);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Controls Jogja */
.controls {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.controls-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-600);
}

.filter-dropdown {
  display: flex;
  align-items: center;
}

.filter-select {
  padding: 10px 35px 10px 15px;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  background: white;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  cursor: pointer;
  transition: all 0.3s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  min-width: 180px;
}

.filter-select:hover {
  border-color: var(--primary);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.btn-import {
  padding: 10px 20px;
  background: var(--success);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-import:hover {
  background: #229954;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.btn-import:active {
  transform: translateY(0);
}

/* Export Dropdown */
.export-dropdown {
  position: relative;
  display: inline-block;
}

.btn-export {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-export:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

.btn-export:active {
  transform: translateY(0);
}

.export-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 5px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
  animation: dropdownSlide 0.2s ease;
}

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

.export-dropdown-menu.active {
  display: block;
}

.export-option {
  width: 100%;
  padding: 12px 20px;
  background: white;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.export-option:hover {
  background: var(--gray-100);
}

.export-option:active {
  background: var(--gray-200);
}

.export-option:not(:last-child) {
  border-bottom: 1px solid var(--gray-200);
}

.filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  border: 2px solid var(--gray-300);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  font-weight: 500;
}

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

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

/* Main Content */
.main-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 30px;
}

@media (max-width: 1200px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

/* Test Cases List */
.test-cases-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.test-cases-header {
  padding: 20px 25px;
  background: var(--gray-100);
  border-bottom: 2px solid var(--gray-300);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.test-cases-header h2 {
  font-size: 20px;
  color: var(--gray-800);
}

.test-count {
  background: var(--primary);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
}

.test-cases-list {
  max-height: 800px;
  overflow-y: auto;
}

/* Test Case Card */
.test-case-card {
  padding: 20px 25px;
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  transition: background 0.2s;
}

.test-case-card:hover {
  background: var(--gray-100);
}

.test-case-card.selected {
  background: #e3f2fd;
  border-left: 4px solid var(--primary);
}

.test-case-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.test-case-id {
  font-weight: bold;
  color: var(--primary);
  font-size: 14px;
}

.test-case-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.test-case-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-critical {
  background: #ffe5e5;
  color: var(--critical);
}

.priority-high {
  background: #fff3e0;
  color: var(--high);
}

.priority-medium {
  background: #e3f2fd;
  color: var(--medium);
}

.priority-low {
  background: #f5f5f5;
  color: var(--low);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-passed {
  background: #d4edda;
  color: #155724;
}

.status-failed {
  background: #f8d7da;
  color: #721c24;
}

.status-blocked {
  background: #fff3cd;
  color: #856404;
}

.status-skipped {
  background: #e3f2fd;
  color: #0277bd;
}

.status-not-run {
  background: var(--gray-200);
  color: var(--gray-600);
}

/* Detail Panel */
.detail-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.detail-panel-header {
  padding: 20px 25px;
  background: var(--gray-100);
  border-bottom: 2px solid var(--gray-300);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.detail-panel-header h2 {
  font-size: 18px;
  color: var(--gray-800);
  margin: 0;
}

.btn-reload {
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-reload:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

.btn-reload:active {
  transform: translateY(0);
}

.detail-header {
  padding: 25px;
  background: var(--primary);
  color: white;
}

.detail-header h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.detail-header p {
  opacity: 0.9;
  font-size: 14px;
}

.detail-content {
  padding: 25px;
}

.detail-section {
  margin-bottom: 25px;
}

.detail-section h3 {
  font-size: 16px;
  color: var(--gray-800);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section p,
.detail-section ul {
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.6;
}

.detail-section ul {
  list-style: none;
  padding-left: 0;
}

.detail-section li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
}

.detail-section li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* Execution Controls */
.execution-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.btn {
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.btn-success:hover {
  background: #229954;
}

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

.btn-danger:hover {
  background: #c0392b;
}

.btn-secondary {
  background: var(--gray-300);
  color: var(--gray-800);
}

.btn-secondary:hover {
  background: var(--gray-600);
  color: white;
}

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

.btn-warning:hover {
  background: #e67e22;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-600);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 14px;
}

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

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-600);
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--gray-600);
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 15px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Suite Label */
.suite-label {
  display: none;
}

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

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

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 500px;
  animation: modalSlideIn 0.3s ease;
}

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

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

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: var(--gray-800);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--gray-600);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.modal-body {
  padding: 25px;
}

.modal-body p {
  margin: 0 0 15px 0;
  font-size: 15px;
  color: var(--gray-800);
  font-weight: 500;
}

.modal-info {
  background: var(--gray-100);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

.info-item {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.5;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item strong {
  color: var(--gray-800);
  font-weight: 600;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 2px solid var(--gray-200);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-footer .btn {
  padding: 10px 20px;
  font-size: 14px;
}
