/* ========================================
   GLOBAL VARIABLES & RESET
   ======================================== */

:root {
    --bg-color: #E0F2FE;
    --text-main: #1E293B;
    --text-sub: #64748B;
    --accent: #0EA5E9;
    --accent-glow: rgba(14, 165, 233, 0.3);
    --card-bg: #FFFFFF;
    --border-color: #DBEAFE;
    --font-head: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -20%; left: -20%; width: 140%; height: 140%;
    background: radial-gradient(circle at 20% 30%, #FCE7F3 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, #FEF3C7 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, #E0F2FE 0%, transparent 60%);
    z-index: -1;
    animation: aurora 20s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes aurora {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-2%, 2%) scale(1.05); }
}

[data-theme="dark"] body::before {
    background: radial-gradient(circle at 20% 30%, #1E1B4B 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, #312E81 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, #0F172A 0%, transparent 60%);
}

/* ========================================
   SHARED COMPONENTS
   ======================================== */

.logo {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.3px;
    color: var(--text-main);
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 18px 20px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px var(--accent-glow);
}

.btn-primary:active { 
    transform: scale(0.98); 
}

input {
    width: 100%;
    padding: 18px;
    border: 1px solid #DBEAFE;
    border-radius: 12px;
    font-size: 16px;
    font-family: var(--font-body);
    background: #FFFFFF;
    outline: none;
    transition: border 0.3s;
}

input:focus { 
    border-color: var(--accent); 
}

/* ========================================
   LOGIN PAGE STYLES
   ======================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.login-container {
    max-width: 420px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-intro {
    text-align: center;
    margin-bottom: 32px;
}

.login-headline {
    font-family: var(--font-head);
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--text-main);
    line-height: 1.3;
}

.login-subcopy {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.6;
}

/* Login Error Box */
.error-box {
    background: #FFF0E6;
    border: 1px solid #FFD4B8;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

[data-theme="dark"] .error-box {
    background: #0F172A;
    border-color: #7C2D12;
}

.error-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.error-text {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.5;
    margin: 0;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-hint {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 4px;
}

/* Button Loader */
.btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: rotate 2s linear infinite;
}

.spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Login Footer */
.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #DBEAFE;
}

[data-theme="dark"] .login-footer {
    border-top-color: #334155;
}

.footer-text {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 16px;
    line-height: 1.6;
}

.footer-link {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-link:hover {
    opacity: 0.8;
}

.footer-divider {
    height: 1px;
    background: #DBEAFE;
    margin: 20px 0;
}

[data-theme="dark"] .footer-divider {
    background: #334155;
}

.footer-legal {
    font-size: 12px;
    color: var(--text-sub);
    opacity: 0.7;
    line-height: 1.5;
}

/* ========================================
   TOKEN GUIDE PAGE STYLES (lynk-guide.php)
   ======================================== */

.guide-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 60px 20px;
}

.guide-container h2 {
    font-family: var(--font-head);
    font-size: 26px;
    color: var(--text-main);
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.6;
    text-align: center;
    margin-bottom: 32px;
}

.step-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #FFFFFF;
    border: 1px solid #DBEAFE;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}

[data-theme="dark"] .step-box {
    background: #1E293B;
    border-color: #334155;
}

.step-box .step-number {
    flex-shrink: 0;
    margin: 0;
}

.step-box .step-content h3 {
    font-family: var(--font-head);
    font-size: 17px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.step-box .step-content p {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.5;
}

/* ========================================
   DASHBOARD STYLES
   ======================================== */

.dashboard-page {
    min-height: 100vh;
    padding: 24px 20px 40px;
    display: flex;
    justify-content: center;
}

.dashboard-container {
    max-width: 480px;
    width: 100%;
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 32px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.theme-toggle {
    background: transparent;
    border: 1px solid #DBEAFE;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 18px;
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }

.theme-toggle:hover {
    background: #E0F2FE;
    border-color: var(--accent);
}

[data-theme="dark"] .theme-toggle {
    border-color: #475569;
}
[data-theme="dark"] .theme-toggle:hover {
    background: #334155;
}

.greeting-text {
    font-family: var(--font-head);
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.greeting-sub {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.5;
    margin-bottom: 24px;
}

.trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #E0F2FE;
    border: 1px solid #DBEAFE;
    padding: 10px 16px;
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-sub);
}

[data-theme="dark"] .trial-badge {
    background: #334155;
    border-color: #475569;
}

.trial-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #DBEAFE;
    transition: all 0.3s;
}

.dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* Tools Grid */
.section-title {
    font-family: var(--font-body);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-sub);
    margin-bottom: 20px;
    font-weight: 500;
}

.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 40px;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 20px;
    background: #FFFFFF;
    border: 1px solid #DBEAFE;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.25s ease;
    cursor: pointer;
    min-height: 100px;
}

.tool-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(204, 85, 0, 0.08);
}

.tool-card:active {
    transform: scale(0.98);
}

[data-theme="dark"] .tool-card {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] .tool-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(204, 85, 0, 0.15);
}

.tool-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E0F2FE;
    border-radius: 16px;
}

[data-theme="dark"] .tool-icon {
    background: #334155;
}

.tool-content {
    flex: 1;
    text-align: left;
}

.tool-title {
    font-family: var(--font-head);
    font-size: 17px;
    margin-bottom: 4px;
    color: var(--text-main);
    font-weight: 700;
}

.tool-desc {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.4;
}

.tool-arrow {
    font-size: 20px;
    color: var(--accent);
    flex-shrink: 0;
    transition: transform 0.25s;
}

.tool-card:hover .tool-arrow {
    transform: translateX(4px);
}

/* Dashboard Footer */
.dashboard-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #DBEAFE;
}

[data-theme="dark"] .dashboard-footer {
    border-top-color: #334155;
}

.upgrade-notice {
    background: linear-gradient(135deg, #DBEEFB 0%, #E0F2FE 100%);
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-main);
}

