/* General Reset and Layout */
:root {
    --primary: #3498db;
    --primary-hover: #2980b9;
    --success: #27ae60;
    --success-hover: #219150;
    --danger: #ef4444;
    --bg-main: #f4f7f6;
    --text-main: #2d3748;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

html {
    overflow-y: scroll;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    margin: 0;
    background-color: var(--bg-main);
    color: var(--text-main);
}

/* Utility Classes */
.hidden { display: none; }
.flex-center-space { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 15px; }
.flex-end-gap { display: flex; justify-content: flex-end; gap: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; }
.icon-inline { vertical-align: middle; margin-right: 4px; }
.image-preview-hidden { display: none; margin-bottom: 15px; text-align: center; }
.modal-title-style { font-weight: 600; color: #1e293b; margin-bottom: 10px; }
.modal-input-container-hidden { display: none; margin-top: 15px; }
.input-bg-light { background: #f1f5f9; }
.btn-padding { padding: 8px 20px; }
.editor-wrap-hidden { display: none; margin-bottom: 20px; }

/* Diary Two-Column Layout */
.diary-container {
    position: relative;
}

.diary-content {
    width: 100%;
}

/* Main Content Area */
.main-content {
    margin: 0 auto;
    padding: 20px 40px;
    width: 100%;
    min-height: 100vh;
    max-width: 800px;
    box-sizing: border-box;
}

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

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

.nav-logo {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
}

.logo-the {
    display: inline-block;
    font-weight: 700;
    transform: rotate(-90deg);
    font-size: 0.5em; /* Make "THE" slightly smaller */
    letter-spacing: 0.2em;
    margin-right: -0.7em; /* Adjust spacing to tuck "THE" closer to "JOURNAL" */
    margin-left: -0.2em;
    margin-top: -0.2em; 
}

/* Form Styling */
.entry-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-control, .entry-form input, .entry-form textarea, .auth-box input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f8fafc;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
    color: #2d3748;
}

.form-control:focus, .entry-form input:focus, .entry-form textarea:focus, .auth-box input:focus {
    outline: none;
    border-color: #3498db;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.btn-save {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-save:hover { background: #2980b9; }

/* Flash Messages */
.alert { padding: 15px; margin-bottom: 20px; border-radius: 6px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* Auth / Login Page Styling */
.auth-page {
    background: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.auth-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.auth-container h2 {
    color: #3498db;
    margin-bottom: 8px;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.auth-container p {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 0.85rem;
}

.btn-primary { 
    background: #3498db; 
    color: white; 
    border: none; 
    padding: 12px; 
    border-radius: 6px; 
    width: 100%; 
    cursor: pointer; 
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s;
}
.btn-primary:hover { background: #2980b9; }
.btn-primary:disabled { background: #bdc3c7; cursor: not-allowed; }

.error-text { 
    color: #e74c3c; 
    margin-top: 15px; 
    font-size: 0.9rem; 
    font-weight: 600;
    min-height: 1.2em;
}
.logout-link { color: #3498db; }

.auth-toggle {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #7f8c8d;
}
.auth-toggle a { color: #3498db; text-decoration: none; font-weight: bold; margin-left: 5px; }
.auth-toggle a:hover { text-decoration: underline; }

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary);
}

.auth-security-note {
    margin-top: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: left;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    max-width: 100%;
    width: 100%;
}

/* Daily Entry Styling */
.daily-entry {
    background: white;
    margin-bottom: 24px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    position: relative;
    border: 1px solid #f1f5f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.daily-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.date-header {
    display: inline-block;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 6px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

.entry-body p, .entry-text {
    line-height: 1.7;
    font-size: 0.9rem;
    white-space: pre-wrap; /* Preserves line breaks from your textarea */
    color: #334155;
    margin: 0;
}

.entry-text * {
    font-size: inherit !important;
    line-height: inherit !important;
}

.entry-image {
    margin-top: 24px;
}

.entry-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-unread-text {
    font-size: 10px;
    font-weight: 800;
    color: var(--danger);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #fff1f2;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #fecaca;
}

/* Month View Header Adjustments */
.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

 .editor-toggle-btn {
    background: white;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.editor-toggle-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
}

.editor-toggle-btn:hover {
    background: #f8fafc;
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.diary-delete-btn {
    position: absolute !important;
    top: 20px;
    right: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.daily-entry:hover .diary-delete-btn {
    opacity: 1;
}

.diary-edit-btn {
    position: absolute !important;
    top: 20px;
    right: 52px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.daily-entry:hover .diary-edit-btn {
    opacity: 1;
}

.notepad-editor {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: 0.9rem;
    background-color: #f8fafc;
    color: #2d3748;
    overflow-y: auto;
    outline: none;
}

.notepad-editor:focus {
    background-color: #fff;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

[contenteditable]:empty:before {
    content: attr(data-placeholder);
    color: #cbd5e0;
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    background: #ffffff;
    padding: 10px;
    border-radius: 8px 8px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    box-shadow: inset 0 -1px 0 #f1f5f9;
}

.editor-toolbar button {
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
}

.editor-toolbar button:hover {
    background: #edf2f7;
    color: #3498db;
}

.form-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

.upload-label-inline {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.upload-label-inline:hover {
    background: #f1f5f9;
    border-color: #cbd5e0;
    color: #334155;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-save, .btn-cancel {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-cancel {
    background-color: #94a3b8;
    color: white;
}

.btn-cancel:hover {
    background-color: #64748b;
}

/* Minimalist Bible Tracker Styles */
.bible-container { padding: 0; }
.bible-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.progress-bar-container { flex-grow: 1; height: 10px; background: #e2e8f0; border-radius: 5px; margin-right: 20px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: #3498db; width: 0%; transition: width 0.5s ease; }
#bible-progress-text { font-size: 0.9rem; color: #64748b; white-space: nowrap; }

/* Unified Tab Navigation Styles */
.tabs { border-bottom: 1px solid #e2e8f0; margin-bottom: 20px; display: flex; gap: 5px; width: 100%; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn { background: none; border: none; padding: 10px 15px; cursor: pointer; color: #94a3b8; font-weight: 600; font-size: 0.9rem; transition: all 0.2s; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; align-items: center; white-space: nowrap; }
.tab-btn.active { color: #3498db; border-bottom: 2px solid #3498db; }
.tab-btn:hover { color: #3498db; }

.bible-tabs-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid #e2e8f0; /* Move border-bottom here from .tabs */
    margin-bottom: 15px; /* Move margin-bottom here from .tabs */
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Adjust .tabs when inside the new wrapper to prevent double borders/margins */
.bible-tabs-wrapper .tabs {
    border-bottom: none; /* Remove border-bottom as it's now on the wrapper */
    margin-bottom: 0; /* Remove margin-bottom as it's now on the wrapper */
    width: auto; /* Allow tabs to take only necessary width */
}

.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; align-items: start; }
.psalms-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(35px, 1fr)); 
    gap: 8px; 
    justify-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.book { border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: white; }
.bible-book-header { padding: 10px; background: #f8fafc; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem;}
.bible-book-header.in-progress { border-left: 4px solid #27ae60; }
.bible-book-header.finished { border-left: 4px solid #f1c40f; }
.bible-book-header.collapsed + .chapters { display: none; }

.bible-book-header.planned-book span {
    color: #3498db;
    font-weight: 700;
}

.chapters { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; border-top: 1px solid #e2e8f0; }
.bible-chapter { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; border: 1px solid #edf2f7; border-radius: 4px; cursor: pointer; background: white; }
.bible-chapter:hover { background: #edf2f7; }
.bible-chapter.read { background: #3498db; color: white; border-color: #3498db; }

.bible-chapter.planned-today:not(.read) {
    border: 2px solid #ef4444;
    color: #ef4444;
    font-weight: bold;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.2);
}

.reading-log-container { background: white; border-radius: 12px; padding: 20px; border: 1px solid #e2e8f0; }
.log-column h4 { margin-top: 0; color: #475569; font-size: 0.9rem; border-bottom: 1px solid #f1f5f9; padding-bottom: 5px; }
.log-entry { font-size: 0.85rem; padding: 5px 0; display: flex; justify-content: space-between; color: #64748b; }
#l-ot, #l-ps, #l-nt {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}
/* Minimalist scrollbar for reading logs */
#l-ot::-webkit-scrollbar, #l-ps::-webkit-scrollbar, #l-nt::-webkit-scrollbar {
    width: 4px;
}
#l-ot::-webkit-scrollbar-thumb, #l-ps::-webkit-scrollbar-thumb, #l-nt::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}
.log-actions { border-top: 1px solid #f1f5f9; padding-top: 20px; display: flex; gap: 15px; }

.cheer-bubble { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #27ae60; color: white; padding: 10px 20px; border-radius: 20px; z-index: 2000; display: none; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* To-Do Specific Styles */
.todo-container {
    background: transparent;
    padding: 0;
}

#task-table {
    table-layout: auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#task-table th, #task-table td {
    padding: 4px 4px;
    vertical-align: middle;
}

#task-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Stable widths for metadata columns to keep the layout clean */
#task-table th:nth-child(1) { width: 70px; }  /* Type */
#task-table th:nth-child(3) { width: 85px; }  /* Due */
#task-table th:nth-child(4) { width: 85px; }  /* Added */
#task-table th:nth-child(5) { width: 80px; }  /* Actions */

#task-table th:nth-child(2) {
    min-width: 200px; /* Protect the task text from squishing too much on mobile */
}

#task-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

#task-table tbody tr:last-child {
    border-bottom: none;
}

#task-table tr:hover {
    background-color: #f0f4f8;
}

.task-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 4px;
}

.task-input:focus {
    outline: none;
    background: #f1f5f9;
    border-radius: 4px;
}

.subtask-dots {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.subtask-dot {
    width: 7px;
    height: 7px;
    min-width: 3px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.subtask-dot.completed {
    background: #94a3b8;
}

.subtask-wrapper {
    display: flex;
    align-items: center;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 9.6px;
    overflow: hidden;
    white-space: nowrap;
    border: 1px solid transparent;
}

.subtask-wrapper:hover, .subtask-wrapper.editing {
    max-width: 300px;
    border-color: transparent;
}

.subtask-label {
    font-size: 0.9rem;
    margin-left: 6px;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-decoration: none !important;
}

.subtask-wrapper:hover .subtask-label, .subtask-wrapper.editing .subtask-label {
    opacity: 1;
}

.subtask-label.completed {
    color: #94a3b8;
}

.reminder-days-input {
    width: 40px;
    /* border: none; - Handled by inline Tailwind border-none */
    /* background: #f8fafc; - Handled by inline Tailwind bg-transparent */
    font-size: 0.7rem;
    color: #3b82f6;
    text-align: center;
    border-radius: 4px;
    padding: 2px;
}

.restore-btn {
    color: #94a3b8;
    opacity: 0.7;
}

.restore-btn:hover {
    color: #44ef52; /* Assuming a green color for restore */
}

.icon-btn.delete-btn {
    position: static; /* Prevents inheriting absolute positioning from diary delete-btn */
}

.subtask-badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.icon-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.icon-btn:hover {
    color: #3498db;
    transform: scale(1.1);
}

.icon-btn.delete-btn:hover {
    color: #ef4444;
}

.icon-btn svg {
    width: 15px;
    height: 15px;
}

.diary-view-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.diary-view-header > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0;
}

.diary-view-header .tabs {
    margin: 0;
    border-bottom: none;
}


.add-task-footer {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    position: relative;
    padding-bottom: 20px;
}

.add-task-footer::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 0;
}

.add-task-btn {
    position: relative;
    z-index: 1;
    background: var(--primary);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(52, 152, 219, 0.3), 0 2px 4px -1px rgba(52, 152, 219, 0.2);
}

.add-task-btn:hover {
    transform: translateY(-2px);
    background: var(--primary-hover);
    box-shadow: 0 10px 15px -3px rgba(52, 152, 219, 0.4);
}

.add-task-btn svg {
    stroke-width: 3px;
}

/* New styles for inline editing and display */
.task-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.task-text-display {
    flex: 1;
    min-width: 80px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: #334155;
}

.task-text-display:hover {
    background-color: #f1f5f9;
}

.category-display, .due-date-display {
    background-color: #f1f5f9;
}

.inline-edit-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    padding: 4px;
    font-size: 0.95rem;
    color: #334155;
    border-radius: 4px;
}

.inline-edit-input:focus {
    outline: none;
    border-color: #3498db;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.reminder-days-input.inline-edit-input {
    width: 50px;
    text-align: center;
    font-size: 0.85rem;
    color: #5544ef;
    border: none !important;
}

/* Hide the default browser calendar icon on date inputs */
input[type="date"]::-webkit-calendar-picker-indicator {
    display: none !important;
}

/* Ensure date inputs have enough width for yyyy-mm-dd and signal they are clickable */
input[type="date"] {
    min-width: 80px;
    cursor: pointer;
}

/* Blinking animation for the reminder bell when a task is overdue for attention */
@keyframes bell-blink {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

.reminder-bell-icon {
    color: #f59e0b !important; /* Warning Amber/Orange */
    animation: bell-blink 1s ease-in-out infinite;
}

.overdue {
    color: #ef4444 !important; /* Using var(--danger) equivalent */
    font-weight: 700;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Favorites/Dashboard Styles */
.fav-category-section {
    margin-bottom: 40px;
}

.fav-category-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.fav-card {
    background: white;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    position: relative;
}

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

.fav-card .fav-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.fav-card:hover .fav-delete {
    opacity: 1;
}

/* Group Styles */
.group-member-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.member-progress-container {
    margin-top: 10px;
}

.member-progress-bg {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.member-progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 1s ease-out;
}

.admin-badge { background: #fee2e2; color: #ef4444; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: bold; }

/* Chat Styles */
.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 500px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 20px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.me { align-self: flex-end; background: #3b82f6; color: white; border-bottom-right-radius: 2px; }
.message.others { align-self: flex-start; background: #f1f5f9; color: #1e293b; border-bottom-left-radius: 2px; }
.chat-input-area { padding: 15px; border-top: 1px solid #e2e8f0; display: flex; gap: 10px; background: white; }

/* Dashboard Landing Styles */
.dashboard-hero {
    text-align: center;
    padding: 0 0 20px;
}

.dashboard-subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.dashboard-card {
    background: white;
    padding: 20px 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.dashboard-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dashboard-card-label {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
}

.active-view-indicator {
    color: var(--primary);
    opacity: 0.5;
    animation: indicatorFadeIn 0.5s ease-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-view-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.active-view-icon-wrapper svg {
    width: 18px;
    height: 18px;
}

@keyframes indicatorFadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 0.5; transform: translateX(0); }
}