/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #333333;
    --secondary-color: #666666;
    --accent-color: #00ff00;
    --dark-bg: #121212;
    --light-bg: #f8f9fa;
    --text-dark: #333;
    --text-light: #f8f9fa;
    --border-radius: 8px;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    
    /* Theme variables */
    --bg-color: var(--light-bg);
    --text-color: var(--text-dark);
    --card-bg: white;
    --header-bg: white;
    --border-color: #eee;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f8f9fa;
    --card-bg: #1e1e1e;
    --header-bg: #1a1a1a;
    --border-color: #333;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background-color: var(--header-bg);
    box-shadow: var(--shadow);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

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

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo i {
    color: var(--accent-color);
    margin-right: 10px;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--dark-bg);
}

.btn-primary:hover {
    background-color: #00cc00;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.theme-toggle {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    color: var(--text-color);
}

.theme-toggle:hover {
    border-color: var(--accent-color);
    transform: rotate(20deg);
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 100px);
}

/* Section Title */
.section-title {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
}

/* Property Information Section */
.property-info-section {
    margin-bottom: 2rem;
}

.property-info-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.property-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--accent-color);
    font-size: 0.85rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="time"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 255, 0, 0.1);
}

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

/* Filter Section */
.filter-section {
    margin-bottom: 40px;
}

.filter-divider {
    margin: 20px 0;
    border-top: 2px solid var(--border-color);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
}

.filter-btn.renovation-filter {
    border-color: #ff9800;
    color: #ff9800;
}

.filter-btn.renovation-filter:hover {
    border-color: #ff9800;
    background-color: rgba(255, 152, 0, 0.1);
    transform: translateY(-2px);
}

.filter-btn.renovation-filter.active {
    background-color: #ff9800;
    color: white;
    border-color: #ff9800;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: var(--dark-bg);
    border-color: var(--accent-color);
}

/* Progress Section */
.progress-section {
    margin-bottom: 40px;
}

.progress-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

.progress-header h3 {
    margin: 0;
}

.toggle-all-btn {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 255, 0, 0.3);
}

.toggle-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 255, 0, 0.5);
}

.toggle-all-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.toggle-all-btn.collapsed i {
    transform: rotate(180deg);
}

.progress-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.progress-bar {
    width: 100%;
    height: 30px;
    background-color: var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #00cc00);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 1.1rem;
}

.progress-stats strong {
    color: var(--accent-color);
}

.progress-stats .issue-stat strong {
    color: #ff9800;
}

.progress-stats .request-stat strong {
    color: #2196F3;
}

/* Checklist Section */
.checklist-section {
    margin-bottom: 40px;
}

.category-group {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
    transition: var(--transition);
}

.category-group.hidden {
    display: none;
}