[data-theme="dark"] .upgrade-notice {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

.upgrade-link {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.logout-link {
    font-size: 13px;
    color: var(--text-sub);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.logout-link:hover {
    opacity: 1;
    color: var(--accent);
}

/* ========================================
   DARK MODE GLOBAL OVERRIDES
   ======================================== */

[data-theme="dark"] {
    --bg-color: #141414;
    --text-main: #E8E8E8;
    --text-sub: #A8A8A8;
    --card-bg: #1F1F1F;
    --border-color: #2A2A2A;
    background-color: var(--bg-color);
    color: var(--text-main);
}

[data-theme="dark"] .logo {
    color: var(--text-main);
}

[data-theme="dark"] .greeting-text {
    color: var(--text-main);
}

[data-theme="dark"] .greeting-sub,
[data-theme="dark"] .section-title {
    color: var(--text-sub);
}
/* ========================================
   TOOL PAGES STYLES
   ======================================== */

.tool-page {
    min-height: 100vh;
    padding: 40px 20px 60px;
    background-color: var(--bg-color);
}

.delivery-choice-box {
    margin-top: 8px;
    padding-top: 4px;
}
.delivery-choice-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}
.btn-secondary-outline {
    display: block;
    width: 100%;
    background: transparent;
    color: var(--pulih-green, var(--accent));
    border: 1.5px solid var(--pulih-green, var(--accent));
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s, transform 0.2s;
}
.btn-secondary-outline:hover {
    background: var(--pulih-green-tint, rgba(0,0,0,0.03));
    transform: translateY(-1px);
}
.btn-secondary-outline:active { transform: scale(0.98); }
.delivery-choice-note {
    font-size: 12px;
    color: var(--text-sub, #6B6255);
    line-height: 1.5;
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--pulih-green-tint, rgba(36,92,75,0.06));
    border-radius: 10px;
}

.tool-container {
    max-width: 600px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    color: var(--text-sub);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent);
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-title {
    font-family: var(--font-head);
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.tool-subtitle {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.6;
}

/* ========================================
   IMPULSE TOOL (REVISED)
   ======================================== */

.impulse-explanation {
    background: #FFFFFF;
    border: 1px solid #DBEAFE;
    border-left: 4px solid var(--accent);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
}

[data-theme="dark"] .impulse-explanation {
    background: #1E293B;
    border-color: #334155;
}

.impulse-explanation h3 {
    font-family: var(--font-head);
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.impulse-explanation p {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.7;
    margin-bottom: 12px;
}

.impulse-explanation p:last-child {
    margin-bottom: 0;
}

.impulse-box {
    background: #FFFFFF;
    border: 2px solid #DBEAFE;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 32px;
}

[data-theme="dark"] .impulse-box {
    background: #1E293B;
    border-color: #334155;
}

.timer-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 24px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: #DBEAFE;
    stroke-width: 8;
}

[data-theme="dark"] .progress-ring-bg {
    stroke: #334155;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-head);
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
}

.timer-label {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 32px;
    min-height: 20px;
}

.fact-box {
    background: #E0F2FE;
    border-left: 4px solid var(--accent);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 32px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .fact-box {
    background: #334155;
}

.fact-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
    font-style: italic;
}

/* Venting Box */
.venting-box {
    background: #FFFFFF;
    border: 1px solid #DBEAFE;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
}

[data-theme="dark"] .venting-box {
    background: #1E293B;
    border-color: #334155;
}

.venting-box h3 {
    font-family: var(--font-head);
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.venting-subtitle {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 16px;
}

.venting-box textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 1px solid #DBEAFE;
    border-radius: 12px;
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--text-main);
    background: #E0F2FE;
    resize: vertical;
    outline: none;
    transition: border 0.3s;
    line-height: 1.6;
}

[data-theme="dark"] .venting-box textarea {
    background: #334155;
    border-color: #475569;
    color: var(--text-main);
}

.venting-box textarea:focus {
    border-color: var(--accent);
}

.venting-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn-small {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.btn-small:hover {
    background: var(--accent);
    color: white;
}

.btn-danger {
    border-color: #DC2626;
    color: #DC2626;
}

.btn-danger:hover {
    background: #DC2626;
    color: white;
}

.venting-status {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 12px;
    min-height: 16px;
}
/* Panic Tool (Ruang Tenang - tool-panic.php) */
.panic-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.safe-space-box {
    background: #FFFFFF;
    border: 1px solid #DBEAFE;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    width: 100%;
}

[data-theme="dark"] .safe-space-box {
    background: #1E293B;
    border-color: #334155;
}

.safe-space-box h1 {
    font-family: var(--font-head);
    font-size: 24px;
    color: var(--text-main);
    margin-bottom: 16px;
}

.comfort-text {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 24px;
}

.instruction-mini {
    font-size: 14px;
    color: var(--text-sub);
    margin: 24px 0 16px;
}

.low-effort-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    background: #E0F2FE;
    border: 1px solid #DBEAFE;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.action-btn:hover {
    background: #DBEEFB;
}

.action-btn:active {
    transform: scale(0.98);
}

[data-theme="dark"] .action-btn {
    background: #1E293B;
    border-color: #334155;
    color: var(--text-main);
}

.feedback-box {
    background: #FFF0E6;
    border: 1px solid #FFD4B8;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.6;
    text-align: left;
}

[data-theme="dark"] .feedback-box {
    background: #0F172A;
    border-color: #7C2D12;
}

.breathing-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #DBEEFB 0%, #E0F2FE 100%);
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 4s ease-in-out;
}

[data-theme="dark"] .breathing-circle {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

.circle-inner {
    text-align: center;
}

#breathText {
    font-family: var(--font-head);
    font-size: 24px;
    color: var(--text-main);
}

.panic-instruction {
    font-size: 15px;
    color: var(--text-sub);
    margin-bottom: 32px;
    line-height: 1.6;
}

.panic-btn {
    max-width: 300px;
}

/* Quiz Tool */
.quiz-box {
    margin-bottom: 32px;
}

.progress-bar {
    height: 8px;
    background: #DBEAFE;
    border-radius: 100px;
    margin-bottom: 40px;
    overflow: hidden;
}

[data-theme="dark"] .progress-bar {
    background: #334155;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}

.question-box {
    background: #FFFFFF;
    border: 2px solid #DBEAFE;
    border-radius: 20px;
    padding: 40px 30px;
}

[data-theme="dark"] .question-box {
    background: #1E293B;
    border-color: #334155;
}

.question-number {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-sub);
    margin-bottom: 16px;
}

.question-text {
    font-family: var(--font-head);
    font-size: 22px;
    color: var(--text-main);
    margin-bottom: 32px;
    line-height: 1.4;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: #E0F2FE;
    border: 2px solid #DBEAFE;
    padding: 18px 20px;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-main);
    transition: all 0.2s;
    font-family: var(--font-body);
}

[data-theme="dark"] .option-btn {
    background: #334155;
    border-color: #475569;
}

.option-btn:hover {
    border-color: var(--accent);
    background: #DBEEFB;
    transform: translateX(4px);
}

[data-theme="dark"] .option-btn:hover {
    background: #1E3A5F;
}

.result-box {
    background: #FFFFFF;
    border: 2px solid #DBEAFE;
    border-radius: 20px;
    padding: 40px 30px;
    margin-bottom: 32px;
}

