/* ============================================
   Global Styles — Nexus Cove / Nexus One Brand
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

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

:root {
    --brand-primary: #4862B8;
    --brand-primary-light: #779ECA;
    --brand-primary-dark: #3a4f94;
    --brand-gradient: linear-gradient(135deg, #4862B8 0%, #779ECA 100%);
    --brand-gradient-subtle: linear-gradient(135deg, rgba(72,98,184,0.08) 0%, rgba(119,158,202,0.08) 100%);

    --primary-color: #4862B8;
    --primary-dark: #3a4f94;
    --secondary-color: #779ECA;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #f7f8fb;
    --surface-color: #ffffff;
    --border-color: #e2e5ec;
    --text-primary: #18191B;
    --text-secondary: #5a6170;
    --shadow: 0 1px 3px 0 rgba(72, 98, 184, 0.06), 0 1px 2px -1px rgba(72, 98, 184, 0.06);
    --shadow-lg: 0 10px 25px -5px rgba(72, 98, 184, 0.1), 0 8px 10px -6px rgba(72, 98, 184, 0.06);
    --radius: 10px;
    --radius-lg: 14px;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    box-shadow: 0 1px 4px rgba(72, 98, 184, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
}

.logo img {
    height: 36px;
    width: auto;
}

.logo-module {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1.5px solid var(--border-color, #e5e7eb);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text-dark { color: var(--text-primary); }
.logo-text-accent { color: var(--brand-primary); }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.78rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--brand-primary);
    background: rgba(72, 98, 184, 0.08);
}

.nav-link.active {
    color: var(--brand-primary);
    background: rgba(72, 98, 184, 0.1);
    font-weight: 600;
}

.nav-link.disabled {
    color: var(--text-secondary);
    opacity: 0.38;
    pointer-events: none;
    cursor: default;
}

.nav-link.upgrade-link {
    color: var(--text-secondary);
    opacity: 0.52;
    position: relative;
}
.nav-link.upgrade-link:hover {
    opacity: 1;
    color: var(--brand-primary);
    background: rgba(72, 98, 184, 0.06);
}

.user-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--bg-color);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* ============================================
   App Container
   ============================================ */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
}

/* ============================================
   Authentication Section
   ============================================ */

.auth-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-color);
    padding: 2rem 1rem;
    padding-bottom: 120px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 80px;
    width: auto;
}

.auth-container {
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-color);
}

.auth-form {
    padding: 2rem;
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-form .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.auth-form .form-group input {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(72, 98, 184, 0.1);
}

.auth-form .btn-primary {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.auth-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    min-height: 20px;
}

.auth-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.auth-security-notice {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    max-width: 420px;
    line-height: 1.5;
}

.auth-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right, #111827, #1e3a5f, #111827);
    color: white;
    padding: 1rem 0;
    text-align: center;
    z-index: 50;
}

.auth-footer img {
    height: 40px;
    display: inline-block;
    transition: opacity 0.2s;
}

.auth-footer img:hover {
    opacity: 0.8;
}

.auth-footer p {
    font-size: 0.7rem;
    color: #d1d5db;
    margin-top: 0.5rem;
}

/* ============================================
   Dashboard Section
   ============================================ */

.dashboard-section {
    animation: fadeIn 0.3s ease-in;
}

.dashboard-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

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

.dashboard-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ============================================
   Form Sections
   ============================================ */

.form-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.form-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(72, 98, 184, 0.12);
}

.form-group small {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.form-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
}

/* ============================================
   Claude Section
   ============================================ */

