/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #ffffff;
  min-height: 100vh;
}

/* Sidebar Layout */
.sidebar-layout {
  display: flex;
  min-height: 100vh;
  --sidebar-width: 225px;
}

.sidebar-layout.sidebar-collapsed {
  --sidebar-width: 60px;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  border-right: 1px solid #ebebeb;
}

.sidebar-header {
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 53px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  object-fit: contain;
}

.logo-image {
  width: auto;
  height: 23px;
  object-fit: cover;
  object-position: left center;
  transition: all 0.3s ease;
}

/* When sidebar is collapsed, crop the logo to show only the mark portion */
.sidebar.collapsed .logo-image {
  width: 26px;
  height: 26px;
  max-width: 26px;
  object-fit: cover;
  object-position: left center;
}


.sidebar-toggle {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0;
  border-radius: 3px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
}

.sidebar-toggle:hover {
  background: #f5f5f5;
  color: #1a1a1a;
}

.toggle-icon {
  width: 8px;
  height: 16px;
  transition: transform 0.2s ease;
}

.sidebar.collapsed .sidebar-toggle {
  margin-left: 13px;
}

.sidebar.collapsed .toggle-icon {
  transform: rotate(180deg);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #bbb;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.5rem 15px 0.35rem;
}

.sidebar.collapsed .nav-section-label {
  display: none;
}

.nav-list {
  list-style: none;
  padding: 0 15px;
}

.nav-item {
  margin-bottom: 0.75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.225rem 0.325rem;
  color: #1a1a1a;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.15s;
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-link:hover {
  background: #f3f3f3;
  color: #1a1a1a;
}

.nav-link.active {
  background: #f0f0f0;
  color: #1a1a1a;
  font-weight: 600;
}

.nav-link.active .nav-icon {
  color: #1a1a1a;
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #676767;
}

.nav-link:hover .nav-icon {
  color: #666;
}

.nav-text {
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.sidebar.collapsed .nav-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* Organization Switch Link (in sidebar footer) */
.org-switch-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  color: #999;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.org-switch-link:hover {
  color: #1250FB;
}

.sidebar.collapsed .org-switch-link {
  display: none;
}

/* Organization Switch Modal */
.org-modal-body {
  padding: 0.5rem 0;
  max-height: 300px;
  overflow-y: auto;
}

.org-option-form {
  margin: 0;
  width: 100%;
}

.org-modal-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.7rem 1.25rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.org-modal-option:hover {
  background: #f5f5f5;
}

.org-modal-option.active {
  background: #EBF0FF;
}

.org-modal-option-info {
  flex: 1;
  min-width: 0;
}

.org-modal-option-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-modal-option-role {
  font-size: 0.7rem;
  color: #999;
  text-transform: capitalize;
}

.org-modal-option.active .org-modal-option-name {
  color: #1250FB;
}

.org-modal-option.active .org-modal-option-role {
  color: #1250FB;
}

.org-check {
  color: #10b981;
  flex-shrink: 0;
}


/* Sidebar Footer */
.sidebar-footer {
  padding: 0.75rem 15px;
  border-top: 1px solid #ebebeb;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0;
  background: transparent;
  border-radius: 8px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: #cbd6e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.85rem;
  flex-shrink: 0;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 500;
  color: #1a1a1a;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.75rem;
  color: #999;
}

.sidebar.collapsed .user-details {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: none;
  border: none;
  color: #999;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.85rem;
}

.logout-btn:hover {
  background: #fef2f2;
  color: #dc2626;
}

.sidebar.collapsed .logout-btn {
  justify-content: center;
  padding: 0.75rem;
}

.sidebar.collapsed .logout-btn .nav-text {
  display: none;
}

/* Main Wrapper */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Bar */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid #ebebeb;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 53px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s;
  flex-direction: column;
  gap: 3px;
}

