/* Job Simulator Frontend - Work Software UI Styles */

/* Reset and Base */
.js-work-dashboard,
.js-workspace,
.js-step-container,
.js-completion-screen {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #f5f5f7;
}

/* Work Dashboard */
.js-work-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.js-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.js-dashboard-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.js-dashboard-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.js-user-name {
    font-size: 14px;
    color: #666;
}

/* Active Work Card */
.js-active-work-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.js-work-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.js-work-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 8px;
}

.js-work-role {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.js-work-scenario {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.js-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.js-status-working {
    background: #e3f2fd;
    color: #1976d2;
}

.js-status-pending-review {
    background: #fff3e0;
    color: #f57c00;
}

.js-status-completed {
    background: #e8f5e9;
    color: #388e3c;
}

/* Progress */
.js-work-progress {
    margin-bottom: 24px;
}

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

.js-progress-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.js-progress-count {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.js-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.js-progress-fill {
    height: 100%;
    background: #2196f3;
    transition: width 0.3s ease;
}

.js-progress-detail {
    font-size: 12px;
    color: #666;
}

/* Buttons */
.js-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.js-btn-primary {
    background: #2196f3;
    color: #ffffff;
}

.js-btn-primary:hover {
    background: #1976d2;
    color: #ffffff;
}

.js-btn-secondary {
    background: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
}

.js-btn-secondary:hover {
    background: #e8e8e8;
    color: #1a1a1a;
}

.js-btn-outline {
    background: transparent;
    color: #666;
    border: 1px solid #e0e0e0;
}

.js-btn-outline:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

/* No Active Work */
.js-no-active-work {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 48px 24px;
    text-align: center;
}

.js-empty-state {
    margin-bottom: 48px;
}

.js-empty-icon {
    color: #bdbdbd;
    margin-bottom: 16px;
}

.js-empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.js-empty-state p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Role Selection */
.js-role-selection {
    text-align: left;
}

.js-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 24px 0;
    color: #1a1a1a;
}

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

.js-role-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    transition: all 0.2s ease;
}

.js-role-card:hover {
    border-color: #2196f3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

.js-role-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.js-role-level {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    background: #e0e0e0;
    color: #666;
    border-radius: 3px;
}

.js-role-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0;
}

.js-role-actions {
    margin-top: 16px;
}

.js-role-unavailable {
    margin-top: 16px;
    text-align: center;
}

.js-role-unavailable small {
    font-size: 12px;
    color: #999;
}

/* Workspace Layout */
.js-workspace {
    min-height: 100vh;
    background: #f5f5f7;
}

.js-workspace-header {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.js-workspace-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.js-breadcrumb-link {
    color: #2196f3;
    text-decoration: none;
}

.js-breadcrumb-link:hover {
    text-decoration: underline;
}

.js-breadcrumb-separator {
    color: #bdbdbd;
}

.js-breadcrumb-current {
    color: #1a1a1a;
    font-weight: 600;
}

.js-workspace-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.js-scenario-name {
    font-size: 14px;
    color: #666;
}

.js-workspace-progress-mini {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    color: #1a1a1a;
}

.js-workspace-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Task Inbox */
.js-task-inbox {
    width: 320px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
}

.js-inbox-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.js-inbox-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.js-inbox-count {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 12px;
    color: #666;
}

.js-task-list {
    padding: 0;
}

.js-empty-task-list {
    padding: 32px 20px;
    text-align: center;
    color: #999;
}

.js-empty-task-list p {
    font-size: 14px;
    margin: 0 0 8px 0;
    color: #666;
}

.js-empty-task-list small {
    font-size: 12px;
    color: #999;
}


.js-task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.js-task-item:hover {
    background: #f9f9f9;
}

.js-task-item.js-task-current {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.js-task-item.js-task-locked {
    cursor: not-allowed;
    opacity: 0.5;
}

.js-task-item.js-task-locked:hover {
    background: transparent;
}

.js-task-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.js-task-current .js-task-number {
    background: #2196f3;
    color: #ffffff;
}

.js-task-content {
    flex: 1;
}

.js-task-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #1a1a1a;
}

.js-task-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.js-task-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
}

.js-badge-completed {
    background: #e8f5e9;
    color: #388e3c;
}

.js-badge-failed {
    background: #ffebee;
    color: #d32f2f;
}

.js-badge-in-progress {
    background: #e3f2fd;
    color: #1976d2;
}

.js-badge-available {
    background: #f5f5f5;
    color: #666;
}

.js-badge-locked {
    background: #f5f5f5;
    color: #999;
}

.js-task-lock {
    color: #bdbdbd;
}

/* Step Workspace */
.js-step-workspace {
    flex: 1;
    overflow-y: auto;
    background: #f5f5f7;
}

#js-workspace-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px;
}

