body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #000000;
    margin: 0;
    /* Light gray background, similar to Google Docs */
    background-color: #f4f4f4;
}

/* Navbar Styles */
.navbar {
    background-color: #333;
    color: white;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.navbar a {
    color: white;
    text-decoration: none;
}
.nav-brand {
    font-size: 1.5em;
    font-weight: bold;
}
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100%;
}
.nav-item {
    position: relative;
}
.nav-item > a {
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 100%;
}

/* Make the link a flex container to position the arrow */
.nav-item.has-dropdown > a {
    justify-content: space-between;
}

/* Style for folder items to make them look more substantial */
.nav-item.has-dropdown > a {
    font-weight: 500;
}

/* Add a subtle arrow for dropdowns */
.dropdown-arrow {
    border: solid white;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    margin-left: 8px;
    cursor: pointer;
    flex-shrink: 0; /* Prevent arrow from shrinking */
    transform: rotate(45deg);
    transition: transform 0.2s;
}

.dropdown {
    display: none;
    position: absolute;
    background-color: #333;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 200px;
    z-index: 1;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Show dropdown when the 'open' class is added by JS */
.nav-item.open > .dropdown {
    display: block;
}
.nav-item.open > a > .dropdown-arrow {
    transform: rotate(-135deg); /* Point arrow up */
}
.dropdown .nav-item {
    width: 100%;
    height: auto;
}
.dropdown .nav-item a {
    padding: 12px 16px;
}

/* Differentiate files from folders in dropdowns */
.dropdown .nav-item:not(.has-dropdown) a {
    color: #ddd;
    font-weight: normal;
}

.nav-item:hover, .nav-item.open {
    background-color: #555;
}
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 24px;
}

/* Wrapper for the entire doc page content (header, body, footer) */
.doc-page-wrapper {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 10px; /* Add some padding for smaller screens */
}

/* Document Content Styles */
.container {
    max-width: 800px;
    margin: 20px auto;
    /* Padding to simulate document margins */
    padding: 50px 60px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Use a sans-serif font for headings, like in Google Docs */
h1, h2, h3, h4, h5, h6 {
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #000000;
    font-weight: 700;
}
h1 { font-size: 2em; }

/* Special styling for the main document title to remove top margin */
.main-content > h1:first-child {
    margin-top: 0;
}

.doc-header {
    margin-bottom: 1.5em;
    padding: 0 10px; /* Align text with container padding */
    font-size: 0.8em;
    color: #555;
    text-align: right;
}
.doc-footer {
    margin-top: 1.5em;
    padding: 1em 10px; /* Align text with container padding */
    border-top: 1px solid #ddd;
    font-size: 0.8em;
    color: #777;
    text-align: center;
}
h2 { font-size: 1.5em; }
h3 { font-size: 1.25em; }
h4 { font-size: 1em; font-weight: bold; }
h5 { font-size: .875em; font-weight: bold; }
h6 { font-size: .8em; font-weight: bold; color: #666; }

p, ul, table {
    margin-bottom: 1em;
}
a {
    color: #007bff;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
ul {
    padding-left: 2em;
}
li {
    margin-bottom: 0.5em;
}
img {
  margin-top: 1em;
  margin-bottom: 1em;
  border-radius: 4px;
  max-width: 100%;
  height: auto;
}
table {
    border-collapse: collapse;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    width: 100%;
}
th, td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
}
th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

/* Styles for file browser table */
tr:nth-child(even) {
    background-color: #f9f9f9;
}
.file-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* Asana Project List Styles */
.asana-project-list {
    list-style: none;
    padding: 0;
}
.asana-project-item {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
}
.asana-project-item:last-child {
    border-bottom: none;
}
.project-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 5px 15px 0 0; /* Add top margin to align with text */
    flex-shrink: 0;
    background-color: #ccc; /* Default for 'not_set' */
}
.status-on-track { background-color: #2ecc71; } /* Green */
.status-at-risk { background-color: #f1c40f; } /* Yellow */
.status-off-track { background-color: #e74c3c; } /* Red */
.status-on-hold { background-color: #3498db; } /* Blue */

.project-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.project-name {
    font-weight: 500;
    font-size: 1.1em;
    margin-bottom: 4px;
}
.project-description {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: #666;
}
/* Ensure lists within descriptions have proper padding */
.project-description ul, .project-description ol {
    padding-left: 20px;
    margin-top: 5px;
}

.milestones-container {
    margin-top: 10px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}
.milestone-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}
.milestone-item {
    display: flex;
    flex-direction: column; /* Stack title and description vertically */
    font-size: 0.9em;
    margin-bottom: 10px;
}
.milestone-status-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    position: relative;
    flex-shrink: 0;
}
/* Create the checkmark using a rotated L-shape with borders */
.milestone-item.completed .milestone-status-icon::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #2ecc71; /* Green checkmark */
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.milestone-item.completed .milestone-date {
    color: #888; /* Dim the date of completed items */
}
/* Container for month/day and year */
.milestone-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 10px;
    flex-shrink: 0;
    width: 70px; /* Allocate fixed space for the date */
}
.milestone-month-day {
    font-weight: 600;
    color: #333;
}
.milestone-date.no-date {
    color: #aaa;
}
.milestone-year {
    font-size: 0.9em;
    color: #888; /* Lighter tone for the year */
    font-weight: 400;
}
.milestone-title {
    display: flex;
    align-items: baseline;
}
.milestone-description {
    font-size: 0.95em;
    color: #777;
    padding-left: 80px; /* Adjust indent for icon, date, and title */
    margin-top: 4px;
}
/* Ensure lists within milestone descriptions have proper padding */
.milestone-description ul, .milestone-description ol {
    padding-left: 20px;
    margin-top: 5px;
}

/* Mobile styles */
@media (max-width: 768px) {
    .navbar {
        position: relative;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Height of the navbar */
        left: 0;
        background-color: #333;
        height: auto;
    }
    .nav-links.active {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .dropdown {
        position: static;
        display: none;
        background-color: #444;
        box-shadow: none;
        border-top: 1px solid #555;
    }
    .container {
        margin: 10px;
        padding: 20px;
    }
}