:root {
    --bg-color: #F3F2EA;
    --card-bg: #FFFFFF;
    --primary-color: #153328;
    --primary-dark: #0A1F18;
    --accent-color: #A8B898;
    --accent-light: #E8E6D9;
    --gold-color: #C5A572;
    --text-color: #153328;
    --text-muted: #8A9280;
    --error-color: #D32F2F;

    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    --shadow-soft: 0 10px 40px rgba(21, 51, 40, 0.05);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    min-height: 100vh;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
}

/* Auth View */
/* Auth View */
.view {
    display: none !important;
}

.view.active {
    display: block !important;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.view.active.auth-container {
    display: flex !important;
}

.auth-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    max-width: 450px;
    width: 100%;
    text-align: center;
}

.auth-card h1 {
    font-family: var(--font-serif);
    color: var(--primary-color);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #E0E0E0;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(21, 51, 40, 0.1);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

.auth-toggle {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-toggle a {
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.error-message {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 10px;
}

/* Dashboard Layout */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    padding-bottom: 40px;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-family: var(--font-serif);
    font-size: 48px;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 16px;
    font-style: italic;
    font-family: var(--font-serif);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.streak-badge {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.05);
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    margin-bottom: 40px;
}

/* Today's Reading Card */
.reading-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.visual-header {
    height: 240px;
    background: linear-gradient(135deg, #788574 0%, #4A5D52 100%);
    position: relative;
    padding: 30px;
}

.tag {
    background: rgba(21, 51, 40, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.reading-content {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.scripture-title {
    font-family: var(--font-serif);
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.quote-block {
    border-left: 3px solid var(--accent-light);
    padding-left: 20px;
    margin-bottom: 40px;
}

.quote-block p {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.6;
}

.action-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--accent-light);
    padding-top: 30px;
    margin-top: auto;
}

.meta-info {
    display: flex;
    flex-direction: column;
}

.meta-info .label {
    font-size: 10px;
    letter-spacing: 1px;
    color: #999;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}

#readingReferenceDetail {
    font-weight: 600;
    color: var(--primary-color);
}

.btn-primary-large {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary-large:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-primary-large.completed {
    background: var(--gold-color);
}

/* Sidebar Widgets */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.widget-header .label {
    font-size: 10px;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.widget-header .icon {
    font-size: 18px;
    opacity: 0.5;
}

.widget h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* Tomorrow Card */
.tomorrow-preview {
    background: #F8F8F8;
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 16px;
}

.day-box {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.tomorrow-details h4 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.tomorrow-details .sub-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* Progress Widget */
.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
}

.progress-info .label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.progress-info .percent {
    font-weight: 800;
    font-size: 12px;
    color: var(--primary-color);
}

.progress-track {
    background: #E0E0E0;
    height: 6px;
    border-radius: 3px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
}

.btn-outline {
    width: 100%;
    background: transparent;
    border: 1px solid #E0E0E0;
    padding: 12px;
    border-radius: 30px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Annual Journey */
.journey-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 30px 40px;
    box-shadow: var(--shadow-soft);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h3 {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--primary-color);
}

.journey-legend {
    display: flex;
    gap: 15px;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.legend-item.completed {
    color: var(--primary-color);
}

.legend-item.upcoming {
    color: #E0E0E0;
}

.journey-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    /* Tight gap for dot grid */
    margin-bottom: 30px;
}

/* Style for dot grid items */
.journey-dot {
    width: 8px;
    /* Small dots */
    height: 8px;
    background-color: #F0F0F0;
    border-radius: 50%;
}

.journey-dot.completed {
    background-color: var(--primary-color);
}

.journey-footer {
    display: flex;
    align-items: center;
    border-top: 1px solid #F0F0F0;
    padding-top: 20px;
}

.stat-group {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.stat-value {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.settings-link {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

/* Settings Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-soft);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
}

.btn-close {
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.setting-group {
    margin-bottom: 24px;
}

.btn-setting {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-danger {
    background: var(--error-color);
}

.setting-description {
    font-size: 12px;
    color: #777;
    margin-top: 8px;
    line-height: 1.4;
}

/* Nav Arrows */
.nav-arrow {
    background: transparent;
    border: 1px solid #E0E0E0;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    transition: all 0.2s;
    font-size: 16px;
    padding-bottom: 2px;
    /* optical center */
}

.nav-arrow:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Navbar */
.navbar {
    background: #FFFEF9;
    /* Slightly lighter/cleaner than bg */
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    /* Floating Rounded Header */
    margin: 16px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.app-footer {
    text-align: center;
    padding: 30px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-text {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 11px;
    text-decoration: underline;
    opacity: 0.6;
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-icon {
    font-size: 24px;
}

.nav-center {
    display: flex;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}