.js-workspace-loading {
    text-align: center;
    padding: 48px 24px;
}

.js-loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid #e0e0e0;
    border-top-color: #2196f3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Step Container */
.js-step-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.js-step-header {
    margin-bottom: 24px;
}

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

.js-step-task {
    font-weight: 600;
}

.js-step-separator {
    color: #bdbdbd;
}

.js-step-name {
    color: #1a1a1a;
}

.js-step-instruction {
    margin-bottom: 32px;
}

.js-instruction-content {
    font-size: 15px;
    line-height: 1.7;
    color: #1a1a1a;
}

.js-instruction-content p {
    margin: 0 0 16px 0;
}

.js-instruction-content ul,
.js-instruction-content ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.js-instruction-content li {
    margin-bottom: 8px;
}

/* Form Elements */
.js-step-input-area {
    margin-bottom: 24px;
}

.js-form-group {
    margin-bottom: 20px;
}

.js-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.js-form-input,
.js-form-select,
.js-form-textarea {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    color: #1a1a1a;
    transition: border-color 0.2s ease;
}

.js-form-input:focus,
.js-form-select:focus,
.js-form-textarea:focus {
    outline: none;
    border-color: #2196f3;
}

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

.js-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.js-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
}

.js-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.js-info-notice {
    padding: 16px;
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
    border-radius: 4px;
}

.js-info-notice p {
    margin: 0;
    font-size: 14px;
    color: #1a1a1a;
}

.js-form-actions {
    display: flex;
    gap: 12px;
}

.js-btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.js-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Feedback Panel */
.js-feedback-panel {
    padding: 32px;
}

.js-feedback-header {
    text-align: center;
    margin-bottom: 32px;
}

.js-feedback-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.js-result-icon {
    width: 48px;
    height: 48px;
}

.js-result-pass .js-result-icon {
    color: #388e3c;
}

.js-result-fail .js-result-icon {
    color: #d32f2f;
}

.js-feedback-result h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.js-feedback-section {
    margin-bottom: 24px;
}

.js-feedback-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #1a1a1a;
}

.js-feedback-errors {
    padding: 16px;
    background: #ffebee;
    border-left: 3px solid #d32f2f;
    border-radius: 4px;
    margin-bottom: 16px;
}

.js-feedback-errors ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.js-feedback-errors li {
    font-size: 14px;
    color: #c62828;
    margin-bottom: 4px;
}

.js-feedback-success {
    padding: 16px;
    background: #e8f5e9;
    border-left: 3px solid #388e3c;
    border-radius: 4px;
}

.js-feedback-success p {
    margin: 0;
    font-size: 14px;
    color: #2e7d32;
}

.js-feedback-score {
    text-align: center;
    margin-bottom: 24px;
}

