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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utility */
.hidden {
    display: none !important;
}

.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Login Screen */
.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
}

.login-container h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.login-container p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.profile-buttons {
    display: flex;
    gap: 20px;
}

.profile-btn {
    padding: 20px 50px;
    font-size: 1.3rem;
    background: white;
    color: #2c3e50;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
}

.profile-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

/* Header */
header {
    background: #2c3e50;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul.menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

nav a:hover, nav a.active {
    background: #34495e;
}

/* User Info in Header */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info #current-user {
    font-weight: 600;
}

/* Main Content */
main {
    flex: 1;
    padding: 30px 0;
}

h2 {
    margin-bottom: 25px;
    color: #2c3e50;
}

h3 {
    margin-bottom: 15px;
    color: #34495e;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s;
}

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

.btn-small {
    padding: 5px 12px;
    font-size: 0.85rem;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Forms */
.add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.add-form input, .add-form select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.add-form input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.form-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.book-form .form-row input,
.book-form .form-row select {
    flex: 1;
}

/* Cards */
.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 900px) {
    .dashboard {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .dashboard h2,
    .dashboard .stats-grid {
        grid-column: 1 / -1;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3498db;
}

.stat-card p {
    color: #7f8c8d;
    margin-bottom: 15px;
}

/* Habits */
.habit-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.habit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.habit-item.completed {
    background: #e8f8f5;
}

.habit-checkbox {
    width: 30px;
    height: 30px;
    border: 2px solid #3498db;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    color: #27ae60;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.habit-item.completed .habit-checkbox {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

.habit-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.habit-name {
    font-weight: 500;
}

.habit-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.streak {
    color: #e67e22;
    font-weight: 500;
}

.no-streak {
    color: #bdc3c7;
}

/* Quick habits on dashboard */
.quick-habits {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.quick-habits .habit-item {
    box-shadow: none;
    border: 1px solid #eee;
}

/* Reading List */
.filter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-form select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.book-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #95a5a6;
}

.book-card.status-to_read {
    border-left-color: #3498db;
}

.book-card.status-reading {
    border-left-color: #e67e22;
}

.book-card.status-finished {
    border-left-color: #27ae60;
}

.book-header {
    margin-bottom: 10px;
}

.book-title {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.book-author {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.book-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.genre-tag, .status-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: #ecf0f1;
}

.status-tag.status-to_read {
    background: #e8f4fc;
    color: #2980b9;
}

.status-tag.status-reading {
    background: #fef5e7;
    color: #d35400;
}

.status-tag.status-finished {
    background: #e8f8f5;
    color: #1e8449;
}

.book-edit-form {
    margin-bottom: 15px;
}

.book-edit-form .form-row {
    margin-bottom: 10px;
    align-items: center;
}

.book-edit-form label {
    font-size: 0.85rem;
    color: #7f8c8d;
    min-width: 50px;
}

.book-edit-form select,
.book-edit-form input[type="date"] {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

.book-edit-form .dates {
    display: flex;
    gap: 15px;
}

.book-edit-form .dates > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.book-actions {
    text-align: right;
    margin-top: 10px;
}

/* Bible Reading Checklist */
.bible-checklist {
    margin-bottom: 20px;
}

.bible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
}

.bible-header h3 {
    margin: 0;
}

.bible-progress-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 0.9rem;
}

.expand-icon {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.bible-content {
    margin-top: 15px;
}

.bible-progress-bar {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.bible-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    transition: width 0.3s ease;
}

.bible-path-note {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 15px;
    font-style: italic;
}

.bible-phase {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.bible-phase.phase-complete {
    border-left-color: #27ae60;
    background: #f0fff4;
}

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

.phase-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #2c3e50;
}

.phase-progress {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 500;
}

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

.bible-book-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
}

.bible-book-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bible-book-item.completed {
    background: #e8f5e9;
    border-color: #a5d6a7;
}

.bible-book-item.completed .book-name {
    text-decoration: line-through;
    color: #666;
}

.bible-book-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #27ae60;
    cursor: pointer;
}

.bible-book-item .book-name {
    flex: 1;
    font-size: 0.9rem;
}

.testament-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.bible-book-item.ot .testament-badge {
    background: #fff3e0;
    color: #e65100;
}

.bible-book-item.nt .testament-badge {
    background: #e3f2fd;
    color: #1565c0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    background: white;
    border-radius: 8px;
}

.empty-state a {
    color: #3498db;
}

/* Loading & Error */
.loading {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
}

.error {
    text-align: center;
    color: #e74c3c;
    padding: 20px;
}

/* Footer */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

/* Sections */
section {
    margin-bottom: 30px;
}

/* Stretches */
.stretch-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stretch-progress {
    background: #3498db;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 10px;
}

.stretch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stretch-item.completed {
    background: #e8f8f5;
}

.stretch-number {
    width: 28px;
    height: 28px;
    background: #ecf0f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #7f8c8d;
    flex-shrink: 0;
}

.stretch-checkbox {
    width: 30px;
    height: 30px;
    border: 2px solid #3498db;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    color: #27ae60;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stretch-item.completed .stretch-checkbox {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

.stretch-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stretch-name {
    font-weight: 500;
}

.stretch-area {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.stretch-reps {
    font-size: 0.85rem;
    color: #3498db;
    font-style: italic;
}

.stretch-edit-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stretch-edit-form input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.stretch-edit-form .edit-buttons {
    display: flex;
    gap: 8px;
}

.edit-stretch {
    color: #3498db !important;
}

.edit-stretch:hover {
    background: #ebf5fb !important;
}

.stretch-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-icon {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover:not(:disabled) {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Tabs */
.tab-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 25px;
    border: none;
    background: #ecf0f1;
    color: #7f8c8d;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #dfe6e9;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

.tab-content {
    display: none;
}

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

/* Food / Freezer */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.freezer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.freezer-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.freezer-item-name {
    font-weight: 500;
}

.freezer-item-qty {
    color: #3498db;
    font-size: 0.9rem;
}

.freezer-item-date {
    color: #95a5a6;
    font-size: 0.8rem;
}

.freezer-number {
    width: 28px;
    height: 28px;
    background: #ecf0f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #7f8c8d;
    flex-shrink: 0;
}

.freezer-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Freezer on Home Page */
.freezer-reminder {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.freezer-home-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.freezer-home-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

/* Recipes */
.recipe-form .form-group {
    margin-bottom: 15px;
}

.recipe-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #34495e;
}

.recipe-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.recipe-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.recipe-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.recipe-card-title {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.recipe-link {
    display: inline-block;
    color: #3498db;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.recipe-has-details {
    display: inline-block;
    font-size: 0.75rem;
    color: #27ae60;
    background: #e8f8f5;
    padding: 2px 8px;
    border-radius: 10px;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #95a5a6;
}

.modal-close:hover {
    color: #2c3e50;
}

.modal-content h2 {
    margin-bottom: 20px;
    padding-right: 30px;
}

.recipe-section {
    margin-bottom: 20px;
}

.recipe-section h4 {
    color: #3498db;
    margin-bottom: 10px;
}

.recipe-section pre {
    white-space: pre-wrap;
    font-family: inherit;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 0;
}

.modal-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Date Picker Section */
.date-picker-section {
    margin-bottom: 20px;
}

.date-picker-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.date-picker-row label {
    font-weight: 500;
    color: #34495e;
}

.date-picker-row input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

#date-display {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: normal;
}

/* Progress Charts */
.progress-chart {
    margin-top: 30px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.chart-header h3 {
    margin-bottom: 0;
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.chart-controls select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    font-size: 0.85rem;
    color: #555;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.legend-color.legend-line {
    height: 3px;
    border-radius: 0;
}

/* Goal Selector */
.habit-goal,
.stretch-goal {
    flex-shrink: 0;
}

.goal-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
    background: white;
    color: #555;
    cursor: pointer;
}

.goal-select:hover {
    border-color: #3498db;
}

/* Goal Progress Section (Home Page) */
.goal-progress-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.goal-progress-section h3 {
    margin-bottom: 15px;
}

.goal-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.goal-progress-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.goal-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.goal-label {
    font-weight: 600;
    color: #2c3e50;
}

.goal-percentage {
    font-size: 1.5rem;
    font-weight: bold;
    color: #7f8c8d;
}

.goal-percentage.goal-met {
    color: #27ae60;
}

.goal-percentage.goal-close {
    color: #3498db;
}

.goal-percentage.goal-behind {
    color: #e67e22;
}

.goal-progress-bar {
    position: relative;
    height: 24px;
    background: #ecf0f1;
    border-radius: 12px;
    overflow: visible;
    margin-bottom: 10px;
}

.goal-progress-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
    background: #7f8c8d;
}

.goal-progress-fill.goal-met {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.goal-progress-fill.goal-close {
    background: linear-gradient(90deg, #2980b9, #3498db);
}

.goal-progress-fill.goal-behind {
    background: linear-gradient(90deg, #d35400, #e67e22);
}

.goal-target-line {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 3px;
    background: #e74c3c;
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 0 4px rgba(231, 76, 60, 0.5);
}

.goal-progress-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.goal-progress-footer strong {
    color: #2c3e50;
}

/* Investment Tracking Page */
.investment-page {
    max-width: 1200px;
}

/* Account Type Tabs for Investment */
.account-tabs {
    margin-bottom: 25px;
}

.account-tabs .tab-btn {
    min-width: 140px;
    font-weight: 600;
}

.account-tabs .tab-btn.active {
    background: #27ae60;
}

.investment-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.investment-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.investment-card h3 {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.investment-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.investment-value.highlight {
    color: #27ae60;
}

.investment-card p {
    font-size: 0.85rem;
    color: #95a5a6;
}

.investment-card p.positive {
    color: #27ae60;
}

.investment-card p.negative {
    color: #e74c3c;
}

/* Page Header Row */
.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header-row h2 {
    margin-bottom: 0;
}

.privacy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

.privacy-icon {
    font-size: 1rem;
}

/* Privacy Mode - Hide Values */
.privacy-mode .investment-value,
.privacy-mode .pnl-value,
.privacy-mode .chart-container {
    filter: blur(8px);
    user-select: none;
}

/* Blur money columns in P&L table (columns 3-6: Realized, Unrealized, Commissions, Net) */
.privacy-mode #pnl-table tbody td:nth-child(3),
.privacy-mode #pnl-table tbody td:nth-child(4),
.privacy-mode #pnl-table tbody td:nth-child(5),
.privacy-mode #pnl-table tbody td:nth-child(6) {
    filter: blur(8px);
    user-select: none;
}

/* Import Section */
.import-section {
    margin-bottom: 30px;
}

.import-instructions {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.import-instructions code {
    background: #ecf0f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.import-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.import-controls input[type="file"] {
    flex: 1;
    min-width: 200px;
}

.import-status {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.import-status.success {
    background: #d4edda;
    color: #155724;
}

.import-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* Transactions Table */
.transactions-section {
    margin-bottom: 30px;
}

.table-container {
    overflow-x: auto;
}

#transactions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#transactions-table th,
#transactions-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#transactions-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

#transactions-table tr:hover {
    background: #f8f9fa;
}

#transactions-table .positive {
    color: #27ae60;
    font-weight: 500;
}

#transactions-table .negative {
    color: #e74c3c;
    font-weight: 500;
}

/* Chart Section */
.chart-section {
    margin-bottom: 30px;
}

/* IBKR Section */
.ibkr-section {
    margin-bottom: 30px;
}

.coming-soon {
    color: #95a5a6;
    font-style: italic;
    text-align: center;
    padding: 30px;
}

/* S&P 500 Section */
.sp500-section p {
    margin-bottom: 0;
}

.sp500-section p.success {
    color: #27ae60;
}

.sp500-section p.warning {
    color: #e67e22;
}

.sp500-section p.error {
    color: #e74c3c;
}

@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-controls {
        width: 100%;
    }

    .chart-controls select {
        flex: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul.menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .add-form {
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
    }

    .profile-buttons {
        flex-direction: column;
    }

    .profile-btn {
        padding: 15px 40px;
    }

    .login-container h1 {
        font-size: 2rem;
    }
}

/* Password Protection */
.password-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

.password-form input[type="password"] {
    padding: 15px;
    font-size: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    text-align: center;
}

.password-form input[type="password"]::placeholder {
    color: rgba(255,255,255,0.6);
}

.password-form input[type="password"]:focus {
    outline: none;
    border-color: white;
    background: rgba(255,255,255,0.2);
}

.error-message {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: -5px;
}

/* Investment Password Modal */
#invest-password-modal .modal-content {
    text-align: center;
}

#invest-password-modal .password-form {
    margin: 20px auto 0;
}

#invest-password-modal .password-form input[type="password"] {
    background: #f5f5f5;
    color: #333;
    border-color: #ddd;
}

#invest-password-modal .password-form input[type="password"]::placeholder {
    color: #999;
}

#invest-password-modal .password-form input[type="password"]:focus {
    border-color: #3498db;
    background: white;
}

#invest-password-modal .error-message {
    color: #e74c3c;
}

/* Collapsible Sections */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin: 0;
    padding: 0;
}

