﻿body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: #f9f9fb;
    color: #333;
}

header {
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-container {
    max-width: 1280px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    margin-left: 1rem;
    text-decoration: none;
    color: #0077cc;
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: #e3f2fd;
    margin-bottom: 3rem;
}

.hero h1 {
    margin: 0;
    font-size: 2.5rem;
}

.tagline {
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

.hero-actions {
    margin-top: 1.5rem;
}

.hero .tagline {
    font-size: 1.2rem;
    color: #333;
}

.cta {
    margin-bottom: 16px;
    display: inline-block;
    background-color: #007BFF;
    color: white;
    font-weight: bold;
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.cta:hover {
    background-color: #0056b3;
}

.filter-bar {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-bar strong {
    margin-right: 8px;
    font-size: 15px;
    color: #444;
}

.btn-filter {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.btn-filter.active {
    background-color: #007BFF;
    color: #fff;
    border-color: #007BFF;
}

.alt-link {
    margin-left: 1rem;
    color: #0077cc;
    text-decoration: underline;
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
	padding: 0 1rem 2rem;
}

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    max-width: 300px;
    text-align: center;
}

.auth-form-wrapper {
    background-color: white;
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 10px;
}

/* Dashboard container layout */
.dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
}

/* Sidebar on the left */
.sidebar {
    flex: 1 1 200px;
    max-width: 220px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.sidebar p {
    margin: 10px 0;
    color: #333;
    cursor: pointer;
}

.sidebar p:hover {
    text-decoration: underline;
}

/* Main content beside sidebar */
.main-features {
    flex: 3 1 600px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Individual feature cards */
.main-features .feature-card {
    flex: 1 1 280px;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.feature-card h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* Responsive stacking on small screens */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }

  .sidebar {                      /* keep it mountable by JS */
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;                 /* or your preferred width */
    max-width: 80vw;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0,0,0,.08);
    z-index: 1000;
  }
  
    .main-features {
        flex-direction: column;
    }

    .main-features .feature-card {
        width: 100%;
    }

    .main-content {
        margin-left: 0;
    }

    .form-wrapper {
        width: 100%;
        padding: 15px;
        border-radius: 0;
    }
}

/* Fix the gap when sidebar is collapsed */
.sidebar.collapsed {
    display: none !important;
}

.sidebar.collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

#toggle-arrow {
    font-size: 1.2rem;
    user-select: none;
    transition: transform 0.3s ease;
}

.sidebar.collapsed #toggle-arrow {
    transform: rotate(180deg);
}

#sidebar-toggle-button {
    position: fixed;
    top: 100px;
    left: 10px;
    background-color: #D3D3D3;
    color: white;
    padding: 6px 10px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    z-index: 999;
    font-size: 14px;
}

#toggleSidebar {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #D3D3D3;
    position: absolute;
    top: 1rem;
    left: 0.5rem;
    z-index: 1000;
}

.content-box {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

form input,form input[type=text], form input[type=email] {
    width: 95%;
    padding: 8px;
    margin: 6px 0 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

form button:hover {
    background-color: #45a049;
}

.success {
    color: green;
}

.error {
    color: red;
}

.form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
}

.reminder-box {
    max-height: 1500px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 8px;
    background: #f9f9f9;
    margin-bottom: 30px;
}

.reminder-item {
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 12px;
}

.reminder-item.today {
    background-color: #e6f7ff; /* Light blue for today */
    border-left: 4px solid #1890ff;
    padding-left: 10px;
}

.reminder-item.overdue {
    background-color: #fff2f0; /* Light red */
    border-left: 4px solid #ff4d4f;
    padding-left: 10px;
}

.dashboard-layout {
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
    width: 100%;
}

/* Make sure main content fills remaining width */
.main-content {
    flex-grow: 1;
    min-width: 0;
    transition: all 0.3s ease;
}

/* When sidebar is collapsed, expand main content to full width */
.main-content.expanded {
    flex-basis: 100%;
    max-width: 100%;
    margin-left: 0; /* Remove !important unless you're overriding something specific */
}

.page-section {
    flex-grow: 1;
}

/* Optional: make sure footer is below everything */
footer {
    clear: both;
}

.reminder-item {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 10px;
    position: relative;
}

.reminder-item.today {
    border-left: 6px solid #007bff;
    background-color: #eef6ff;
}

.reminder-actions {
    position: absolute;
    top: 10px;
    right: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-small {
    font-size: 0.9em;
    text-decoration: underline;
    color: #007bff;
    background: none;
    border: none;
    cursor: pointer;
}

.inline-form {
    display: inline;
}

.mark-complete {
    font-size: 1.1em;
    background: none;
    border: none;
    color: green;
    cursor: pointer;
}

.mark-complete:hover {
    color: darkgreen;
}

label input[type=checkbox] {
    margin-left: 8px;
    vertical-align: middle;
}

.form-wrapper label {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
}

.inline-checkbox {
    margin: 15px 0;
}

.inline-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    white-space: nowrap;
}

.content-box p { 
	margin: 10px 0; 
}

.content-box h2 { 
	font-size: 1.5rem; 
}

.btn-filter {
    display: inline-block;
    padding: 4px 10px;
    margin: 0 4px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
}
.btn-filter.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
    gap: 12px;
}

.filter-left strong {
    margin-right: 8px;
    font-size: 15px;
    color: #444;
}

.filter-right .cta {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .filter-toolbar {
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .filter-right {
        width: 100%;
        text-align: right;
    }

    .filter-right .cta {
        width: 100%;
        text-align: center;
    }
}

.filter-form label {
    display: flex;
    align-items: center;
    margin-right: 10px;
    gap: 6px;
}

.filter-form input[type=date] {
    width: 150px;
}

@media (max-width: 768px) {
  .reminder-box {
    max-height: 70vh;
    overflow-y: auto;
  }
}

.logout-btn {
  background-color: #F3F3F3;
  color: #000;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.logout-btn:hover {
  background-color: #c0c0c0;
}

.reminder-box .reminder-item[data-when=overdue] {
  background-color: #fff2f0 !important;
  border-left: 4px solid #ff4d4f !important;
}
.reminder-box .reminder-item[data-when=today] {
  background-color: #e6f7ff !important;
  border-left: 4px solid #1890ff !important;
}