.js-score-display {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.js-score-value {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
}

.js-score-max {
    font-size: 24px;
    font-weight: 600;
    color: #666;
}

.js-feedback-criteria,
.js-feedback-strengths,
.js-feedback-improvements,
.js-feedback-tip {
    margin-bottom: 24px;
}

.js-criterion-item {
    padding: 16px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 12px;
}

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

.js-criterion-score {
    font-weight: 600;
    color: #2196f3;
}

.js-criterion-feedback {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.js-feedback-strengths ul,
.js-feedback-improvements ul {
    margin: 0;
    padding-left: 20px;
}

.js-feedback-strengths li,
.js-feedback-improvements li {
    font-size: 14px;
    margin-bottom: 8px;
}

.js-feedback-strengths li {
    color: #2e7d32;
}

.js-feedback-improvements li {
    color: #c62828;
}

.js-feedback-tip {
    padding: 16px;
    background: #fff3e0;
    border-left: 3px solid #f57c00;
    border-radius: 4px;
}

.js-feedback-tip p {
    margin: 0;
    font-size: 14px;
    color: #e65100;
}

.js-feedback-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 32px;
}

.js-retry-info {
    text-align: center;
}

.js-retry-info p {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px 0;
}

.js-no-retries {
    text-align: center;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 6px;
}

.js-no-retries p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Completion Screens */
.js-completion-screen {
    max-width: 700px;
    margin: 48px auto;
    padding: 24px;
}

.js-completion-header {
    text-align: center;
    margin-bottom: 48px;
}

.js-completion-icon {
    margin-bottom: 24px;
}

.js-icon-success {
    color: #388e3c;
}

.js-icon-warning {
    color: #f57c00;
}

.js-completion-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.js-completion-subtitle {
    font-size: 18px;
    color: #666;
    margin: 0;
}

.js-completion-meta {
    margin-top: 16px;
}

.js-role-name,
.js-scenario-name {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.js-completion-score,
.js-completion-score-main {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.js-score-card,
.js-final-score-card {
    text-align: center;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.js-score-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 8px;
}

.js-score-value {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
    margin-bottom: 8px;
}

.js-score-value-large {
    font-size: 64px;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
    margin-bottom: 16px;
}

.js-score-status,
.js-score-status-large {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.js-status-passed {
    background: #e8f5e9;
    color: #388e3c;
}

.js-status-not-passed {
    background: #ffebee;
    color: #d32f2f;
}

.js-task-breakdown {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.js-breakdown-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #1a1a1a;
}

.js-task-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.js-task-score-item:last-child {
    border-bottom: none;
}

.js-task-score-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.js-task-score-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.js-task-score-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.js-task-score-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 3px;
}

.js-badge-pass {
    background: #e8f5e9;
    color: #388e3c;
}

.js-badge-fail {
    background: #ffebee;
    color: #d32f2f;
}

.js-completion-next-steps {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.js-next-steps-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #1a1a1a;
}

.js-next-steps-content p {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0;
}

.js-next-steps-list {
    margin: 0;
    padding-left: 24px;
}

.js-next-steps-list li {
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.js-completion-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Error Display */
.js-error {
    padding: 16px;
    background: #ffebee;
    border-left: 3px solid #d32f2f;
    border-radius: 4px;
    color: #c62828;
    font-size: 14px;
}

/* Empty Workspace State */
.js-workspace-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 48px 24px;
    text-align: center;
    background: #ffffff;
    border-radius: 8px;
    margin: 24px;
}

.js-workspace-empty .js-empty-icon {
    margin-bottom: 24px;
    color: #999;
}

.js-workspace-empty .js-empty-icon svg {
    width: 64px;
    height: 64px;
}

.js-workspace-empty h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

.js-workspace-empty p {
    font-size: 16px;
    color: #666;
    margin: 0 0 24px 0;
    max-width: 500px;
}

.js-workspace-empty .js-empty-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.js-workspace-empty .js-empty-note {
    font-size: 14px;
    color: #999;
    margin: 0;
}

.js-workspace-empty .js-empty-note small {
    font-size: 12px;
}


/* Responsive */
@media (max-width: 768px) {
    .js-workspace-layout {
        flex-direction: column;
    }
    
    .js-task-inbox {
        width: 100%;
        max-height: 300px;
    }
    
    .js-roles-grid {
        grid-template-columns: 1fr;
    }
}

/* AI Failure Fallback UX Styles */

.js-ai-failure-notice {
    border: 2px solid #f0ad4e;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background: #fff8e5;
}

.js-ai-failure-notice.service-unavailable {
    border-color: #d9534f;
    background: #fff0f0;
}

.js-ai-failure-notice.pending-review {
    border-color: #5bc0de;
    background: #e5f5fa;
}

.js-ai-failure-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.js-ai-failure-icon {
    font-size: 24px;
    margin-right: 10px;
}

.js-ai-failure-icon.clock::before {
    content: "⏱️";
}

.js-ai-failure-icon.warning::before {
    content: "⚠️";
}

.js-ai-failure-icon.error::before {
    content: "⛔";
}

.js-ai-failure-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.js-ai-failure-message {
    font-size: 15px;
    line-height: 1.6;
    margin: 15px 0;
    color: #555;
}

.js-ai-failure-action {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.js-ai-failure-action-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.js-ai-failure-action-desc {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #666;
}

.js-retry-button {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.js-retry-button:hover {
    background: #005a87;
}

.js-retry-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.js-retry-button.retrying {
    background: #999;
}

.js-retry-button.retrying::after {
    content: "...";
    animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
    0%, 20% { content: "..."; }
    40% { content: ""; }
    60% { content: "."; }
    80% { content: ".."; }
}

/* Status badges */
.js-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.js-status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.js-status-badge.status-review {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.js-status-badge.status-blocked {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Reassurance emphasis */
.js-work-saved-notice {
    font-weight: 600;
    color: #28a745;
    margin-top: 10px;
}

.js-work-saved-notice::before {
    content: "✓ ";
    font-size: 16px;
}

/* Loading state */
.js-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* Error notification */
.js-error-notification {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}


/* Authentication Forms */
.js-auth-wrapper {
    max-width: 480px;
    margin: 40px auto;
    padding: 24px;
}

.js-auth-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.js-auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.js-auth-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.js-auth-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.js-auth-form {
    margin-bottom: 24px;
}

.js-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.js-form-group {
    margin-bottom: 20px;
}

.js-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.js-form-group input[type="text"],
.js-form-group input[type="email"],
.js-form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.js-form-group input:focus {
    outline: none;
    border-color: #0066cc;
}

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

.js-form-checkbox label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.js-form-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.js-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.js-message-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.js-message-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.js-message-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.js-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.js-btn-primary {
    background: #0066cc;
    color: #ffffff;
    width: 100%;
}

.js-btn-primary:hover {
    background: #0052a3;
}

.js-btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.js-btn-secondary {
    background: #f5f5f7;
    color: #1a1a1a;
    border: 1px solid #d0d0d0;
}

.js-btn-secondary:hover {
    background: #e8e8e8;
}

.js-auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.js-auth-footer p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

.js-auth-footer a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.js-auth-footer a:hover {
    text-decoration: underline;
}

/* User History / My Work */
.js-user-history-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.js-user-history-header {
    margin-bottom: 32px;
}

.js-user-history-header h1 {
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.js-user-history-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.js-history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.js-stat-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.js-stat-number {
    font-size: 48px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 8px;
}

.js-stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.js-history-section {
    margin-bottom: 48px;
}

.js-history-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 24px 0;
    color: #1a1a1a;
}

.js-sessions-list {
    display: grid;
    gap: 24px;
}

.js-session-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    transition: box-shadow 0.2s;
}

.js-session-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.js-session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.js-session-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.js-session-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.js-session-completed .js-session-status {
    background: #e8f5e9;
    color: #2e7d32;
}

.js-session-in-progress .js-session-status {
    background: #e3f2fd;
    color: #1976d2;
}

.js-session-failed .js-session-status {
    background: #ffebee;
    color: #c62828;
}

.js-session-scenario {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0;
}

.js-session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 16px;
    font-size: 14px;
}

.js-session-meta span {
    color: #666;
}

.js-session-meta strong {
    color: #1a1a1a;
    margin-right: 4px;
}

.js-session-verification {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.js-verification-links {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.js-verification-share p {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.js-verification-link {
    width: calc(100% - 100px);
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
    background: #f5f5f7;
    color: #666;
    margin-right: 8px;
}

.js-btn-copy {
    padding: 8px 16px;
    font-size: 13px;
}

.js-empty-state {
    text-align: center;
    padding: 80px 24px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.js-empty-state h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

.js-empty-state p {
    font-size: 16px;
    color: #666;
    margin: 0 0 24px 0;
}

/* Homepage Specific */
.js-homepage .js-hero {
    padding: 80px 0;
}

.js-homepage .js-hero-keywords {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.js-homepage .js-hero-keywords span {
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.js-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.js-comparison-item {
    padding: 24px;
    border-radius: 8px;
    background: #f5f5f7;
}

.js-comparison-winner {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.js-use-case-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.js-use-case {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.js-use-case h3 {
    margin-top: 0;
    color: #0066cc;
}

/* Responsive */
@media (max-width: 768px) {
    .js-form-row {
        grid-template-columns: 1fr;
    }
    
    .js-verification-links {
        flex-direction: column;
    }
    
    .js-verification-link {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .js-session-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .js-comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .js-auth-container {
        padding: 24px;
    }
}

/* Confirmation Input Styles for Informational Steps */
.js-confirmation-group {
    margin-top: 20px;
}

.js-confirmation-input {
    font-family: inherit;
}

.js-confirmation-feedback {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.js-confirmation-valid {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 3px solid #4caf50;
}

.js-confirmation-invalid {
    background: #ffebee;
    color: #c62828;
    border-left: 3px solid #f44336;
}