.collapsible-header:hover {
    color: #3498db;
}

.collapse-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: #7f8c8d;
    transition: transform 0.2s;
}

.collapsible.collapsed .collapsible-content {
    display: none;
}

.collapsible:not(.collapsed) .collapse-icon {
    content: '−';
}

.collapsible:not(.collapsed) .collapse-icon::before {
    content: '−';
}

.collapsible.collapsed .collapse-icon::before {
    content: '+';
}

.collapse-icon {
    font-size: 0;
}

.collapse-icon::before {
    font-size: 1.5rem;
}

/* IBKR Connection Form */
.ibkr-form {
    margin: 15px 0;
}

.ibkr-form .form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ibkr-form label {
    min-width: 100px;
    font-weight: 500;
}

.ibkr-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.ibkr-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.ibkr-status {
    padding: 10px;
    border-radius: 4px;
    background: #f8f9fa;
    margin-bottom: 15px;
}

.ibkr-status.connected {
    background: #d4edda;
    color: #155724;
}

.ibkr-status.disconnected {
    background: #fff3cd;
    color: #856404;
}

.ibkr-help summary {
    cursor: pointer;
    color: #3498db;
    font-weight: 500;
}

.ibkr-help ol li {
    margin-bottom: 5px;
}

/* ==================== P&L Tracking Styles ==================== */

