/* Survey Designer - Modern CSS Framework */
/* Self-contained design system for Cloudflare deployment */

/* CSS Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #2d3748;
    background: #f7fafc;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

/* When a modal is not hidden, ensure it is visible and centered */
.modal:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Center modal content when visible */
.modal:not(.hidden) .modal-content {
  margin: 0 auto;
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-content.large {
  width: 90%;
  max-width: 800px;
  margin: 15% auto;
}

/* Only center the survey designer question library modal specifically */
#question-library-modal .modal-content.large {
  margin: 5% auto;
}

.modal-content.extra-large {
  width: 95%;
  max-width: 1200px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.modal-header h2 {
  margin: 0;
  color: #333;
}

.modal-close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover,
.modal-close:focus {
  color: #000;
  text-decoration: none;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

/* Modern Question Library Styles */
.question-library-modern {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 70vh;
  overflow: hidden;
}

.library-search {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-input-modern {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.search-input-modern:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.questions-list-modern {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 8px;
}

.question-library-item-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.question-library-item-modern:hover {
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}

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

.question-title-modern {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.question-meta-modern {
  display: flex;
  align-items: center;
  gap: 8px;
}

.response-type-badge-modern {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.question-actions-modern {
  margin-left: 16px;
  flex-shrink: 0;
}

.add-to-survey-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.add-to-survey-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.2);
}

.empty-library-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #6b7280;
}

.empty-library-modern .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-library-modern h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
}

.empty-library-modern p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

/* Custom scrollbar for questions list */
.questions-list-modern::-webkit-scrollbar {
  width: 6px;
}

.questions-list-modern::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.questions-list-modern::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.questions-list-modern::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.modal .form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.modal .form-group small {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.modal input,
.modal textarea,
.modal select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal input:focus,
.modal textarea:focus,
.modal select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-col {
    flex: 1;
}

.form-col label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.option-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.option-item .btn {
    flex-shrink: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-container {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.loading-container p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Authentication Error */
.auth-error {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.error-container {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-container h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
}

.error-container p {
    color: #64748b;
    margin-bottom: 2rem;
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    white-space: nowrap;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary {
    background: #3b82f6;
    color: #ffffff;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    text-decoration: none;
    color: #ffffff;
}

/* Solid primary utility to prevent background overrides */
.btn.btn-solid {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: 1px solid #3b82f6 !important;
}
.btn.btn-solid:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    transform: translateY(-1px);
}

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

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

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

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

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

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

/* Survey Designer Layout */
.survey-designer {
    min-height: 100vh;
    background: #f7fafc;
}

/* Header */
.designer-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

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

.designer-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.designer-header p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin: 0;
}

/* Wizard Container */
.designer-wizard {
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* Navigation */
.wizard-nav {
    background: #ffffff;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: max-content;
    border: 1px solid transparent;
}

.nav-item:hover:not(.active) {
    background: #f1f5f9;
    color: #334155;
}

.nav-item.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.nav-item.completed:not(.active) {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    opacity: 0.7;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-number {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.nav-item.active .nav-number {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.nav-item.completed:not(.active) .nav-number {
    background: #10b981;
    color: #ffffff;
}

.nav-label {
    font-weight: 500;
}

/* Step Content */
.wizard-content {
    padding: 2rem;
    min-height: 500px;
}

.step-container {
    animation: fadeIn 0.3s ease-in-out;
}

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

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

.step-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.step-subtitle {
    color: #64748b;
    font-size: 1.125rem;
}

/* Grid Layout */
.step-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .step-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Section Cards */
.section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    display: flex;
    align-items: center;
}

.section-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    color: #3b82f6;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #374151;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* Preview Section */
.preview-section {
    position: sticky;
    top: 2rem;
    background-color: #fff;
}

.preview-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
}

.preview-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.preview-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    display: flex;
    align-items: center;
}

.preview-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    color: #3b82f6;
}

.preview-content {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    min-height: 200px;
}

/* Template Cards */
.template-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.template-title {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.template-desc {
    font-size: 0.875rem;
    color: #64748b;
}

/* Form Builder */
.form-builder {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.builder-toolbar {
    margin-bottom: 1.5rem;
}

.field-editor {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.field-editor:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

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

.field-number {
    background: #3b82f6;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-remove {
    background: #ef4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

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

.config-row {
    display: grid;
    grid-template-columns: 1fr 120px 120px auto;
    gap: 1rem;
    align-items: end;
}

.config-group {
    display: flex;
    flex-direction: column;
}

.config-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0 !important;
    font-weight: normal !important;
}

.radio-label input[type="radio"] {
    width: auto !important;
    margin: 0 !important;
}

/* Navigation Footer */
.wizard-footer {
    background: #f8fafc;
    padding: 2rem 3rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-indicator {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* Summary Items */
.summary-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* Question Categories */
.question-category {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.question-category h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.question-category p {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Checklist Items */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #64748b;
}

.checklist-item.completed {
    color: #10b981;
}

.checklist-item i {
    width: 16px;
    height: 16px;
}

/* Statement and Reference Items */
.statement-item, .ref-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.statement-item .statement-inputs {
    flex: 1;
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
}

.statement-item .statement-inputs input,
.statement-item .statement-inputs textarea {
    margin-bottom: 0;
}

.ref-item .ref-inputs {
    flex: 1;
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
}

.ref-item .ref-inputs input {
    margin-bottom: 0;
}

.statement-item button,
.ref-item button {
    flex-shrink: 0;
    align-self: flex-start;
}

.empty-state {
    color: #64748b;
    font-style: italic;
    text-align: center;
    padding: 2rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Coming Soon Modal */
.coming-soon-content {
    text-align: center;
    padding: 2rem;
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.coming-soon-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.coming-soon-content p {
    color: #64748b;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* Launch Screen Preview */
.launch-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-logo-container {
    margin-bottom: 1.5rem;
}

.preview-logo {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
    border-radius: 4px;
}

.preview-logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    width: 120px;
}

.logo-placeholder-icon {
    font-size: 2rem;
}

.preview-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.preview-instruction {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.preview-form-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

.form-icon-large {
    font-size: 2.5rem;
    color: #6b7280;
}

.form-placeholder-text {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-placeholder-subtext {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
}

.preview-start-button {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 1rem;
}

.preview-start-button:hover {
    background: #2563eb;
}

.preview-terms {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.terms-link {
    color: #3b82f6;
    text-decoration: none;
}

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

/* Help Text */
.help-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

.alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .designer-header {
        padding: 1.5rem 1rem;
    }
    
    .designer-header h1 {
        font-size: 2rem;
    }
    
    .wizard-content {
        padding: 2rem 1.5rem;
    }
    
    .step-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .config-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .wizard-nav {
        flex-direction: column;
    }
    
    .nav-item {
        min-width: auto;
    }
    
    .wizard-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-builder {
        grid-template-columns: 1fr;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .survey-designer {
        background: #1a202c;
    }
    
    .section-card {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
}

/* Ultra-Modern Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.03)"/><circle cx="20" cy="80" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-header p {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

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

.login-form .form-group {
    margin-bottom: 0;
}

.login-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.login-form input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #1f2937;
    font-family: inherit;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.login-form input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message::before {
    content: '⚠️';
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
}

.btn-full::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-full:hover::before {
    left: 100%;
}

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

.btn-full:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-full:disabled:hover {
    transform: none;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
}

.btn-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.login-footer p {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-footer p::before {
    content: '🔒';
    font-size: 1rem;
}

/* Floating Elements Animation */
.login-screen::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: 10%;
    right: 10%;
    animation: float 15s ease-in-out infinite reverse;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .login-container {
        margin: 1rem;
        padding: 2rem 1.5rem;
        max-width: none;
    }
    
    .login-header h1 {
        font-size: 1.875rem;
    }
    
    .login-form input {
        padding: 0.875rem 1rem;
    }
    
    .btn-full {
        padding: 0.875rem 1.25rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-container {
        background: #ffffff;
        border: 2px solid #000000;
    }
    
    .login-form input {
        border-color: #000000;
    }
    
    .btn-full {
        background: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .login-container {
        animation: none;
    }
    
    .login-screen::before,
    .login-screen::after {
        animation: none;
    }
    
    .btn-full::before {
        display: none;
    }
    
    .error-message {
        animation: none;
    }
}

/* Dashboard Styles */
.main-application {
    min-height: 100vh;
    background: #f7fafc;
}

.dashboard-view {
    min-height: 100vh;
    background: #f7fafc;
}

.app-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    flex-direction: column;
}

.app-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    letter-spacing: -0.025em;
}

.app-subtitle {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
    margin-top: 0.25rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: #1a202c;
    font-size: 0.875rem;
}

.user-role {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 0.125rem;
}

.dashboard-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Quick Actions Section */
.quick-actions h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

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

.action-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.action-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.action-card.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.action-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: inherit;
}

.action-card p {
    color: inherit;
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

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

.action-card .btn {
    pointer-events: none;
}

.action-card.primary .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Recent Surveys Section */
.recent-surveys h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

.survey-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.survey-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.survey-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

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

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

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

.survey-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.survey-card p {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.survey-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    color: #64748b;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.survey-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Analytics Overview */
.analytics-overview h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

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

.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
}

.stat-change.positive {
    background: #d1fae5;
    color: #065f46;
}

.stat-change.negative {
    background: #fee2e2;
    color: #991b1b;
}

.stat-change.neutral {
    background: #f3f4f6;
    color: #374151;
}

/* Question Library View */
.question-library-view {
    min-height: 100vh;
    background: #f7fafc;
}

.library-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.library-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.library-filters {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-bar {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
}

.search-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #64748b;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #ffffff;
    min-width: 150px;
}

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

.question-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.question-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #eff6ff;
    color: #1e40af;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.question-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.question-category {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Question Library specific category styling */
.question-card .question-category {
    margin-bottom: 0;
    padding: 0;
}

.question-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.question-meta .question-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0;
}

.question-tags {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.question-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Responsive Design for Dashboard */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-right {
        flex-direction: column;
        gap: 1rem;
    }
    
    .dashboard-main {
        padding: 1rem;
    }
    
    .action-cards {
        grid-template-columns: 1fr;
    }
    
    .surveys-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .library-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-bar {
        min-width: auto;
    }
    
    .filter-controls {
        justify-content: stretch;
    }
    
    .filter-select {
        min-width: auto;
        flex: 1;
    }
    
    .questions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .survey-actions {
        flex-direction: column;
    }
    
    .question-actions {
        flex-direction: column;
    }
}

/* Print styles */
@media print {
    .wizard-nav,
    .wizard-footer {
        display: none;
    }
    
    .wizard-content {
        padding: 0;
    }
    
    .step-grid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Intake Form Styling */
.intake-field-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.intake-field-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

.field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px 12px 0 0;
}

.field-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.field-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

.field-type-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-type-text { background: #e6fffa; color: #065f46; }
.field-type-email { background: #fef3c7; color: #92400e; }
.field-type-number { background: #ddd6fe; color: #5b21b6; }
.field-type-boolean { background: #ecfdf5; color: #14532d; }
.field-type-select { background: #fce7f3; color: #be185d; }
.field-type-textarea { background: #d1fae5; color: #047857; }

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-icon.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-icon.btn-danger:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

.field-body {
    padding: 20px;
}

.field-basic-config {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
    align-items: end;
}

.form-group.flex-1 {
    flex: 1;
}

/* Toggle Switch Styling */
.toggle-switch {
    position: relative;
    display: inline-block;
}

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

.toggle-label {
    display: block;
    width: 48px;
    height: 24px;
    background-color: #cbd5e0;
    border-radius: 24px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-input:checked + .toggle-label {
    background-color: #10b981;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-input:checked + .toggle-label .toggle-slider {
    transform: translateX(24px);
}

/* Select Options Section */
.select-options-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    margin-top: 20px;
}

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

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.option-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e0;
}

.option-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.option-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 14px;
}

.option-input:focus {
    outline: none;
}

.no-options {
    padding: 20px;
    text-align: center;
    color: #718096;
    font-style: italic;
}

/* Enhanced Cohort Management Styling */
.cohort-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.cohort-placeholder h4 {
    margin-bottom: 8px;
    color: #4a5568;
    font-size: 18px;
}

.cohort-setup-info {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 1px solid #bee3f8;
    border-radius: 12px;
    padding: 24px;
}

.info-header h4 {
    color: #2b6cb0;
    margin-bottom: 8px;
    font-size: 18px;
}

.info-header p {
    color: #2c5282;
    margin-bottom: 20px;
}

.available-options-display {
    margin-top: 20px;
}

.options-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    display: block;
}

.options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #edf2f7;
    color: #4a5568;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.option-chip.assigned {
    background: #c6f6d5;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.option-chip.unassigned {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fca5a5;
}

.assigned-to {
    font-size: 12px;
    opacity: 0.8;
}

.unassigned-label {
    font-size: 12px;
    opacity: 0.8;
}

/* Cohort Management */
.cohort-management {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cohort-overview {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

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

.overview-header h4 {
    color: #2d3748;
    font-size: 18px;
}

.cohort-count {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.cohorts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cohort-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.cohort-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

.cohort-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.cohort-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cohort-number {
    font-weight: 600;
    color: #4a5568;
}

.cohort-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cohort-status.assigned {
    background: #c6f6d5;
    color: #276749;
}

.cohort-status.unassigned {
    background: #fed7d7;
    color: #c53030;
}

.cohort-body {
    padding: 20px;
}

/* Responsive Design for New Components */
@media (max-width: 768px) {
    .field-header {
        padding: 12px 16px;
    }
    
    .field-body {
        padding: 16px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .option-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .option-number {
        align-self: flex-start;
    }
    
    .overview-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .options-grid {
        flex-direction: column;
    }
    
    .cohort-header {
        padding: 12px 16px;
    }
    
    .cohort-body {
        padding: 16px;
    }
}

/* Boolean Field Preview Styling */
.preview-boolean-options {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.preview-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
    cursor: default;
}

.preview-radio-label input[type="radio"] {
    margin: 0;
    cursor: default;
}

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

.ql-modal.show {
    display: flex;
}

/* Question Library Modal - specific styling for ql-question-modal */
#ql-question-modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
}

#ql-question-modal.hidden {
    display: none;
}

.ql-modal-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    animation: qlModalSlideIn 0.3s ease-out;
}

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

.ql-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ql-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
}

.ql-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ql-modal-close:hover {
    background: #e2e8f0;
    color: #374151;
}

.ql-modal-body {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.ql-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* Question Library Form Styles */
.ql-form-group {
    margin-bottom: 20px;
}

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

.ql-form-group input,
.ql-form-group textarea,
.ql-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #374151;
    font-family: inherit;
}

.ql-form-group input:focus,
.ql-form-group textarea:focus,
.ql-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ql-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.ql-form-group small {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}

/* Question Library Options */
.ql-options-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 20px;
}

.ql-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ql-option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.ql-option-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.ql-option-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 14px;
}

.ql-option-input:focus {
    outline: none;
}

.ql-btn-remove {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ql-btn-remove:hover {
    background: #fecaca;
}

/* Question Library Button Styles */
.ql-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.ql-btn-primary {
    background: #667eea;
    color: white;
}

.ql-btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.ql-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.ql-btn-secondary:hover {
    background: #cbd5e0;
}

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

.ql-btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Responsive Design for Question Library Modals */
@media (max-width: 768px) {
    .ql-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .ql-modal-header,
    .ql-modal-body,
    .ql-modal-footer {
        padding: 16px;
    }
    
    .ql-modal-footer {
        flex-direction: column;
    }
    
    .ql-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Survey Management Styles */
.recent-surveys,
.all-surveys {
    margin-bottom: 3rem;
}

.recent-surveys h2,
.all-surveys h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

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

.survey-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #ffffff;
    color: #374151;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.survey-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.survey-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.survey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.survey-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

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

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

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

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

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    background: #f1f5f9;
    color: #64748b;
}

.btn-icon:hover {
    background: #e2e8f0;
    color: #374151;
    transform: translateY(-1px);
}

.btn-icon.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-icon.btn-danger:hover {
    background: #fecaca;
    color: #b91c1c;
}

.survey-body {
    padding: 1.5rem;
}

.survey-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.survey-description {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.survey-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.survey-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.survey-responses {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

/* Loading States */
.loading-surveys {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #64748b;
}

.loading-surveys .loading-spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: #64748b;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

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

.empty-state p {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    font-weight: 500;
    max-width: 300px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.notification.success {
    background: #10b981;
    color: white;
}

.notification.error {
    background: #ef4444;
    color: white;
}

.notification.info {
    background: #3b82f6;
    color: white;
}

/* All Surveys Section */
.all-surveys {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.all-surveys .section-header {
    margin-bottom: 2rem;
}

/* Responsive Design for Survey Management */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .survey-filters {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-select,
    .search-input {
        min-width: auto;
        width: 100%;
    }
    
    .surveys-grid {
        grid-template-columns: 1fr;
    }
    
    .survey-header {
        padding: 1rem;
    }
    
    .survey-body {
        padding: 1rem;
    }
    
    .survey-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .survey-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-icon {
        font-size: 2rem;
    }
    
    .empty-state h3 {
        font-size: 1.125rem;
    }
    
    .survey-card {
        margin: 0 -0.5rem;
    }
}

/* Enhanced Action Cards for Dashboard */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.action-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.action-card:hover::before {
    transform: scaleX(1);
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: #3b82f6;
}

.action-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.action-card.primary::before {
    background: rgba(255, 255, 255, 0.3);
}

.action-card.primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.9;
}

.action-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: inherit;
}

.action-card p {
    color: inherit;
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

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

.action-card .btn {
    pointer-events: none;
    transition: all 0.3s ease;
}

.action-card.primary .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-card:hover .btn {
    transform: translateY(-1px);
}

/* Dashboard Container Improvements */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Quick Actions Section Improvements */
.quick-actions h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-actions h2::before {
    content: '⚡';
    font-size: 1.25rem;
}

/* Recent Surveys Section Improvements */
.recent-surveys h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recent-surveys h2::before {
    content: '📊';
    font-size: 1.25rem;
}

/* Improved Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary {
    background: #3b82f6;
    color: #ffffff;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    text-decoration: none;
    color: #ffffff;
}

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

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled::before {
    display: none;
}

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

.survey-card {
    animation: fadeInUp 0.3s ease-out;
}

.action-card {
    animation: fadeInUp 0.3s ease-out;
}

/* Stagger animation for multiple cards */
.survey-card:nth-child(1) { animation-delay: 0.1s; }
.survey-card:nth-child(2) { animation-delay: 0.2s; }
.survey-card:nth-child(3) { animation-delay: 0.3s; }
.survey-card:nth-child(4) { animation-delay: 0.4s; }
.survey-card:nth-child(5) { animation-delay: 0.5s; }
.survey-card:nth-child(6) { animation-delay: 0.6s; }

.action-card:nth-child(1) { animation-delay: 0.1s; }
.action-card:nth-child(2) { animation-delay: 0.2s; }
.action-card:nth-child(3) { animation-delay: 0.3s; }

/* Step 6 Preview & Deploy Styles */
.question-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.breakdown-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.breakdown-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.breakdown-icon {
    font-size: 1.25rem;
}

.breakdown-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.stat-item.total {
    background: #eff6ff;
    border-color: #3b82f6;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.stat-item.total .stat-number {
    color: #3b82f6;
}

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

.cohort-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cohort-breakdown-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}

.cohort-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.cohort-name {
    font-weight: 600;
    color: #1a202c;
}

.cohort-assignment {
    font-size: 0.875rem;
    color: #64748b;
}

.cohort-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 0.75rem;
}

.cohort-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.cohort-stat.total {
    background: #f0f9ff;
    border-color: #0ea5e9;
}

.cohort-stat .stat-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.cohort-stat.total .stat-number {
    color: #0ea5e9;
}

.cohort-stat .stat-label {
    font-size: 0.625rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cohort-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #374151;
}

/* Survey Metrics Styles */
.survey-metrics {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metrics-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.metric-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.metric-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

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

.metrics-breakdown {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.metrics-breakdown h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.distribution-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.distribution-label {
    min-width: 120px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.distribution-bar {
    flex: 1;
    height: 20px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
}

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

.bar-segment.opening {
    background: #10b981;
}

.bar-segment.anytime {
    background: #3b82f6;
}

.bar-segment.closing {
    background: #f59e0b;
}

.distribution-count {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #1a202c;
}

.cohort-assignments {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.cohort-assignments h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.assignment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

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

.cohort-name {
    font-weight: 600;
    color: #1a202c;
}

.assignment-arrow {
    color: #64748b;
    font-weight: 500;
}

.assigned-option {
    color: #374151;
    font-weight: 500;
}

.question-count {
    margin-left: auto;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.readiness-check {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.readiness-check h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.readiness-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.readiness-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.readiness-item.ready {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.readiness-item.not-ready {
    background: #fef2f2;
    border-color: #fecaca;
}

.readiness-icon {
    font-size: 1rem;
}

.readiness-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

/* Responsive Design for Step 6 */
@media (max-width: 768px) {
    .breakdown-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metrics-overview {
        grid-template-columns: 1fr;
    }
    
    .cohort-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .distribution-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .distribution-label {
        min-width: auto;
        text-align: center;
    }
    
    .assignment-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.5rem;
    }
    
    .question-count {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .breakdown-stats,
    .cohort-stats {
        grid-template-columns: 1fr;
    }
    
    .distribution-bar {
        height: 16px;
    }
}

/* Version Management Styles */
.version-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    transition: all 0.2s ease;
}

.version-status.never-published {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.version-status.up-to-date {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.version-status.changes-pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.version-status.unknown {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.version-status.loading {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.status-icon {
    font-size: 1rem;
    font-weight: 600;
}

.status-text {
    font-weight: 600;
}

.last-published {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Version History Modal */
.version-history {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.current-status {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.current-status h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.versions-list h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.no-versions {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
}

.versions-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.version-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.version-row:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.version-row.current-production {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.version-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.version-number {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
}

.production-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #10b981;
    color: white;
    border-radius: 12px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.version-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.published-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.publish-notes {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Version Preview Modal */
.version-preview {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.preview-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.preview-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.version-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.config-summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

/* Header Actions for Version Management */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-left {
    display: flex;
    flex-direction: column;
}

/* Notification Styles for Version Management */
.error-notification,
.success-notification,
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    font-weight: 500;
    max-width: 300px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.error-notification {
    background: #ff4757;
    color: white;
}

.success-notification {
    background: #2ed573;
    color: white;
}

.copy-notification.success {
    background: #2ed573;
    color: white;
}

.copy-notification.error {
    background: #ff4757;
    color: white;
}

/* Profile Editor Styles */
.profile-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #374151;
    background: #f8fafc;
}

.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: #f8fafc;
}

.tab-content {
    display: none;
}

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

.profile-tabs .tab-btn:first-child {
    border-radius: 8px 0 0 0;
}

.profile-tabs .tab-btn:last-child {
    border-radius: 0 8px 0 0;
}

/* User Management Styles */
.user-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.user-management-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.loading-users {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #64748b;
}

.loading-users .loading-spinner {
    width: 32px;
    height: 32px;
    margin-bottom: 1rem;
}

.user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.user-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e0;
}

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

.user-name {
    font-weight: 600;
    color: #1a202c;
    font-size: 0.875rem;
}

.user-email {
    color: #64748b;
    font-size: 0.75rem;
}

.user-role {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

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

.role-user {
    background: #e0f2fe;
    color: #0369a1;
}

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

.current-user-label {
    padding: 0.25rem 0.75rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Form Styling for Profile Editor */
#profile-modal .form-group {
    margin-bottom: 1.5rem;
}

#profile-modal .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

#profile-modal .form-group input,
#profile-modal .form-group select,
#profile-modal .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #374151;
    font-family: inherit;
}

#profile-modal .form-group input:focus,
#profile-modal .form-group select:focus,
#profile-modal .form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#profile-modal .form-group input:disabled {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

#profile-modal .form-group small {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-style: italic;
}

#profile-modal hr {
    border: none;
    height: 1px;
    background: #e2e8f0;
    margin: 2rem 0;
}

#profile-modal h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

/* Add User Modal Styles */
#add-user-modal .form-group {
    margin-bottom: 1.5rem;
}

#add-user-modal .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

#add-user-modal .form-group input,
#add-user-modal .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #374151;
    font-family: inherit;
}

#add-user-modal .form-group input:focus,
#add-user-modal .form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Modal Improvements for Profile Editor */
#profile-modal .modal-content {
    max-width: 600px;
    width: 90%;
}

#add-user-modal .modal-content {
    max-width: 500px;
    width: 90%;
}

/* Responsive Design for Profile Editor */
@media (max-width: 768px) {
    .profile-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: 1px solid #e2e8f0;
        border-radius: 0;
    }
    
    .tab-btn.active {
        border-bottom-color: #3b82f6;
    }
    
    .user-management-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .user-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .user-actions {
        justify-content: center;
    }
    
    #profile-modal .modal-content,
    #add-user-modal .modal-content {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .user-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-sm {
        width: 100%;
        justify-content: center;
    }
    
    .users-list {
        max-height: 300px;
    }
}

/* Profile View Styles */
.profile-view {
    min-height: 100vh;
    background: #f7fafc;
}

.profile-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.profile-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Profile Tabs Navigation */
.profile-tabs-nav {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.profile-tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.profile-tab-btn:hover {
    color: #374151;
    background: #f1f5f9;
}

.profile-tab-btn.active {
    color: #3b82f6;
    background: #ffffff;
    border-bottom-color: #3b82f6;
}

/* Profile Tab Content */
.profile-tab-content {
    display: none;
    padding: 2rem;
}

.profile-tab-content.active {
    display: block;
}

/* Profile Sections */
.profile-section {
    margin-bottom: 2rem;
}

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

.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.section-header p {
    color: #64748b;
    margin: 0;
    font-size: 0.875rem;
}

/* Profile Form Container */
.profile-form-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-grid.password-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
}

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

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #374151;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:disabled {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.form-group small {
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Profile Actions */
.profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}

/* Users List Container */
.users-list-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
}

.users-list-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.loading-users {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #64748b;
}

.loading-users .loading-spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
}

.user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.user-item:hover {
    background: #f9fafb;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.user-name {
    font-weight: 600;
    color: #1a202c;
    font-size: 0.875rem;
}

.user-email {
    color: #64748b;
    font-size: 0.75rem;
}

.user-role {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
    width: fit-content;
}

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

.role-user {
    background: #e0f2fe;
    color: #0369a1;
}

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

.current-user-label {
    padding: 0.25rem 0.75rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Empty State for Users */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: #64748b;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
}

.empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

/* Responsive Design for Profile View */
@media (max-width: 768px) {
    .profile-main {
        padding: 1rem;
    }
    
    .profile-tabs-nav {
        flex-direction: column;
    }
    
    .profile-tab-btn {
        border-bottom: 1px solid #e2e8f0;
        border-radius: 0;
    }
    
    .profile-tab-btn.active {
        border-bottom-color: #3b82f6;
    }
    
    .profile-tab-content {
        padding: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .user-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .user-actions {
        justify-content: center;
    }
    
    .section-header .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .profile-container {
        margin: 0 -0.5rem;
        border-radius: 8px;
    }
    
    .user-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-sm {
        width: 100%;
        justify-content: center;
    }
    
    .users-list-main {
        max-height: 400px;
    }
    
    .profile-form-container {
        padding: 1rem;
    }
}

/* Route Management Styles */
.route-management-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.route-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    color: #1e40af;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.info-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 0.5rem 0;
}

.info-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1e40af;
}

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

.route-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.route-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.route-item.default-route {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.route-item.admin-only {
    background: #fef3c7;
    border-color: #fcd34d;
}

.route-info {
    margin-bottom: 1rem;
}

.route-path {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.route-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.route-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
}

.route-url {
    font-size: 0.875rem;
    color: #64748b;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.route-description {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.route-permissions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.permission-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.role-badge.role-user {
    background: #e0f2fe;
    color: #0369a1;
}

.access-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.access-status.granted {
    color: #065f46;
}

.access-status.denied {
    color: #991b1b;
}

.permission-toggle {
    position: relative;
    display: inline-block;
}

.permission-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.permission-toggle .toggle-label {
    display: block;
    width: 48px;
    height: 24px;
    background-color: #cbd5e0;
    border-radius: 24px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.permission-toggle input[type="checkbox"]:checked + .toggle-label {
    background-color: #10b981;
}

.permission-toggle input[type="checkbox"]:disabled + .toggle-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.permission-toggle .toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.permission-toggle input[type="checkbox"]:checked + .toggle-label .toggle-slider {
    transform: translateX(24px);
}

.route-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.default-label,
.admin-only-label {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.default-label {
    background: #d1fae5;
    color: #065f46;
}

.admin-only-label {
    background: #fef3c7;
    color: #92400e;
}

.admin-note {
    color: #6b7280;
    font-size: 0.75rem;
    font-style: italic;
}

.route-management-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

/* Autosave Status Styles */
.autosave-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.autosave-status.saving {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.autosave-status.saved {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.autosave-status.error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.autosave-status .status-text {
    font-weight: 500;
}

/* Responsive Design for Route Management */
@media (max-width: 768px) {
    .route-management-container {
        gap: 1.5rem;
    }
    
    .route-info-banner {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .route-item {
        padding: 1rem;
    }
    
    .route-path {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .permission-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .route-actions {
        justify-content: center;
    }
    
    .route-management-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .route-management-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .routes-list {
        gap: 0.75rem;
    }
    
    .route-item {
        padding: 0.75rem;
    }
    
    .route-permissions {
        gap: 0.5rem;
    }
    
    .permission-item {
        padding: 0.75rem;
    }
    
    .role-badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Responsive Design for Version Management */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .version-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .version-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .version-actions {
        justify-content: center;
    }
    
    .info-item,
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .version-actions {
        flex-direction: column;
    }
    
    .btn-sm {
        width: 100%;
        justify-content: center;
    }
    
    .error-notification,
    .success-notification,
    .copy-notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}