.mobile-sidebar-toggle:hover {
  background: #f5f5f5;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}


/* Page Content */
.page-content {
  flex: 1;
  padding: 2rem;
  background: #fafafa;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Inline Alerts (contextual, in-page) */
.alert {
  padding: 0.85rem 1.25rem;
  margin: 1rem 0;
  border-radius: 8px;
  font-weight: 400;
  font-size: 0.9rem;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Flash Toasts */
.flash-toast-container {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 2rem);
}

.flash-toast {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 450;
  pointer-events: auto;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
  animation: flashSlideIn 0.35s ease-out;
}

.flash-toast-success {
  background: #f0fdf4;
  color: #166534;
}

.flash-toast-error {
  background: #fef2f2;
  color: #991b1b;
}

.flash-toast-message {
  flex: 1;
}

.flash-toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
  padding: 0 0.15rem;
  transition: opacity 0.15s;
}

.flash-toast-close:hover {
  opacity: 1;
}

.flash-toast-hiding {
  animation: flashSlideOut 0.3s ease-in forwards;
}

@keyframes flashSlideIn {
  from {
    opacity: 0;
    transform: translateY(-1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flashSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-1rem);
  }
}

/* Main content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.form-errors {
  background: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid #f5c6cb;
}

.form-errors h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.form-errors ul {
  margin-left: 1.5rem;
}

.btn-secondary {
  background: #f2f3f5;
  color: #333;
  border: 1px solid #ddd;
}

.btn-secondary:hover {
  background: #e9ecef;
}

/* Dashboard */
.dashboard-container {
  max-width: 1200px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.dashboard-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: #1a1a1a;
}

.dashboard-subtitle {
  font-size: 0.95rem;
  color: #888;
  margin: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-targets { background: #f2f5ff; color: #000000; }
.stat-icon-scans { background: #f2f5ff; color: #000000; }
.stat-icon-findings { background: #fef3c7; color: #d97706; }
.stat-icon-risk { background: #fee2e2; color: #dc2626; }

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

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: #888;
  font-weight: 500;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.dashboard-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 1.5rem;
}

.dashboard-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
}

.dashboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.dashboard-card-header h3 {
  margin: 0;
}

.dashboard-link {
  font-size: 0.85rem;
  color: #1250FB;
  text-decoration: none;
  font-weight: 500;
}

.dashboard-link:hover {
  text-decoration: underline;
}

/* Severity Breakdown */
.severity-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.severity-breakdown-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.severity-breakdown-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.severity-breakdown-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.severity-breakdown-bar {
  width: 100%;
  height: 6px;
  background: #f5f5f5;
  border-radius: 999px;
  overflow: hidden;
}

.severity-breakdown-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.severity-fill-critical { background: #dc2626; }
.severity-fill-high { background: #ea580c; }
.severity-fill-medium { background: #d97706; }
.severity-fill-low { background: #2563eb; }
.severity-fill-info { background: #9ca3af; }

/* Recent Scans */
.recent-scans-list {
  display: flex;
  flex-direction: column;
}

.recent-scan-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.recent-scan-item:last-child {
  border-bottom: none;
}

.recent-scan-item-link {
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s;
  border-radius: 6px;
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.recent-scan-item-link:hover {
  background-color: #f5f5f5;
}

.recent-scan-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.recent-scan-target {
  font-weight: 500;
  color: #1a1a1a;
  font-size: 0.9rem;
}

.recent-scan-time {
  font-size: 0.8rem;
  color: #999;
}

.recent-scan-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.recent-scan-findings {
  font-size: 0.8rem;
  color: #888;
}

/* Getting Started */
.getting-started-card {
  text-align: center;
  padding: 3rem 2rem;
  background: #fff;
  border: 2px dashed #ddd;
  border-radius: 10px;
}

.getting-started-icon {
  color: #1250FB;
  margin-bottom: 1rem;
}

.getting-started-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
}

.getting-started-card p {
  color: #888;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.getting-started-steps {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-number {
  width: 28px;
  height: 28px;
  background: #1250FB;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-text {
  font-size: 0.9rem;
  color: #555;
  font-weight: 500;
}

.text-muted {
  color: #888;
  font-style: italic;
}

/* Button icons */
.btn svg {
  margin-right: 0.3rem;
}

.btn-icon {
  width: 16px;
  height: 16px;
  margin-right: 0.3rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main-wrapper {
    margin-left: 0;
  }
  
  .mobile-sidebar-toggle {
    display: flex;
  }
  
  .sidebar-toggle {
    display: none;
  }
  
  .topbar {
    padding: 1rem;
  }
  
  .page-content {
    padding: 1rem;
  }
  
  .dashboard-content {
    grid-template-columns: 1fr;
  }
  
  .dashboard-header h1 {
    font-size: 1.5rem;
  }
  
  .page-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .page-content {
    padding: 0.75rem;
  }
  
  .topbar {
    padding: 0.75rem;
  }
}

/* Settings Page Styles */
.settings-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}



.page-subtitle {
  color: #888;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-card {
  background: white;
  border-radius: 10px;
  border: 1px solid #ebebeb;
  overflow: hidden;
}

.card-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #ebebeb;
  background: #fafafa;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
}

.card-description {
  color: #888;
  font-size: 0.9rem;
  margin: 0;
}

.card-content {
  padding: 2rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 500;
  color: #444;
  font-size: 0.9rem;
}

.form-input {
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: #1250FB;
  box-shadow: 0 0 0 3px rgba(18, 80, 251, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-help {
  color: #888;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.error-messages {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error-messages h3 {
  color: #dc2626;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.error-messages ul {
  margin: 0;
  padding-left: 1.5rem;
  color: #dc2626;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  padding-top: 1rem;
  border-top: 1px solid #ebebeb;
}


.password-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.radio-option:hover {
  border-color: #d5d5d5;
  background: #fafafa;
}

.radio-option input[type="radio"] {
  margin-top: 0.15rem;
  accent-color: #1250FB;
}

.radio-option input[type="radio"]:checked ~ .radio-option-content .radio-option-label {
  color: #1250FB;
}

.radio-option:has(input[type="radio"]:checked) {
  border-color: #1250FB;
  background: #f5f8ff;
}

.radio-option-content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.radio-option-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: #1a1a1a;
}

.radio-option-desc {
  font-size: 0.78rem;
  color: #888;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid #ebebeb;
}

.btn-ball-nav {
  background: #f5f5f5;
  color: #1a1a1a;
  border: 1px solid #ebebeb;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-ball-nav:hover {
  background: #eee;
  color: #333;
}

/* Modal Animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Team Section Styles */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title-row .section-title {
  margin-bottom: 0;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
}

.organization-info {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #ebebeb;
}

.org-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.org-switcher-settings {
  min-width: 200px;
}

.org-switch-form {
  margin: 0;
}

.org-select {
  width: 100%;
  margin-top: 0.25rem;
}

.current-org-details {
  padding-top: 1rem;
  border-top: 1px solid #ebebeb;
}

.current-org-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
}

.org-meta {
  margin-top: 1rem;
}

.org-role-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.org-role-badge.owner {
  background: #fef3c7;
  color: #92400e;
}

.org-role-badge.admin {
  background: #dbeafe;
  color: #1e40af;
}

.org-role-badge.member {
  background: #f3f4f6;
  color: #444;
}

/* Organization Settings Section */
.organization-settings-section {
  margin-bottom: 2rem;
}

.org-settings-card {
  background: #fafafa;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  padding: 1.5rem;
}

.org-settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.5;
}

.organization-description {
  color: #888;
  font-size: 0.9rem;
  margin: 0.5rem 0 0 0;
}

.org-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.current-org-name {
  margin: 0;
  flex: 1;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.organizations-section {
  margin-bottom: 2rem;
}

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

.organization-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem;
  background: white;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  transition: all 0.2s;
  gap: 1rem;
}

.organization-item:hover {
  border-color: #d5d5d5;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.org-info {
  flex: 1;
  min-width: 0;
}

.org-name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.org-description {
  color: #888;
  font-size: 0.9rem;
  margin: 0.5rem 0 0 0;
}

.org-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.org-owner-badge {
  background: #fef3c7;
  color: #92400e;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.org-table-name {
  font-weight: 500;
  color: #1a1a1a;
  font-size: 0.875rem;
}

.org-current-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 9999px;
  vertical-align: middle;
}

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

.dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border: 1px solid #ebebeb;
  background: white;
  color: #1a1a1a;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 2rem;
  height: 2rem;
}

.btn-ball-nav.dropdown-toggle {
  min-width: auto;
  height: auto;
}

.dropdown-toggle:hover {
  background: #fafafa;
  border-color: #d5d5d5;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: 160px;
  padding: 0.5rem 0;
  margin: 0.25rem 0 0;
  background: white;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: none;
  list-style: none;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1rem;
  color: #444;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
  list-style: none;
  box-sizing: border-box;
}

.dropdown-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-menu li form {
  margin: 0;
  padding: 0;
}

.dropdown-item:hover {
  background: #f3f4f6;
}

.dropdown-item.text-danger {
  color: #dc2626;
}

.dropdown-item.text-danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

/* Warning Message Styles */
.warning-message {
  text-align: center;
  padding: 1rem 0;
}

.warning-icon {
  color: #f59e0b;
  margin-bottom: 1rem;
}

.warning-message h3 {
  color: #1f2937;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.warning-message p {
  color: #888;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.warning-message p:last-child {
  margin-bottom: 0;
}

.invite-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #ebebeb;
}

.invite-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.team-members-section {
  margin-bottom: 2rem;
}

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

.members-table thead th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #ebebeb;
}

.members-table thead th:last-child {
  width: 3rem;
}

.members-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
}

.members-table tbody tr:last-child {
  border-bottom: none;
}

.members-table tbody tr:hover {
  background: #fafafa;
}

.members-table td {
  padding: 0.75rem;
  vertical-align: middle;
}

.member-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.member-avatar {
  width: 32px;
  height: 32px;
  background: #cbd6e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.member-details {
  display: flex;
  flex-direction: column;
}

.member-name {
  font-weight: 500;
  color: #1a1a1a;
  font-size: 0.875rem;
  line-height: 1.3;
}

.member-email {
  color: #888;
  font-size: 0.78rem;
}

.member-actions-cell {
  text-align: right;
  width: 3rem;
}

.member-actions-cell .btn-ball-nav.dropdown-toggle {
  background: none;
  border: none;
  padding: 0.4rem;
  color: #1a1a1a;
  border-radius: 50%;
  min-width: auto;
  height: auto;
}

.member-actions-cell .btn-ball-nav.dropdown-toggle:hover {
  background: #f3f4f6;
  color: #555;
}

.member-role {
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  margin-right: 0.35rem;
  letter-spacing: 0.5px;
}

.member-role.owner {
  background: #fef3c7;
  color: #92400e;
}

.member-role.admin {
  background: #dbeafe;
  color: #093e5e;
}

.member-role.member {
  background: #f3f4f6;
  color: #444;
}

.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.btn-danger {
  background: #ef4444;
  color: white;
  border: 1px solid #ef4444;
}

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

.pending-invitations-section {
  margin-bottom: 2rem;
}

.invitations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.invitation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
}