.pnl-section {
    margin-bottom: 30px;
}

/* P&L Filters */
.pnl-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.pnl-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 140px;
}

.pnl-filters label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

.pnl-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.pnl-filters select:hover {
    border-color: #3498db;
}

.pnl-filters select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* P&L Summary Cards */
.pnl-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.pnl-summary-card {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-left: 4px solid #95a5a6;
}

.pnl-summary-card.highlight {
    background: #e8f8f5;
    border-left-color: #27ae60;
}

.pnl-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 500;
}

.pnl-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
}

.pnl-value.positive {
    color: #27ae60;
}

.pnl-value.negative {
    color: #e74c3c;
}

/* P&L Table */
#pnl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#pnl-table th,
#pnl-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#pnl-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
    white-space: nowrap;
}

#pnl-table tr:hover {
    background: #f8f9fa;
}

#pnl-table .pnl-summary-row:hover {
    background: #e8f4fc;
}

#pnl-table .pnl-detail-row {
    background: #f8f9fa;
    font-size: 0.85rem;
}

#pnl-table .pnl-detail-row td {
    padding: 8px 10px;
    color: #555;
}

#pnl-table .pnl-position-row {
    background: #f0f7ff;
}

#pnl-table .pnl-position-row td {
    color: #1e40af;
}