[data-theme="dark"] .result-box {
    background: #1E293B;
    border-color: #334155;
}

.result-title {
    font-family: var(--font-head);
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--text-main);
    text-align: center;
}

.result-content {
    color: var(--text-sub);
    line-height: 1.8;
    margin-bottom: 32px;
}

.result-content p {
    margin-bottom: 16px;
}

.result-content ul {
    padding-left: 20px;
    margin: 16px 0;
}

.result-content li {
    margin-bottom: 8px;
}

.result-actions {
    text-align: center;
}

/* Autopsy Tool */
.autopsy-box {
    margin-bottom: 32px;
}

.autopsy-instruction {
    font-size: 15px;
    color: var(--text-sub);
    margin-bottom: 32px;
    line-height: 1.6;
    text-align: center;
}

.checkbox-group {
    background: #FFFFFF;
    border: 1px solid #DBEAFE;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

[data-theme="dark"] .checkbox-group {
    background: #1E293B;
    border-color: #334155;
}

.checkbox-group h3 {
    font-family: var(--font-head);
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-main);
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--accent);
}

.checkbox-item span {
    flex: 1;
}

.severity-box {
    background: linear-gradient(135deg, #DBEEFB 0%, #E0F2FE 100%);
    border-left: 4px solid var(--accent);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
}

[data-theme="dark"] .severity-box {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

.reminder-box {
    background: #E0F2FE;
    border: 2px dashed var(--accent);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

[data-theme="dark"] .reminder-box {
    background: #334155;
}

.reminder-box p {
    margin: 0;
    font-weight: 500;
    color: var(--text-main);
}

/* Science Note */
.science-note {
    background: #FFFFFF;
    border: 1px solid #DBEAFE;
    border-radius: 16px;
    padding: 24px;
    margin-top: 40px;
}

[data-theme="dark"] .science-note {
    background: #1E293B;
    border-color: #334155;
}

.science-note h3 {
    font-family: var(--font-head);
    margin-bottom: 16px;
    color: var(--text-main);
}

.science-note p {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.7;
    margin-bottom: 12px;
}

.citation {
    font-size: 12px;
    color: var(--text-sub);
    opacity: 0.8;
    font-style: italic;
    margin-top: 8px;
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.btn-secondary:hover {
    background: var(--accent);
    color: white;
}

/* Responsive */
@media (max-width: 480px) {
    .timer-display {
        font-size: 48px;
    }
    
    .breathing-circle {
        width: 160px;
        height: 160px;
    }
    
    .tool-title {
        font-size: 26px;
    }
    
    .question-text {
        font-size: 18px;
    }

    /* Halaman tool/module (dipakai 18 halaman lewat style.css ini) punya
       padding atas 40px yang terasa boros di layar sempit — dikecilkan
       supaya konten utama lebih cepat kelihatan tanpa perlu scroll dulu. */
    body.tool-page {
        padding: 20px 16px 60px;
    }

    /* Chip prompt cepat ("💭 Ini semua salahku" dsb, dipakai di semua
       module-*.php) sebelumnya tinggi tap-nya cuma ~24px — terlalu kecil
       untuk jempol. Dinaikkan ke standar aksesibilitas minimum ~40px+. */
    .chip-btn {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }
}/* ========================================
   LANDING PAGE VISUAL DESIGN
   ======================================== */

.landing-page {
    background: linear-gradient(180deg, #E0F2FE 0%, #DBEEFB 100%);
    min-height: 100vh;
    font-family: var(--font-body);
}

[data-theme="dark"] .landing-page {
    background: linear-gradient(180deg, #141414 0%, #1E293B 100%);
}

/* HERO SECTION */
.hero-section {
    padding: 60px 20px 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-visual {
    margin-bottom: 32px;
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brain-heart-animation {
    position: relative;
    width: 150px;
    height: 150px;
    animation: float 3s ease-in-out infinite;
}

.brain-icon, .heart-icon, .healing-icon {
    position: absolute;
    font-size: 80px;
    filter: drop-shadow(0 4px 12px rgba(204, 85, 0, 0.2));
}

.brain-icon {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: pulse 2s ease-in-out infinite;
}

.heart-icon {
    bottom: 0;
    left: 20%;
    font-size: 60px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.healing-icon {
    bottom: 0;
    right: 20%;
    font-size: 60px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: rotate(0deg); }
    50% { opacity: 0.7; transform: rotate(180deg); }
}

.hero-title {
    font-family: var(--font-head);
    font-size: 42px;
    margin-bottom: 16px;
    color: var(--text-main);
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--accent);
    position: relative;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-sub);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    background: #FFFFFF;
    border: 2px solid #DBEAFE;
    border-radius: 100px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

[data-theme="dark"] .badge {
    background: #1E293B;
    border-color: #334155;
}

/* TOOLS SHOWCASE */
.tools-showcase {
    padding: 60px 20px;
    background: #FFFFFF;
    margin: 40px 0;
}

[data-theme="dark"] .tools-showcase {
    background: #1A1A1A;
}

.section-title {
    font-family: var(--font-head);
    font-size: 32px;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text-main);
}

.tools-grid-visual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-visual-card {
    background: #E0F2FE;
    border: 2px solid #DBEAFE;
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .tool-visual-card {
    background: #334155;
    border-color: #475569;
}

.tool-visual-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(204, 85, 0, 0.15);
    border-color: var(--accent);
}

.card-visual {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #DBEAFE;
}

[data-theme="dark"] .card-visual {
    background: #1E293B;
    border-color: #475569;
}

.visual-timer {
    font-family: var(--font-head);
    font-size: 32px;
    color: var(--accent);
    font-weight: 700;
}

.visual-text {
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 8px;
    font-style: italic;
}

.breathing-circle-visual .circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #DBEEFB, #0EA5E9);
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.quiz-options {
    text-align: left;
    width: 100%;
}

.option {
    padding: 8px;
    margin: 4px 0;
    background: #E0F2FE;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-main);
}

[data-theme="dark"] .option {
    background: #334155;
}

.red-flags .flag {
    background: #DBEEFB;
    padding: 6px 12px;
    border-radius: 8px;
    margin: 4px 0;
    font-size: 12px;
    color: var(--text-main);
}

[data-theme="dark"] .red-flags .flag {
    background: #1E3A5F;
}

.tool-visual-card h3 {
    font-family: var(--font-head);
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.tool-visual-card p {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 12px;
    line-height: 1.5;
}

.card-tag {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* HOW IT WORKS */
.how-it-works {
    padding: 60px 20px;
    background: linear-gradient(135deg, #DBEEFB 0%, #E0F2FE 100%);
}

[data-theme="dark"] .how-it-works {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

.steps-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    text-align: center;
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    margin: 0 auto 12px;
}

.step-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.step p {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.step small {
    font-size: 12px;
    color: var(--text-sub);
}

.step-arrow {
    font-size: 32px;
    color: var(--accent);
    font-weight: 700;
}

/* LOGIN SECTION */
.login-section {
    padding: 80px 20px;
    display: flex;
    justify-content: center;
}

.login-box {
    background: #FFFFFF;
    border: 2px solid #DBEAFE;
    border-radius: 24px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(204, 85, 0, 0.1);
}

[data-theme="dark"] .login-box {
    background: #1E293B;
    border-color: #334155;
}

.login-box h3 {
    font-family: var(--font-head);
    font-size: 24px;
    text-align: center;
    margin-bottom: 24px;
    color: var(--text-main);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.btn-large {
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
}

.login-alternative {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #DBEAFE;
}

[data-theme="dark"] .login-alternative {
    border-top-color: #334155;
}

.login-alternative p {
    color: var(--text-sub);
    margin-bottom: 12px;
    font-size: 14px;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 12px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* FOOTER */
.landing-footer {
    background: #1E293B;
    color: #E0F2FE;
    padding: 40px 20px;
    text-align: center;
}

.footer-content p {
    margin: 8px 0;
}

.footer-tagline {
    font-size: 14px;
    opacity: 0.8;
}

.footer-science {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }
    
    .brain-heart-animation {
        width: 120px;
        height: 120px;
    }
    
    .brain-icon, .heart-icon, .healing-icon {
        font-size: 60px;
    }
    
    .steps-visual {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .tools-grid-visual {
        grid-template-columns: 1fr;
    }
}
/* ========================================
   DASHBOARD PERSONALIZATION (AL-BALKHI)
   ======================================== */

/* Category Banner */
.category-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #DBEEFB 0%, #E0F2FE 100%);
    border: 1px solid #DBEAFE;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 32px;
}

[data-theme="dark"] .category-banner {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    border-color: #475569;
}

.category-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.category-info h3 {
    font-family: var(--font-head);
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text-main);
}

.category-info h3 span {
    color: var(--accent);
}

.category-info p {
    font-size: 13px;
    color: var(--text-sub);
    margin: 0;
}

/* Personal Modules */
.personal-modules {
    margin-bottom: 40px;
}

.module-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.module-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 20px;
    background: #FFFFFF;
    border: 2px solid #DBEAFE;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.25s ease;
    cursor: pointer;
    min-height: 110px;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.25s;
}

.module-card:hover::before {
    opacity: 1;
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(204, 85, 0, 0.12);
}

.module-card:active {
    transform: scale(0.98);
}

[data-theme="dark"] .module-card {
    background: #1E293B;
    border-color: #334155;
}

.module-card.module-primary {
    border-color: var(--accent);
    background: linear-gradient(135deg, #E0F2FE 0%, #FFFFFF 100%);
}

[data-theme="dark"] .module-card.module-primary {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

.module-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E0F2FE;
    border-radius: 16px;
}

[data-theme="dark"] .module-icon {
    background: #334155;
}

.module-content {
    flex: 1;
    text-align: left;
}

.module-tag {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.module-title {
    font-family: var(--font-head);
    font-size: 17px;
    margin-bottom: 4px;
    color: var(--text-main);
    font-weight: 700;
}

.module-desc {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.4;
}

.module-arrow {
    font-size: 20px;
    color: var(--accent);
    flex-shrink: 0;
    transition: transform 0.25s;
}

.module-card:hover .module-arrow {
    transform: translateX(4px);
}

/* Balkhi Quote */
.balkhi-quote {
    background: #E0F2FE;
    border-left: 4px solid var(--accent);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 20px;
}

[data-theme="dark"] .balkhi-quote {
    background: #334155;
}

.quote-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.balkhi-quote p {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
    font-style: italic;
    margin: 0;
}

/* First Aid Section */
.first-aid-section {
    margin-bottom: 40px;
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-sub);
    margin-top: -12px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.first-aid-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 20px;
    background: linear-gradient(135deg, #DBEEFB 0%, #E0F2FE 100%);
    border: 2px dashed var(--accent);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.25s ease;
    cursor: pointer;
}

.first-aid-card:hover {
    background: linear-gradient(135deg, #FFD4B8 0%, #DBEEFB 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(204, 85, 0, 0.12);
}

[data-theme="dark"] .first-aid-card {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

.first-aid-icon {
    font-size: 36px;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 16px;
}

[data-theme="dark"] .first-aid-icon {
    background: #334155;
}

.first-aid-content {
    flex: 1;
    text-align: left;
}

.first-aid-content h4 {
    font-family: var(--font-head);
    font-size: 17px;
    margin-bottom: 4px;
    color: var(--text-main);
    font-weight: 700;
}

.first-aid-content p {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.4;
    margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .category-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .module-card, .first-aid-card {
        padding: 18px 16px;
    }
}
/* ========================================
   MODULE FORMS & HISTORY STYLES
   ======================================== */
.module-form { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.form-group { background: #FFFFFF; border: 1px solid #DBEAFE; border-radius: 16px; padding: 20px; }
[data-theme="dark"] .form-group { background: #1E293B; border-color: #334155; }
.form-group label { display: block; font-family: var(--font-head); font-size: 16px; margin-bottom: 8px; color: var(--text-main); }
.form-group .hint { font-size: 13px; color: var(--text-sub); margin-bottom: 12px; line-height: 1.5; }
.form-group textarea, .form-group input[type="text"] { width: 100%; padding: 14px; border: 1px solid #DBEAFE; border-radius: 10px; font-family: var(--font-body); font-size: 15px; background: #E0F2FE; color: var(--text-main); resize: vertical; outline: none; transition: border 0.3s; }
[data-theme="dark"] .form-group textarea, [data-theme="dark"] .form-group input[type="text"] { background: #334155; border-color: #475569; }
.form-group textarea:focus, .form-group input[type="text"]:focus { border-color: var(--accent); }

/* Slider Styles */
.slider-group { margin-bottom: 16px; }
.slider-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; color: var(--text-main); font-weight: 500; }
.slider-value { color: var(--accent); font-weight: 700; }
input[type="range"] { width: 100%; height: 6px; background: #DBEAFE; border-radius: 5px; outline: none; -webkit-appearance: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: var(--accent); border-radius: 50%; cursor: pointer; }
[data-theme="dark"] input[type="range"] { background: #475569; }

/* History Box */
.history-box { background: #E0F2FE; border-left: 4px solid var(--accent); padding: 16px; border-radius: 12px; margin-bottom: 24px; }
[data-theme="dark"] .history-box { background: #334155; }
.history-box h4 { font-family: var(--font-head); font-size: 14px; margin-bottom: 8px; color: var(--text-main); }
.history-box p { font-size: 13px; color: var(--text-sub); line-height: 1.6; margin: 4px 0; white-space: pre-wrap; }
.history-box .meta { font-size: 11px; color: var(--text-sub); opacity: 0.7; margin-top: 8px; }

/* Radio/Checkbox Groups */
.radio-group { display: flex; gap: 12px; margin-top: 12px; }
.radio-option { flex: 1; }
.radio-option input { display: none; }
.radio-option label { display: block; padding: 12px; text-align: center; border: 2px solid #DBEAFE; border-radius: 10px; cursor: pointer; transition: all 0.2s; font-size: 14px; color: var(--text-main); }
.radio-option input:checked + label { background: var(--accent); color: white; border-color: var(--accent); }
[data-theme="dark"] .radio-option label { border-color: #475569; }

/* Alert */
.alert-msg { padding: 14px; border-radius: 10px; margin-bottom: 20px; text-align: center; font-size: 14px; font-weight: 500; }
.alert-success { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.alert-error { background: #FFEBEE; color: #C62828; border: 1px solid #EF9A9A; }
/* ========================================
   PROGRESS & HISTORY STYLES
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.stat-card {
    background: #FFFFFF;
    border: 1px solid #DBEAFE;
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
}

[data-theme="dark"] .stat-card {
    background: #1E293B;
    border-color: #334155;
}

.stat-number {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.3;
}

.progress-section {
    margin-bottom: 40px;
}

.section-title {
    font-family: var(--font-head);
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Category Bars */
.category-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #FFFFFF;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #DBEAFE;
}

[data-theme="dark"] .category-bars {
    background: #1E293B;
    border-color: #334155;
}

.cat-bar-item {
    margin-bottom: 14px;
}

.cat-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 500;
}

.cat-bar-bg {
    height: 8px;
    background: #DBEAFE;
    border-radius: 100px;
    overflow: hidden;
}

[data-theme="dark"] .cat-bar-bg {
    background: #475569;
}

.cat-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 100px;
    transition: width 1s ease;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 0;
    width: 2px;
    background: #DBEAFE;
}

[data-theme="dark"] .timeline::before {
    background: #475569;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-dot {
    position: absolute;
    left: -22px;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid #E0F2FE;
    box-shadow: 0 0 0 2px var(--accent);
}

[data-theme="dark"] .timeline-dot {
    border-color: #1E293B;
}

.timeline-content {
    background: #FFFFFF;
    border: 1px solid #DBEAFE;
    border-radius: 12px;
    padding: 16px;
}

[data-theme="dark"] .timeline-content {
    background: #1E293B;
    border-color: #334155;
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-type {
    background: #E0F2FE;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .timeline-type {
    background: #334155;
}

.timeline-date {
    font-size: 11px;
    color: var(--text-sub);
    opacity: 0.8;
}

.timeline-text {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #FFFFFF;
    border: 1px dashed #DBEAFE;
    border-radius: 16px;
}

[data-theme="dark"] .empty-state {
    background: #1E293B;
    border-color: #475569;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
    }
    
    .stat-number {
        margin-bottom: 0;
    }
}
<style>
    /* BASE STYLES */
    .onboarding-page {
        background: linear-gradient(180deg, #E0F2FE 0%, #DBEEFB 100%);
        min-height: 100vh;
        padding: 40px 20px;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }

    [data-theme="dark"] .onboarding-page {
        background: linear-gradient(180deg, #141414 0%, #1E293B 100%);
    }

    .onboarding-container {
        max-width: 700px;
        width: 100%;
        background: #FFFFFF;
        border-radius: 24px;
        padding: 48px 40px;
        box-shadow: 0 8px 32px rgba(204, 85, 0, 0.1);
        margin-top: 20px;
    }

    [data-theme="dark"] .onboarding-container {
        background: #1E293B;
    }

    /* PROGRESS BAR */
    .progress-bar {
        height: 6px;
        background: #DBEAFE;
        border-radius: 100px;
        margin-bottom: 40px;
        overflow: hidden;
    }

    [data-theme="dark"] .progress-bar {
        background: #334155;
    }

    .progress-fill {
        height: 100%;
        background: var(--accent);
        transition: width 0.5s ease;
    }

    /* STEP CONTENT */
    .step-content {
        text-align: center;
    }

    .step-icon {
        font-size: 64px;
        margin-bottom: 24px;
        animation: float 3s ease-in-out infinite;
    }

    @keyframes float {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-10px); }
    }

    .step-title {
        font-family: var(--font-head);
        font-size: 32px;
        margin-bottom: 16px;
        color: var(--text-main);
        line-height: 1.3;
    }

    .step-description {
        font-size: 16px;
        color: var(--text-sub);
        line-height: 1.8;
        margin-bottom: 24px;
    }

    .step-note {
        font-size: 14px;
        color: var(--text-sub);
        opacity: 0.8;
        margin-bottom: 40px;
    }

    /* NICKNAME SECTION */
    .nickname-section {
        background: linear-gradient(135deg, #DBEEFB 0%, #E0F2FE 100%);
        border: 2px solid var(--accent);
        border-radius: 20px;
        padding: 28px;
        margin-bottom: 32px;
        text-align: left;
    }

    [data-theme="dark"] .nickname-section {
        background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
        border-color: var(--accent);
    }

    .nickname-title {
        font-family: var(--font-head);
        font-size: 22px;
        margin: 0 0 8px;
        color: var(--text-main);
        text-align: center;
    }

    .nickname-desc {
        font-size: 14px;
        color: var(--text-sub);
        margin: 0 0 20px;
        line-height: 1.5;
        text-align: center;
    }

    .nickname-input-wrapper {
        position: relative;
        margin-bottom: 12px;
    }

    .nickname-input-wrapper input {
        width: 100%;
        padding: 18px;
        padding-right: 80px;
        border: 2px solid #DBEAFE;
        border-radius: 12px;
        font-family: var(--font-head);
        font-size: 22px;
        background: #FFFFFF;
        color: var(--accent);
        outline: none;
        transition: border 0.3s;
        text-align: center;
        font-style: italic;
        box-sizing: border-box;
    }

    [data-theme="dark"] .nickname-input-wrapper input {
        background: #1E293B;
        border-color: #475569;
        color: var(--accent);
    }

    .nickname-input-wrapper input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(204, 85, 0, 0.1);
    }

    .nickname-counter {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 13px;
        color: var(--text-sub);
        font-weight: 500;
    }

    .nickname-rules {
        font-size: 12px;
        color: var(--text-sub);
        opacity: 0.8;
        margin: 0;
        text-align: center;
    }

    /* SECTION SUBTITLE */
    .section-subtitle {
        font-family: var(--font-head);
        font-size: 20px;
        margin: 32px 0 12px;
        color: var(--text-main);
        text-align: center;
    }

    /* CATEGORY FORM */
    .category-form {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-top: 24px;
    }

    /* CATEGORY CARDS */
    .category-card {
        display: block;
        cursor: pointer;
        border: 2px solid #DBEAFE;
        border-radius: 16px;
        padding: 20px;
        transition: all 0.25s ease;
        text-align: left;
        background: #FFFFFF;
        position: relative;
    }

    [data-theme="dark"] .category-card {
        border-color: #334155;
        background: #1E293B;
    }

    .category-card:hover {
        border-color: var(--accent);
        background: #E0F2FE;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(204, 85, 0, 0.08);
    }

    [data-theme="dark"] .category-card:hover {
        background: #334155;
    }

    .category-card.selected {
        border-color: var(--accent);
        border-width: 3px;
        background: #E0F2FE;
        box-shadow: 0 6px 20px rgba(204, 85, 0, 0.15);
    }

    [data-theme="dark"] .category-card.selected {
        background: #0F172A;
        border-color: var(--accent);
    }

    .category-card input[type="radio"] {
        display: none;
    }

    .card-content {
        display: flex;
        gap: 16px;
        align-items: flex-start;
    }

    .card-icon {
        font-size: 36px;
        flex-shrink: 0;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #E0F2FE;
        border-radius: 12px;
    }

    [data-theme="dark"] .card-icon {
        background: #334155;
    }

    .category-card.selected .card-icon {
        background: var(--accent);
        transform: scale(1.1);
    }

    .card-text {
        flex: 1;
    }

    .card-text h3 {
        font-family: var(--font-head);
        font-size: 18px;
        margin: 0 0 8px;
        color: var(--text-main);
        font-weight: 700;
    }

    .card-text p {
        font-size: 14px;
        color: var(--text-sub);
        line-height: 1.6;
        margin: 0;
    }

    /* CHECK INDICATOR */
    .check-indicator {
        width: 28px;
        height: 28px;
        border: 2px solid #DBEAFE;
        border-radius: 50%;
        flex-shrink: 0;
        transition: all 0.25s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    [data-theme="dark"] .check-indicator {
        border-color: #475569;
    }

    .category-card.selected .check-indicator {
        background: var(--accent);
        border-color: var(--accent);
    }

    .category-card.selected .check-indicator::after {
        content: '✓';
        color: white;
        font-size: 16px;
        font-weight: bold;
    }

    /* SPIRITUAL TOGGLE */
    .spiritual-toggle {
        display: flex;
        align-items: center;
        gap: 16px;
        margin: 32px 0;
        padding: 20px;
        background: #E0F2FE;
        border-radius: 12px;
        border: 1px solid #DBEAFE;
    }

    [data-theme="dark"] .spiritual-toggle {
        background: #334155;
        border-color: #475569;
    }

    .toggle-label {
        position: relative;
        cursor: pointer;
        flex-shrink: 0;
    }

    .toggle-label input {
        display: none;
    }

    .toggle-slider {
        width: 52px;
        height: 28px;
        background: #DBEAFE;
        border-radius: 100px;
        display: block;
        position: relative;
        transition: all 0.3s;
    }

    .toggle-slider:before {
        content: '';
        position: absolute;
        width: 22px;
        height: 22px;
        background: white;
        border-radius: 50%;
        top: 3px;
        left: 3px;
        transition: all 0.3s;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .toggle-label input:checked + .toggle-slider {
        background: var(--accent);
    }

    .toggle-label input:checked + .toggle-slider:before {
        transform: translateX(24px);
    }

    .toggle-text {
        text-align: left;
        flex: 1;
    }

    .toggle-text strong {
        display: block;
        color: var(--text-main);
        margin-bottom: 4px;
        font-size: 14px;
    }

    .toggle-text small {
        font-size: 12px;
        color: var(--text-sub);
        line-height: 1.4;
    }

    /* SUBMIT BUTTON */
    .btn-large {
        margin-top: 32px;
        width: 100%;
        transition: all 0.3s ease;
        padding: 18px;
        font-size: 16px;
        font-weight: 600;
    }

    .btn-large:disabled {
        background: #DBEAFE;
        cursor: not-allowed;
        opacity: 0.6;
    }

    .btn-large:disabled:hover {
        transform: none;
    }

    /* ERROR BOX */
    .error-box {
        background: #FFEBEE;
        border: 1px solid #EF9A9A;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 24px;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    [data-theme="dark"] .error-box {
        background: #3A1818;
        border-color: #C62828;
    }

    .error-icon {
        font-size: 24px;
    }

    .error-text {
        color: #C62828;
        margin: 0;
        font-size: 14px;
        text-align: left;
    }

    [data-theme="dark"] .error-text {
        color: #EF9A9A;
    }

    /* RESPONSIVE */
    @media (max-width: 600px) {
        .onboarding-container {
            padding: 32px 24px;
        }

        .step-title {
            font-size: 26px;
        }

        .card-content {
            gap: 12px;
        }

        .card-icon {
            width: 44px;
            height: 44px;
            font-size: 28px;
        }

        .card-text h3 {
            font-size: 16px;
        }

        .card-text p {
            font-size: 13px;
        }

        .spiritual-toggle {
            flex-direction: column;
            text-align: center;
            gap: 12px;
        }

        .toggle-text {
            text-align: center;
        }

        .nickname-input-wrapper input {
            font-size: 18px;
            padding: 16px;
            padding-right: 70px;
        }

        .nickname-section {
            padding: 24px 20px;
        }
    }
    /* ========================================
   DASHBOARD PROFESSIONAL REDESIGN
   ======================================== */

.dashboard-section {
    margin-bottom: 28px;
}

.dashboard-section .section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-sub);
    margin-bottom: 12px;
    font-weight: 600;
}

/* Intent Banner (Tag Tujuan) */
.intent-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, var(--accent-peach) 0%, var(--card-bg) 100%);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 32px;
}

.intent-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.intent-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-sub);
    margin-bottom: 2px;
    font-weight: 600;
}

.intent-title {
    font-family: var(--font-head);
    font-size: 16px;
    color: var(--text-main);
    margin: 0;
}

/* Emergency Card Special Styling */
.emergency-card {
    border: 1px dashed var(--accent);
    background: linear-gradient(135deg, rgba(133, 163, 143, 0.05) 0%, var(--card-bg) 100%);
}

.emergency-card:hover {
    border-style: solid;
}
/* ========================================
   DARK MODE FIXES - Dashboard Specific
   ======================================== */

[data-theme="dark"] .goal-anchor-card {
    background: linear-gradient(135deg, #0F172A 0%, var(--card-bg) 100%);
    border-color: var(--accent);
}

[data-theme="dark"] .goal-text {
    color: var(--text-main);
    font-style: italic;
}

[data-theme="dark"] .goal-subtext {
    color: var(--text-sub);
}

[data-theme="dark"] .goal-label {
    color: var(--accent);
}

[data-theme="dark"] .expiry-banner {
    background: var(--card-bg);
    border-color: var(--border-color, #475569);
    color: var(--text-main);
}

[data-theme="dark"] .expiry-banner span {
    color: var(--text-sub);
}

[data-theme="dark"] .expiry-banner strong {
    color: var(--text-main);
}

[data-theme="dark"] .checkin-post-card {
    color: white;
}

[data-theme="dark"] .checkin-post-card strong,
[data-theme="dark"] .checkin-post-card span {
    color: white;
}

[data-theme="dark"] .rec-card {
    background: var(--card-bg);
    border-color: var(--border-color, #475569);
    color: var(--text-main);
}

[data-theme="dark"] .rec-info strong {
    color: var(--text-main);
}

[data-theme="dark"] .rec-info span {
    color: var(--text-sub);
}

[data-theme="dark"] .feature-grid-item {
    background: var(--card-bg);
    border-color: var(--border-color, #475569);
    color: var(--text-main);
}

[data-theme="dark"] .feature-grid-name {
    color: var(--text-main);
}

[data-theme="dark"] .ai-widget {
    background: var(--card-bg);
    border-color: var(--border-color, #475569);
}

[data-theme="dark"] .ai-text {
    color: var(--text-main);
}

[data-theme="dark"] .ai-avatar {
    background: #0F172A;
}

[data-theme="dark"] .btn-ai.secondary {
    background: var(--bg-color);
    color: var(--text-main);
    border-color: var(--border-color, #475569);
}

[data-theme="dark"] .section-title {
    color: var(--text-main);
}

[data-theme="dark"] .app-logo {
    color: var(--text-main);
}

[data-theme="dark"] .user-profile-badge {
    background: var(--card-bg);
    border-color: var(--border-color, #475569);
    color: var(--text-main);
}

[data-theme="dark"] .avatar-circle {
    background: #0F172A;
    color: var(--accent);
}

[data-theme="dark"] .onboarding-banner {
    background: #0F172A;
    border-color: var(--accent);
    color: var(--text-main);
}

[data-theme="dark"] .bottom-nav {
    background: var(--card-bg);
    border-top-color: var(--border-color, #475569);
}

[data-theme="dark"] .nav-item {
    color: var(--text-sub);
}

[data-theme="dark"] .nav-item.active {
    color: var(--accent);
}

[data-theme="dark"] .nav-icon {
    filter: brightness(1.2);
}
</style>
/* ========================================
   ACTIVITY TABLE & STREAK — Sunlit Recovery Journal palette
   ======================================== */

.streak-banner {
    background: #DBEEFB;
    border: 1px solid #38BDF8;
    color: #0369A1;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 13.5px;
    text-align: center;
    margin-bottom: 24px;
}

.streak-banner-gentle {
    background: #E7F5EC;
    border: 1px solid #86D9A5;
    color: #1F7A45;
}

.activity-table-section {
    background: #FFFFFF;
    border: 1px solid #DBEAFE;
    border-radius: 18px;
    padding: 20px 16px;
    margin-bottom: 24px;
    box-shadow: 0 8px 26px rgba(43, 38, 32, 0.06);
}

.section-heading {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    color: #0369A1;
    margin-bottom: 4px;
}

.section-sub {
    font-size: 12px;
    color: #64748B;
    margin-bottom: 14px;
}

.activity-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}

.activity-table {
    border-collapse: separate;
    border-spacing: 4px;
    min-width: 640px;
}

.activity-row-label {
    font-size: 12px;
    font-weight: 600;
    color: #1E293B;
    text-align: left;
    white-space: nowrap;
    padding: 4px 10px 4px 4px;
}

.row-label-link {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}
.row-label-link:hover { color: #245C4B; text-decoration: underline; }

.sticky-col {
    position: sticky;
    left: 0;
    background: #FFFFFF;
    z-index: 2;
}

.row-icon { display: inline-block; width: 16px; }

.activity-day-head {
    font-size: 10px;
    color: #64748B;
    text-align: center;
    padding: 2px 0;
    min-width: 26px;
}
.activity-day-head .day-dow { display: block; font-weight: 600; }
.activity-day-head .day-num { display: block; font-weight: 700; color: #1E293B; }
.activity-day-head.is-today { color: #245C4B; }
.activity-day-head.is-today .day-num { color: #245C4B; }

.activity-cell-wrap { padding: 0; }

.activity-cell {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.activity-cell:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 8px rgba(43,38,32,0.18);
}
.activity-cell.is-empty { background: #F3ECDD; }
.activity-cell.is-done { background: #245C4B; color: #38BDF8; font-weight: 700; }

.activity-legend {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #64748B;
    margin-top: 12px;
}
.legend-dot {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 4px;
    margin-right: 5px;
    vertical-align: middle;
}
.legend-dot.is-done { background: #245C4B; }
.legend-dot.is-empty { background: #F3ECDD; border: 1px solid #DBEAFE; }

/* ========================================
   MODULE COMPANION — "Ruang Aman" UI
   Dipakai di semua halaman module-*.php:
   empathy helper box, quick-fill chip,
   mode ruang bebas, tombol AI starter,
   dan jalur aman ke Ruang Tenang.
   ======================================== */

.empathy-helper-box {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #DBEAFE);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 13.5px;
    color: var(--text-sub);
    line-height: 1.5;
}
.helper-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.chip-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color, #DBEAFE);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.chip-btn:hover {
    border-color: var(--accent);
    background: var(--accent-light, #DBEEFB);
}

.ai-starter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 20px;
    flex-wrap: wrap;
}
.btn-starter {
    background: transparent;
    border: 1px dashed var(--accent);
    color: var(--accent);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-starter:hover { background: var(--accent-light, #DBEEFB); }
.btn-starter:disabled { opacity: 0.6; cursor: wait; }
.ai-starter-result {
    display: none;
    background: var(--accent-light, #FFF3E9);
    border-left: 3px solid var(--accent);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-style: italic;
    color: var(--text-main);
    margin: -6px 0 20px;
}

.freewrite-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #DBEAFE);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--text-sub);
}
.freewrite-switch label.switch-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-main);
    font-weight: 500;
}
.freewrite-switch input[type="checkbox"] {
    width: 38px;
    height: 22px;
    appearance: none;
    background: var(--border-color, #DBEAFE);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.freewrite-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 2px; left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.freewrite-switch input[type="checkbox"]:checked {
    background: var(--accent);
}
.freewrite-switch input[type="checkbox"]:checked::before {
    transform: translateX(16px);
}

.freewrite-box { display: none; }
.freewrite-box textarea { min-height: 160px; }
.structured-fields.is-hidden { display: none; }

.safe-link-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-sub);
    background: transparent;
    border: 1px dashed var(--border-color, #DBEAFE);
    border-radius: 12px;
    padding: 10px 14px;
    margin-top: 20px;
}
.safe-link-bar a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.safe-link-bar a:hover { text-decoration: underline; }

/* ========================================
   MODULE IDENTITY THEMING
   Tiap modul punya warna & ikon sendiri
   biar nggak terasa template yang sama.
   Semua tetap dalam palet dasar cream/warm
   biar identitas brand tetap satu.
   ======================================== */

body[data-module="circuit"]     { --accent: #0284C7; --accent-tint: #FBF0DD; --accent-light: #F6E2BE; }
body[data-module="cooling"]     { --accent: #2A7F8C; --accent-tint: #E4F3F4; --accent-light: #C9E7EA; }
body[data-module="journaling"]  { --accent: #A8577A; --accent-tint: #F7E9EF; --accent-light: #EFCEDD; }
body[data-module="mood"]        { --accent: #0EA5E9; --accent-tint: #FFF1E0; --accent-light: #FFE0BF; }
body[data-module="reality"]     { --accent: #55707F; --accent-tint: #E9EFF1; --accent-light: #CBDBE0; }
body[data-module="reciprocal"]  { --accent: #5B7B9A; --accent-tint: #EAF0F5; --accent-light: #CCDDEA; }
body[data-module="reframe"]     { --accent: #4F7942; --accent-tint: #EAF2E6; --accent-light: #CCE3C2; }
body[data-module="spiritual"]   { --accent: #6B4E8E; --accent-tint: #F0EBF6; --accent-light: #DCCBEC; }
body[data-module="triggers"]    { --accent: #B5495B; --accent-tint: #F8E9EC; --accent-light: #EFC7CE; }

[data-theme="dark"] body[data-module] { --accent-tint: #1E293B; }

.module-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: var(--accent-tint);
    border: 2px solid var(--accent);
    animation: badgeIn 0.5s ease;
}

body[data-module="circuit"]    .module-icon-badge::before { content: "\1F6D1"; }
body[data-module="cooling"]    .module-icon-badge::before { content: "\1F4A7"; }
body[data-module="journaling"] .module-icon-badge::before { content: "\270D\FE0F"; }
body[data-module="mood"]       .module-icon-badge::before { content: "\1F305"; }
body[data-module="reality"]    .module-icon-badge::before { content: "\1F50D"; }
body[data-module="reciprocal"] .module-icon-badge::before { content: "\2696\FE0F"; }
body[data-module="reframe"]    .module-icon-badge::before { content: "\1F331"; }
body[data-module="spiritual"]  .module-icon-badge::before { content: "\1F54A\FE0F"; }
body[data-module="triggers"]   .module-icon-badge::before { content: "\26A1"; }

@keyframes badgeIn {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}

/* ========================================
   DECLUTTER: science-note jadi collapsible
   biar halaman nggak numpuk kotak putih
   ======================================== */

details.science-note {
    background: var(--accent-tint, #FFFFFF);
    border: 1px solid #DBEAFE;
    border-radius: 16px;
    padding: 16px 20px;
    margin-top: 32px;
}
[data-theme="dark"] details.science-note { background: #1E293B; border-color: #334155; }
details.science-note summary {
    font-family: var(--font-head);
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
}
details.science-note summary::-webkit-details-marker { display: none; }
details.science-note summary::after {
    content: "+";
    font-size: 20px;
    color: var(--accent);
    transition: transform 0.25s ease;
}
details.science-note[open] summary::after { transform: rotate(45deg); }
details.science-note p { font-size: 14px; color: var(--text-sub); line-height: 1.7; margin-top: 14px; }

/* history-box dibikin lebih ringan biar nggak berebut perhatian sama form */
.history-box { background: transparent; border: 1px dashed #DBEAFE; box-shadow: none; opacity: 0.85; }
[data-theme="dark"] .history-box { border-color: #475569; }

/* ========================================
   COMPLETION FLOW
   Muncul setelah modul selesai diisi:
   animasi + pilihan Progress / AI / Dashboard
   ======================================== */

.completion-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 24, 18, 0.55);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    opacity: 0;
    animation: overlayIn 0.35s ease forwards;
}

@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.completion-card {
    background: var(--bg-color, #E0F2FE);
    border-radius: 24px;
    max-width: 380px;
    width: 100%;
    padding: 36px 28px 28px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.85) translateY(10px);
    opacity: 0;
    animation: cardIn 0.45s 0.1s cubic-bezier(.2,.9,.3,1.2) forwards;
}
[data-theme="dark"] .completion-card { background: #1A1A1A; }

@keyframes cardIn {
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.completion-check {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
}
.completion-check circle {
    stroke: var(--accent);
    stroke-width: 3;
    fill: var(--accent-tint);
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: circleDraw 0.5s ease forwards;
}
.completion-check path {
    stroke: var(--accent);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: checkDraw 0.35s 0.5s ease forwards;
}
@keyframes circleDraw { to { stroke-dashoffset: 0; } }
@keyframes checkDraw { to { stroke-dashoffset: 0; } }

.completion-title {
    font-family: var(--font-head);
    font-size: 22px;
    color: var(--text-main);
    margin-bottom: 8px;
}
.completion-sub {
    font-size: 13.5px;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 26px;
}

.completion-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.completion-btn {
    display: block;
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.completion-btn:active { transform: scale(0.97); }
.completion-btn.is-primary { background: var(--accent); color: #fff; }
.completion-btn.is-secondary { background: var(--accent-tint); color: var(--text-main); border: 1px solid var(--accent-light); }
.completion-btn.is-ghost { background: transparent; color: var(--text-sub); padding: 10px; font-weight: 500; }

@media (max-width: 380px) {
    .completion-card { padding: 28px 20px 22px; }
}