.invitation-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.invitation-email {
  font-weight: 500;
  color: #92400e;
  font-size: 0.9rem;
}

.invitation-role {
  color: #b45309;
  font-size: 0.8rem;
}

.invitation-date {
  color: #a16207;
  font-size: 0.75rem;
}

.invitation-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}


/* Settings responsive styles */
@media (max-width: 768px) {
  .settings-container {
    padding: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .card-content {
    padding: 1.5rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .members-table thead {
    display: none;
  }

  .members-table,
  .members-table tbody,
  .members-table tr,
  .members-table td {
    display: block;
    width: 100%;
  }

  .members-table tbody tr {
    padding: 0.75rem 0;
  }

  .members-table td {
    padding: 0.25rem 0;
  }

  .member-actions-cell {
    text-align: left;
  }
  
  .invitation-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .invitation-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .org-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .org-switcher-settings {
    min-width: auto;
    margin-top: 1rem;
  }
}

/* ============================================
   TARGETS
   ============================================ */

.targets-container {
  max-width: 1200px;
}

.targets-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.targets-subtitle {
  color: #888;
  font-size: 0.95rem;
  margin: 0;
}

.targets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.target-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.15s;
}

.target-card:hover {
  border-color: #d5d5d5;
}

a.target-card-clickable {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.target-card-clickable:hover {
  border-color: #1250FB;
  box-shadow: 0 2px 8px rgba(18, 80, 251, 0.08);
}

.target-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.target-info {
  min-width: 0;
  flex: 1;
}

.target-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #1a1a1a;
}

.target-name-link {
  color: #1a1a1a;
  text-decoration: none;
}

.target-name-link:hover {
  color: #1250FB;
}

.target-url {
  font-size: 0.8rem;
  color: #4d4d4d;
  word-break: break-all;
}

.target-findings-summary {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.target-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
}

.auto-scan-icon {
  position: relative;
  display: flex;
  align-items: center;
  opacity: 0.45;
  transition: opacity 0.15s;
}

.auto-scan-icon:hover {
  opacity: 0.8;
}

.auto-scan-icon img {
  display: block;
}


.auto-scan-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s;
}

