/* ========================================
   Big Sea — Client KB Brand System
   ======================================== */

:root {
    --primary-dark: #0D2022;
    --dark-teal: #194146;
    --lime: #70F086;
    --magenta: #E86CE4;
    --cyan: #70F1CC;
    --coral: #EC6155;
    --white: #FFFFFF;
    --purple: #2e175d;
    --navy: #1d2f67;

    --surface: #0f2b2e;
    --surface-hover: #153538;
    --border: rgba(255, 255, 255, 0.1);
    --text-muted: rgba(255, 255, 255, 0.6);

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Fraunces', serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow: 6px 6px 9px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);

    --container: 1200px;
    --nav-height: 64px;
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    line-height: 1.6;
    color: var(--white);
    background: var(--primary-dark);
    min-height: 100vh;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; font-weight: 500; }

p { margin-bottom: 0.75em; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--lime);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

a:hover {
    color: var(--cyan);
}

/* ========================================
   Layout
   ======================================== */

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

#main-content {
    flex: 1;
    padding: 2rem;
    padding-top: calc(var(--nav-height) + 2rem);
    max-width: var(--container);
    margin: 0 auto;
    width: 100%;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    width: 100%;
}

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

#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(13, 32, 34, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
}

.nav-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand:hover {
    color: var(--lime);
}

.nav-brand .brand-dot {
    width: 10px;
    height: 10px;
    background: var(--lime);
    border-radius: 50%;
    display: inline-block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user-name {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.btn {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.625em 1.5em;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    transition: all 0.2s;
    line-height: 1;
}

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

.btn-primary:hover {
    background: var(--cyan);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--dark-teal);
    color: var(--white);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--lime);
}

.btn-danger {
    background: transparent;
    color: var(--coral);
    border: 1px solid var(--coral);
}

.btn-danger:hover {
    background: var(--coral);
    color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--white);
}

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

.btn-lg {
    font-size: 1rem;
    padding: 0.75em 2em;
}

/* ========================================
   Cards
   ======================================== */

.card {
    background: var(--dark-teal);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.card-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.125rem;
}

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

/* ========================================
   Forms
   ======================================== */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--lime);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

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

/* ========================================
   Badges & Tags
   ======================================== */

.badge {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.7rem;
    padding: 0.25em 0.75em;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-lime { background: var(--lime); color: var(--primary-dark); }
.badge-magenta { background: var(--magenta); color: var(--white); }
.badge-cyan { background: var(--cyan); color: var(--primary-dark); }
.badge-coral { background: var(--coral); color: var(--white); }
.badge-outline {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
}

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

.source-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.source-dot.hubspot { background: var(--coral); }
.source-dot.drive { background: var(--cyan); }
.source-dot.upload { background: var(--magenta); }

/* ========================================
   Tabs
   ======================================== */

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.tab {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--white);
}

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

/* ========================================
   Progress Bar
   ======================================== */

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--surface);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--lime);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.progress-bar-fill.warning { background: var(--coral); }

/* ========================================
   Upload Zone
   ======================================== */

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--lime);
    background: rgba(112, 240, 134, 0.05);
}

.upload-zone-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.upload-zone-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.upload-zone-text strong {
    color: var(--lime);
}

/* ========================================
   Login Screen
   ======================================== */

.login-container {
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
}

.login-container h1 {
    margin-bottom: 0.5rem;
}

.login-container .subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-card {
    background: var(--dark-teal);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
    text-align: left;
}

.login-card .form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.login-card .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 0.75em;
}

.login-footer {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--lime);
}

/* ========================================
   Slide Viewer
   ======================================== */

.slide-viewer {
    position: relative;
    min-height: 60vh;
}

.slide {
    background: var(--dark-teal);
    border-radius: var(--radius-lg);
    padding: 3rem;
    border: 1px solid var(--border);
    min-height: 50vh;
    display: flex;
    flex-direction: column;
}

.slide-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--lime);
}

.slide-content {
    flex: 1;
    font-size: 1.125rem;
    line-height: 1.8;
}

.slide-content h1,
.slide-content h2,
.slide-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.slide-content ul,
.slide-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.slide-content li {
    margin-bottom: 0.5rem;
}

.slide-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.slide-counter {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.slide-thumbnails {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.slide-thumb {
    width: 40px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--surface);
    cursor: pointer;
    transition: background 0.2s;
}

.slide-thumb.active {
    background: var(--lime);
}

.slide-thumb:hover {
    background: var(--cyan);
}

/* ========================================
   Quiz Interface
   ======================================== */

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

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

.quiz-question {
    background: var(--dark-teal);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
}

.quiz-question-text {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--white);
}

.quiz-option:hover {
    border-color: var(--lime);
    background: var(--surface-hover);
}

.quiz-option.selected {
    border-color: var(--lime);
    background: rgba(112, 240, 134, 0.1);
}

.quiz-option.correct {
    border-color: var(--lime);
    background: rgba(112, 240, 134, 0.15);
}

.quiz-option.incorrect {
    border-color: var(--coral);
    background: rgba(236, 97, 85, 0.15);
}

.quiz-option-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.quiz-option.selected .quiz-option-radio {
    border-color: var(--lime);
}

.quiz-option.selected .quiz-option-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lime);
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

/* ========================================
   Results Screen
   ======================================== */

.results-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.results-score {
    font-size: 4rem;
    font-family: var(--font-heading);
    font-weight: 800;
    margin: 1rem 0;
}

.results-score.passed { color: var(--lime); }
.results-score.failed { color: var(--coral); }

.results-status {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.results-breakdown {
    text-align: left;
    background: var(--dark-teal);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2rem 0;
}

.results-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.results-category:last-child {
    border-bottom: none;
}

/* ========================================
   Onboarding Steps
   ======================================== */

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 3rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.step.active {
    color: var(--lime);
}

.step.completed {
    color: var(--cyan);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 2px solid var(--border);
}

.step.active .step-number {
    border-color: var(--lime);
    background: var(--lime);
    color: var(--primary-dark);
}

.step.completed .step-number {
    border-color: var(--cyan);
    background: var(--cyan);
    color: var(--primary-dark);
}

.step-connector {
    width: 40px;
    height: 2px;
    background: var(--border);
    margin: 0 0.5rem;
}

.step.completed + .step-connector {
    background: var(--cyan);
}

/* ========================================
   Empty States
   ======================================== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

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

.empty-state h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

/* ========================================
   Loading
   ======================================== */

.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: var(--text-muted);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--lime);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

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

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

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

.toast {
    background: var(--dark-teal);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast.success { border-left: 3px solid var(--lime); }
.toast.error { border-left: 3px solid var(--coral); }
.toast.info { border-left: 3px solid var(--cyan); }

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

/* ========================================
   Utilities
   ======================================== */

.text-muted { color: var(--text-muted); }
.text-lime { color: var(--lime); }
.text-coral { color: var(--coral); }
.text-cyan { color: var(--cyan); }
.text-magenta { color: var(--magenta); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none !important; }

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

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }

    #main-content {
        padding: 1rem;
        padding-top: calc(var(--nav-height) + 1rem);
    }

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

    .slide {
        padding: 1.5rem;
    }

    .steps {
        flex-wrap: wrap;
    }
}