.category-header {
    background: linear-gradient(135deg, var(--accent-color), #00cc00);
    color: var(--dark-bg);
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.category-header:hover {
    opacity: 0.9;
}

.category-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-header .toggle-icon {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.category-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.category-content {
    padding: 25px;
    padding-bottom: 35px;
    max-height: none;
    overflow: visible;
    transition: max-height 0.3s ease, padding 0.3s ease, overflow 0s;
}

.category-content.collapsed {
    max-height: 0;
    padding: 0 25px;
    overflow: hidden;
}

.checklist-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.checklist-item:last-child {
    border-bottom: none;
    padding-bottom: 20px;
}

.checklist-item:hover {
    background-color: var(--border-color);
}

.checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding-top: 2px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.checkbox-wrapper.renovation-check input[type="checkbox"] {
    accent-color: #ff9800;
}

.checkbox-label {
    font-size: 0.85rem;
    color: var(--text-color);
    white-space: nowrap;
}

.checkbox-label.ok-label {
    color: var(--accent-color);
}

.checkbox-label.issue-label {
    color: #ff9800;
}

.request-doc-btn {
    padding: 6px 12px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.request-doc-btn:hover {
    background-color: #1976D2;
}

.request-doc-btn.requested {
    background-color: #4CAF50;
}

.item-content {
    flex: 1;
}

.item-text {
    font-size: 1.05rem;
    margin-bottom: 10px;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.info-deadline-btn {
    background: none;
    border: none;
    color: #2196F3;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 2px 6px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-deadline-btn:hover {
    color: #1976D2;
    background-color: rgba(33, 150, 243, 0.1);
    transform: scale(1.15);
}

.item-text.checked {
    text-decoration: line-through;
    opacity: 0.6;
}

.item-notes {
    margin-top: 10px;
}

.item-notes textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: var(--transition);
}

.item-notes textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag {
    background-color: var(--border-color);
    color: var(--text-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Notes Section */
.notes-section {
    margin-bottom: 40px;
}

.notes-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.notes-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.notes-card textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: var(--transition);
}

.notes-card textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px var(--shadow-color);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

.close-btn:hover {
    color: #ff0000;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid var(--border-color);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

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

.report-section.property-info-report {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.05), rgba(0, 255, 0, 0.02));
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}

.report-section.property-info-report p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-section.property-info-report i {
    color: var(--accent-color);
    min-width: 20px;
}

.report-section h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.report-section ul {
    list-style: none;
    padding-left: 0;
}

.report-section li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.report-section li:last-child {
    border-bottom: none;
}

.report-note {
    background-color: var(--border-color);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-top: 5px;
    font-style: italic;
}

/* Footer Styles */
.footer {
    background: var(--card-bg);
    border-top: 3px solid var(--accent-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 1rem;
}

.footer-left,
.footer-right,
.footer-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-left {
    justify-content: flex-start;
}

.footer-right {
    justify-content: flex-end;
}

.help-btn {
    background: var(--accent-color);
    color: #000;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 255, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 12px rgba(0, 255, 0, 0.5);
}

.footer-center p {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
}

.footer-center i {
    color: #ff0066;
    margin: 0 0.5rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.footer-center a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-center a:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px var(--accent-color);
}

.footer-right p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Help Modal Styles */
.help-modal-content {
    max-width: 800px;
    max-height: 85vh;
}

.help-modal-body {
    max-height: calc(85vh - 120px);
    overflow-y: auto;
}

.help-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.help-tab {
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-tab:hover {
    color: var(--text-color);
    background: rgba(0, 255, 0, 0.05);
}

.help-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.help-tab-content {
    display: none;
}

.help-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.help-content h3 {
    color: var(--text-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', sans-serif;
}

.help-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.help-section:last-child {
    border-bottom: none;
}

.help-section h4 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-section p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.help-section ul {
    margin-left: 1.5rem;
    color: var(--text-color);
    line-height: 1.8;
}

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

.help-section strong {
    color: var(--accent-color);
}

.help-section a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.help-section a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-left,
    .footer-right {
        justify-content: center;
    }
    
    .help-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .help-tab {
        border-bottom: 1px solid var(--border-color);
        border-left: 3px solid transparent;
    }
    
    .help-tab.active {
        border-left-color: var(--accent-color);
        border-bottom-color: var(--border-color);
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .filter-buttons {
        justify-content: center;
    }

    .filter-btn {
        font-size: 0.85rem;
        padding: 8px 15px;
    }

    .progress-stats {
        flex-direction: column;
        align-items: center;
    }

    .category-header h3 {
        font-size: 1.2rem;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Deadline Modal Styles */
.deadline-modal-content {
    max-width: 700px;
}

.deadline-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.deadline-section {
    padding: 16px;
    background: var(--card-bg);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.deadline-section h3 {
    color: var(--accent-color);
    margin-bottom: 12px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.deadline-text {
    font-weight: bold;
    color: #ff9800;
    font-size: 1.1rem;
    margin: 0;
}

.deadline-section p {
    margin: 0;
    line-height: 1.6;
}

#deadlineSources {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#deadlineSources a {
    color: #2196F3;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 6px;
    transition: var(--transition);
}

#deadlineSources a:hover {
    background: rgba(33, 150, 243, 0.2);
    transform: translateX(5px);
}

#deadlineSources a i {
    color: var(--accent-color);
}

@media print {
    .header,
    .filter-section,
    .progress-section,
    .modal-footer {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    .modal-content {
        box-shadow: none;
        max-height: none;
    }
}