.auto-scan-icon:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.target-last-scan {
  font-family: monospace;
  font-size: 0.7rem;
  color: #999;
}

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

/* ============================================
   SCAN BADGES
   ============================================ */

.scan-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.scan-badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.scan-badge-running {
  background: #000000;
  color: #ffffff;
  animation: pulse-badge 1.5s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.scan-badge-completed {
  background: #dcfce7;
  color: #166534;
}

.scan-badge-failed {
  background: #fee2e2;
  color: #991b1b;
}

.scan-badge-new {
  background: #f5f5f5;
  color: #888;
}

/* ============================================
   SECURITY SCORE PILL
   ============================================ */

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.score-pill-green {
  background: #dcfce7;
  color: #16a34a;
}

.score-pill-orange {
  background: #fef3c7;
  color: #d97706;
}

.score-pill-red {
  background: #fee2e2;
  color: #dc2626;
}

.score-pill-na {
  background: #f5f5f5;
  color: #888;
  font-weight: 500;
}

/* ============================================
   SEVERITY PILLS & BADGES
   ============================================ */

.severity-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.severity-pill-empty {
  background: #f0f0f0;
  color: #ccc;
  font-weight: 400;
}

.severity-pill-skeleton {
  display: inline-block;
  min-width: 28px;
  height: 22px;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.severity-critical {
  background: #9B0100;
  color: #FFFFFF;
}

.severity-high {
  background: #CC0000;
  color: #FFFFFF;
}

.severity-medium {
  background: #FF9902;
  color: #FFFFFF;
}

.severity-low {
  background: #CCCCCC;
  color: #000000;
}

.severity-info {
  background: #E6E6E6;
  color: #000000;
}

.severity-badge {
  display: inline-block;
  width: 72px;
  padding: 2px 0;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}

.severity-badge.severity-critical {
  background: #9B0100;
  color: #FFFFFF;
}

.severity-badge.severity-high {
  background: #CC0000;
  color: #FFFFFF;
}

.severity-badge.severity-medium {
  background: #FF9902;
  color: #FFFFFF;
}

.severity-badge.severity-low {
  background: #CCCCCC;
  color: #000000;
}

.severity-badge.severity-info {
  background: #E6E6E6;
  color: #000000;
}

.severity-critical-text { color: #9B0100; }
.severity-high-text { color: #CC0000; }
.severity-medium-text { color: #FF9902; }
.severity-low-text { color: #CCCCCC; }
.severity-info-text { color: #E6E6E6; }

/* ============================================
   TARGET DETAIL
   ============================================ */

.target-detail {
  max-width: 1200px;
}

.target-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #ebebeb;
}

.target-detail-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.target-detail-title-row h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.target-detail-url {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #000000;
  font-size: 0.9rem;
  text-decoration: none;
  word-break: break-all;
}

.target-detail-url:hover {
  text-decoration: underline;
}

.auto-scan-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #888;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.auto-scan-label img {
  opacity: 0.5;
}

.target-detail-desc {
  color: #888;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.target-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.target-detail-actions form {
  margin: 0;
  padding: 0;
  display: flex;
}

.target-detail-actions .btn {
  border: 1px solid #ddd;
}

.target-detail-actions .btn-primary {
  background: #1250FB;
  color: #fff;
  border-color: #1250FB;
}

.target-detail-actions .btn-primary:hover {
  background: #0F45D6;
  border-color: #0F45D6;
}

.target-detail-actions .btn-outline {
  background: transparent;
  color: #1a1a1a;
  border-color: #ddd;
}

.target-detail-actions .btn-outline:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.target-detail-actions .btn-danger {
  background: transparent;
  color: #dc2626;
  border-color: #fecaca;
}

.target-detail-actions .btn-danger:hover {
  background: #fef2f2;
}

.target-detail-actions .btn-ball-nav {
  height: 34px;
  width: 34px;
  padding: 0;
  box-sizing: border-box;
}

.target-detail-actions .dropdown {
  position: relative;
}

/* ============================================
   FINDINGS OVERVIEW & LIST
   ============================================ */

.findings-overview {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.findings-overview h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
}

.findings-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}

.findings-overview-header h3 {
  margin-bottom: 0;
}

.findings-overview-header .btn {
  margin-bottom: 1rem;
}

.severity-summary-bar {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.severity-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.severity-count {
  font-size: 1.75rem;
  font-weight: 700;
}

.severity-label {
  font-size: 0.75rem;
  color: #888;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.findings-list-section {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.findings-list-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
}

.findings-table {
  width: 100%;
}

.findings-table-header {
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #fafafa;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.findings-table-row {
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
  font-size: 0.9rem;
}

.findings-table-row:last-child {
  border-bottom: none;
}

.findings-col-name strong {
  display: block;
  color: #1a1a1a;
  margin-bottom: 0.15rem;
}

.finding-desc {
  display: block;
  font-size: 0.8rem;
  color: #999;
  line-height: 1.4;
}

.findings-col-type {
  font-size: 0.8rem;
  color: #888;
}

/* ============================================
   SCAN HISTORY TABLE
   ============================================ */

.scan-history-section {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.scan-history-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
}

.scan-history-header {
  display: grid;
  grid-template-columns: 100px 80px 90px 1fr 80px;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: #fafafa;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.scan-history-row {
  display: grid;
  grid-template-columns: 100px 80px 90px 1fr 80px;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
  font-size: 0.875rem;
  color: #555;
}

.scan-history-row:last-child {
  border-bottom: none;
}

/* ============================================
   FORM CONTAINER
   ============================================ */

.form-container {
  max-width: 640px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
}

.form-header {
  margin-bottom: 2rem;
}

.form-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.35rem 0;
}

.form-header p {
  color: #888;
  font-size: 0.95rem;
  margin: 0;
}

.form-hint {
  display: block;
  font-size: 0.8rem;
  color: #999;
  margin-top: 0;
}

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

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* iOS-style toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ios-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.ios-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ios-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #e0e0e0;
  border-radius: 26px;
  transition: background 0.25s;
}

.ios-toggle-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.25s;
}

.ios-toggle input:checked + .ios-toggle-slider {
  background: #34c759;
}

.ios-toggle input:checked + .ios-toggle-slider::before {
  transform: translateX(20px);
}

.auto-scan-options {
  margin-top: 0.75rem;
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: #fff;
  border: 2px dashed #ddd;
  border-radius: 10px;
}

.empty-state-icon {
  color: #ccc;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #555;
  margin: 0 0 0.5rem 0;
}

.empty-state p {
  color: #999;
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-small {
  text-align: center;
  padding: 2rem;
  color: #999;
}

.empty-state-small p {
  margin: 0;
}

/* ============================================
   BUTTONS (shared)
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.25rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  height: 34px;
  box-sizing: border-box;
}

.btn-primary {
  background: #1250FB;
  color: #fff;
}

.btn-primary:hover {
  background: #0F45D6;
}

.btn-outline {
  background: transparent;
  color: #1a1a1a;
  border: 1px solid #ddd;
}

.btn-outline:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.btn-danger {
  background: transparent;
  color: #dc2626;
  border: 1px solid #fecaca;
}

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

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* ============================================
   FINDINGS FILTERS
   ============================================ */

.findings-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.findings-list-header h3 {
  margin: 0;
}

.findings-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: #888;
  background: #f5f5f5;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.filter-btn:hover {
  background: #eee;
  color: #1a1a1a;
}

.filter-btn.active {
  background: #1250FB;
  color: #fff;
  border-color: #1250FB;
}

.filter-critical.active { background: #9B0100; border-color: #9B0100; }
.filter-high.active { background: #CC0000; border-color: #CC0000; }
.filter-medium.active { background: #FF9902; border-color: #FF9902; }
.filter-low.active { background: #CCCCCC; border-color: #CCCCCC; color: #000;}
.filter-info.active { background: #E6E6E6; border-color: #E6E6E6; color: #000; }

/* ============================================
   SCAN DETAIL PAGE
   ============================================ */

.scan-detail {
  max-width: 1200px;
}

.scan-detail-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #ebebeb;
}

.scan-detail-breadcrumb {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.scan-detail-breadcrumb a {
  color: #1250FB;
  text-decoration: none;
}

.scan-detail-breadcrumb a:hover {
  text-decoration: underline;
}

.scan-detail-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.scan-detail-title-row h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.scan-detail-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: monospace;
  font-size: 0.7rem;
  color: #888;
}

.scan-detail-meta strong {
  color: #1a1a1a;
}

.finding-matched-url {
  display: block;
  font-size: 0.8rem;
  color: #000000;
  word-break: break-all;
  margin-bottom: 0.15rem;
}

.finding-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.finding-tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  background: #f5f5f5;
  color: #888;
  border-radius: 4px;
  font-size: 0.7rem;
}

.finding-references {
  margin-top: 0.35rem;
}

.finding-ref-link {
  display: block;
  font-size: 0.75rem;
  color: #1250FB;
  text-decoration: none;
  word-break: break-all;
}

.finding-ref-link:hover {
  text-decoration: underline;
}

/* Clickable finding rows */
.findings-table-row-clickable {
  cursor: pointer;
  transition: background 0.1s;
}

.findings-table-row-clickable:hover {
  background: #f9f9f9;
}

/* Finding Detail Modal */
.finding-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2000;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 1rem;
  overflow-y: auto;
}

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

.finding-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  animation: modalFadeIn 0.15s ease-out;
}

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

.finding-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #ebebeb;
}

.finding-modal-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.finding-modal-title-row h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.4;
}

.finding-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.1s;
}

