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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #1a1a1a;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 200px;
    background: white;
    border-right: 1px solid #e1e5e9;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 10px 16px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    box-sizing: border-box;
}

.sidebar-logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 50%;
}

.sidebar-header h1 {
    color: #2D5F83;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

.sidebar-nav {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Temporarily hidden sections (e.g. TDD, SDD) - remove class to show again */
.nav-section.temporarily-hidden,
.nav-btn.temporarily-hidden,
.view.temporarily-hidden {
    display: none !important;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    padding: 8px 12px 4px 12px;
    margin-top: 4px;
}

.nav-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #4a5568;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    width: 100%;
}

.nav-btn:hover:not(:disabled) {
    background: #f8f9fa;
    color: #2D5F83;
}

.nav-btn.active {
    background: #e8f0f7;
    color: #2D5F83;
    font-weight: 600;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nav-icon .icon {
    font-size: 1em;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-header {
    background: white;
    padding: 10px 16px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    height: 48px;
    box-sizing: border-box;
}

.page-title {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-projects-bar {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    background: #fff;
    color: #1a1a1a;
    cursor: pointer;
    flex-shrink: 0;
}
.btn-projects-bar:hover {
    border-color: #2D5F83;
    background: #f0f7fc;
    color: #2D5F83;
}
.btn-projects-bar .icon {
    font-size: 16px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  position: relative;
  cursor: pointer;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: #0f172a;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-name {
  font-size: 13px;
  color: #0f172a;
}

.user-menu-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  padding: 0;
}

.user-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  padding: 4px 0;
  min-width: 140px;
  z-index: 50;
}

.user-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 6px 12px;
  border: none;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

.user-menu button .icon {
  font-size: 14px;
  flex-shrink: 0;
}

.user-menu button:hover {
  background: #f1f5f9;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e5f0ff;
  background-image: url('assets/background_logo.png');
  background-repeat: repeat;
  background-size: auto;
}

.auth-card {
  background: white;
  border-radius: 16px;
  padding: 28px 32px 24px;
  width: 360px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.45);
}

.auth-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-logo-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
}

.auth-title {
  margin: 0;
  font-size: 18px;
  color: #020617;
}

.auth-subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.auth-form .form-group {
  margin-bottom: 14px;
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
  padding-right: 36px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

.auth-submit-btn {
  width: 120px;
  margin: 16px auto 0;
  padding: 12px 0;
}

.btn.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Generic button spinner */
.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: #ffffff;
  animation: btn-spin 0.6s linear infinite;
}

.btn.is-loading {
  cursor: default;
  opacity: 0.9;
  justify-content: center;
}

.btn.is-loading .btn-label {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.btn.is-loading .btn-spinner {
  display: inline-block;
}

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

.icon.spin {
  display: inline-block;
  animation: btn-spin 0.6s linear infinite;
}

/* Outlined primary button (e.g. 2FA Cancel) */
.btn-primary-outline {
  background: transparent;
  color: #2D5F83;
  border: 1px solid #2D5F83;
}
.btn-primary-outline:hover {
  background: rgba(45, 95, 131, 0.08);
  border-color: #2D5F83;
  color: #1e3d5f;
}

/* 2FA dialog: login-card style, padding, actions */
.twofactor-modal .modal-content.twofactor-dialog-card {
  padding: 28px 32px 24px;
  min-width: 320px;
  max-width: 400px;
  width: 90%;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.45);
  border: none;
}
.twofactor-dialog-card h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: #020617;
}
.twofactor-dialog-card .form-hint {
  margin-bottom: 14px;
}
.twofactor-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e1e5e9;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.global-project-selector-wrapper {
    min-width: 200px;
}

.global-project-select {
    padding: 6px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    background: white;
    color: #1a1a1a;
    min-width: 200px;
    height: 32px;
}

.global-project-select:hover {
    border-color: #cbd5e0;
}

.global-project-select:focus {
    outline: none;
    border-color: #2D5F83;
    box-shadow: 0 0 0 2px rgba(45, 95, 131, 0.1);
}

/* Ensure global project selector uses custom dropdown with logos */
#global-project-selector-wrapper .custom-select-display {
    min-width: 200px;
}

#global-project-selector-wrapper .custom-select-display img,
#global-project-selector-wrapper .custom-select-display .select-project-logo,
#global-project-selector-wrapper .custom-select-display .select-project-logo-placeholder {
    order: -1;
}

