* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Hide content until Vue is mounted */
[v-cloak] {
    display: none;
}

/* Allow text selection in input fields and textareas */
input,
textarea {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
     font-family: system-ui, -apple-system, BlinkMacSystemFont,
               '.SFNSText-Regular', 'Segoe UI', Roboto,
               'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #e0e0e0;
    color: #333;
    line-height: 1.6;
}

/* App container - Sticky footer layout */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    /*background-color: #2c3e50;*/
    background-color: #4e4f54;
    color: white;
    padding: 0.2rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

header h1 {
    font-weight: 400;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.settings-btn,
.help-btn,
.eye-btn,
.header-create-btn {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 1.5rem !important;
    cursor: pointer;
    padding: 0.5rem !important;
    border-radius: 4px;
    transition: background-color 0.3s;
}
.header-create-btn {
color:white !important;
}
.settings-btn:hover,
.help-btn:hover,
.eye-btn:hover,
.header-create-btn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.eye-btn.active {
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* Tool Navigation Tabs */
.tool-nav {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Desktop Navigation - Horizontal Tabs */
.tool-nav-desktop {
    display: flex;
    justify-content: center;
    gap: 0;
}

.tool-nav-mobile {
    display: none;
}

.tool-nav-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tool-nav-btn:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.tool-nav-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background-color: white;
}

.tool-nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

/* Mobile Navigation - Dropdown */
.tool-nav-mobile-current {
    width: 100%;
    background: white;
    border: none;
    border-bottom: 3px solid #3498db;
    color: #3498db;
    font-size: 1rem;
    font-weight: 500;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.tool-nav-mobile-current:active {
    background-color: rgba(52, 152, 219, 0.1);
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: #6c757d;
}

.tool-nav-mobile-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 2px solid #dee2e6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.tool-nav-mobile-option {
    width: 100%;
    background: white;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
    padding: 1rem 1.5rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.tool-nav-mobile-option:last-child {
    border-bottom: none;
}

.tool-nav-mobile-option:active {
    background-color: rgba(52, 152, 219, 0.1);
}

.tool-nav-mobile-option.active {
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.05);
}

/* Tool-specific Actions */
.tool-actions {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tool-action-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tool-action-btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.tool-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Tool Container */
.tool-container {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Placeholder tool styles */
.notes-tool,
.calendar-tool {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 2rem auto;
    text-align: center;
}

.notes-tool h2,
.calendar-tool h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

main {
    flex: 1;
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

.create-list-button-container {
    text-align: center;
    margin-bottom: 2rem;
}

.create-list-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.create-list-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.create-list-btn:active {
    transform: translateY(0);
}

.create-list {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.create-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.create-list-header h2 {
    margin: 0;
}

.close-create-form-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.close-create-form-btn:hover {
    color: #2c3e50;
    background-color: rgba(0, 0, 0, 0.1);
}

.create-list h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.create-list form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.create-list input,
.create-list select {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
}

.create-list button {
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.create-list button:hover {
    background-color: #2980b9;
}

.habit-lists {
    /* Default: CSS Grid for 2-column layout (when Masonry is disabled) */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem; 
    align-items: start; /* Prevents grid items from stretching to match row height */
}

.habit-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    /* When Masonry is active, it will set width to 50% and add margin-bottom */
    /* When Masonry is disabled, CSS Grid will handle the layout */
}

.list-header {
    /*background-color: #34495e;*/
    background-color: #4e4f54;

    color: white;
    padding: 0.3rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.list-header.edit-mode {
    background-color: #2980b9;
    border-left: 4px solid #3498db;
}

.list-title {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    flex: 1;
    padding: 0.25rem;
}

.list-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.list-title-row:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.list-title-row h3 {
    margin: 0;
}

.list-progress {
    font-size: 0.75rem;
    color: #c6d7d8;
    font-weight: normal;
    white-space: nowrap;
}

.list-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.drag-handle {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 1.2rem;
    cursor: grab;
    padding: 0.25rem;
    padding-top: 0;
    border-radius: 4px;
    transition: color 0.2s, opacity 0.2s;
}

.drag-handle-hover {
    opacity: 0;
    pointer-events: none;
    color:#fff;
}

.list-header .drag-handle-hover {
        padding-top: 6px;
    }
.list-header:hover .drag-handle-hover {
    opacity: 1;
    pointer-events: auto;
    color:#fff;
}

.drag-handle:hover {
    color: #2c3e50;
    background-color: rgba(0, 0, 0, 0.1);
}

.drag-handle:active {
    cursor: grabbing;
}

/* Manual reorder button (for masonry mode) */
.manual-reorder-btn {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
}

.manual-reorder-btn:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.habit-list.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

/* Reorder Mode Styles */
.reorder-instructions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reorder-instructions-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reorder-instructions-icon {
    font-size: 1.5rem;
}

.reorder-instructions-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.reorder-instructions-text strong {
    font-weight: 600;
}

.habit-list.reorder-source {
    border: 3px solid #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    }
}

.habit-list.reorder-target {
    cursor: pointer;
    border: 2px dashed #95a5a6;
    transition: all 0.2s ease;
}

.habit-list.reorder-target:hover {
    border-color: #27ae60;
    border-style: solid;
    background-color: #e8f5e9;
    transform: scale(1.01);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.drag-handle.reorder-active {
    background-color: #e74c3c;
    color: white;
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.habit-list {
    transition: opacity 0.2s, transform 0.2s, border 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.habit-drag-handle {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 1rem;
    cursor: grab;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s;
}

.habit-drag-handle:hover {
    color: #2c3e50;
    background-color: rgba(0, 0, 0, 0.1);
}

.habit-drag-handle:active {
    cursor: grabbing;
}

.habit-item.dragging-habit {
    opacity: 0.5;
    transform: scale(0.98);
}

.habit-item {
    transition: opacity 0.2s, transform 0.2s;
}

.toggle-list-btn,
.edit-list-icon-btn,
.delete-list-icon-btn,
.done-edit-btn {
    background: none;
    border: none;
    color: #2c3e50;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.edit-list-icon-btn,
.delete-list-icon-btn,
.done-edit-btn {
    font-size: 1.1rem;
}

.edit-list-hover-btn,
.add-habit-hover-btn {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.list-header:hover .edit-list-hover-btn,
.list-header:hover .add-habit-hover-btn {
    opacity: 1;
    pointer-events: auto;
}

.add-habit-hover-btn,
.add-habit-edit-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.2s, opacity 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-habit-hover-btn:hover,
.add-habit-edit-btn:hover {
    background-color: rgba(46, 204, 113, 0.3);
}

.add-habit-hover-btn:active,
.add-habit-edit-btn:active {
    transform: scale(0.95);
}

.done-edit-btn {
    font-size: 1.5rem;
    font-weight: bold;
}

.toggle-list-btn:hover,
.edit-list-icon-btn:hover,
.delete-list-icon-btn:hover,
.done-edit-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.edit-list-icon-btn:hover {
    background-color: rgba(52, 152, 219, 0.3);
}

.delete-list-icon-btn:hover {
    background-color: rgba(231, 76, 60, 0.3);
}

.done-edit-btn:hover {
    background-color: rgba(46, 204, 113, 0.3);
}

.toggle-list-btn:active,
.edit-list-icon-btn:active,
.delete-list-icon-btn:active,
.done-edit-btn:active {
    transform: scale(0.95);
}

.habit-list.collapsed {
    margin-bottom: 0.5rem;
    background: transparent;
    box-shadow: none;
}

.habit-list.collapsed .list-header {
    border-radius: 8px;
}

.habit-list {
    transition: all 0.3s ease;
}

.edit-list-btn,
.completion-mode-btn,
.reset-all-btn,
.delete-list-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.edit-list-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.completion-mode-btn:hover {
    background-color: rgba(52, 152, 219, 0.8);
}

.reset-all-btn:hover {
    background-color: rgba(241, 196, 15, 0.8);
}

.delete-list-btn:hover {
    background-color: rgba(231, 76, 60, 0.8);
}

.edit-list-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
    flex-wrap: wrap;
}

.edit-list-form input {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    flex: 1;
    min-width: 150px;
}

.edit-list-actions {
    display: flex;
    gap: 0.5rem;
    flex: 1 1 100%;
    justify-content: flex-start;
}

.edit-list-actions .delete-list-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s;
}

.edit-list-actions .delete-list-btn:hover {
    background-color: #c0392b;
}

.list-header h3 {
    margin: 0;
}

.period-info {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.periodicity {
    background-color: #2c3e50;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    text-transform: capitalize;
}

.periodicity.permanent {
    background-color: #8e44ad;
}

.current-period {
    background-color: #3498db;
    color: white;
    padding: 0.15rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.3s;
    cursor: pointer;
    white-space: nowrap;
}

.current-period:hover {
    background-color: #2980b9;
}

.current-period.historical {
    background-color: #95a5a6;
}

.current-period.historical:hover {
    background-color: #7f8c8d;
}

.period-nav-arrow {
    background: none;
    border: none;
    color: #3498db;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    padding: 0;
    transition: color 0.2s, transform 0.2s;
    font-weight: bold;
}

.period-nav-arrow:hover {
    color: #2980b9;
    transform: scale(1.2);
}

.period-nav-arrow:active {
    transform: scale(0.95);
}

/* Total Sum Display */
.total-sum-display {
    text-align: center;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    background-color: #f8f9fa;
    border-top: 2px solid #e0e0e0;
    font-size: 1.1rem;
    font-weight: 600;
}

.total-sum-label {
    color: #555;
    margin-right: 0.5rem;
}

.total-sum-value {
    color: #2c3e50;
    font-weight: 700;
}

/* No Data Message */
.no-data-message {
    text-align: center;
    padding: 1.5rem 1rem;
    margin: 1rem 0;
    color: #95a5a6;
    font-style: italic;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 4px;
}

/* Hidden Items Toggle */
.hidden-items-toggle {
    text-align: right;
    padding: 0.5rem 1rem;
    margin: 0.5rem 0;
    border-radius: 4px;

}

.hidden-items-link {
    color: #f57c00;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
}

.hidden-items-link:hover {
    text-decoration: underline;
    color: #e65100;
}

.add-habit-container {
    margin-bottom: 1rem;
}

.stop-editing-container {
    text-align: center;
    padding: 0.75rem 0.5rem;
    margin-bottom: 0.5rem;
}

.stop-editing-link {
    color: #3498db;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    transition: color 0.2s;
}

.stop-editing-link:hover {
    color: #2980b9;
}

.add-habit-button-container {
    text-align: right;
    padding: 0.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.add-habit-btn,
.edit-all-btn {
    color: white;
    border: none;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, opacity 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-habit-btn {
    background-color: #27ae60;
}

.edit-all-btn {
    background-color: #3498db;
    opacity: 0.4;
}

.edit-all-btn.active {
    opacity: 1;
}

.add-habit-btn:hover,
.edit-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.add-habit-btn:hover {
    background-color: #229954;
}

.edit-all-btn:hover {
    background-color: #2980b9;
    opacity: 1;
}

.add-habit-btn:active,
.edit-all-btn:active {
    transform: translateY(0);
}

.add-habit {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem;
    border: 2px solid #e9ecef;
}

.add-habit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

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

.close-add-habit-btn {
    background: red !important;
    border: none;
    color: #7f8c8d;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.close-add-habit-btn:hover {
    color: #2c3e50;
    background-color: rgba(0, 0, 0, 0.1);
}

.add-habit-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.add-habit-form input {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    width: 100%;
}

.add-habit-form>input {
    flex: 1;
    min-width: 120px;
}

.add-habit-actions {
    display: flex;
    gap: 0.5rem;
    flex: 1 1 100%;
    justify-content: flex-start;
}

.add-habit input {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
}

.add-habit button {
    padding: 0.5rem 1rem;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s;
}

.add-habit button:hover {
    background-color: #219a52;
}

.habits {
    padding: 1rem;
}

.habit-item {
    padding: 0.3rem 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.habit-display {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.habit-content {
    flex: 1;
    min-width: 0; /* Allows flex item to shrink below content size */
    overflow: hidden; /* Prevents overflow */
}

.habit-name-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: visible;
}

.habit-name {
    display: inline-block;
    font-weight: 500;
    position: relative;
    z-index: 1;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.swipe-indicator {
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.1s ease-out;
}

.habit-edit-icon {
    display: none;
    font-size: 1rem;
    color: #3498db;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0.25rem;
    line-height: 1;
}

.habit-name-wrapper:hover .habit-edit-icon {
    display: inline;
}

.habit-edit-icon:hover {
    color: #2980b9;
}

/* Hide edit icon on mobile/touch devices */
@media (hover: none) {
    .habit-edit-icon {
        display: none;
    }
}

.habit-notes {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #7f8c8d;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.habit-meta-info {
    font-size: 0.75rem;
    color: #95a5a6;
    margin-top: 0.25rem;
    font-style: italic;
}

.notes-display {
    cursor: pointer;
    padding: 0.25rem 0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.notes-display:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.notes-placeholder {
    color: #7f8c8d;
    font-style: italic;
}

.notes-textarea {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    resize: vertical;
    font-family: inherit;
    padding-left: 7px;
}

.edit-habit-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.input-with-hint {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 0 0 auto;
    min-width: 80px;
    max-width: 100px;
}

.input-hint,
.setting-hint {
    font-size: 0.7rem;
    color: #7f8c8d;
    font-style: italic;
}

.setting-hint {
    display: block;
    margin-top: 0.25rem;
    margin-left: 1.5rem;
}

.edit-habit-form input {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    width: 100%;
}

.edit-habit-form>input {
    flex: 1;
    min-width: 120px;
}

.edit-habit-notes {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    flex: 1 1 100%;
    min-width: 100%;
    font-family: inherit;
    resize: vertical;
}

.edit-habit-actions {
    display: flex;
    gap: 0.5rem;
    flex: 1 1 100%;
    justify-content: flex-start;
}

.edit-habit-actions .delete-habit-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s;
}

.edit-habit-actions .delete-habit-btn:hover {
    background-color: #c0392b;
}

/* Hide Until Section */
.hide-until-section {
    flex: 1 1 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.hide-until-link {
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.hide-until-link:hover {
    text-decoration: underline;
}

.hide-until-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hide-until-date {
    color: #7f8c8d;
    font-size: 0.875rem;
}

.hide-until-edit-btn,
.hide-until-clear-btn,
.hide-until-cancel-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.hide-until-edit-btn {
    background-color: #3498db;
    color: white;
}

.hide-until-edit-btn:hover {
    background-color: #2980b9;
}

.hide-until-clear-btn {
    background-color: #e74c3c;
    color: white;
}

.hide-until-clear-btn:hover {
    background-color: #c0392b;
}

.hide-until-cancel-btn {
    background-color: #95a5a6;
    color: white;
}

.hide-until-cancel-btn:hover {
    background-color: #7f8c8d;
}

.hide-until-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hide-until-date-input {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Move To Section */
.move-to-section {
    flex: 1 1 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.move-to-link {
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.move-to-link:hover {
    text-decoration: underline;
}

.move-to-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.move-to-select {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    background-color: white;
    cursor: pointer;
}

.move-to-select:focus {
    outline: none;
    border-color: #3498db;
}

.move-to-actions {
    display: flex;
    gap: 0.5rem;
}

.move-to-move-btn,
.move-to-cancel-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.move-to-move-btn {
    background-color: #27ae60;
    color: white;
    flex: 1;
}

.move-to-move-btn:hover {
    background-color: #229954;
}

.move-to-cancel-btn {
    background-color: #95a5a6;
    color: white;
}

.move-to-cancel-btn:hover {
    background-color: #7f8c8d;
}

.habit-item.completed {
    border-left-color: #27ae60;
    background-color: #e8f5e8;
}

/* Completing animation - shown when item is being marked complete */
.habit-item.completing {
    animation: completeAndFade 0.6s ease-out forwards;
    border-left-color: #27ae60;
}

@keyframes completeAndFade {
    0% {
        transform: scale(1);
        opacity: 1;
        background-color: #f8f9fa;
    }
    15% {
        transform: scale(1.05);
        background-color: #d4edda;
    }
    30% {
        transform: scale(1);
        background-color: #e8f5e8;
    }
    70% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}

/* Completed items in edit mode - different tonality */
.habit-item.completed.edit-mode {
    border-left-color: #5dade2;
    background-color: #ebf5fb;
}

.habit-item.historical .habit-name {
    opacity: 0.6;
}

.habit-item.historical {
    background-color: #f1f2f6;
    border-left-color: #95a5a6;
    opacity: 0.8;
}

.habit-item.historical.completed {
    background-color: #ddecd4;
    border-left-color: #7fad66;
}

/* Hidden habits styling */
.habit-item.hidden-habit {
    opacity: 0.7;
    background-color: #f8f9fa;
    border-left-color: #bdc3c7;
}

.hidden-until-tag {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.4rem;
    background-color: #e8eaed;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    font-size: 0.7rem;
    color: #7f8c8d;
    font-weight: normal;
}


.habit-controls {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.toggle-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    font-size: 1.0rem;
    font-weight: bold;
    cursor: pointer;
}

.toggle-done {
    color: #27ae60;
    font-size: 1.0rem;
}

.toggle-undone {
    color: #95a5a6;
    font-size: 1.0rem;
}

.progress {
    font-weight: bold;
    color: #2c3e50;
    min-width: 55px;
    text-align: center;
}

.increment-btn {
    margin-right: 0.25rem;
}

.increment-btn,
.decrement-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 100;    
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.increment-btn:hover,
.decrement-btn:hover {
    background-color: #2980b9;
    transform: scale(1.15);
}

.decrement-btn {
    background-color: #e74c3c;
}

.decrement-btn:hover {
    background-color: #c0392b;
}

.edit-habit-btn,
.delete-habit-btn,
.habit-info-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.2s;
}


 
.edit-habit-btn:hover {
    background-color: rgba(52, 152, 219, 0.2);
}

.delete-habit-btn:hover {
    background-color: rgba(231, 76, 60, 0.2);
}

.habit-info-btn:hover {
    background-color: rgba(155, 89, 182, 0.2);
    transform: scale(1.1);
}

.habit-info-btn.has-info {
    background-color: rgba(155, 89, 182, 0.2);
    /*border: 1px solid #9b59b6 ;*/
    box-shadow: inset 0 0 2px  #9b59b6;
}

.habit-info-btn.has-info:hover {
    background-color: rgba(155, 89, 182, 0.4);
}

.save-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s;
}

.save-btn:hover {
    background-color: #219a52;
}

.cancel-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s;
}

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

.list-completion {
    padding: 1rem;
    background-color: #ecf0f1;
    border-top: 1px solid #bdc3c7;
    text-align: center;
    transition: background-color 0.3s ease;
    position: relative;
}

.list-completion.collapsed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.list-completion.completed {
    background-color: #d5f4e6;
    border-top: 1px solid #27ae60;
}

.expand-list-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.expand-list-btn:hover {
    background-color: #2980b9;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.expand-list-btn:active {
    transform: scale(0.95);
}

.completion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.completion-stats {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.completion-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 50%;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.list-completion.completed .stat-value {
    color: #27ae60;
}

.list-completion.completed .stat-label {
    color: #27ae60;
}

.list-completion {
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

.completion-counter {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    background-color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.habit-link {
    color: #3498db;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

.habit-link:hover {
    color: #2980b9;
    text-decoration: none;
}

.notes-display {
    cursor: pointer;
    word-wrap: break-word;
}

/* List Impressions Styles */
.list-impressions {
    margin-top: 1rem;
    padding: 0.3rem 0.3rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #9b59b6;
}

.impressions-display {
    cursor: pointer;
}

.impressions-content {
    color: #333;
    font-size: 0.875rem;
    line-height: 1.4;
    white-space: pre-wrap;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.impressions-content:hover {
    background-color: rgba(155, 89, 182, 0.1);
}

.impressions-placeholder {
    color: #7f8c8d;
    font-style: italic;
    padding: 0.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.impressions-placeholder:not(.disabled):hover {
    background-color: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.impressions-placeholder.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.impressions-edit {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.impressions-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.impressions-textarea:focus {
    outline: none;
    border-color: #9b59b6;
}

.impressions-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Period Progress Bar Styles */
.period-progress-container {
    margin-top: 1rem;
    /*padding: 0.75rem 1rem;*/
    background-color: #f8f9fa;
    border-radius: 6px;
}

.period-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    /*border-radius: 4px;*/
    overflow: hidden;
    /*margin-bottom: 0.5rem;*/
}

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

.period-progress-label {
    text-align: center;
    font-size: 0.75rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* Period Navigation Styles */
.period-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.nav-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover:not(:disabled) {
    background-color: #2980b9;
    transform: scale(1.1);
}

.nav-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.period-indicator {
    font-weight: 500;
    color: #2c3e50;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background-color: white;
    border: 2px solid #3498db;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.period-indicator.current {
    background-color: #3498db;
    color: white;
}

/* Settings Panel Styles */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.settings-panel {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.settings-header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-settings-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.close-settings-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.settings-content {
    padding: 1.5rem;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

.setting-item {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.setting-item label {
    font-weight: 500;
    color: #34495e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-item select {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    flex: 1;
}

.setting-item input[type="checkbox"] {
    margin-right: 0.5rem;
}

.export-btn,
.import-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    transition: background-color 0.3s;
}

.export-btn:hover,
.import-btn:hover {
    background-color: #2980b9;
}

.clear-data-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s;
}

.clear-data-btn:hover {
    background-color: #c0392b;
}

.settings-footer {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.save-settings-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

.save-settings-btn:hover {
    background-color: #219a52;
}

.settings-saved-msg {
    color: #27ae60;
    font-weight: 500;
    font-size: 0.875rem;
    opacity: 0;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Help Popup */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.help-panel {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.help-header {
    background-color: #3498db;
    color: white;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-help-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.close-help-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.help-content {
    padding: 1.5rem;
}

.help-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.help-content h3 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.help-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.help-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.help-demo-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #3498db;
    text-align: center;
}

.help-demo-section h3 {
    color: #3498db;
    margin-top: 0;
}

.help-demo-section p {
    margin-bottom: 1rem;
}

.load-demo-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.load-demo-btn:hover {
    background-color: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.load-demo-btn:active {
    transform: translateY(0);
}

.delete-demo-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-left: 0.5rem;
}

.delete-demo-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.delete-demo-btn:active {
    transform: translateY(0);
}

.help-demo-note {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Help Accordion */
.help-intro {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.help-intro p {
    margin-bottom: 0.75rem;
}

.help-intro ul {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.help-intro li {
    margin-bottom: 0.5rem;
}

.help-note {
    font-size: 0.9rem;
    padding: 0.75rem;
    background-color: #e8f5e9;
    border-radius: 6px;
    margin-top: 1rem;
    margin-bottom: 0;
}

.help-accordion {
    margin-bottom: 2rem;
}

.help-accordion-item {
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.help-accordion-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.help-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.help-accordion-header:hover {
    background-color: #e9ecef;
}

.help-accordion-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: #2c3e50;
}

.help-accordion-icon {
    font-size: 1.5rem;
    color: #6c757d;
    font-weight: bold;
    line-height: 1;
}

.help-accordion-content {
    padding: 1.5rem 1.25rem;
    background-color: white;
    border-top: 1px solid #dee2e6;
}

.help-accordion-content h4 {
    color: #2c3e50;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.help-accordion-content h4:first-child {
    margin-top: 0;
}

.help-accordion-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.help-accordion-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.help-accordion-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.help-footer {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.help-footer h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.help-footer p {
    margin-bottom: 0.5rem;
}

/* Habit Info Popup */
.habit-info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.habit-info-panel {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.habit-info-header {
    background-color: #9b59b6;
    color: white;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.habit-info-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-habit-info-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.close-habit-info-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.habit-info-content {
    padding: 1.5rem;
}

.habit-info-notice {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid #4caf50;
}

.habit-info-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 150px;
    transition: border-color 0.2s;
    line-height: 1.5;
}

.habit-info-textarea:focus {
    outline: none;
    border-color: #9b59b6;
}

.habit-info-textarea.readonly {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: #666;
}

.last-completion-info {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background-color: #e8f5e9;
    border-left: 3px solid #4caf50;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #2e7d32;
}

.interaction-history {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.interaction-history h3 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
}

.interactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 250px;
    overflow-y: auto;
}

.interaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: white;
    border-radius: 4px;
    font-size: 0.875rem;
    border-left: 3px solid #3498db;
}

.interaction-time {
    color: #6c757d;
    font-size: 0.8rem;
    min-width: 120px;
}

.interaction-action {
    flex: 1;
    text-align: right;
    font-weight: 500;
    color: #2c3e50;
}

.habit-info-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Footer Styles */
.app-footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 1rem;
    padding-top: 4rem;
    margin-top: auto;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.footer-separator {
    color: #7f8c8d;
}

.footer-text {
    color: #95a5a6;
    font-size: 0.875rem;
    margin: 0;
}

/* Contact Form Popup */
.contact-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.contact-form-panel {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.contact-form-header {
    background-color: #3498db;
    color: white;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-form-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-contact-form-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.close-contact-form-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.contact-form-content {
    padding: 1.5rem;
}

.contact-form-description {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

.form-group input:disabled,
.form-group textarea:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

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

.contact-form-error {
    background-color: #fee;
    color: #c33;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid #e74c3c;
    font-size: 0.9rem;
}

.contact-form-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid #4caf50;
    font-size: 0.9rem;
}

.contact-form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.submit-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover:not(:disabled) {
    background-color: #2980b9;
}

.submit-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.add-habit-list-center .add-habit-btn {
    padding: 0.25rem 0.75rem;
}

.add-habit-list-center {
    text-align: center;


}

/* User button */
.user-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.user-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Authentication Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-header {
    background-color: #3498db;
    color: white;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.popup-content {
    padding: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.auth-panel {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.auth-message {
    color: #555;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #ddd;
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.auth-tab-btn:hover {
    color: #3498db;
}

.auth-tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-error {
    background-color: #fee;
    color: #c33;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid #e74c3c;
    font-size: 0.9rem;
}

.auth-success {
    background-color: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid #28a745;
    font-size: 0.9rem;
}

.forgot-password-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.forgot-password-link {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.forgot-password-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.forgot-password-form {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: left;
}

.forgot-password-message {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Google Sign-In */
.google-signin-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.google-signin-section .divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #888;
    font-size: 0.9rem;
}

.google-signin-section .divider::before,
.google-signin-section .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.google-signin-section .divider span {
    padding: 0 1rem;
}

.google-signin-button {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.user-account-info {
    padding: 1rem 0;
}

.user-account-info h3 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.25rem;
    text-align: center;
}

.user-info-field {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.user-info-field label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    min-width: 80px;
}

.user-info-field span {
    color: #555;
    font-size: 0.95rem;
}

.email-edit-section, .email-validated-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.email-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.email-input.has-error {
    border-color: #e74c3c;
}

.email-error {
    color: #e74c3c;
    font-size: 0.85rem;
}

.email-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.save-email-btn, .validate-email-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.save-email-btn {
    background-color: #3498db;
    color: white;
}

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

.validate-email-btn {
    background-color: #f39c12;
    color: white;
    position: relative;
}

.validate-email-btn:hover:not(:disabled) {
    background-color: #e67e22;
}

.validate-email-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.validate-email-btn .spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.email-status {
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.email-status.validated {
    color: #27ae60;
}

.email-status.unvalidated {
    color: #e67e22;
}

.logout-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c0392b;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.primary-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.primary-btn:hover:not(:disabled) {
    background-color: #2980b9;
}

.primary-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Tablet - 2 columns */
@media (max-width: 1200px) and (min-width: 769px) {
    .habit-list {
        width: calc(50% - 1rem);
    }
}

/* Mobile - 1 column */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    header h1 {
        font-size: 1.25rem;
    }

    .header-buttons {
        gap: 0.35rem;
    }

    /* Tool Navigation - Switch to Dropdown on Mobile */
    .tool-nav-desktop {
        display: none;
    }

    .tool-nav-mobile {
        display: block;
    }

    .create-list form {
        flex-direction: column;
    }

    .habit-lists {
        grid-template-columns: 1fr;
    }

    .habit-list {
        width: 100%;
    }

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



    .habit-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .habit-controls {
        justify-content: space-between;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-separator {
        display: none;
    }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fff !important;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: var(--text-color);
    line-height: 1.4;
}

/* Toast Types */
.toast.success {
    border-color: #4caf50;
    background: var(--bg-color);
}

.toast.success .toast-icon {
    color: #4caf50;
}

.toast.info {
    border-color: #2196f3;
    background: var(--bg-color);
}

.toast.info .toast-icon {
    color: #2196f3;
}

.toast.warning {
    border-color: #ff9800;
    background: var(--bg-color);
}

.toast.warning .toast-icon {
    color: #ff9800;
}

.toast.error {
    border-color: #f44336;
    background: var(--bg-color);
}

.toast.error .toast-icon {
    color: #f44336;
}

/* Toast Animations */
.toast-enter-active {
    animation: toast-slide-in 0.3s ease-out;
}

.toast-leave-active {
    animation: toast-slide-out 0.3s ease-in;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .toast-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ============================================
   NOTES TOOL
   ============================================ */

/* Override main container constraints for notes tool */
main.notes-active {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.notes-tool-container {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.notes-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    width: 100vw;
    background-color: white;
    overflow: hidden;
}

/* Encryption Warning Banner */
.encryption-warning {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.95rem;
}

.encryption-warning.warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.encryption-warning.error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.encryption-warning .warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.encryption-warning .warning-text {
    flex: 1;
}

.encryption-warning .warning-action-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.encryption-warning .warning-action-btn:hover {
    background-color: #0056b3;
}

/* Tabs Navigation */
.notes-tabs {
    background-color: #f8f9fa;
    border-bottom: 0px solid #dee2e6;
    padding: 0.5rem 1rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;
}

.notes-tabs-list {
    display: flex;
    gap: 0.5rem;
    min-width: min-content;
}

.notes-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 6px 6px 0 0;
    padding: 0.5rem 1.5rem 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: 200px;
    min-width: 80px;
}

.notes-tab:hover {
    background-color: #f8f9fa;
    border-color: #3498db;
}

.notes-tab.active {
    background-color: white;
    border-color: #3498db;
    border-bottom-color: white;
    position: relative;
    z-index: 1;
}

.notes-tab-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    color: #495057;
    cursor: pointer;
}

.notes-tab.active .notes-tab-title {
    color: #3498db;
    font-weight: 500;
}

.notes-tab-title-input {
    flex: 1;
    border: 1px solid #3498db;
    border-radius: 3px;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    color: #495057;
    outline: none;
    background-color: white;
}

.notes-tab-title-input:focus {
    border-color: #2980b9;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.notes-tab-close {
    position: absolute;
    top: 2px;
    right: 2px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.15rem;
    font-size: 0.75rem;
    line-height: 1;
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    border-radius: 2px;
    opacity: 0;
    visibility: hidden;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-tab:hover .notes-tab-close {
    opacity: 1;
    visibility: visible;
}

.notes-tab-close:hover {
    background-color: #dc3545;
    color: white;
}

.notes-unsaved-indicator {
    color: #ff9800;
    font-size: 0.6rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notes-unsaved-indicator:hover {
    color: #f57c00;
    transform: scale(1.2);
}

.notes-tab-new {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.2s ease;
    min-width: 40px;
}

.notes-tab-new:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

/* Notes Peek Icon - appears at right side when in fullscreen */
.notes-peek-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    margin-left: auto; /* Push to the right */
    user-select: none;
}

.notes-peek-icon:hover {
    background-color: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.5);
    transform: scale(1.05);
}

/* Note Content Wrapper - positions content at top-left */
.notes-content-wrapper {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0 0rem 0 0;
    min-height: 0;
    background-color: #f8f9fa;
}

/* Fullscreen mode - fills browser window viewport */
.notes-fullscreen .notes-tabs{
    padding:0;
}

.notes-wrapper.notes-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    padding: 0rem;
    background-color: #f8f9fa;
}

/* Fullscreen dark theme background */
.notes-wrapper.notes-fullscreen .notes-tabs.theme-dark {
    background-color: #2d2d2d;
}

.notes-wrapper.notes-fullscreen .notes-content-wrapper {
    background-color: transparent;
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}

.notes-wrapper.notes-fullscreen .notes-content {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    max-height: none;
    border:0;
}

.notes-wrapper.notes-fullscreen .notes-resize-handle {
    display: none;
}

/* Note Content - the resizable editor area */
.notes-content {
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    overflow: hidden;
    border: 1px solid #ccc;
    border-top:0;
    /* Inline styles will set explicit width/height when resized */
    max-height: calc(100vh - 110px); /* Viewport height minus tabs and padding */
}

/* Resize Handle - bottom right corner */
.notes-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, #3498db 50%);
    opacity: 0.5;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.notes-resize-handle:hover {
    opacity: 1;
}

.notes-resize-handle::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-image:
        linear-gradient(to right, transparent 0px, transparent 4px, #fff 4px, #fff 5px, transparent 5px),
        linear-gradient(to right, transparent 0px, transparent 8px, #fff 8px, #fff 9px, transparent 9px),
        linear-gradient(to bottom, transparent 0px, transparent 4px, #fff 4px, #fff 5px, transparent 5px),
        linear-gradient(to bottom, transparent 0px, transparent 8px, #fff 8px, #fff 9px, transparent 9px);
}

/* Line Numbers */
.notes-line-numbers {
    display: flex;
    flex-direction: column;
    padding: 0;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    overflow-x: hidden;
    user-select: none;
    height: 100%;
    flex-shrink: 0;
    width: 50px;
}

/* Hide scrollbar for line numbers */
.notes-line-numbers::-webkit-scrollbar {
    display: none;
}

.notes-line-numbers {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.line-number-wrapper {
    position: relative;
    width: 50px;
    flex-shrink: 0;
}

.line-number {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    padding: 0 0.5rem;
    text-align: right;
    color: #6c757d;
    user-select: none;
    display: block;
    line-height: 1.6;
}

.notes-textarea {
    flex: 1;
    height: 100%;
    border: none;
    resize: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 0;
    outline: none;
    color: #212529;
    background-color: transparent;
    overflow-y: auto; /* Scroll inside textarea */
    overflow-x: auto;
    padding-left:7px;
}

.notes-textarea::placeholder {
    color: #adb5bd;
}

/* Theme - Light (default) */
.notes-textarea.theme-light {
    background-color: #ffffff;
    color: #212529;
}

.notes-textarea.theme-light::placeholder {
    color: #adb5bd;
}

/* Theme - Dark */
.notes-textarea.theme-dark {
    background-color: #1e1e1e;
    color: #d4d4d4;
}

.notes-textarea.theme-dark::placeholder {
    color: #6e7681;
}

/* Disabled state (when notes are encrypted) */
.notes-textarea:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: #f8f9fa;
}

.notes-textarea.theme-dark:disabled {
    background-color: #2d2d2d;
    opacity: 0.5;
}

/* Dark theme - Tabs */
.notes-tabs.theme-dark {
    background-color: #2d2d2d;
    border-bottom-color: #404040;
}

.notes-tabs.theme-dark .notes-tab {
    background-color: #3a3a3a;
    color: #e8e8e8;
    border-color: #404040;
}

.notes-tabs.theme-dark .notes-tab:hover {
    background-color: #454545;
}

.notes-tabs.theme-dark .notes-tab.active {
    background-color: #1e1e1e;
    border-bottom-color: #1e1e1e;
    color: #ffffff;
}

.notes-tabs.theme-dark .notes-tab-close {
    color: #888888;
}

.notes-tabs.theme-dark .notes-tab-close:hover {
    background-color: #dc3545;
    color: white;
}

.notes-tabs.theme-dark .notes-tab-new {
    background-color: #3498db;
}

.notes-tabs.theme-dark .notes-tab-new:hover {
    background-color: #2980b9;
}

.notes-tabs.theme-dark .notes-peek-icon {
    background-color: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.4);
}

.notes-tabs.theme-dark .notes-peek-icon:hover {
    background-color: rgba(52, 152, 219, 0.25);
    border-color: rgba(52, 152, 219, 0.6);
}

.notes-tabs.theme-dark .notes-unsaved-indicator {
    color: #ffa726;
}

.notes-tabs.theme-dark .notes-unsaved-indicator:hover {
    color: #ffb74d;
}

.notes-tabs.theme-dark .notes-tab-title{
    color: #eee;
}

/* Dark theme - Line Numbers */
.notes-content.theme-dark .notes-line-numbers {
    background-color: #2d2d2d;
    border-right-color: #404040;
}
.notes-content.theme-dark{
    background-color: #2d2d2d;
}

.notes-content.theme-dark .line-number {
    color: #858585;
}

/* Empty State */
.notes-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    padding: 3rem;
}

.notes-empty p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.notes-create-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notes-create-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .notes-wrapper {
        height: calc(100vh - 180px);
    }

    .notes-tabs {
        padding: 0.25rem 0.5rem;
    }

    .notes-tab {
        padding: 0.4rem 0.75rem;
        max-width: 150px;
    }

    .notes-content-wrapper {
        padding: 1rem;
    }

    .notes-textarea {
        font-size: 13px;
    }
}

/* ============================================
   CALENDAR / AGENDA COMPONENT
   ============================================ */

.calendar-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: none;
}

.calendar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

/* Section Headers */
.calendar-section {
    margin-bottom: 1rem;
}

.section-header {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.section-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #495057;
}

/* Pending Block */
.pending-block {
    border-color: #ffc107;
    border-width: 2px;
}

.pending-header {
    background-color: #fff3cd;
    border-bottom-color: #ffc107;
}

/* Future Section */
.future-section .section-header {
    background-color: #e7f3ff;
    border-left: 4px solid #0d6efd;
}

/* Day Blocks */
.day-block {
    margin-bottom: 1.3rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    background-color: #fff;
    transition: box-shadow 0.2s;
}

.day-block:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.day-block.is-today {
    border-color: #0d6efd;
    border-width: 2px;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.875rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.day-block.is-today .day-header {
    background-color: #e7f3ff;
}

.day-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: opacity 0.2s;
}

.day-info:hover {
    opacity: 0.7;
}

.day-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: #0d6efd;
    text-transform: uppercase;
}

.day-date {
    font-size: 0.9375rem;
    color: #495057;
}

.btn-add-entry {
    padding: 0.375rem 0.75rem;
    
    border: none;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-add-entry:hover {
    background-color: #0b5ed7;
    color: white;
}

/* Day Entries */
.day-entries {
    padding: 0.45rem 0.25rem 0.45rem 1.5rem;
}

.day-empty {
    padding: 1rem;
    text-align: center;
    color: #adb5bd;
    font-size: 0.875rem;
    font-style: italic;
    display:none;
}

/* Calendar Entry */
.calendar-entry {
    display: flex;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    margin: 0.25rem;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-entry:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    transform: translateX(4px);
}

.calendar-entry.completed {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.calendar-entry.completed .entry-title {
    text-decoration: line-through;
    color: #6c757d;
}

.calendar-entry.pending {
    border-left: 4px solid #ffc107;
    background-color: #fffbf0;
}

.calendar-entry.future {
    border-left: 4px solid #0d6efd;
}

/* Drag and Drop */
.calendar-entry[draggable="true"] {
    cursor: grab;
}

.calendar-entry[draggable="true"]:active {
    cursor: grabbing;
}

.calendar-entry.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    cursor: grabbing;
}

.day-block.drag-over {
    background-color: #e7f3ff;
    border: 2px dashed #0d6efd;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.2);
}

.calendar-entry.drag-over-entry {
    border-top: 2px solid #0d6efd;
}

/* Task Pool Styles */
.task-pool-block {
    border-color: #17a2b8;
}

.task-pool-header {
    background-color: #d1ecf1;
    border-bottom-color: #17a2b8;
}

.task-pool-header .day-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-pool-header .day-info:hover {
    opacity: 0.7;
}

.pool-count {
    font-size: 0.8125rem;
    color: #6c757d;
    font-weight: normal;
}

.pool-entry {
    border-left: 4px solid #17a2b8;
    background-color: #f0f9fa;
}

.pool-entry .entry-content {
    flex: 1;
}

.entry-date-badge.expired {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 3px;
    color: #856404;
    font-size: 0.6875rem;
    font-weight: 500;
}

.entry-time {
    flex-shrink: 0;
    width: 50px;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #495057;
    padding-top: 0.125rem;
}

.entry-content {
    flex: 1;
    min-width: 0;
}

.entry-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entry-title {
    font-weight: 500;
    font-size: 0.9375rem;
    color: #212529;
}

.entry-date-badge {
    padding: 0.1875rem 0.4375rem;
    background-color: #e9ecef;
    border-radius: 3px;
    font-size: 0.6875rem;
    color: #495057;
    white-space: nowrap;
}

.entry-description {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.5;
}

.entry-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.btn-complete,
.btn-delete {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    background-color: #fff;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-complete {
    color: #6c757d;
}

.btn-complete:hover {
    background-color: #d1e7dd;
    border-color: #198754;
    color: #198754;
}

.btn-complete.is-completed {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.btn-delete {
    color: #6c757d;
}

.btn-delete:hover {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #dc3545;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.calendar-modal {
    width: 500px;
}

@media (min-width: 768px) {
    .calendar-modal {
        width: 700px;
    }
}

/* Manual Reorder Modal */
.manual-reorder-modal {
    width: 400px;
    max-width: 90%;
}

.manual-reorder-modal .reorder-instruction {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 0.95rem;
}

.manual-reorder-modal .reorder-hint {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

.manual-reorder-modal .position-input {
    width: 100%;
    max-width: 120px;
    padding: 0.5rem;
    font-size: 1.1rem;
    text-align: center;
}

/* General Settings Modal */
.general-settings-modal {
    width: 600px;
    max-width: 90%;
}

.general-settings-modal .setting-description {
    color: #6c757d;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.general-settings-modal .button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.general-settings-modal .settings-section {
    margin-bottom: 0;
}

.general-settings-modal .settings-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #212529;
}

.general-settings-modal .warning-text {
    color: #dc3545;
    font-weight: 500;
}

.general-settings-modal .settings-section + .settings-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}

/* Export Password Encryption */
.export-password-container {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.export-password-label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.export-password-input {
    width: 100%;
    padding: 0.625rem;
    font-size: 0.9375rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    margin-bottom: 0.5rem;
}

.export-password-input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.export-password-hint {
    display: block;
    font-size: 0.8125rem;
    color: #6c757d;
    line-height: 1.4;
    font-style: italic;
}

/* Storage Usage Display */
.storage-usage-display {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.storage-usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.storage-usage-label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #495057;
}

.storage-usage-stats {
    font-size: 0.875rem;
    color: #6c757d;
    font-family: 'Courier New', monospace;
}

.storage-usage-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.storage-usage-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 10px;
}

.storage-usage-fill.usage-low {
    background-color: #28a745;
}

.storage-usage-fill.usage-medium {
    background-color: #ffc107;
}

.storage-usage-fill.usage-high {
    background-color: #dc3545;
}

.storage-warning-text {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
    color: #dc3545;
    font-weight: 500;
}

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

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #212529;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: transparent;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
}

.modal-footer-right {
    display: flex;
    gap: 0.75rem;
}

.optional-label {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: normal;
    font-style: italic;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
    font-size: 0.875rem;
}

.form-control-with-action {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.form-control-with-action .form-control {
    flex: 1;
}

.btn-form-action {
    padding: 0.5rem 0.75rem;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-form-action:hover {
    background-color: #5c636a;
}

@media (min-width: 768px) {
    .calendar-modal .form-group {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
        flex-wrap: nowrap;
    }

    .calendar-modal .form-group > label:not(.checkbox-label) {
        flex-shrink: 0;
        width: 120px;
        margin-bottom: 0;
        padding-top: 0.625rem;
        text-align: right;
    }

    .calendar-modal .form-group .form-control,
    .calendar-modal .form-group .form-control-wrapper,
    .calendar-modal .form-group .form-control-with-action {
        flex: 1 1 0;
        max-width: 400px;
        min-width: 0;
        width: auto;
    }

    .calendar-modal .form-group textarea.form-control {
        max-width: 500px;
    }

    .calendar-modal .form-group .checkbox-label {
        margin-left: 120px;
        padding-left: 1rem;
    }
}

.form-control-wrapper {
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0d6efd;
}

/* Tags in Form */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    background-color: #0d6efd;
    color: white;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    margin-left: 0.25rem;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tag-remove:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.suggested-tags {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.suggested-tags-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #6c757d;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggested-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    color: #495057;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
}

.suggested-tag:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Tags in Entry List */
.entry-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.entry-tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 3px;
    color: #0d6efd;
    font-size: 0.6875rem;
    font-weight: 500;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #0d6efd;
    color: white;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5c636a;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #bb2d3b;
}

/* Calendar Settings */
.calendar-settings-modal {
    max-width: 600px;
}

.settings-placeholder {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-content {
        padding: 0.5rem;
    }

    .day-header {
        padding: 0.75rem 1rem;
    }

    .calendar-entry {
        flex-direction: column;
        gap: 0.5rem;
    }

    .entry-time {
        width: auto;
    }

    .entry-actions {
        justify-content: flex-end;
    }

    .calendar-modal {
        width: 95%;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* ============================================
   BOOKMARKS COMPONENT
   ============================================ */

.bookmarks-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.bookmarks-content {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.bookmarks-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.bookmarks-empty p {
    font-size: 1.125rem;
}

/* Hint message for drag/drop and paste */
.bookmarks-hint {
    margin: 2rem auto 1rem;
    padding: 1rem 1.5rem;
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 6px;
    max-width: 800px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.bookmarks-hint .hint-text {
    color: #1565c0;
    font-size: 0.9375rem;
    line-height: 1.5;
    flex: 1;
}

.bookmarks-hint .hint-dismiss {
    background: none;
    border: none;
    color: #1565c0;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    flex-shrink: 0;
    opacity: 0.6;
}

.bookmarks-hint .hint-dismiss:hover {
    background-color: rgba(21, 101, 192, 0.1);
    opacity: 1;
}

/* Category Styles */
.bookmark-category {
    margin-bottom: 1rem;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    cursor: grab;
    transition: background-color 0.2s;
}

.category-header:active {
    cursor: grabbing;
}

.category-header.uncategorized {
    background-color: #fff3cd;
}

.category-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #212529;
    cursor: pointer;
    transition: color 0.2s;
}

.category-title:hover {
    color: #0d6efd;
}

.category-count {
    font-size: 0.8125rem;
    color: #6c757d;
    font-weight: normal;
}

.btn-add-link-to-category {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 600;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.btn-add-link-to-category:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Links List */
.links-list {
    display: flex;
    flex-direction: column;
}

.link-item {
    padding: 0.375rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s;
}

.link-item:last-child {
    border-bottom: none;
}

.link-item:hover {
    background-color: #f8f9fa;
}

.link-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.link-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 120px;
    max-width: 200px;
    flex-shrink: 0;
}

.link-url {
    font-size: 0.8125rem;
    color: #0d6efd;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.link-url:hover {
    text-decoration: underline;
}

.link-additional {
    font-size: 0.8125rem;
    color: #6c757d;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    flex-shrink: 0;
}

.links-empty {
    padding: 1rem;
    text-align: center;
}

.empty-message {
    color: #6c757d;
    font-style: italic;
    font-size: 0.875rem;
}

/* Drag and Drop States */
.link-item {
    cursor: grab;
}

.link-item:active {
    cursor: grabbing;
}

.dragging-link {
    opacity: 0.4;
}

.drag-over-category {
    background-color: #e7f3ff;
    border-color: #0d6efd;
}

.dragging-category {
    opacity: 0.4;
}

.drag-over-category-header .category-header {
    background-color: #0d6efd;
    color: white;
}

.drag-over-category-header .category-title,
.drag-over-category-header .category-count {
    color: white;
}

.links-empty {
    min-height: 60px;
}

/* Selection Mode */
.selected-link {
    background-color: #b3d9ff !important;
    border-left: 3px solid #0d6efd;
    padding-left: calc(1rem - 3px);
}

.selected-link:hover {
    background-color: #99c9ff !important;
}

/* Floating Action Buttons */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.selection-info {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    padding-right: 0.5rem;
    border-right: 1px solid #dee2e6;
}

.floating-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.floating-btn-cancel {
    background-color: #6c757d;
    color: white;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.floating-btn-cancel:hover {
    background-color: #5c636a;
}

.floating-btn-move {
    background-color: #0d6efd;
    color: white;
}

.floating-btn-move:hover {
    background-color: #0b5ed7;
}

.floating-btn-delete {
    background-color: #dc3545;
    color: white;
}

.floating-btn-delete:hover {
    background-color: #bb2d3b;
}

/* Bookmarks Modal */
.bookmarks-modal {
    width: 500px;
}

.bookmarks-settings-modal {
    max-width: 600px;
}

/* Category Suggestions Block */
.suggestions-block {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.suggestions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.suggestions-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
}

.btn-dismiss {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.btn-dismiss:hover {
    background-color: #dee2e6;
    color: #212529;
}

.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-btn {
    padding: 0.375rem 0.75rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-btn:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

@media (min-width: 768px) {
    .bookmarks-modal {
        width: 700px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .bookmarks-content {
        padding: 0.75rem;
    }

    .category-header {
        padding: 0.5rem 0.75rem;
    }

    .link-item {
        padding: 0.375rem 0.75rem;
    }

    .selected-link {
        padding-left: calc(0.75rem - 3px);
    }

    .category-title {
        font-size: 0.875rem;
    }

    .link-title {
        font-size: 0.8125rem;
        min-width: 100px;
        max-width: 150px;
    }

    .link-url,
    .link-additional {
        font-size: 0.75rem;
    }

    .btn-add-link-to-category {
        width: 22px;
        height: 22px;
        font-size: 0.875rem;
    }

    .floating-actions {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        padding: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .selection-info {
        flex-basis: 100%;
        text-align: center;
        padding-right: 0;
        padding-bottom: 0.5rem;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 0.5rem;
    }

    .floating-btn {
        flex: 1;
        min-width: fit-content;
    }

    .bookmarks-modal {
        width: 95%;
    }
}

/* ============================================
   LOGGER COMPONENT
   ============================================ */

.logger-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.logger-content {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logger-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.logger-empty p {
    font-size: 1.125rem;
}

/* Log Styles */
.logger-log {
    margin-bottom: 1.5rem;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.log-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.log-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    cursor: pointer;
    transition: color 0.2s;
}

.log-title:hover {
    color: #0d6efd;
}

.log-count {
    font-size: 0.8125rem;
    color: #6c757d;
    font-weight: normal;
}

/* Input Section */
.log-input-section {
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.log-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
    resize: none;
    overflow-y: hidden;
    min-height: 2.25rem;
    max-height: 200px;
    line-height: 1.5;
    font-family: inherit;
}

.log-input:focus {
    outline: none;
    border-color: #0d6efd;
    overflow-y: auto;
}

.log-input::placeholder {
    color: #adb5bd;
}

/* Annotations List */
.annotations-list {
    display: flex;
    flex-direction: column;
}

.annotation-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.annotation-item:last-child {
    border-bottom: none;
}

.annotation-item:hover {
    background-color: #f8f9fa;
}

.annotation-content {
    flex: 1;
    min-width: 0;
}

.annotation-text {
    font-size: 0.875rem;
    color: #212529;
    word-wrap: break-word;
    white-space: pre-wrap;
    margin-bottom: 0.25rem;
}

.annotation-time {
    font-size: 0.75rem;
    color: #6c757d;
}

.annotation-delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s, opacity 0.2s;
    flex-shrink: 0;
    opacity: 0;
}

.annotation-item:hover .annotation-delete-btn {
    opacity: 0.5;
}

.annotation-delete-btn:hover {
    background-color: #ffebee;
    opacity: 1 !important;
}

.annotations-empty {
    padding: 2rem 1rem;
    text-align: center;
}

.annotations-empty .empty-message {
    color: #6c757d;
    font-style: italic;
    font-size: 0.875rem;
}

/* Collapse Icon */
.collapse-icon {
    font-size: 0.75rem;
    color: #6c757d;
    user-select: none;
}

/* Annotation Edit Form */
.annotation-edit-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.annotation-edit-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #0d6efd;
    border-radius: 4px;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    line-height: 1.5;
}

.annotation-edit-input:focus {
    outline: none;
    border-color: #0b5ed7;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.annotation-edit-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
}

/* Logger Modal */
.logger-modal {
    max-width: 500px;
}

@media (max-width: 768px) {
    .logger-content {
        padding: 0.75rem;
    }

    .log-header {
        padding: 0.5rem 0.75rem;
    }

    .log-input-section {
        padding: 0.5rem 0.75rem;
    }

    .annotation-item {
        padding: 0.5rem 0.75rem;
    }

    .log-title {
        font-size: 0.9375rem;
    }

    .logger-modal {
        width: 95%;
    }
}
