@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* ============================================
   GLOBAL
   ============================================ */
:root {
    --primary: #0d6efd;
    --success: #198754;
    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Montserrat', 'Segoe UI', sans-serif;
    --shadow-card: 0 2px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --radius: 1rem;
}

html, body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    width: 100%;
    min-height: 100vh;
    background: #f8f9fa;
    color: #333;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   LAYOUT
   ============================================ */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #495057;
}

.main {
    min-height: calc(100dvh - 86px);
    color: #495057;
    background: #f8f9fa;
    width: 100%;
    display: flex;
    flex-direction: row;
}

.body-content {
    height: calc(100dvh - 86px) !important;
    display: flex;
    width: 100%;
}

.content {
    padding: 1rem 1.5rem;
    width: 100%;
}

.empty-layout {
    width: 100%;
    height: 100%;
}

/* ============================================
   CARD OVERRIDES (polish Bootstrap cards)
   ============================================ */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ============================================
   BUTTON OVERRIDES (nicer feel)
   ============================================ */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13,110,253,0.3);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25,135,84,0.3);
}

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

.btn:disabled {
    transform: none;
    box-shadow: none;
}

/* ============================================
   FORM OVERRIDES
   ============================================ */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

.form-check-input {
    width: 1.15em;
    height: 1.15em;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    cursor: pointer;
    padding-left: 0.25rem;
}

/* ============================================
   QNA STEP WIZARD (matches original Blazorise design)
   ============================================ */
.step-wizard-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.step-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.step-badge.active {
    background: var(--primary);
    color: #fff;
}

.step-badge.completed {
    background: var(--primary);
    color: #fff;
}

.step-badge.pending {
    background: #fff;
    color: #adb5bd;
    border-color: #dee2e6;
}

.step-connector {
    height: 2px;
    flex: 1;
    min-width: 40px;
    border-radius: 1px;
    transition: background 0.3s ease;
}

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

.step-connector.pending {
    background: #dee2e6;
}

/* Question styling — clean & minimal like original */
.qna-question-block {
    margin-bottom: 2.5rem;
}

.qna-question-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.qna-question-label .required-star {
    color: #c0392b;
    font-weight: 700;
}

/* Simple radio options — plain like original */
.qna-radio-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.25rem;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 0.98rem;
    color: #444;
    transition: color 0.15s;
}

.qna-radio-option:hover {
    color: var(--primary);
}

.qna-radio-text {
    line-height: 1.4;
}

/* ============================================
   FUNNEL PAGE NAV BAR
   ============================================ */
.funnel-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 1rem 1.25rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    z-index: 1000;
}

.funnel-nav .btn {
    min-width: 130px;
    padding: 0.7rem 1.75rem;
    font-size: 1.05rem;
    border-radius: 0.6rem;
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing-bg {
    background: linear-gradient(170deg, #ffffff 0%, #f4f7fc 50%, #eaf0fb 100%);
    min-height: 100vh;
}

.landing-cta {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-size: clamp(1.05rem, 3vw, 1.25rem);
    font-weight: 700;
    border-radius: 0.85rem;
    box-shadow: 0 6px 24px rgba(46,204,113,0.35);
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.landing-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(46,204,113,0.45);
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: #fff;
}

.landing-cta:active {
    transform: translateY(-1px);
    color: #fff;
}


/* ============================================
   LOGIN PAGE
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f8f9fa 0%, #e3ecfa 100%);
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-card .card-header {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    border: none;
}

.login-card .card-header h5 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.login-card .card-body {
    padding: 2rem;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

.dashboard-header h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
}

.dashboard-subtitle {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
}

.dashboard-card {
    margin-bottom: 1rem;
}

.dashboard-select {
    max-width: 400px;
}

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

.platform-card {
    text-align: center;
}

.platform-icon {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.facebook-card .platform-icon {
    background: linear-gradient(135deg, #e7f0ff, #d0e2ff);
    color: #1877f2;
}

.tiktok-card .platform-icon {
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    color: #333;
}

.platform-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pixel-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.pixel-row:last-child {
    border-bottom: none;
}

.pixel-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.pixel-enabled {
    background: #d1e7dd;
    color: #0f5132;
}

.pixel-disabled {
    background: #f8d7da;
    color: #842029;
}

.pixel-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pixel-info strong {
    font-size: 0.88rem;
    color: #495057;
}

.pixel-id {
    font-size: 0.78rem;
    color: #adb5bd;
    font-family: 'Courier New', monospace;
}

/* ============================================
   CLIENT DATA TABLE
   ============================================ */
.date-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    max-width: 420px;
    margin: 0 auto 1.5rem;
}

.date-nav-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.date-nav-btn:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
}

.date-filter-input {
    text-align: center;
}

.date-filter-count {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.client-section {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.client-header h4 {
    color: #212529;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-family: 'Courier New', monospace;
}

.separator {
    color: #dee2e6;
    font-weight: bold;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.qna-list {
    font-size: 0.9rem;
}

.question {
    color: var(--primary);
    font-weight: 600;
}

.arrow {
    color: #adb5bd;
    margin: 0 10px;
    font-weight: bold;
}

.answer {
    color: var(--success);
    font-weight: 500;
}

.no-data {
    color: #adb5bd;
    font-style: italic;
}

.notes-section {
    margin-top: 1rem;
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.notes-section label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    color: #212529;
}

.notes-section textarea {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.9rem;
    resize: none;
    transition: border-color 0.2s;
}

.notes-section textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

.notes-section .save-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.notes-section .save-btn:hover {
    background: #0b5ed7;
}

.notes-section .delete-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    margin-left: 0.5rem;
    transition: all 0.2s;
}

.notes-section .delete-btn:hover {
    background: #bb2d3b;
}

/* ============================================
   SUCCESS / REVIEW PAGES
   ============================================ */
.result-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f8f9fa 0%, #e3ecfa 100%);
    padding: 1rem;
    cursor: default;
    user-select: none;
}

.result-card {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 520px;
    width: 100%;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    background: #fff;
}

.result-card img {
    width: 40%;
    max-width: 180px;
    margin-bottom: 1.5rem;
}

.result-card h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: #212529;
    margin-bottom: 1rem;
}

/* ============================================
   BLAZOR SYSTEM
   ============================================ */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT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xODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::before {
    content: "An error has occurred."
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard {
        padding: 1rem 0.75rem;
    }

    .funnel-nav .btn {
        min-width: 100px;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .step-badge {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .step-connector {
        width: 16px;
    }

    .qna-question-card {
        padding: 1rem;
    }

    .result-card {
        padding: 2rem 1.5rem;
    }

    .client-section {
        padding: 1rem;
    }
}