main {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* View content with right panel */
.view-content-with-panel {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.view-main-content {
    flex: 1;
    min-width: 0;
}

.view-right-panel {
    width: 200px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.panel-header {
    padding: 10px 16px;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.panel-header h3 {
    color: #2D5F83;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

.panel-nav {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e5e9;
}

.view-header h2 {
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.btn {
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-primary {
    background: #2D5F83;
    color: white;
    border-color: #2D5F83;
}

.btn-primary:hover {
    background: #1e3d5f;
    border-color: #1e3d5f;
}

.btn-success {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

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

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

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

.btn-secondary {
    background: #6b7280;
    color: white;
    border-color: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

select {
    padding: 6px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    vertical-align: middle;
    background: white;
    color: #1a1a1a;
    min-width: 160px;
    min-height: 32px;
}

select:hover {
    border-color: #cbd5e0;
}

select:focus {
    outline: none;
    border-color: #2D5F83;
    box-shadow: 0 0 0 2px rgba(45, 95, 131, 0.1);
}

.custom-select-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.custom-select-display {
    padding: 6px 10px 6px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    background: white;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    height: 32px;
    box-sizing: border-box;
    color: #1a1a1a;
    position: relative;
    padding-right: 28px;
}

.custom-select-display::after {
    content: '▼';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #6b7280;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.custom-select-wrapper.active .custom-select-display::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-display img,
.custom-select-display .select-project-logo,
.custom-select-display .select-project-logo-placeholder {
    order: -1;
}

.custom-select-display:hover {
    border-color: #cbd5e0;
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    margin-top: 2px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.custom-select-dropdown.active {
    display: block;
}

.custom-select-option {
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.1s;
    font-size: 12px;
}

.custom-select-option:hover {
    background: #f8f9fa;
}

.custom-select-option-manage {
    border-bottom: 1px solid #e1e5e9;
    margin-bottom: 4px;
    padding-bottom: 8px;
    font-weight: 500;
}

.custom-select-option-manage:hover {
    background: #e8f0f7;
}

.custom-select-option-empty {
    color: #9ca3af;
    font-style: italic;
    pointer-events: none;
}

.custom-select-option-manage .nav-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.custom-select-option-manage .nav-icon .icon {
    font-size: 1em;
}

.select-project-logo {
    width: 20px;
    height: 20px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 50%;
}

.select-project-logo-placeholder {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: #e1e5e9;
    border-radius: 50%;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.card {
    background: #fafbfc;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 12px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.card:hover {
    border-color: #2D5F83;
    box-shadow: 0 2px 6px rgba(45, 95, 131, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.project-logo-small {
    width: 24px;
    height: 24px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 50%;
}

.project-logo-placeholder {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: #e1e5e9;
    border-radius: 50%;
}

.card h3 {
    color: #2D5F83;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    letter-spacing: -0.01em;
}

.card p {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.test-case-item {
    background: #fafbfc;
    border-left: 3px solid #2D5F83;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.15s ease;
    border: 1px solid #e1e5e9;
    border-left-width: 3px;
}

.test-case-item:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

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

.test-case-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.priority-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.priority-high {
    background: #fee2e2;
    color: #991b1b;
}

.priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.priority-low {
    background: #e8f0f7;
    color: #2D5F83;
}

.test-case-description {
    color: #6b7280;
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.5;
}

/* Test Suite Sections */
.test-suite-section {
    margin-bottom: 24px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
}

.test-suite-section-header {
    background: #f8f9fa;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e1e5e9;
    transition: background-color 0.2s;
}

.test-suite-section-header:hover {
    background: #f0f1f3;
}

.test-suite-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
}

.section-icon {
    font-size: 20px;
}

.section-count {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.section-toggle {
    color: #6b7280;
    font-size: 14px;
    transition: transform 0.2s;
}

.test-suite-section-content {
    padding: 16px 20px;
    background: white;
}

.test-suite-item {
    background: #fafbfc;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}

.test-suite-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 12px;
}

.test-suite-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.suite-badge {
    display: inline-block;
    background: #e8f0f7;
    color: #2D5F83;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
}

.test-suite-description {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.use-cases-list {
    margin-top: 12px;
}

.use-case-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-left: 3px solid #2D5F83;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 12px;
}

.use-case-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
    gap: 12px;
}

.use-case-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-automated {
    background: #d1fae5;
    color: #065f46;
}

.status-manual {
    background: #fef3c7;
    color: #92400e;
}

.use-case-description {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.use-case-field {
    color: #4b5563;
    font-size: 12px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.use-case-field strong {
    color: #1a1a1a;
    margin-right: 4px;
}

.use-case-gherkin {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e1e5e9;
}

.use-case-gherkin strong {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #1a1a1a;
}

.gherkin-block {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #374151;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    overflow-x: auto;
}

.use-case-warnings {
    margin-top: 12px;
    padding: 10px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: 12px;
}

.use-case-warnings strong {
    color: #92400e;
    display: block;
    margin-bottom: 6px;
}

.use-case-warnings ul {
    margin: 0;
    padding-left: 20px;
    color: #78350f;
}

.empty-state-small {
    padding: 12px;
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
}

.btn-small {
    padding: 4px 12px;
    font-size: 12px;
}

.gherkin-block-readonly {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #374151;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
}

.suite-toggle-icon {
    display: inline-block;
    width: 16px;
    margin-right: 8px;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
}

.test-suite-header {
    cursor: pointer;
}

.test-suite-header:hover {
    background: #f0f1f3;
}

.suite-use-case-count {
    color: #6b7280;
    font-size: 12px;
    font-weight: normal;
    margin-left: 8px;
}

.use-case-toggle-icon {
    display: inline-block;
    width: 16px;
    margin-right: 8px;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
}

.use-case-header {
    cursor: pointer;
}

.use-case-header:hover {
    background: #f8f9fa;
}

.uc-code {
    font-weight: 600;
    color: #2D5F83;
    margin-right: 8px;
}

.uc-base-title {
    color: #1a1a1a;
}

.missing-steps-tag {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
    cursor: pointer;
    text-transform: uppercase;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.missing-steps-tag:hover {
    background: #fde68a;
}

.use-case-content {
    padding: 12px 0 0 24px;
}

.use-case-details {
    padding: 12px;
    margin-top: 12px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

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

/* Cookie consent banner (EU) */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1e293b;
    color: #f1f5f9;
    padding: 16px 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}
.cookie-consent-banner.cookie-consent-visible {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.cookie-consent-content {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}
.cookie-consent-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    flex: 1;
    min-width: 200px;
}
.cookie-consent-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.cookie-consent-banner .btn-primary { background: #2D5F83; border-color: #2D5F83; color: #fff; }
.cookie-consent-banner .btn-primary:hover { background: #1e3d5f; }
.cookie-consent-banner .btn-secondary { background: transparent; border-color: #94a3b8; color: #e2e8f0; }
.cookie-consent-banner .btn-secondary:hover { background: #334155; }

.modal-content {
    background: white;
    border-radius: 6px;
    padding: 0;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid #e1e5e9;
    overflow: hidden;
}

.modal-content #modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-content h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.modal-content.documentation-modal {
    max-width: 900px;
    padding: 0;
    position: relative;
}

/* Documentation Viewer Styles */
.documentation-viewer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.documentation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px 20px 20px;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
    border-radius: 6px 6px 0 0;
    flex-shrink: 0;
}

.documentation-header h2 {
    margin: 0;
    color: #2D5F83;
    font-size: 20px;
    font-weight: 600;
}

.documentation-header .btn {
    margin-right: 0;
}

.language-selector {
    padding: 8px 32px 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    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='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 36px;
}

.language-selector:hover {
    border-color: #2D5F83;
    box-shadow: 0 0 0 2px rgba(45, 95, 131, 0.1);
}

.language-selector:focus {
    outline: none;
    border-color: #2D5F83;
    box-shadow: 0 0 0 3px rgba(45, 95, 131, 0.15);
}

.documentation-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.7;
    color: #1a1a1a;
}

.documentation-content h1 {
    color: #2D5F83;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 24px 0;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 12px;
}

.documentation-content h2 {
    color: #2D5F83;
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 16px 0;
    padding-top: 8px;
}

.documentation-content h3 {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 12px 0;
}

.documentation-content .doc-section {
    margin-bottom: 32px;
}

.documentation-content p {
    margin: 12px 0;
    color: #4a5568;
    text-align: justify;
}

.documentation-content ul {
    margin: 12px 0;
    padding-left: 24px;
}

.documentation-content li {
    margin: 8px 0;
    color: #4a5568;
}

.documentation-content li strong {
    color: #1a1a1a;
}

.source-reference {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-left: 3px solid #2D5F83;
    border-radius: 4px;
    font-size: 13px;
}

.source-reference a {
    color: #2D5F83;
    text-decoration: none;
}

.source-reference a:hover {
    text-decoration: underline;
}

.close {
    position: absolute;
    top: 22px;
    right: 16px;
    font-size: 22px;
    font-weight: 300;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    z-index: 10;
}

.close:hover {
    color: #1a1a1a;
    background: #f3f4f6;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #374151;
    font-weight: 500;
    font-size: 12px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    color: #1a1a1a;
    transition: all 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2D5F83;
    box-shadow: 0 0 0 2px rgba(45, 95, 131, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e1e5e9;
}

.test-run-item {
    background: #fafbfc;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #e1e5e9;
}

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

.test-run-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.test-results {
    margin-top: 12px;
}

.result-item {
    background: white;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    border-left: 3px solid #e1e5e9;
    border: 1px solid #e1e5e9;
    border-left-width: 3px;
}

.result-item.passed {
    border-left-color: #10b981;
}

.result-item.failed {
    border-left-color: #ef4444;
}

.result-item.blocked {
    border-left-color: #f59e0b;
}

.result-item.untested {
    border-left-color: #9ca3af;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.result-header strong {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-passed {
    background: #d1fae5;
    color: #065f46;
}

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

.status-blocked {
    background: #fef3c7;
    color: #92400e;
}

.status-untested {
    background: #f3f4f6;
    color: #374151;
}

.result-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.result-actions button {
    padding: 4px 10px;
    font-size: 11px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.empty-state h3 {
    font-size: 14px;
    margin-bottom: 6px;
    color: #6b7280;
    font-weight: 600;
}

.empty-state p {
    font-size: 12px;
    color: #9ca3af;
}

/* Localization config card (Terms view) */
.localization-config-card {
    margin-bottom: 20px;
}
.localization-config-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
}
.localization-config-summary {
    font-size: 13px;
    color: #374151;
}
.localization-config-summary .config-label {
    color: #6b7280;
    font-weight: 500;
}
.readonly-input {
    background: #f3f4f6;
    cursor: not-allowed;
}
.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}
.strapi-field-ok {
    color: #059669;
    margin-left: 4px;
    font-size: 1em;
    vertical-align: middle;
}
.strapi-field-ok .icon { font-size: 1em; }

/* Terms manager: single screen with filters, sort, expandable cards */
.terms-manager-content { max-width: 100%; }
.terms-tabs {
    margin-bottom: 0;
    padding: 0 0 0 8px;
    border-bottom: 1px solid #cbd5e1;
    background: #e2e8f0;
    min-height: 36px;
}
.terms-tabs-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0;
    margin-bottom: -1px;
}
.terms-tab {
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #f1f5f9;
    font-size: 13px;
    cursor: pointer;
    color: #475569;
    margin-right: 2px;
}
.terms-tab:hover { background: #e2e8f0; color: #1e293b; }
.terms-tab.terms-tab-active {
    background: #fff;
    color: #2D5F83;
    border-color: #cbd5e1;
    font-weight: 500;
    padding-bottom: 9px;
    margin-bottom: 1px;
}
.terms-tab.terms-tab-add {
    opacity: 0.85;
    padding: 6px 10px;
    cursor: default;
    margin-left: 4px;
}
.terms-tab-add-input {
    border: none;
    background: transparent;
    font-size: 13px;
    width: 100px;
    padding: 0;
    box-shadow: none;
    outline: none;
}
.terms-tab-add-input::placeholder { color: #94a3b8; }
.term-row-group-label {
    font-size: 11px;
    color: #64748b;
    margin-right: 8px;
}
.terms-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e1e5e9;
}
.terms-toolbar .filter-group { display: flex; align-items: center; gap: 6px; }
.terms-toolbar .terms-toolbar-row { width: 100%; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.terms-toolbar .terms-toolbar-filter-row .filter-group { flex: 1; min-width: 180px; }
.terms-toolbar .terms-toolbar-filter-row .filter-group input[type="text"] { flex: 1; min-width: 0; }
.terms-toolbar label { font-size: 12px; color: #6b7280; white-space: nowrap; }
.terms-toolbar input[type="text"],
.terms-toolbar input[type="date"],
.terms-toolbar select {
    padding: 6px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 13px;
    min-width: 120px;
}
.terms-toolbar .terms-actions-group { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.terms-toolbar .terms-toolbar-bottom-row { justify-content: flex-start; }
.terms-save-all-hidden { display: none !important; }
.terms-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #e1e5e9;
    border-radius: 5px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.terms-expand-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}
.terms-expand-btn.terms-expand-btn-active {
    background: #e0f2fe;
    border-color: #38bdf8;
    color: #0369a1;
}
.terms-expand-btn-spinner {
    display: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    border-top-color: #64748b;
    animation: btn-spin 0.6s linear infinite;
    flex-shrink: 0;
}
.terms-expand-btn.terms-expand-btn-loading {
    cursor: default;
    opacity: 0.75;
}
.terms-expand-btn.terms-expand-btn-loading .terms-expand-btn-spinner {
    display: inline-block;
}
.terms-expand-btn.terms-expand-btn-loading .terms-expand-btn-icon,
.terms-expand-btn.terms-expand-btn-loading .terms-expand-btn-label {
    opacity: 0;
    pointer-events: none;
}
.terms-add-row { margin-bottom: 16px; }
.terms-add-row .add-term-bar {
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #64748b;
}
.terms-add-row .add-term-bar:hover { background: #f1f5f9; color: #475569; }
.terms-add-row .add-term-form {
    padding: 16px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-top: 8px;
}
.terms-add-row .add-term-form .form-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.terms-add-row .add-term-form .form-group-inline { min-width: 160px; }
.terms-add-row .add-term-form .form-group-inline label { display: block; font-size: 11px; color: #6b7280; margin-bottom: 4px; }
.terms-add-row .add-term-form .form-group-inline input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}
.term-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}
.term-card-header {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.term-card-header:hover { background: #f8fafc; }
.term-card-header .term-key { font-weight: 600; font-size: 14px; color: #1a1a1a; font-family: ui-monospace, monospace; }
.term-card-header .term-preview {
    font-size: 12px;
    color: #64748b;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: 12px;
}
.term-card-header .term-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-left: 8px; }
.term-card-header .term-tag { font-size: 11px; padding: 2px 8px; background: #e0f2fe; color: #0369a1; border-radius: 4px; }
.term-card-body {
    padding: 14px;
    border-top: 1px solid #e1e5e9;
    background: #fafafa;
}
.term-card-body .lang-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.term-card-body .lang-fields .lang-field label { display: block; font-size: 11px; color: #6b7280; margin-bottom: 4px; }
.term-card-body .lang-fields .lang-field input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}
.term-card-body .tags-edit { margin-bottom: 12px; }
.term-card-body .tags-edit .tags-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.term-card-body .tags-edit .tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 8px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
}
.term-card-body .tags-edit .tag-chip .tag-remove { cursor: pointer; opacity: 0.8; }
.term-card-body .tags-edit .tag-chip .tag-remove:hover { opacity: 1; color: #dc2626; }
.term-card-body .term-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e1e5e9; }
.term-card-history {
    padding: 12px 14px;
    border-top: 1px solid #e1e5e9;
    background: #f8fafc;
    font-size: 12px;
}
.term-card-history .history-title { font-weight: 600; margin-bottom: 8px; color: #475569; }
.term-card-history .history-list { list-style: none; padding: 0; margin: 0; }
.term-card-history .history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
}
.term-card-history .history-item:last-child { border-bottom: none; }
.term-card-history .history-item .history-delete { cursor: pointer; color: #94a3b8; padding: 2px 6px; }
.term-card-history .history-item .history-delete:hover { color: #dc2626; }

/* Compact term row (empty row + term rows) */
.terms-list { display: flex; flex-direction: column; gap: 6px; }
.term-row {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
}
.term-row-new { border-style: dashed; background: #fafbfc; }
/* Missing source (base) language — highlight in red */
.term-row.term-row-missing-source {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
}
/* Missing some localizations — highlight in orange/yellow */
.term-row.term-row-missing-locales {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
}
.term-row-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 12px;
    padding: 6px 10px;
    min-height: 36px;
}
.term-key-cell {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-shrink: 0;
}
.term-key-cell label {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    padding-top: 6px;
}
.term-key-cell .term-key-textarea {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: ui-monospace, monospace;
    min-width: 100px;
    max-width: 180px;
    border: 1px solid #e1e5e9;
    background: #fff;
    resize: none;
    min-height: 2.25em;
    overflow-y: hidden;
    line-height: 1.4;
    box-sizing: border-box;
}
.term-lang-cells {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px 14px;
    flex: 1;
    min-width: 0;
}
.term-lang-cells.term-lang-cells-multi {
    grid-template-columns: repeat(2, 1fr);
}
.term-lang-cell {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}
.term-lang-cell label {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    padding-top: 6px;
}
.term-lang-cell input,
.term-lang-cell textarea {
    flex: 1;
    min-width: 0;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}
.term-lang-cell textarea.term-lang-textarea {
    resize: none;
    min-height: 2.25em;
    overflow-y: hidden;
    line-height: 1.4;
}
.term-row-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.term-row-actions-left { order: -1; }
.term-row-actions-right { margin-left: auto; }
.term-btn-icon.term-revert-hidden { display: none; }
.term-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    line-height: 1;
}
.term-btn-icon:hover { background: #e2e8f0; }
.term-tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 6px 10px;
    padding: 4px 10px 6px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    font-size: 12px;
}
.term-tag-input-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.term-tag-row .term-tag-input {
    padding: 3px 8px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 12px;
    min-width: 140px;
}
.term-tag-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    background: #f8fafc;
    color: #475569;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.term-tag-add-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.term-tag-labels { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-end; }
.term-tag-label {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}
.term-tag-label .term-tag-remove { cursor: pointer; opacity: 0.7; }
.term-tag-label .term-tag-remove:hover { color: #dc2626; opacity: 1; }
.term-history-row {
    padding: 8px 10px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    font-size: 12px;
}
.term-history-title { font-weight: 600; margin-bottom: 6px; color: #475569; }
.term-history-list { list-style: none; padding: 0; margin: 0; }
.term-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #e2e8f0;
}
.term-history-item:last-child { border-bottom: none; }
.term-history-item-actions { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.term-history-item .history-delete { cursor: pointer; color: #94a3b8; padding: 2px 6px; }
.term-history-item .history-delete:hover { color: #dc2626; }
.term-history-view {
    padding: 2px 8px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 14px;
}
.term-history-view:hover { background: #e2e8f0; }
.history-snapshot-meta { color: #64748b; font-size: 13px; margin-bottom: 12px; }
.history-snapshot-content { max-height: 50vh; overflow-y: auto; }
.history-snapshot-lang {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}
.history-snapshot-lang:last-of-type { border-bottom: none; }
.history-snapshot-lang-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}
.history-snapshot-value {
    display: block;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 2em;
}
.history-snapshot-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Localization Dashboard */
.dashboard-layout {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.dashboard-summary-column {
    flex: 0 0 320px;
    min-width: 280px;
}
.dashboard-languages-column {
    flex: 1;
    min-width: 300px;
}
.dashboard-summary-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.dashboard-summary-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}
.dashboard-percentage-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}
.dashboard-percentage-bar-wrap {
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}
.dashboard-percentage-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease, background 0.2s ease;
}
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}
.dashboard-stat-item {
    font-size: 12px;
    color: #6b7280;
}
.dashboard-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
    margin-top: 2px;
}
.dashboard-languages-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.dashboard-lang-card {
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.dashboard-lang-card.is-base {
    border-color: #2D5F83;
    box-shadow: 0 0 0 1px #2D5F83;
}
.dashboard-lang-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.dashboard-lang-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}
.dashboard-lang-card-actions {
    display: flex;
    gap: 4px;
}
.dashboard-lang-card-actions .btn-icon {
    padding: 4px;
    font-size: 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0.8;
}
.dashboard-lang-card-actions .btn-icon:hover {
    background: #f3f4f6;
    opacity: 1;
}
.dashboard-lang-card-actions .btn-icon.btn-delete:hover {
    background: #fef2f2;
}
.dashboard-lang-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}
.dashboard-lang-progress-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.dashboard-lang-stats {
    font-size: 11px;
    color: #6b7280;
}
.dashboard-lang-stats span {
    display: block;
    margin-top: 4px;
}
.dashboard-add-lang-card {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 16px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.dashboard-add-lang-card .add-lang-combo-wrap {
    position: relative;
    flex: 1;
}
.dashboard-add-lang-card input.add-lang-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}
.dashboard-add-lang-card .add-lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 50;
}
.dashboard-add-lang-card .add-lang-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.dashboard-add-lang-card .add-lang-dropdown-option:hover {
    background: #f3f4f6;
}
.dashboard-add-lang-card .add-lang-dropdown-option .flag {
    font-size: 18px;
}

.empty-message {
    color: #9ca3af;
    font-size: 12px;
    font-style: italic;
}

.test-run-stats {
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}

.result-comment {
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

.form-hint {
    color: #6b7280;
    font-size: 11px;
    display: block;
    margin-top: 4px;
}

.logo-preview {
    margin-bottom: 8px;
}

.logo-preview-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid #e1e5e9;
    display: block;
    margin-bottom: 6px;
    object-fit: cover;
}

.logo-preview-actions {
    margin-top: 4px;
}

.logo-preview-actions label {
    font-weight: normal;
    cursor: pointer;
    font-size: 12px;
    color: #374151;
}

/* Compact table-like view for better space usage */
.view-header > div {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Improve spacing in automation view */
.automation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* When code generation is visible, use two columns with code generation max 50% */
.automation-grid:has(#code-generation-section:not([style*="display: none"])) {
    grid-template-columns: 1fr minmax(0, 50%);
}

.automation-grid > div:first-child {
    /* Step Definitions - takes remaining space */
    min-width: 0;
}

#code-generation-section {
    /* Code Generation - maximum 50% width */
    min-width: 0;
    max-width: 100%;
}

#automation-content h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

/* Code Generation Box */
#code-generation-container {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.code-box-header {
    display: flex;
    justify-content: flex-end;
    padding: 8px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

#generated-code {
    margin: 0;
    padding: 16px;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre;
    tab-size: 2;
}

#generated-code code {
    color: #d4d4d4;
    background: transparent;
    padding: 0;
    font-size: inherit;
}

/* Step Definitions */
.step-definitions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.step-definitions-header h3 {
    margin: 0;
}

.step-definitions-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-definitions-filter .filter-dropdown {
    min-width: 150px;
    padding: 6px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    color: #1a1a1a;
}

.step-definitions-filter .filter-dropdown:focus {
    outline: none;
    border-color: #2D5F83;
}

.btn-clear-filter {
    padding: 6px 10px;
    background: #f3f4f6;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clear-filter:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.step-definition-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    transition: box-shadow 0.15s ease;
}

.step-definition-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.step-definition-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.step-definition-content .step-keywords {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.step-definition-content .step-keyword {
    font-weight: 600;
    color: #7c3aed;
    flex-shrink: 0;
    padding: 2px 6px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 11px;
}

.step-definition-content .step-text {
    color: #1a1a1a;
    flex: 1;
}

.step-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.step-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.step-tag-feature {
    background: #e9d5ff;
    color: #6b21a8;
    border: 1px solid #d8b4fe;
}

.step-tag-scenario {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.step-definition-item {
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
    border-left: 4px solid #e1e5e9;
}

.step-definition-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.step-definition-item.step-definition-complete {
    border-left-color: #10b981; /* Green */
}

.step-definition-item.step-definition-incomplete {
    border-left-color: #ef4444; /* Red */
}

.step-definition-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e1e5e9;
}

.manual-label {
    display: inline-block;
    padding: 4px 12px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Step Editor Inline */
.step-editor-inline {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Test Type Selector */
.test-type-selector {
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.test-type-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.test-type-dropdown,
.endpoint-select-dropdown,
.form-control select {
    width: 100%;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    color: #1a1a1a;
    cursor: pointer;
    min-height: 42px;
    line-height: 1.5;
    box-sizing: border-box;
    height: auto;
}

.test-type-dropdown option,
.endpoint-select-dropdown option {
    padding: 8px 12px;
    min-height: 24px;
    line-height: 1.5;
}

.test-type-dropdown:focus {
    outline: none;
    border-color: #2D5F83;
    box-shadow: 0 0 0 3px rgba(45, 95, 131, 0.1);
}

.test-type-dropdown optgroup {
    font-weight: 600;
    color: #2D5F83;
    padding: 4px 0;
}

.test-type-dropdown option {
    padding: 8px 12px;
    font-weight: normal;
    white-space: normal;
    min-height: 20px;
    line-height: 1.4;
}

/* Step Type Selector (legacy - keeping for compatibility) */
.step-type-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.step-type-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: #6b7280;
}

.step-type-option input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.step-type-option:hover {
    border-color: #2D5F83;
    color: #2D5F83;
}

.step-type-option.active {
    border-color: #2D5F83;
    background: #f0f7fc;
    color: #2D5F83;
    font-weight: 600;
}

.step-type-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f3f4f6;
}

.step-type-option.disabled input[type="radio"] {
    cursor: not-allowed;
}

.step-type-option.disabled:hover {
    border-color: #e1e5e9;
    color: #6b7280;
}

.config-indicator {
    margin-left: 8px;
    color: #10b981;
    font-weight: 600;
    font-size: 14px;
}

.step-editor-frontend,
.step-editor-backend {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Backend Editor */
.backend-editor {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.backend-request-config {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #2D5F83;
    box-shadow: 0 0 0 3px rgba(45, 95, 131, 0.1);
}

.backend-body-textarea {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    resize: vertical;
}

.form-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Backend Parameters */
.backend-params-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 40px;
}

.empty-params {
    text-align: center;
    padding: 16px;
    color: #9ca3af;
    font-size: 13px;
    background: #f8f9fa;
    border-radius: 4px;
}

.backend-param-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
}

.backend-param-name {
    flex: 0 0 200px;
    padding: 6px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 13px;
}

.backend-param-value {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 13px;
}

.backend-expected-response {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Backend Authentication */
.backend-auth-config {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #2D5F83;
}

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

.step-editor-section {
    display: flex;
    flex-direction: column;
}

.step-editor-section + .step-editor-section {
    margin-top: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header h3,
.section-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.section-header h4 {
    font-size: 13px;
}

/* Views List */
.views-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    min-height: 60px;
}

.empty-views {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 13px;
}

.view-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 12px;
    transition: box-shadow 0.15s ease;
}

.view-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-name {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 6px;
}

.view-icon {
    font-size: 16px;
}

.view-name-text {
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
}

.view-details {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    margin-left: 24px;
}

.view-method {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.view-param {
    color: #9ca3af;
}

/* Action Lines - Similar to Gherkin steps */
.action-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin-bottom: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: move;
}

.action-line:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.action-line.dragging {
    opacity: 0.5;
    background: #e5e7eb;
}

.action-view-select {
    flex-shrink: 0;
    min-width: 150px;
}

.action-input-box {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #1a1a1a;
    background: white;
    cursor: pointer;
    min-height: 32px;
    display: flex;
    align-items: center;
}

.action-input-box:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.action-input-box:hover {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.action-input-box .placeholder-text {
    color: #9ca3af;
    font-style: italic;
}

.action-input-box span {
    color: #1a1a1a;
}

.action-input-box .action-type {
    font-weight: 600;
    color: #7c3aed;
    margin-right: 8px;
}

.action-input-box .action-param {
    color: #6b7280;
}

/* Make action-view-select look like step-keyword */
.action-view-select.step-keyword {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 16px;
    padding-right: 28px;
}

.action-sequence {
    flex: 1;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 12px;
    background: #f9fafb;
    margin-bottom: 12px;
}

.empty-actions {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.action-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    transition: box-shadow 0.15s ease;
}

.action-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.action-icon {
    font-size: 18px;
}

.action-label {
    font-weight: 600;
    flex: 1;
    color: #1a1a1a;
}

.action-actions {
    display: flex;
    gap: 4px;
}

.action-description {
    font-size: 12px;
    color: #6b7280;
    margin-left: 26px;
}

.action-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.action-type-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: white;
}

.action-type-option:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(124, 58, 237, 0.1);
}

.action-type-option .action-icon {
    font-size: 24px;
}

.code-preview {
    flex: 1;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.code-preview code {
    color: #d4d4d4;
    white-space: pre;
}

.preview-actions {
    display: flex;
    gap: 8px;
}

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

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

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

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

/* Gherkin and acceptance criteria blocks */
.gherkin-block {
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.6;
    color: #374151;
    border: 1px solid #e1e5e9;
    white-space: pre-wrap;
}

.acceptance-criteria-block {
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #374151;
    border: 1px solid #e1e5e9;
}

.acceptance-criteria-block strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #e1e5e9;
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
    }
    
    .nav-btn {
        white-space: nowrap;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .automation-grid {
        grid-template-columns: 1fr;
    }
    
    .global-project-selector-wrapper {
        min-width: 150px;
    }
}

/* Example Mapping Styles */
.example-mapping-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  background: #f5f5f5;
  min-height: 100vh;
}

/* Story Card - Yellow Post-it, Centered */
.example-mapping-story-card {
  background: #FFFC9B;
  width: 400px;
  margin: 0 auto;
  padding: 20px;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.15),
    0 2px 4px rgba(0,0,0,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.05);
  transform: rotate(-1deg);
  border: none;
  position: relative;
}

.example-mapping-story-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(225deg, transparent 50%, rgba(0,0,0,0.1) 50%);
}

.example-mapping-story-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.example-mapping-story-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.example-mapping-story-card p {
  margin: 0;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

/* Rules Section - Horizontal Layout */
.example-mapping-rules-section {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  margin-top: 20px;
}

.example-mapping-rule-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 280px;
}

/* Rule Card - Blue Post-it */
.example-mapping-rule-card {
  background: #A8D8F0;
  padding: 16px;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.15),
    0 2px 4px rgba(0,0,0,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.05);
  transform: rotate(0.5deg);
  border: none;
  position: relative;
  min-height: 80px;
}

.example-mapping-rule-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(225deg, transparent 50%, rgba(0,0,0,0.1) 50%);
}

.example-mapping-rule-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.example-mapping-rule-card h4 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.example-mapping-rule-card p {
  margin: 0;
  color: #1a1a1a;
  font-size: 13px;
  line-height: 1.5;
}

/* Examples - Green Post-its */
.example-mapping-examples {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.example-mapping-example-card {
  background: #B8E6B8;
  padding: 14px;
  box-shadow: 
    0 3px 6px rgba(0,0,0,0.15),
    0 1px 3px rgba(0,0,0,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.05);
  transform: rotate(-0.5deg);
  border: none;
  position: relative;
}

.example-mapping-example-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: linear-gradient(225deg, transparent 50%, rgba(0,0,0,0.1) 50%);
}

.example-mapping-example-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.example-mapping-example-card .card-header span {
  font-size: 10px;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.example-mapping-example-card p {
  margin: 0;
  color: #1a1a1a;
  font-size: 12px;
  line-height: 1.5;
}

.example-mapping-add-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  padding: 16px;
}

/* Questions Section - Pink Post-its, Fixed Width */
.example-mapping-questions-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-top: 30px;
  width: 300px;
  margin-left: auto;
  margin-right: 0;
}

.questions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.questions-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

#questions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Question Card - Pink Post-it */
.example-mapping-question-card {
  background: #FFB3D9;
  padding: 14px;
  box-shadow: 
    0 3px 6px rgba(0,0,0,0.15),
    0 1px 3px rgba(0,0,0,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.05);
  transform: rotate(1deg);
  border: none;
  position: relative;
  width: 100%;
}

.example-mapping-question-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: linear-gradient(225deg, transparent 50%, rgba(0,0,0,0.1) 50%);
}

.example-mapping-question-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.example-mapping-question-card .card-header span {
  font-size: 10px;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.example-mapping-question-card p {
  margin: 0;
  color: #1a1a1a;
  font-size: 12px;
  line-height: 1.5;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.btn-icon:hover {
  opacity: 1;
}

.btn-small {
  padding: 6px 12px;
  font-size: 11px;
}

/* Formulation View - Feature Cards */
.feature-card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
}

.feature-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-color: #c1c9d1;
}

.feature-card.feature-complete {
  border-left: 4px solid #10b981;
}

.feature-card.feature-incomplete {
  border-left: 4px solid #ef4444;
}

.feature-status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.feature-status-indicator.status-green {
  background: #10b981;
}

.feature-status-indicator.status-red {
  background: #ef4444;
}

.feature-content {
  flex: 1;
}

.feature-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.feature-content p {
  color: #6b7280;
  margin-bottom: 12px;
  line-height: 1.5;
}

.feature-completion {
  display: flex;
  align-items: center;
  gap: 8px;
}

.completion-text {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

/* Gherkin Editor */
.gherkin-editor-content {
  background: white;
  border-radius: 8px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.gherkin-feature {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.8;
  color: #1a1a1a;
}

.gherkin-line {
  margin-bottom: 8px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gherkin-line .scenario-edit-buttons {
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.gherkin-line.has-steps .scenario-edit-buttons {
  opacity: 1;
}

.gherkin-line:hover .scenario-edit-buttons {
  opacity: 1;
}

.gherkin-line .scenario-edit-buttons[style*="opacity: 1"] {
  opacity: 1 !important;
}

.gherkin-keyword {
  color: #7c3aed;
  font-weight: 600;
  margin-right: 8px;
}

.gherkin-text {
  color: #1a1a1a;
}

.gherkin-description {
  color: #6b7280;
  font-style: italic;
  margin-left: 0;
  margin-bottom: 16px;
  padding-left: 0;
}

.gherkin-rule {
  margin-top: 24px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 2px solid #e1e5e9;
}

.gherkin-scenario {
  margin-top: 16px;
  margin-left: 32px;
  padding-left: 16px;
  border-left: 2px solid #d1d5db;
}

.gherkin-steps {
  margin-top: 12px;
  margin-left: 0;
}

.gherkin-steps-input {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f9fafb;
  resize: vertical;
  transition: border-color 0.2s, background-color 0.2s;
}

.gherkin-steps-input:focus {
  outline: none;
  border-color: #7c3aed;
  background: white;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

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

/* Gherkin Steps Widget */
.gherkin-steps-widget {
  margin-top: 12px;
  margin-left: 0;
}

.steps-list {
  margin-bottom: 12px;
}

.gherkin-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: move;
}

.gherkin-step-item:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.gherkin-step-item.dragging {
  opacity: 0.5;
  background: #e5e7eb;
}

.step-drag-handle {
  color: #9ca3af;
  font-size: 16px;
  cursor: grab;
  user-select: none;
  padding: 0 4px;
}

.step-drag-handle:active {
  cursor: grabbing;
}

.step-keyword {
  flex-shrink: 0;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: white;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  color: #7c3aed;
  font-weight: 600;
  cursor: pointer;
  min-width: 80px;
}

.step-keyword:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.step-text {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  color: #1a1a1a;
  background: white;
}

.step-text:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.step-text::placeholder {
  color: #9ca3af;
}

.step-remove {
  flex-shrink: 0;
  padding: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.step-remove:hover {
  opacity: 1;
}

.add-step-btn {
  margin-top: 8px;
}

/* Step text view (when not in edit mode) */
.gherkin-step-text {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: #f9fafb;
  border-left: 3px solid #7c3aed;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.step-keyword-text {
  color: #7c3aed;
  font-weight: 600;
  flex-shrink: 0;
}

.step-text-content {
  color: #1a1a1a;
  flex: 1;
}

.gherkin-step-text .step-edit {
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.gherkin-step-text:hover .step-edit {
  opacity: 1;
}

/* Scenario edit button */
.scenario-edit-btn {
  margin-left: 8px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.scenario-edit-btn:hover {
  opacity: 1;
}

/* Step editing state */
.gherkin-step-item.step-editing {
  background: #fef3c7;
  border-color: #fbbf24;
}

.gherkin-step-item.step-new {
  background: #dbeafe;
  border-color: #60a5fa;
}

.step-save {
  color: #10b981;
}

.step-save:hover {
  color: #059669;
}

/* Capability grouping styles */
.capability-group {
  margin-bottom: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.capability-header {
  background-color: #ebe6f9;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e0e0e0;
  user-select: none;
}

.capability-header:hover {
  background-color: #eeeeee;
}

.capability-header .btn-icon {
  padding: 2px 6px;
  margin-left: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
  flex-shrink: 0;
  border-radius: 4px;
  line-height: 1;
}

.capability-header .reorder-stories-btn {
  margin-left: auto;
}

.capability-header .btn-icon:hover {
  opacity: 1;
  color: #2D5F83;
  background: rgba(45, 95, 131, 0.1);
}

.capability-toggle {
  font-size: 12px;
  color: #666;
  min-width: 16px;
}

.capability-name {
  font-weight: 600;
  font-size: 16px;
  cursor: text;
}

.capability-name:hover {
  color: #0066cc;
}

.capability-count {
  color: #999;
  font-size: 14px;
}

.capability-stories {
  padding: 8px;
  background-color: #fafafa;
}

.capability-stories .test-case-item {
  margin-bottom: 8px;
}

.capability-stories .test-case-item:last-child {
  margin-bottom: 0;
}

.capability-stories .feature-card {
  margin-bottom: 12px;
}

.capability-stories .feature-card:last-child {
  margin-bottom: 0;
}

.capability-endpoints {
  padding: 8px;
  background-color: #fafafa;
}

/* Drag and drop styles for user stories */
.story-item.draggable-story {
  position: relative;
}

.story-item.draggable-story:hover {
  background-color: #f0f0f0;
}

.story-item.draggable-story:active {
  cursor: grabbing;
}

.drag-handle {
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.reorder-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-small {
  padding: 4px 12px;
  font-size: 12px;
}

.capability-endpoints .test-case-item {
  margin-bottom: 8px;
}

.capability-endpoints .test-case-item:last-child {
  margin-bottom: 0;
}

/* Coming Soon Container */
.coming-soon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #666;
}

.coming-soon-container h3 {
  font-size: 24px;
  color: #333;
  margin-bottom: 12px;
}

.coming-soon-container p {
  font-size: 14px;
  color: #666;
}

/* SDD Content */
.sdd-content {
  max-width: 800px;
  padding: 30px;
  line-height: 1.8;
}

.sdd-content p {
  font-size: 15px;
  color: #333;
  margin-bottom: 20px;
}

.sdd-content p:last-child {
  margin-bottom: 0;
}

/* Data Stubs Styles */
.stubs-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  height: 100%;
  min-height: calc(100vh - 200px);
}

.stubs-list-panel {
  overflow-y: auto;
}

.stub-preview-panel {
  background: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 160px);
}

.stub-preview-header {
  padding: 12px 16px;
  background: #2d2d2d;
  border-bottom: 1px solid #3d3d3d;
}

.stub-preview-header h3 {
  color: #e0e0e0;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.stub-json-preview {
  flex: 1;
  margin: 0;
  padding: 16px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #d4d4d4;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.stub-json-preview code {
  color: #9cdcfe;
}

/* Stub Item Styles */
.stub-item {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.stub-item:hover {
  border-color: #2D5F83;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stub-item.selected {
  border-color: #2D5F83;
  box-shadow: 0 0 0 2px rgba(45, 95, 131, 0.2);
}

.stub-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
}

.stub-item-info {
  flex: 1;
}

.stub-item-name {
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.stub-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.stub-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.stub-type-badge.primitive {
  background: #e3f2fd;
  color: #1976d2;
}

.stub-type-badge.object {
  background: #e8f5e9;
  color: #388e3c;
}

.stub-type-badge.array {
  background: #fff3e0;
  color: #f57c00;
}

.stub-value-preview {
  color: #666;
  font-family: monospace;
  font-size: 11px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stub-item-actions {
  display: flex;
  gap: 8px;
}

.stub-dependents-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #f3e5f5;
  color: #7b1fa2;
  border-radius: 4px;
  font-size: 11px;
}

/* Stub Builder Modal Styles */
.stub-builder {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stub-type-selector {
  display: flex;
  gap: 8px;
}

.stub-type-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.stub-type-btn:hover {
  border-color: #2D5F83;
}

.stub-type-btn.active {
  border-color: #2D5F83;
  background: #f0f7fc;
}

.stub-type-btn-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.stub-type-btn-desc {
  font-size: 11px;
  color: #666;
}

.stub-primitive-editor {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.stub-primitive-editor select {
  width: 120px;
  padding: 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
}

.stub-primitive-editor input,
.stub-primitive-editor textarea {
  flex: 1;
  padding: 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
  font-family: monospace;
}

.stub-fields-list,
.stub-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stub-field-row,
.stub-item-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
}

.stub-field-key {
  width: 120px;
  min-width: 120px;
  padding: 6px 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
}

.stub-field-type-select,
.stub-item-type-select {
  width: 90px;
  min-width: 90px;
  padding: 6px 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
}

.stub-field-value,
.stub-item-value {
  flex: 3;
  min-width: 200px;
  padding: 6px 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
  font-family: monospace;
}

.stub-field-ref-select,
.stub-item-ref-select {
  flex: 3;
  min-width: 200px;
  padding: 6px 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
}

.stub-remove-btn {
  padding: 4px 8px;
  background: #fee;
  color: #c62828;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.stub-remove-btn:hover {
  background: #fcc;
}

.stub-add-btn {
  padding: 8px 16px;
  background: #f0f7fc;
  color: #2D5F83;
  border: 1px dashed #2D5F83;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.stub-add-btn:hover {
  background: #e0f0fc;
}

.stub-builder-preview {
  background: #1e1e1e;
  border-radius: 8px;
  padding: 16px;
  margin-top: 8px;
}

.stub-builder-preview-label {
  color: #888;
  font-size: 11px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stub-builder-preview pre {
  margin: 0;
  color: #d4d4d4;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Dynamic Mocks Styles */
.mock-item {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.mock-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mock-item-header:hover {
  background: #f8f9fa;
}

.mock-item-info {
  flex: 1;
}

.mock-item-name {
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.mock-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #666;
}

.mock-stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 11px;
}

.mock-item-actions {
  display: flex;
  gap: 8px;
}

/* Mock Builder */
.mock-section {
  margin-bottom: 24px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.mock-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mock-section-title {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

/* Parameters */
.mock-param-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: white;
  border-radius: 4px;
  margin-bottom: 8px;
  border: 1px solid #e1e5e9;
}

.mock-param-name {
  width: 150px;
  min-width: 150px;
  padding: 6px 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
}

.mock-param-source {
  width: 160px;
  min-width: 160px;
  padding: 6px 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
}

.mock-param-path {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
}

/* Rules */
.mock-rule {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.mock-rule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f0f7fc;
  border-bottom: 1px solid #e1e5e9;
}

.mock-rule-title {
  font-weight: 600;
  color: #2D5F83;
  font-size: 13px;
}

.mock-rule-body {
  padding: 16px;
}

.mock-conditions-list {
  margin-bottom: 16px;
}

.mock-condition-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 8px;
}

.mock-condition-param {
  width: 150px;
  min-width: 150px;
  padding: 6px 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
}

.mock-condition-operator {
  width: 140px;
  min-width: 140px;
  padding: 6px 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
}

.mock-condition-value {
  flex: 1;
  min-width: 150px;
  padding: 6px 8px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
  font-family: monospace;
}

.mock-rule-stub-select {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #e8f5e9;
  border-radius: 4px;
}

.mock-rule-stub-select label {
  font-weight: 600;
  color: #388e3c;
  font-size: 12px;
  white-space: nowrap;
}

.mock-rule-stub-select select {
  flex: 1;
  padding: 8px;
  border: 1px solid #c8e6c9;
  border-radius: 4px;
  background: white;
}

/* Default Stub */
.mock-default-stub {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff3e0;
  border-radius: 8px;
  border: 1px solid #ffcc80;
}

.mock-default-stub label {
  font-weight: 600;
  color: #f57c00;
  font-size: 13px;
  white-space: nowrap;
}

.mock-default-stub select {
  flex: 1;
  padding: 8px;
  border: 1px solid #ffcc80;
  border-radius: 4px;
  background: white;
}

/* Test Panel */
.mock-test-panel {
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.mock-test-panel-label {
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.mock-test-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.mock-test-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.mock-test-input label {
  color: #374151;
  font-size: 12px;
  font-weight: 500;
}

.mock-test-input input {
  padding: 8px 12px;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  background: white;
  color: #1a1a1a;
  font-size: 13px;
  font-family: inherit;
}

.mock-test-input input:focus {
  outline: none;
  border-color: #2D5F83;
  box-shadow: 0 0 0 3px rgba(45, 95, 131, 0.1);
}

.mock-test-result {
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid;
}

.mock-test-result.matched {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #4caf50;
}

.mock-test-result.default {
  background: #fff3e0;
  color: #e65100;
  border-color: #ff9800;
}

.mock-test-result.no-match {
  background: #ffebee;
  color: #c62828;
  border-color: #f44336;
}

/* Filter Dialog Styles */
.filter-dialog {
  max-width: 600px;
  width: 100%;
}

.filter-option-group {
  margin-bottom: 20px;
}

.filter-option {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-option:hover {
  border-color: #2D5F83;
  background: #f0f7fc;
}

.filter-option input[type="radio"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.filter-option.selected {
  border-color: #2D5F83;
  background: #f0f7fc;
}

.filter-option-label {
  flex: 1;
  font-weight: 500;
  color: #1a1a1a;
}

.filter-option-desc {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.filter-dropdown-container {
  margin-top: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  display: none;
}

.filter-dropdown-container.active {
  display: block;
}

.filter-dropdown-container label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 13px;
}

.filter-dropdown-container select {
  width: 100%;
  padding: 10px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  min-height: 44px;
  line-height: 1.5;
}

.filter-dropdown-container select option {
  padding: 10px 12px;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.5;
}

.filter-dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e1e5e9;
}

/* Test Plans Styles */
.test-plans-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.test-plan-card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  padding: 20px;
  transition: all 0.2s ease;
}

.test-plan-card:hover {
  border-color: #2D5F83;
  box-shadow: 0 2px 8px rgba(45, 95, 131, 0.1);
}

.test-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.test-plan-name {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  flex: 1;
}

.test-plan-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.btn-icon:hover {
  background: #f0f1f3;
}

.test-plan-description {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.test-plan-details {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
}

.test-plan-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.detail-value {
  font-size: 14px;
  color: #1a1a1a;
  font-weight: 500;
}

.test-plan-suites {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e1e5e9;
}

.test-plan-suites strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #374151;
}

.suite-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suite-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f0f7;
  color: #2D5F83;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.suite-category-badge {
  display: inline-block;
  background: #2D5F83;
  color: white;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  margin-right: 4px;
}

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

.suite-selection-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.btn-link {
  background: none;
  border: none;
  color: #2D5F83;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
}

.btn-link:hover {
  color: #1a4a6b;
}

.btn-link-small {
  background: none;
  border: none;
  color: #2D5F83;
  cursor: pointer;
  font-size: 11px;
  padding: 0;
  text-decoration: underline;
}

.btn-link-small:hover {
  color: #1a4a6b;
}

.suite-selection {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 350px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
  background: #fafbfc;
}

.suite-category-group {
  border-bottom: 1px solid #e1e5e9;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.suite-category-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.suite-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
  background: #f0f1f3;
  border-radius: 4px;
}

.suite-category-header strong {
  font-size: 13px;
  color: #1a1a1a;
  font-weight: 600;
}

.suite-category-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}

.suite-category-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.checkbox-label:hover {
  background: #f0f1f3;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-label span {
  flex: 1;
  font-size: 14px;
  color: #1a1a1a;
}

.form-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 8px;
  font-style: italic;
}

/* Test Runs Styles */
.test-run-card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.test-run-card:hover {
  border-color: #2D5F83;
  box-shadow: 0 2px 8px rgba(45, 95, 131, 0.1);
}

.test-run-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.test-run-card-title-section {
  flex: 1;
}

.test-run-card-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.test-run-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #6b7280;
}

.test-run-meta-item {
  color: #6b7280;
}

.test-run-target {
  display: inline-block;
  background: #e8f0f7;
  color: #2D5F83;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.test-run-edit-link {
  color: #2D5F83;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
}

.test-run-edit-link:hover {
  text-decoration: underline;
}

.test-run-status-summary {
  font-size: 13px;
  color: #374151;
  margin-top: 8px;
}

.test-run-app-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.test-run-version {
  color: #9ca3af;
}

.test-run-card-progress-section {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.progress-bar {
  display: flex;
  width: 120px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  background: #f3f4f6;
  border: 1px solid #e1e5e9;
}

.progress-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.test-run-passed-percentage {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  min-width: 45px;
  text-align: right;
}

.test-run-delete-btn {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.2s;
}

.test-run-delete-btn:hover {
  background: #dc2626;
}

/* Test Runs Sections */
.test-runs-section {
  margin-bottom: 40px;
}

.test-runs-section:last-child {
  margin-bottom: 0;
}

.test-runs-section-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
}

.automatic-badge {
  font-size: 12px;
  font-weight: 500;
  color: #6366f1;
  background: #e0e7ff;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
}

/* Test Cases View Styles */
.test-cases-dashboard {
  padding: 20px;
}

.test-cases-dashboard-section {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.test-cases-dashboard-left {
  display: flex;
  gap: 20px;
  align-items: center;
}

.test-cases-pie-chart {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  display: block;
  position: relative;
}

.pie-chart-svg {
  width: 140px;
  height: 140px;
  display: block;
  margin: 0;
  padding: 0;
}

.pie-chart-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 14px;
}

.test-cases-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #1a1a1a;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}

.test-cases-dashboard-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 20px;
  margin-left: auto;
}

.test-cases-pass-percentage {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
}

.test-cases-untested-info {
  font-size: 14px;
  color: #6b7280;
}

.test-cases-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

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

.test-cases-table thead {
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

.test-cases-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
}

.test-cases-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s;
}

.test-cases-table tbody tr:hover {
  background-color: #f9fafb;
}

.test-cases-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: #1a1a1a;
}

.test-case-arrow {
  text-align: right;
  color: #9ca3af;
  font-size: 18px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.status-chevron {
  font-size: 10px;
  opacity: 0.7;
}

.status-badge-passed {
  background: #d1fae5;
  color: #065f46;
}

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

.status-badge-blocked {
  background: #e5e7eb;
  color: #374151;
}

.status-badge-untested {
  background: #f3f4f6;
  color: #6b7280;
}

.status-badge-retest {
  background: #fef3c7;
  color: #92400e;
}

.status-badge-skipped {
  background: #fef3c7;
  color: #92400e;
}

.status-badge-in-progress {
  background: #e0e7ff;
  color: #3730a3;
}

.status-badge-conditional {
  background: #d1fae5;
  color: #065f46;
}

/* Use Case Info in Test Result Modal */
.use-case-info-section {
  margin-bottom: 20px;
  padding: 15px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.use-case-info-section h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.use-case-info-box {
  margin-bottom: 15px;
  padding: 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.use-case-info-box:last-child {
  margin-bottom: 0;
}

.use-case-info-box label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  margin-bottom: 8px;
}

.use-case-info-content {
  font-size: 14px;
  color: #1a1a1a;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.use-case-steps-list {
  margin: 0;
  padding-left: 20px;
  list-style-type: disc;
}

.use-case-steps-list li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.use-case-media-item {
  margin-top: 10px;
}

.use-case-media-item label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 5px;
}

.media-thumbnail-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.media-thumbnail {
  max-width: 150px;
  max-height: 150px;
  border-radius: 6px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  object-fit: cover;
  transition: transform 0.2s, border-color 0.2s;
}

.media-thumbnail:hover {
  transform: scale(1.05);
  border-color: #3b82f6;
}

.media-viewer {
  text-align: center;
}

.media-viewer video,
.media-viewer img {
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.current-video {
  margin-top: 10px;
  padding: 10px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.current-video label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 8px;
}

.btn-small {
  padding: 4px 12px;
  font-size: 12px;
  margin-top: 8px;
}

/* SDD Flow Styles */
.sdd-content {
  padding: 20px;
  max-width: 800px;
}

.sdd-content p {
  margin-bottom: 16px;
  line-height: 1.6;
  color: #4a5568;
}

.sdd-header-actions {
  padding: 16px 20px;
  border-bottom: 1px solid #e1e5e9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sdd-specs-container,
.sdd-plans-container,
.sdd-tasks-container,
.sdd-implement-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sdd-specs-list,
.sdd-plans-list {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  overflow-y: auto;
}

.sdd-spec-card,
.sdd-plan-card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.sdd-spec-card:hover,
.sdd-plan-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #2D5F83;
}

.sdd-spec-header,
.sdd-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sdd-spec-header h3,
.sdd-plan-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.spec-status,
.plan-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-draft {
  background: #fef3c7;
  color: #92400e;
}

.status-review {
  background: #dbeafe;
  color: #1e40af;
}

.status-approved {
  background: #d1fae5;
  color: #065f46;
}

.sdd-spec-preview,
.sdd-plan-preview {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
  max-height: 100px;
  overflow: hidden;
}

.sdd-plan-tech {
  font-size: 12px;
  color: #2D5F83;
  margin-bottom: 8px;
  font-weight: 500;
}

.sdd-spec-actions,
.sdd-plan-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.spec-editor {
  width: 100%;
  min-height: 400px;
  padding: 12px;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}

.panel-description {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.5;
}

.panel-hint {
  padding: 16px;
  background: #f9fafb;
  border-radius: 6px;
  color: #6b7280;
  font-size: 13px;
  text-align: center;
}

.panel-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}

.sdd-tasks-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
  height: 100%;
  overflow-y: auto;
}

.task-column {
  background: #f9fafb;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.task-column h3 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e1e5e9;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
}

.sdd-task-card,
.sdd-implement-task-card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  padding: 12px;
  transition: all 0.2s ease;
}

.sdd-task-card:hover,
.sdd-implement-task-card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

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

.task-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  flex: 1;
}

.task-priority {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  background: #f3f4f6;
  color: #6b7280;
}

.priority-0 { background: #f3f4f6; color: #6b7280; }
.priority-1 { background: #fef3c7; color: #92400e; }
.priority-2 { background: #fed7aa; color: #c2410c; }
.priority-3 { background: #fecaca; color: #991b1b; }

.task-description {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  line-height: 1.5;
}

.task-content {
  margin: 8px 0;
  padding: 8px;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  max-height: 200px;
  overflow-y: auto;
}

.task-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #9ca3af;
}

.task-feature {
  padding: 2px 6px;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 4px;
}

.task-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.sdd-implement-tasks {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.view-panel {
  width: 400px;
  background: white;
  border-left: 1px solid #e1e5e9;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

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

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: #2D5F83;
  box-shadow: 0 0 0 3px rgba(45, 95, 131, 0.1);
}

.error-message {
  padding: 12px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 13px;
}

/* ── Admin Panel ─────────────────────────────────────────────────────────── */
.admin-panel {
  max-width: 860px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.admin-section {
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 10px;
  overflow: hidden;
}
.admin-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-count {
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 999px;
  font-size: 11px;
  padding: 1px 7px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

/* Add user form */
.admin-add-form {
  padding: 16px;
}
.admin-add-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.admin-add-fields input[type="email"],
.admin-add-fields input[type="password"] {
  flex: 1;
  min-width: 160px;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  box-sizing: border-box;
}
.admin-add-fields select {
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
}
.admin-form-error {
  color: #b91c1c;
  font-size: 12px;
  margin-top: 8px;
  margin-bottom: 0;
}

/* Users table */
.admin-table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table thead th {
  text-align: left;
  padding: 10px 16px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e1e5e9;
}
.admin-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s;
}
.admin-table tbody tr:last-child {
  border-bottom: none;
}
.admin-table tbody tr:hover {
  background: #f8fafc;
}
.admin-table td {
  padding: 10px 16px;
  vertical-align: middle;
}
.admin-td-email {
  font-weight: 500;
  color: #1e293b;
  word-break: break-all;
}
.admin-td-date {
  color: #94a3b8;
  white-space: nowrap;
}
.admin-td-actions {
  white-space: nowrap;
  display: flex;
  gap: 6px;
  align-items: center;
}
.admin-self-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 6px;
  vertical-align: middle;
  margin-left: 4px;
}
.admin-role-select {
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid #e1e5e9;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  transition: outline 0.2s;
}

/* Password reset inline row */
.admin-pw-row td {
  background: #f8fafc;
  padding: 8px 16px 12px;
}
.admin-pw-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-pw-input {
  flex: 1;
  min-width: 180px;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  box-sizing: border-box;
}

/* Loading / error states */
.admin-loading,
.admin-error {
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}
.admin-error { color: #b91c1c; }

/* Toast notification */
.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1e293b;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 9999;
}
.admin-toast.admin-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