#pnl-table .pnl-detail-header {
    background: #eef2f5;
    font-size: 0.8rem;
}

#pnl-table .pnl-detail-header td {
    padding: 6px 10px;
    color: #34495e;
    border-bottom: 1px solid #ddd;
}

#pnl-table .pnl-subheading-row {
    font-size: 0.85rem;
}

#pnl-table .pnl-subheading-row td {
    padding: 6px 10px;
    border-bottom: 1px solid #cbd5e1;
}

#pnl-table .pnl-side-subheading td {
    font-weight: 600;
    font-style: normal;
}

#pnl-table .pnl-asset-subheading td {
    font-weight: 500;
    font-style: italic;
}

.expand-icon {
    display: inline-block;
    width: 16px;
    font-size: 0.7rem;
    color: #7f8c8d;
}

#pnl-table .positive {
    color: #27ae60;
    font-weight: 500;
}

#pnl-table .negative {
    color: #e74c3c;
    font-weight: 500;
}

#pnl-table .description-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* P&L Hierarchy Rows */
#pnl-table .pnl-category-row {
    background: #e2e8f0 !important;
    font-weight: 600;
}

#pnl-table .pnl-category-row:hover {
    background: #cbd5e1 !important;
}

#pnl-table .pnl-sector-row {
    background: #f1f5f9 !important;
    font-weight: 500;
}