.finding-modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.finding-modal-body {
  padding: 1.25rem 1.5rem;
}

.finding-detail-section {
  margin-bottom: 1.25rem;
}

.finding-detail-section:last-child {
  margin-bottom: 0;
}

.finding-detail-section h4 {
  font-size: 0.7rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.finding-detail-section p {
  font-size: 0.875rem;
  color: #444;
  line-height: 1.6;
  margin: 0;
}

.finding-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.finding-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.finding-detail-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.finding-detail-value {
  font-size: 0.85rem;
  color: #1a1a1a;
  word-break: break-all;
}

.finding-detail-value code {
  background: #f5f5f5;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #1250FB;
}

.finding-detail-url {
  color: #1250FB;
  font-family: monospace;
  font-size: 0.8rem;
}

.finding-curl-block {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 2.5rem 1rem 0.85rem 1rem;
  overflow-x: auto;
  position: relative;
}

.finding-curl-block code {
  color: #e0e0e0;
  font-size: 0.8rem;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.curl-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #888;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.curl-copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ccc;
}

.curl-copy-btn.copied {
  color: #4ade80;
}

.finding-ref-text {
  display: block;
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 0.15rem;
}

@media (max-width: 640px) {
  .finding-detail-grid {
    grid-template-columns: 1fr;
  }

  .finding-modal {
    margin: 1rem 0;
  }

  .finding-modal-overlay {
    padding: 1rem;
  }
}

.scan-in-progress {
  text-align: center;
  padding: 4rem 2rem;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 10px;
}

.scan-in-progress h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #555;
  margin: 1rem 0 0.5rem;
}