.claude-section {
    background: var(--brand-gradient-subtle);
    border: 1px solid var(--border-color);
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.generation-info {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary,
.btn-secondary,
.btn-claude {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-claude {
    width: 100%;
    background: var(--brand-gradient);
    color: white;
    padding: 1rem;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.btn-claude:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-claude:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-large {
    width: 100%;
    padding: 1rem;
}

/* ============================================
   Generation Status
   ============================================ */

.generation-status {
    text-align: center;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

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

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

.generation-status p {
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   Claude Results
   ============================================ */

.claude-results {
    background: var(--bg-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.results-header h4 {
    font-size: 1.2rem;
}

.results-timestamp {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.results-section {
    margin-bottom: 1.5rem;
}

.results-section h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

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

.result-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    line-height: 1.5;
}

.result-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.results-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.results-actions button {
    flex: 1;
}

/* ============================================
   OKR Cards & Strategy Display
   ============================================ */

.okr-card {
    background: white;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.okr-card:hover {
    box-shadow: var(--shadow-lg);
}

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

.okr-number {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    background: rgba(72, 98, 184, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.okr-objective {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.5rem 0;
    line-height: 1.4;
}

.okr-meta {
    display: flex;
    gap: 1.25rem;
    margin: 0.5rem 0 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.key-results-list {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.kr-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.kr-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.kr-bullet {
    color: var(--success-color);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* Priority Badges */
.priority-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    white-space: nowrap;
}

.priority-high {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.priority-medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.priority-low {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

/* Objective Cards */
.objective-card {
    background: white;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--secondary-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.objective-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.objective-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 0.75rem;
}

.objective-activities,
.objective-metrics {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.objective-activities ul,
.objective-metrics ul {
    margin: 0.25rem 0 0 1.25rem;
    padding: 0;
}

.objective-activities li,
.objective-metrics li {
    padding: 0.15rem 0;
    color: var(--text-primary);
}

.objective-timeline {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Recommendation Cards */
.recommendation-card {
    background: white;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--success-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.rec-header h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rec-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0.5rem 0;
}

.rec-detail {
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 0.25rem 0;
}

.rec-detail strong {
    color: var(--text-secondary);
}

/* Risk Cards */
.risk-card {
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.risk-mitigation {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Executive Summary */
.executive-summary {
    background: linear-gradient(135deg, rgba(72, 98, 184, 0.06), rgba(119, 158, 202, 0.06));
    border: 1px solid rgba(72, 98, 184, 0.15);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.executive-summary h4 {
    color: var(--primary-color);
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.executive-summary p {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

/* Strategic Themes */
.strategic-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.theme-tag {
    background: rgba(139, 92, 246, 0.1);
    color: var(--secondary-color);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Success Factors */
.success-factors {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.factor-item {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Strategy Section */
.strategy-section {
    margin-bottom: 2rem;
}

.strategy-section h4 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.empty-note {
    color: var(--text-secondary);
    font-style: italic;
    padding: 1rem;
}

/* ============================================
   Strategies Page Layout
   ============================================ */

.strategies-page {
    max-width: 1100px;
}

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

.page-header h2 {
    font-size: 1.75rem;
    margin: 0 0 0.25rem;
}

.strategies-grid {
    margin-bottom: 2rem;
}

/* Strategy Cards (list) */
.strategy-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.strategy-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

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

.strategy-card-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.strategy-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.strategy-card-body {
    margin-bottom: 0.75rem;
}

.strategy-industry {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.strategy-card-footer {
    display: flex;
    justify-content: flex-end;
}

.btn-view {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-view:hover {
    background: var(--primary-color);
    color: white;
}

/* Strategy Detail Overlay */
.strategy-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    z-index: 50;
    overflow-y: auto;
}

.strategy-detail-panel {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.strategy-detail-toolbar {
    margin-bottom: 1.5rem;
}

.btn-close-detail {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

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

.strategy-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.detail-company h3 {
    font-size: 1.5rem;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.detail-industry {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.detail-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ============================================
   Toast Notifications
   ============================================ */

.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: var(--surface-color);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .form-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .dashboard-header h2 {
        font-size: 1.5rem;
    }

    .auth-container {
        max-width: 100%;
    }

    .nav-content {
        padding: 0 1rem;
    }

    .toast {
        min-width: 280px;
    }

    .results-actions {
        flex-direction: column;
    }
}

/* ============================================
   Dashboard Styles (used by strategies.html)
   ============================================ */

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

.strategy-item {
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.strategy-item:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
    box-shadow: var(--shadow);
}

.strategy-item.active {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.strategy-item-company {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.strategy-item-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.strategy-details {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
}

.details-header h3 {
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.btn-close:hover {
    color: var(--text-primary);
}

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

.info-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

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

.info-item {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.info-item label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.5rem;
}

.info-item p {
    color: var(--text-primary);
    margin: 0;
}

.content-box {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--success-color);
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.95rem;
    line-height: 1.6;
}

.loading {
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
    text-align: center;
}

.empty-message {
    color: var(--text-secondary);
    padding: 2rem;
    text-align: center;
    font-style: italic;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ============================================
   Sprint 1: Analysis Screens
   ============================================ */

/* ---- Dashboard Input Screen ---- */
.minimal-input-section {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 64px);
    animation: fadeIn 0.4s ease-out;
}

/* Hero Banner */
.dash-hero {
    background: var(--brand-gradient);
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.dash-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}
.dash-hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
}
.dash-hero-content h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.dash-hero-content h1 strong {
    font-weight: 800;
}
.dash-hero-content p {
    color: rgba(255,255,255,0.88);
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Dashboard Body */
.dash-body {
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}

/* Pipeline Steps */
.pipeline-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin-bottom: 2.5rem;
}
.pipe-step {
    flex: 1;
    max-width: 200px;
    text-align: center;
    padding: 0 0.5rem;
}
.pipe-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: var(--brand-gradient-subtle);
    border: 2px solid rgba(72,98,184,0.15);
    border-radius: 50%;
    transition: transform 0.2s;
}
.pipe-step:hover .pipe-icon {
    transform: scale(1.08);
}
.pipe-text h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.pipe-text p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.pipe-arrow {
    display: flex;
    align-items: center;
    padding-top: 1rem;
    font-size: 1.25rem;
    color: var(--brand-primary-light);
    font-weight: 700;
    flex-shrink: 0;
}

/* Form Card */
.dash-form-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 540px;
    margin: 0 auto;
    overflow: hidden;
}
.dash-form-header {
    background: var(--brand-gradient-subtle);
    padding: 1.75rem 2rem 1.25rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.dash-form-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}
.dash-form-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.dash-form {
    padding: 1.75rem 2rem 2rem;
}
.dash-form .form-group {
    margin-bottom: 1.25rem;
}
.dash-form label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.45rem;
    color: var(--text-primary);
}
.dash-form .required {
    color: var(--danger-color);
    margin-left: 2px;
}
.dash-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-color);
}
.dash-form input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(72,98,184,0.12);
    background: #fff;
}
.dash-form input::placeholder {
    color: #a0a7b8;
}
.input-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}
.dash-form .form-actions {
    margin-top: 1.5rem;
    text-align: center;
}
.dash-form .btn-primary.btn-large {
    padding: 0.9rem 2.5rem;
    font-size: 1.05rem;
    min-width: 260px;
    border-radius: var(--radius);
}
.form-note {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: 0.65rem;
}
.form-error,
.dash-form .error-message {
    color: var(--danger-color);
    padding: 0.75rem 1rem;
    background: #fee2e2;
    border-radius: var(--radius);
    margin-top: 1rem;
    border-left: 4px solid var(--danger-color);
    font-size: 0.9rem;
}

/* Responsive: stack pipeline on narrow screens */
@media (max-width: 720px) {
    .pipeline-steps {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    .pipe-step {
        max-width: 320px;
        display: flex;
        align-items: center;
        text-align: left;
        gap: 1rem;
    }
    .pipe-icon {
        margin: 0;
        flex-shrink: 0;
    }
    .pipe-arrow {
        transform: rotate(90deg);
        padding: 0;
    }
    .dash-form-card {
        margin: 0 0.5rem;
    }
    .dash-hero-content h1 {
        font-size: 1.5rem;
    }
}

/* ---- Progress Screen ---- */
.progress-section {
    min-height: calc(100vh - 64px);
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-color);
}

.progress-container {
    width: 100%;
    max-width: 680px;
    padding: 2rem 1.5rem 3rem;
    animation: fadeIn 0.35s ease-out;
}

/* Progress Header */
.progress-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-top: 1rem;
}

.progress-spinner-ring {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    position: relative;
}
.progress-spinner-ring .spinner-lg {
    width: 64px;
    height: 64px;
    border: 4px solid rgba(72,98,184,0.15);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.progress-status {
    margin-top: 0.75rem;
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    background: var(--brand-gradient);
    color: #fff;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Progress Stage Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow);
}

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.35;
    transition: opacity 0.3s, transform 0.3s;
    padding: 0 1.5rem;
    position: relative;
}

.stage.current {
    opacity: 1;
    transform: scale(1.08);
}

.stage.complete {
    opacity: 1;
}

.stage-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    background: var(--brand-gradient-subtle);
    border: 2px solid transparent;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    transition: border-color 0.3s, background 0.3s;
}

.stage.current .stage-icon {
    border-color: var(--brand-primary);
    background: rgba(72,98,184,0.12);
}

.stage.complete .stage-icon {
    background: rgba(16,185,129,0.1);
    border-color: var(--success-color);
}

.stage-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stage.current .stage-label {
    color: var(--brand-primary);
}

.stage.complete .stage-label {
    color: var(--success-color);
}

.stage-connector {
    width: 40px;
    height: 2px;
    background: var(--border-color);
    border-radius: 1px;
    flex-shrink: 0;
}

.stage.complete + .stage-connector {
    background: var(--success-color);
}

/* Activity Log */
.activity-log {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.activity-log h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
}

.activity-items {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: var(--bg-color);
    border-radius: var(--radius);
    font-size: 0.9rem;
    align-items: center;
    border-left: 3px solid transparent;
    transition: border-color 0.2s;
}

.activity-item.loading {
    border-left-color: var(--brand-primary);
}

.activity-item.loading .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(72,98,184,0.2);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

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

.activity-time {
    color: var(--text-secondary);
    font-size: 0.78rem;
    min-width: 70px;
    flex-shrink: 0;
}

.activity-text {
    flex: 1;
    color: var(--text-primary);
}

.activity-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

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

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

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

/* Error Container */
.error-container {
    background: #fef2f2;
    padding: 1.25rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--danger-color);
}

.error-message {
    color: var(--danger-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s;
}

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

.checkpoint-message {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--success-color);
    text-align: center;
    margin-top: 2rem;
}

.checkpoint-message h3 {
    color: var(--success-color);
    margin-bottom: 1rem;
}

.checkpoint-message p {
    color: var(--text-primary);
    margin: 0.5rem 0;
}

/* General helpers */
.form-actions {
    text-align: center;
}
.btn-large {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    min-width: 250px;
}

/* ============================================
   Strategy Execution Dashboard
   ============================================ */

.exec-page {
    max-width: 1200px;
}

/* Top Bar */
.exec-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.exec-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    color: var(--text-primary);
}

.exec-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.exec-select {
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--surface-color);
    cursor: pointer;
    min-width: 220px;
}

.exec-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(72, 98, 184, 0.1);
}

.exec-select-sm {
    min-width: auto;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

/* Section Nav */
.exec-section-nav {
    display: flex;
    gap: 0.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.3rem;
    margin-bottom: 2rem;
    position: sticky;
    top: 64px;
    z-index: 50;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.section-nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.section-nav-link:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.section-nav-link.active {
    background: var(--brand-gradient);
    color: #fff;
}

/* ---- KPI Summary Cards ---- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
}

.kpi-blue::before   { background: #4862B8; }
.kpi-green::before  { background: #10b981; }
.kpi-purple::before { background: #8b5cf6; }
.kpi-orange::before { background: #f59e0b; }

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.kpi-icon-wrap {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
    font-size: 1.3rem;
}

.kpi-blue .kpi-icon-wrap  { background: rgba(72,98,184,0.1); }
.kpi-green .kpi-icon-wrap { background: rgba(16,185,129,0.1); }
.kpi-purple .kpi-icon-wrap{ background: rgba(139,92,246,0.1); }
.kpi-orange .kpi-icon-wrap{ background: rgba(245,158,11,0.1); }

.kpi-body {
    flex: 1;
    min-width: 0;
}

.kpi-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 0.15rem;
}

.kpi-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kpi-trend {
    position: absolute;
    bottom: 0.6rem; right: 0.85rem;
    font-size: 0.68rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ---- Charts Row ---- */
.charts-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.chart-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.chart-card:hover {
    box-shadow: var(--shadow-lg);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem 0.5rem;
}

.chart-card-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.chart-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(72,98,184,0.08);
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.chart-canvas-wrap {
    padding: 0.5rem 1rem 1rem;
    height: 210px;
    position: relative;
}

/* ---- Sections: Collapse / Expand ---- */
.exec-section {
    margin-bottom: 2rem;
}

.exec-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius);
    transition: background 0.15s;
    user-select: none;
}

.exec-section-header:hover {
    background: rgba(72,98,184,0.04);
}

.section-toggle-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s;
}

.exec-section.collapsed .collapse-btn {
    transform: rotate(-90deg);
}

.exec-section-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.exec-section-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.2rem 0 0;
}

.exec-section-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

/* Collapse animation */
.exec-section-body {
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    max-height: 5000px;
    opacity: 1;
}

.exec-section.collapsed .exec-section-body {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* ---- Action Buttons ---- */
.action-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.action-btn:hover {
    background: var(--surface-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.action-btn.action-delete:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* Small inline action buttons (per card) */
.action-btn-sm {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
    padding: 0.15rem 0.25rem;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.action-btn-sm:hover {
    background: rgba(72,98,184,0.08);
}

/* Inline action row on OKR cards */
.okr-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.action-btn-inline {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.action-btn-inline:hover {
    background: var(--surface-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.action-btn-inline.action-delete:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* ---- Status Dot & Badges ---- */
.status-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid;
}

.status-dot.status-not-started { background: transparent; border-color: #9ca3af; }
.status-dot.status-on-track    { background: #10b981; border-color: #10b981; }
.status-dot.status-at-risk     { background: #f59e0b; border-color: #f59e0b; }
.status-dot.status-behind      { background: #ef4444; border-color: #ef4444; }
.status-dot.status-completed   { background: #6366f1; border-color: #6366f1; }

.status-badge-sm {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.status-badge-sm.status-not-started { background: #f3f4f6; color: #6b7280; }
.status-badge-sm.status-on-track    { background: #d1fae5; color: #065f46; }
.status-badge-sm.status-at-risk     { background: #fef3c7; color: #92400e; }
.status-badge-sm.status-behind      { background: #fef2f2; color: #991b1b; }
.status-badge-sm.status-completed   { background: #e0e7ff; color: #3730a3; }

.status-badge-pill {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    white-space: nowrap;
}

.status-badge-pill.status-not-started { background: #f3f4f6; color: #6b7280; }
.status-badge-pill.status-on-track    { background: #d1fae5; color: #065f46; }
.status-badge-pill.status-at-risk     { background: #fef3c7; color: #92400e; }
.status-badge-pill.status-behind      { background: #fef2f2; color: #991b1b; }
.status-badge-pill.status-completed   { background: #e0e7ff; color: #3730a3; }

/* ---- OKR Progress Bar ---- */
.okr-progress-bar {
    height: 8px;
    background: #eef0f4;
    border-radius: 4px;
    position: relative;
    margin: 0.5rem 0 0.75rem;
    overflow: visible;
}

.okr-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 0;
}

.status-bg-not-started { background: #d1d5db; }
.status-bg-on-track    { background: linear-gradient(90deg, #10b981, #34d399); }
.status-bg-at-risk     { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.status-bg-behind      { background: linear-gradient(90deg, #ef4444, #f87171); }
.status-bg-completed   { background: linear-gradient(90deg, #6366f1, #818cf8); }

.okr-progress-label {
    position: absolute;
    right: 0; top: -1.2rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* ---- Toast Notifications ---- */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    z-index: 10000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-info    { background: #4862B8; }
.toast-success { background: #10b981; }
.toast-warning { background: #f59e0b; color: #18191B; }
.toast-error   { background: #ef4444; }

/* Empty State */
.exec-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.exec-empty-inner {
    text-align: center;
    max-width: 400px;
}

.exec-empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.exec-empty-inner h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.exec-empty-inner p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ---- North Star Metric Card ---- */
.nsm-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 50%, #f5f0ff 100%);
    border: 1px solid rgba(72, 98, 184, 0.15);
    border-radius: 14px;
    padding: 1.75rem 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nsm-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.nsm-body {
    flex: 1;
    min-width: 200px;
}

.nsm-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    display: block;
}

.nsm-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
}

.nsm-definition {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.nsm-stats {
    display: flex;
    gap: 2rem;
    flex-shrink: 0;
}

.nsm-stat {
    text-align: center;
}

.nsm-stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nsm-stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---- Strategic Pillars Grid ---- */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.pillar-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.pillar-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.pillar-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.pillar-card-actions {
    display: flex;
    gap: 0.15rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.pillar-card:hover .pillar-card-actions {
    opacity: 1;
}

.pillar-number {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
}

.pillar-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.2rem 0 0.5rem;
}

.pillar-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.pillar-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pillar-goals-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(72, 98, 184, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    display: inline-block;
}

/* ---- Three Horizons ---- */
.horizons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.horizon-col {
    padding: 1.25rem;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    min-height: 200px;
}

.horizon-col:last-child {
    border-right: none;
}

.horizon-header {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

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

.horizon-dot.h1 { background: #3b82f6; }
.horizon-dot.h2 { background: #8b5cf6; }
.horizon-dot.h3 { background: #10b981; }

.horizon-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.horizon-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.horizon-goal {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.6rem;
    border-left: 3px solid transparent;
    transition: background 0.15s, opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    cursor: grab;
    position: relative;
}

.horizon-goal:active {
    cursor: grabbing;
}

.horizon-goal:hover {
    background: #f0f2f8;
}

/* Drag handle */
.drag-handle {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    color: var(--text-secondary);
    opacity: 0;
    cursor: grab;
    transition: opacity 0.2s;
    user-select: none;
    flex-shrink: 0;
    letter-spacing: 1px;
    margin-right: 0.25rem;
}
.horizon-goal:hover .drag-handle {
    opacity: 0.6;
}
.horizon-goal:hover .drag-handle:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* Dragging state */
.horizon-goal.dragging {
    opacity: 0.4;
    transform: scale(0.97);
    box-shadow: 0 4px 16px rgba(72, 98, 184, 0.18);
}

/* Drop zone states */
.horizon-body.drop-zone-active {
    min-height: 80px;
    border: 2px dashed rgba(72, 98, 184, 0.25);
    border-radius: 8px;
    transition: border-color 0.2s, background 0.2s;
}

.horizon-body.drop-zone-hover {
    border-color: var(--primary-color);
    background: rgba(72, 98, 184, 0.06);
}

.horizon-h1 .horizon-goal { border-left-color: #3b82f6; }
.horizon-h2 .horizon-goal { border-left-color: #8b5cf6; }
.horizon-h3 .horizon-goal { border-left-color: #10b981; }

.horizon-goal-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.horizon-goal-actions {
    display: flex;
    gap: 0.1rem;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.horizon-goal:hover .horizon-goal-actions {
    opacity: 1;
}

.horizon-goal h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    flex: 1;
}

.horizon-goal p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.horizon-goal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.35rem;
    gap: 0.5rem;
}

.horizon-goal .horizon-pillar-tag {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(72, 98, 184, 0.08);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    display: inline-block;
}

.horizon-empty {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    padding: 1rem 0;
}

/* ---- OKR Tracking ---- */
.okr-quarter-group {
    margin-bottom: 1.5rem;
}

.okr-quarter-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid rgba(72, 98, 184, 0.15);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.okr-quarter-count {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-color);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

.okr-track-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.okr-track-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.okr-track-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.okr-track-id {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--surface-color);
    background: var(--primary-color);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.okr-track-objective {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}

.okr-track-priority {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.okr-track-priority.high   { background: #fef2f2; color: #dc2626; }
.okr-track-priority.medium { background: #fffbeb; color: #d97706; }
.okr-track-priority.low    { background: #f0fdf4; color: #16a34a; }

.okr-track-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.okr-kr-table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: separate;
    border-spacing: 0;
}

.okr-kr-table thead th {
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.5rem 0.75rem;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.okr-kr-table thead th:first-child {
    border-radius: 6px 0 0 0;
}

.okr-kr-table thead th:last-child {
    border-radius: 0 6px 0 0;
}

.okr-kr-table tbody td {
    padding: 0.55rem 0.75rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.okr-kr-table tbody tr:last-child td {
    border-bottom: none;
}

.kr-bullet {
    color: var(--primary-color);
    margin-right: 0.35rem;
}

.kr-target {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .horizons-grid {
        grid-template-columns: 1fr;
        border-radius: var(--radius-lg);
    }

    .horizon-col {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .horizon-col:last-child {
        border-bottom: none;
    }

    .nsm-card {
        flex-direction: column;
    }

    .nsm-stats {
        width: 100%;
        justify-content: flex-start;
    }

    .exec-topbar {
        flex-direction: column;
    }

    .exec-select {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
    .okr-track-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .okr-card-actions {
        flex-wrap: wrap;
    }
    .chat-panel {
        width: calc(100vw - 2rem);
        right: -0.5rem;
        bottom: 3.5rem;
    }
}

/* ============================================
   AI Chat Widget
   ============================================ */

.chat-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    font-family: 'Montserrat', sans-serif;
}

/* Toggle button */
.chat-toggle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: var(--brand-gradient, linear-gradient(135deg, #4862B8, #779ECA));
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(72, 98, 184, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 2;
}
.chat-toggle:hover {
    transform: scale(1.07);
    box-shadow: 0 6px 24px rgba(72, 98, 184, 0.45);
}
.chat-icon-close { display: none; }
.chat-widget.open .chat-icon-open { display: none; }
.chat-widget.open .chat-icon-close { display: block; }

/* Panel */
.chat-panel {
    display: none;
    position: absolute;
    bottom: 4rem;
    right: 0;
    width: 380px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(72, 98, 184, 0.08);
    flex-direction: column;
    overflow: hidden;
    animation: chatSlideUp 0.25s ease-out;
}
.chat-widget.open .chat-panel {
    display: flex;
}

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

/* Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--brand-gradient, linear-gradient(135deg, #4862B8, #779ECA));
    color: #fff;
}
.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.chat-header h3 {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0;
}
.chat-ai-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    animation: chatPulse 2s infinite;
}
@keyframes chatPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.chat-clear-btn {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: none;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.chat-clear-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 360px;
    min-height: 200px;
    scroll-behavior: smooth;
}

.chat-msg {
    display: flex;
    max-width: 88%;
}
.chat-msg-user {
    align-self: flex-end;
}
.chat-msg-ai {
    align-self: flex-start;
}

.chat-msg-bubble {
    padding: 0.55rem 0.85rem;
    border-radius: 14px;
    font-size: 0.8rem;
    line-height: 1.5;
    word-wrap: break-word;
}
.chat-msg-user .chat-msg-bubble {
    background: var(--primary-color, #4862B8);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg-ai .chat-msg-bubble {
    background: #f0f2f8;
    color: var(--text-primary, #1a1a2e);
    border-bottom-left-radius: 4px;
}

.chat-msg-bubble strong {
    font-weight: 700;
}
.chat-msg-bubble ul {
    margin: 0.3rem 0;
    padding-left: 1.2rem;
}
.chat-msg-bubble li {
    margin: 0.15rem 0;
}

/* Typing indicator */
.chat-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
}
.chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ca3af;
    animation: chatBounce 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* Input row */
.chat-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid #e5e7eb;
    background: #fafbfc;
}
.chat-input {
    flex: 1;
    border: 1px solid #e0e3ea;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    background: #fff;
    transition: border-color 0.15s;
}
.chat-input:focus {
    border-color: var(--primary-color, #4862B8);
}
.chat-input::placeholder {
    color: #9ca3af;
}
.chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--primary-color, #4862B8);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s;
}
.chat-send-btn:hover {
    background: #3a52a0;
    transform: scale(1.05);
}
.chat-send-btn:active {
    transform: scale(0.95);
}

/* ============================================
   Info Tip Buttons & Popup
   ============================================ */

.info-tip-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    padding: 2px;
    margin-left: 0.35rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.info-tip-btn:hover {
    color: var(--primary-color, #4862B8);
    background: rgba(72, 98, 184, 0.08);
}

/* Overlay */
.info-tip-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: infoTipFadeIn 0.2s ease-out;
}
.info-tip-overlay.hidden {
    display: none;
}
@keyframes infoTipFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Popup card */
.info-tip-popup {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
    width: 520px;
    max-width: 92vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: infoTipSlideUp 0.25s ease-out;
}
@keyframes infoTipSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.info-tip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--brand-gradient, linear-gradient(135deg, #4862B8, #779ECA));
    color: #fff;
}
.info-tip-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}
.info-tip-close {
    background: rgba(255,255,255,0.18);
    border: none;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.info-tip-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Body content */
.info-tip-body {
    padding: 1.25rem;
    overflow-y: auto;
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--text-primary, #1a1a2e);
}
.info-tip-body p {
    margin: 0 0 0.75rem;
}
.info-tip-body h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color, #4862B8);
    margin: 1rem 0 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.info-tip-body ul {
    margin: 0 0 0.75rem;
    padding-left: 1.3rem;
}
.info-tip-body li {
    margin: 0.3rem 0;
}
.info-tip-body strong {
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
}
.info-tip-body em {
    color: var(--text-secondary, #6b7280);
}

/* Table inside tips */
.info-tip-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0 0.75rem;
    font-size: 0.78rem;
}
.info-tip-table td {
    padding: 0.45rem 0.6rem;
    border: 1px solid #e5e7eb;
    vertical-align: top;
}
.info-tip-table tr:nth-child(1) td:first-child { color: #3b82f6; }
.info-tip-table tr:nth-child(2) td:first-child { color: #8b5cf6; }
.info-tip-table tr:nth-child(3) td:first-child { color: #10b981; }
.info-tip-table tr:hover {
    background: #f9fafb;
}

/* ============================================
   Key Result Row Actions
   ============================================ */

.kr-actions-cell {
    white-space: nowrap;
    text-align: right;
    padding-right: 0.3rem !important;
}
.kr-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    opacity: 0.45;
    transition: opacity 0.15s, background 0.15s;
}
.kr-action-btn:hover {
    opacity: 1;
    background: rgba(72, 98, 184, 0.08);
}
.kr-action-delete:hover {
    background: rgba(239, 68, 68, 0.1);
}
.okr-kr-table tr:hover .kr-action-btn {
    opacity: 0.75;
}

/* ============================================
   Edit Modal
   ============================================ */

.edit-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: infoTipFadeIn 0.2s ease-out;
}
.edit-modal-overlay.hidden {
    display: none;
}

.edit-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    width: 540px;
    max-width: 94vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: infoTipSlideUp 0.25s ease-out;
}

.edit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--brand-gradient, linear-gradient(135deg, #4862B8, #779ECA));
    color: #fff;
}
.edit-modal-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.edit-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.edit-field {
    margin-bottom: 0.85rem;
}
.edit-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.edit-field input,
.edit-field textarea,
.edit-field select {
    width: 100%;
    border: 1px solid #e0e3ea;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-primary, #1a1a2e);
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.edit-field input:focus,
.edit-field textarea:focus,
.edit-field select:focus {
    border-color: var(--primary-color, #4862B8);
}
.edit-field textarea {
    resize: vertical;
    min-height: 60px;
}

.edit-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 0.5rem;
}
.edit-modal-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.1s;
}
.edit-modal-btn-cancel {
    background: #f0f2f5;
    color: var(--text-secondary, #6b7280);
}
.edit-modal-btn-cancel:hover {
    background: #e5e7eb;
}
.edit-modal-btn-save {
    background: var(--primary-color, #4862B8);
    color: #fff;
}
.edit-modal-btn-save:hover {
    background: #3a52a0;
}
.edit-modal-btn:active {
    transform: scale(0.97);
}

/* ============================================
   Responsive Navbar
   ============================================ */

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s;
}
.nav-hamburger:hover {
    background: rgba(72, 98, 184, 0.08);
}
.nav-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary, #1a1a2e);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s;
}
.nav-hamburger.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 960px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 0.5rem 1rem 1rem;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        border-bottom: 1px solid var(--border-color, #e5e7eb);
        z-index: 999;
        gap: 0.15rem;
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links .nav-link {
        padding: 0.6rem 0.85rem;
        font-size: 0.85rem;
        border-radius: 8px;
        width: 100%;
    }

    .navbar {
        position: relative;
    }
    .nav-content {
        flex-wrap: wrap;
    }
}

/* ============================================
   Nexus Floating Module Menu
   ============================================ */

/* FAB trigger button */
.nxm-fab {
    position: fixed;
    bottom: 28px;
    left: 28px;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--brand-primary, #4862B8);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(72, 98, 184, 0.35), 0 1px 4px rgba(0,0,0,0.10);
    z-index: 9998;
    transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
}
.nxm-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(72, 98, 184, 0.45), 0 2px 8px rgba(0,0,0,0.12);
}
.nxm-fab:active {
    transform: scale(0.96);
}
.nxm-fab.nxm-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.7);
}

/* Overlay */
.nxm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.nxm-overlay.nxm-open {
    opacity: 1;
    pointer-events: auto;
}

/* Slide-in panel */
.nxm-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 340px;
    max-height: 80vh;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 2px 12px rgba(0,0,0,0.06);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s;
}
.nxm-panel.nxm-open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

/* Header */
.nxm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 12px;
}
.nxm-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
}
.nxm-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.nxm-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Items list */
.nxm-items {
    flex: 1;
    overflow-y: auto;
    padding: 6px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nxm-items::-webkit-scrollbar {
    width: 6px;
}
.nxm-items::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

/* Individual item */
.nxm-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #1a1a2e;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.15s;
}
.nxm-item:hover {
    background: #f5f5f8;
}
.nxm-item--active {
    background: var(--brand-primary, #4862B8);
    color: #fff;
    font-weight: 600;
}
.nxm-item--active:hover {
    background: var(--brand-primary, #4862B8);
    opacity: 0.92;
}
.nxm-item--disabled {
    opacity: 0.42;
    cursor: default;
    pointer-events: none;
}
.nxm-icon {
    font-size: 1.25rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.nxm-label {
    white-space: nowrap;
}

/* Footer */
.nxm-footer {
    padding: 12px 24px 20px;
}
.nxm-logout {
    background: none;
    border: none;
    color: #e74c3c;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.15s;
}
.nxm-logout:hover {
    opacity: 0.7;
}

/* Mobile adjustments */
@media (max-width: 420px) {
    .nxm-panel {
        width: calc(100vw - 32px);
        max-height: 85vh;
    }
    .nxm-fab {
        bottom: 20px;
        left: 20px;
        width: 46px;
        height: 46px;
    }
}

/* ============================================
   Upgrade / Marketing Page
   ============================================ */

.upgrade-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Back link in nav */
.btn-back-desk {
    color: var(--brand-primary, #4862B8);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    transition: background 0.15s;
}
.btn-back-desk:hover {
    background: rgba(72, 98, 184, 0.08);
}

/* Hero */
.up-hero {
    text-align: center;
    padding: 64px 20px 48px;
}
.up-hero-badge {
    display: inline-block;
    background: rgba(72, 98, 184, 0.08);
    color: var(--brand-primary, #4862B8);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 18px;
    border-radius: 20px;
    margin-bottom: 20px;
}
.up-hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-primary, #1a1a2e);
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.up-hero-sub {
    font-size: 1.05rem;
    color: var(--text-secondary, #6b7280);
    max-width: 560px;
    margin: 0 auto 28px;
    line-height: 1.6;
}
.up-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.up-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
    border: none;
}
.up-btn:hover {
    transform: translateY(-1px);
}
.up-btn--primary {
    background: var(--brand-primary, #4862B8);
    color: #fff;
    box-shadow: 0 4px 14px rgba(72, 98, 184, 0.3);
}
.up-btn--primary:hover {
    box-shadow: 0 6px 20px rgba(72, 98, 184, 0.4);
}
.up-btn--outline {
    background: #fff;
    color: var(--brand-primary, #4862B8);
    border: 1.5px solid var(--brand-primary, #4862B8);
}
.up-btn--outline:hover {
    background: rgba(72, 98, 184, 0.04);
}

/* Current plan banner */
.up-current-plan {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 14px;
    padding: 16px 22px;
    margin-bottom: 40px;
}
.up-plan-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}
.up-plan-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary, #1a1a2e);
}
.up-plan-text strong {
    color: #16a34a;
}
.up-plan-link {
    color: var(--brand-primary, #4862B8);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}
.up-plan-link:hover {
    text-decoration: underline;
}

/* Module cards */
.up-modules {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.up-module-card {
    background: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 18px;
    padding: 32px;
    transition: box-shadow 0.3s, border-color 0.3s;
    scroll-margin-top: 100px;
}
.up-module-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}
.up-module-card--highlight {
    border-color: var(--brand-primary, #4862B8);
    box-shadow: 0 0 0 3px rgba(72, 98, 184, 0.15), 0 8px 32px rgba(0, 0, 0, 0.08);
}

.up-module-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}
.up-module-emoji {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}
.up-module-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    margin: 0 0 4px;
}
.up-module-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand-primary, #4862B8), var(--brand-secondary, #779ECA));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 6px;
}
.up-module-desc {
    font-size: 0.92rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Feature rows */
.up-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.up-feature {
    background: var(--bg-secondary, #f9fafb);
    border-radius: 12px;
    padding: 18px 20px;
}
.up-feature-pain {
    font-size: 0.82rem;
    color: #b91c1c;
    font-weight: 600;
    margin-bottom: 6px;
    font-style: italic;
}
.up-feature-pain::before {
    content: '⚠ ';
}
.up-feature-sol {
    font-size: 0.88rem;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 6px;
    line-height: 1.5;
}
.up-feature-val {
    font-size: 0.82rem;
    color: #16a34a;
    font-weight: 500;
}
.up-feature-val::before {
    content: '✓ ';
}

/* CTA footer */
.up-cta {
    text-align: center;
    padding: 56px 20px;
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(72, 98, 184, 0.04), rgba(119, 158, 202, 0.06));
    border-radius: 20px;
}
.up-cta h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 10px;
}
.up-cta p {
    font-size: 0.95rem;
    color: var(--text-secondary, #6b7280);
    max-width: 480px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* Mobile for upgrade page */
@media (max-width: 640px) {
    .up-hero-title {
        font-size: 1.6rem;
    }
    .up-module-card {
        padding: 22px 18px;
    }
    .up-current-plan {
        flex-direction: column;
        text-align: center;
    }
    .up-cta h2 {
        font-size: 1.3rem;
    }
}