#pnl-table .pnl-sector-row:hover {
    background: #e2e8f0 !important;
}

#pnl-table .pnl-symbol-row {
    background: #ffffff !important;
}

#pnl-table .pnl-symbol-row:hover {
    background: #f8fafc !important;
}

#pnl-table .pnl-position-header,
#pnl-table .pnl-trade-header {
    font-size: 0.8rem;
}

#pnl-table .pnl-position-row,
#pnl-table .pnl-trade-row {
    font-size: 0.85rem;
}

#pnl-table .pnl-trade-row:hover {
    background: #f5f5f5 !important;
}

#pnl-table .expand-icon {
    display: inline-block;
    width: 16px;
    margin-right: 5px;
    color: #64748b;
    font-size: 0.75rem;
}

/* Category Modal */
#category-modal .modal-content {
    max-width: 400px;
}

#category-modal .form-group {
    margin-bottom: 15px;
}

#category-modal .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #34495e;
}

#category-modal .form-group input,
#category-modal .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#category-modal .form-group input:focus,
#category-modal .form-group select:focus {
    outline: none;
    border-color: #3498db;
}

#category-modal .form-group input[readonly] {
    background: #f5f5f5;
    color: #555;
}

#category-modal .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Responsive P&L */
@media (max-width: 768px) {
    .pnl-filters {
        flex-direction: column;
    }

    .pnl-filters .filter-group {
        width: 100%;
    }

    .pnl-summary {
        grid-template-columns: 1fr 1fr;
    }

    #pnl-table {
        font-size: 0.8rem;
    }

    #pnl-table th,
    #pnl-table td {
        padding: 8px 6px;
    }

    #pnl-table .description-cell {
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .pnl-summary {
        grid-template-columns: 1fr;
    }
}

/* ==================== To Do List Styles ==================== */

.todos-page {
    max-width: 100%;
}

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

.todos-header h2 {
    margin: 0;
}

.todos-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3498db;
}

.toggle-label:hover {
    color: #333;
}