.scan-in-progress p {
  color: #999;
}

.scan-progress-icon {
  color: #1250FB;
}

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

.spinning {
  animation: spin 1s linear infinite;
}

/* Skeleton / Shimmer placeholders */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton-line {
  display: block;
  border-radius: 4px;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-count {
  width: 32px;
  height: 28px;
  margin: 0 auto 0.15rem;
}

.skeleton-badge {
  width: 60px;
  height: 22px;
}

.skeleton-text {
  flex: 1;
  height: 16px;
}

.skeleton-small {
  width: 50px;
  height: 14px;
}

.skeleton-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.skeleton-header-row h3 {
  margin: 0;
}

.skeleton-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.skeleton-row {
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.skeleton-row:last-child {
  border-bottom: none;
}

.skeleton-hint {
  text-align: center;
  color: #999;
  font-size: 0.85rem;
  padding: 1rem 0 0.25rem;
}

/* ============================================
   RESPONSIVE - TARGETS
   ============================================ */

@media (max-width: 768px) {
  .targets-header {
    flex-direction: column;
  }

  .targets-grid {
    grid-template-columns: 1fr;
  }

  .target-detail-header {
    flex-direction: column;
  }

  .target-detail-actions {
    flex-wrap: wrap;
  }

  .findings-table-header,
  .findings-table-row {
    grid-template-columns: 80px 1fr;
  }

  .findings-col-type {
    display: none;
  }

  .scan-history-header,
  .scan-history-row {
    grid-template-columns: 80px 1fr 80px;
  }

  .scan-col-duration,
  .scan-col-date {
    display: none;
  }
}