.todos-columns {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.todos-columns .empty-state {
    flex: 1;
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.todo-column {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px;
    min-width: 350px;
    flex: 1;
}

.column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.column-header h3 {
    margin: 0;
    color: #2c3e50;
    flex: 1;
}

.column-title {
    cursor: pointer;
    transition: color 0.2s;
}

.column-title:hover {
    color: #3498db;
}

.drag-handle {
    cursor: grab;
    color: #bdc3c7;
    font-size: 1.2rem;
    user-select: none;
    padding: 0 5px;
}

.drag-handle:hover {
    color: #7f8c8d;
}

.todo-column.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.todo-column.drag-over {
    border: 2px dashed #3498db;
    background: #f0f7ff;
}

.item-count {
    background: #3498db;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.add-todo-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.add-todo-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.add-todo-form input:focus {
    outline: none;
    border-color: #3498db;
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3498db;
    transition: all 0.2s;
    position: relative;
}

.todo-item:hover {
    background: #ecf0f1;
}

.todo-item.completed {
    opacity: 0.6;
    border-left-color: #95a5a6;
}

.todo-item.completed .todo-title {
    text-decoration: line-through;
    color: #95a5a6;
}

.todo-checkbox {
    padding-top: 2px;
    flex-shrink: 0;
}

.todo-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3498db;
}

.todo-content {
    flex: 1;
    min-width: 0;
    padding-right: 5px;
}

.todo-title {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    line-height: 1.4;
}

.todo-description {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.todo-date {
    display: block;
    font-size: 0.75rem;
    color: #95a5a6;
    margin-top: 5px;
}

.todo-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
    position: absolute;
    right: 8px;
    top: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    padding: 2px;
}

.todo-item:hover .todo-actions {
    opacity: 1;
}

.btn-icon {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #7f8c8d;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #ddd;
    color: #2c3e50;
}

.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-icon.btn-danger:hover {
    background: #fee;
    color: #e74c3c;
}

.empty-message {
    text-align: center;
    color: #95a5a6;
    padding: 30px 10px;
    font-style: italic;
}

/* Modal Styles for Todos */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #34495e;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

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

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* ==================== Research Tab Styles ==================== */

.main-tabs {
    margin-bottom: 20px;
}

.main-tabs .tab-btn {
    min-width: 120px;
    font-size: 1rem;
}

.main-tab-content.hidden {
    display: none;
}

.research-status {
    margin-bottom: 20px;
}

.research-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.research-header h3 {
    margin-bottom: 5px;
}

.research-header p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

.research-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.scan-progress {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.progress-bar {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.scan-progress p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

/* Trend Summary Cards */
.trend-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.trend-card {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #95a5a6;
}

.trend-card.bullish {
    border-left-color: #27ae60;
    background: linear-gradient(135deg, #ffffff 0%, #e8f8f5 100%);
}

.trend-card.momentum {
    border-left-color: #3498db;
    background: linear-gradient(135deg, #ffffff 0%, #ebf5fb 100%);
}

.trend-card.breakout {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, #ffffff 0%, #fef9e7 100%);
}

.trend-card.bearish {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #ffffff 0%, #fdedec 100%);
}

.trend-icon {
    font-size: 2rem;
}

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

.trend-count {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1;
}

.trend-label {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Research Filters */
.research-filters {
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.research-filters .filter-group {
    min-width: 140px;
}

.research-filters .search-group {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.research-filters .search-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.research-filters .search-group input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.research-filters input[type="number"] {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Metrics Info Section */
.metrics-info {
    margin-bottom: 20px;
}

.metrics-info summary {
    cursor: pointer;
    padding: 5px 0;
    color: #3498db;
}

.metrics-info summary:hover {
    color: #2980b9;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.metric-def {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.metric-def h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 0.95rem;
}

.metric-def p {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: #555;
}

.metric-def ul {
    margin: 0;
    padding-left: 18px;
    font-size: 0.85rem;
    color: #555;
}

.metric-def li {
    margin-bottom: 4px;
}

.metric-def em {
    color: #7f8c8d;
    font-size: 0.8rem;
}

/* Signals Table */
.signals-section h3 {
    margin-bottom: 15px;
}

#signals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

#signals-table th,
#signals-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#signals-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
    white-space: nowrap;
}

#signals-table tr:hover {
    background: #f8f9fa;
}

#signals-table .stock-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #7f8c8d;
    font-size: 0.8rem;
}

#signals-table .positive {
    color: #27ae60;
}

#signals-table .positive.strong {
    color: #1e8449;
    font-weight: 600;
}

#signals-table .negative {
    color: #e74c3c;
}

#signals-table .negative.strong {
    color: #c0392b;
    font-weight: 600;
}

/* Momentum Badge */
.momentum-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8rem;
}

.momentum-high {
    background: #27ae60;
    color: white;
}

.momentum-medium {
    background: #2ecc71;
    color: white;
}

.momentum-neutral {
    background: #95a5a6;
    color: white;
}

.momentum-negative {
    background: #e67e22;
    color: white;
}

.momentum-low {
    background: #e74c3c;
    color: white;
}

/* Signal Badge */
.signal-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.signal-bullish {
    background: #27ae60;
    color: white;
}

.signal-bullish-light {
    background: #d5f5e3;
    color: #1e8449;
}

.signal-breakout {
    background: #f39c12;
    color: white;
}

.signal-neutral {
    background: #ecf0f1;
    color: #7f8c8d;
}

.signal-bearish-light {
    background: #fadbd8;
    color: #c0392b;
}

.signal-bearish {
    background: #e74c3c;
    color: white;
}

/* Responsive Research */
@media (max-width: 768px) {
    .research-header {
        flex-direction: column;
    }

    .trend-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-row {
        flex-direction: column;
    }

    .research-filters .filter-group {
        width: 100%;
    }

    #signals-table {
        font-size: 0.75rem;
    }

    #signals-table th,
    #signals-table td {
        padding: 8px 4px;
    }
}

/* Responsive To Do */
@media (max-width: 768px) {
    .todos-columns {
        flex-direction: column;
    }

    .todo-column {
        max-width: 100%;
        min-width: auto;
    }

    .todo-actions {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .add-todo-form {
        flex-direction: column;
    }

    .add-todo-form .btn {
        width: 100%;
    }

    .todos-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
