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

:root {
    --primary-blue: #2196F3;
    --success-green: #4CAF50;
    --warning-amber: #FFC107;
    --danger-red: #F44336;
    --accent-purple: #9C27B0;
    --text-dark: #212121;
    --text-light: #757575;
    --background: #FAFAFA;
    --surface: #FFFFFF;
    --border: #E0E0E0;
    --shadow: rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    padding-bottom: 20px; /* Reduced since footer is not fixed anymore */
}

/* Header */
.app-header {
    background: var(--primary-blue);
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 4px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
}

.app-logo {
    height: 40px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Main Content */
.app-main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sections */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.section-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

/* Buttons */
.primary-btn, .secondary-btn, .danger-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

.primary-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

.secondary-btn {
    background: var(--surface);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.secondary-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

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

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
    text-align: center;
    border: 3px solid transparent;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow);
}

.stat-card:nth-child(1) { border-color: var(--warning-amber); }
.stat-card:nth-child(2) { border-color: var(--primary-blue); }
.stat-card:nth-child(3) { border-color: var(--success-green); }



.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-dark);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Filters */
.filters-section {
    margin-bottom: 2rem;
}

.filter-group {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
}

.filter-group input,
.filter-group select {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background: var(--surface);
    transition: var(--transition);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Activities List */
.activities-list {
    display: grid;
    gap: 1rem;
}

.activity-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
    border-left: 4px solid var(--primary-blue);
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow);
}

.activity-card.status-pending { border-left-color: var(--warning-amber); }
.activity-card.status-in-progress { border-left-color: var(--primary-blue); }
.activity-card.status-completed { border-left-color: var(--success-green); }

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.activity-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.activity-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.activity-status.pending {
    background: var(--warning-amber);
    color: var(--text-dark);
}

.activity-status.in-progress {
    background: var(--primary-blue);
    color: white;
}

.activity-status.completed {
    background: var(--success-green);
    color: white;
}

.activity-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.activity-category {
    background: var(--accent-purple);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
}

.activity-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}



.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Forms */
.activity-form-container {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
    border: 3px solid var(--primary-blue);
}

.activity-form {
    display: grid;
    gap: 1.5rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--surface);
    transition: var(--transition);
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Reports */
.report-controls {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 2rem;
    border: 3px solid var(--success-green);
}

.date-range {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.date-range label {
    font-weight: 600;
}

.date-range input {
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
}

.report-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.report-preview {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.report-stat {
    text-align: center;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--border-radius);
}

.report-stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.report-activities {
    margin-top: 2rem;
}

.report-activity {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
}

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

/* FAQ */
.faq-container {
    display: grid;
    gap: 1rem;
}

.faq-item {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
    overflow: hidden;
    border: 3px solid var(--accent-purple);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--background);
}

.faq-icon {
    font-size: 1.2rem;
    transition: var(--transition);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
    line-height: 1.6;
    animation: slideDown 0.3s ease;
}

.faq-answer[hidden] {
    display: none;
}

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

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

.modal.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--surface);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    animation: slideIn 0.2s ease;
    position: relative;
}

.modal-header {
    padding: 1.5rem 1.5rem 0;
    border-bottom: none;
    display: block;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-dark);
    padding: 0.5rem;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--background);
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-actions {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: var(--background);
    flex-wrap: wrap;
    align-items: center;
}



/* Activity Info Styles */
.activity-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.activity-status-display {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.category-badge {
    padding: 0.5rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

.activity-description h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
}

.activity-description p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.5;
    background: var(--background);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.activity-dates {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.date-label {
    font-weight: 500;
    color: var(--text-dark);
}

.date-value {
    color: var(--text-light);
    font-weight: 500;
}

.date-item.deadline-overdue .date-value {
    color: var(--danger-red);
    font-weight: 600;
}

.date-item.deadline-warning .date-value {
    color: var(--warning-amber);
    font-weight: 600;
}

.quick-status-actions h4 {
    margin: 0 0 0.75rem 0;
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
}

.status-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.status-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text-dark);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.status-btn:hover {
    background: var(--background);
    border-color: var(--primary-blue);
}

.status-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    min-width: 60px;
}

.nav-item.active {
    color: var(--primary-blue);
    background: rgba(33, 150, 243, 0.1);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

/* Footer */
.app-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1rem;
    text-align: center;
    margin-bottom: 80px; /* Space for bottom navigation */
    box-shadow: 0 -2px 8px var(--shadow);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-separator {
    color: var(--text-light);
    opacity: 0.6;
}

.footer-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.footer-link:hover {
    color: #1976D2;
    text-decoration: underline;
}

.footer-version {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .filter-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .date-range {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 0.75rem;
    }
    
    .report-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .activity-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* Fix for elements that might drop */
    .activity-card {
        padding: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .activity-title {
        font-size: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .activity-description {
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .activity-category {
        align-self: flex-start;
        margin-bottom: 0.5rem;
    }
    
    .activity-date {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .app-main {
        padding: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .activity-form-container {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 0.5rem;
    }
    
    /* Additional fixes for very small screens */
    .activity-card {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .activity-header {
        gap: 0.25rem;
    }
    
    .activity-meta {
        gap: 0.25rem;
    }
    
    .activity-category {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .activity-status {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .primary-btn, .secondary-btn, .danger-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* Fixes for elements that might drop on small screens */
@media (max-width: 480px) {
    /* Prevent text overflow */
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Fix for long text in cards */
    .activity-card {
        min-height: auto;
    }
    
    /* Fix for form elements */
    input, textarea, select {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Fix for buttons */
    .primary-btn, .secondary-btn, .danger-btn {
        white-space: normal;
        text-align: center;
        min-height: 44px; /* Touch target size */
    }
    
    /* Fix for navigation */
    .nav-item {
        min-height: 44px;
        justify-content: center;
    }
    
    /* Fix for modal content */
    .modal-content {
        max-width: calc(100vw - 1rem);
        margin: 0.5rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    z-index: 1001;
    animation: slideInRight 0.3s ease;
}

.notification.success {
    background: var(--success-green);
}

.notification.error {
    background: var(--danger-red);
}

.notification.warning {
    background: var(--warning-amber);
    color: var(--text-dark);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .footer-version {
        font-size: 0.7rem;
    }
}

/* Accessibility improvements */
.activity-card:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

.deadline-overdue {
    font-weight: bold;
}

.deadline-warning {
    font-weight: bold;
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: var(--border-radius);
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Activity Details Modal - Enhanced Design */
.activity-details-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    max-height: 70vh;
    overflow-y: auto;
}

/* Compact Layout */
.activity-compact-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-grid-compact {
    display: grid;
    gap: 0.75rem;
}

.info-grid-compact .info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--background);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-blue);
}

.info-grid-compact .info-label {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 80px;
}

.info-grid-compact .info-value {
    color: var(--text-dark);
    flex: 1;
}

.info-grid-compact .info-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

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

.quick-actions-compact .quick-action-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
}

/* Header Section */
.activity-header-section {
    background: linear-gradient(135deg, var(--primary-blue), #1976D2);
    color: white;
    padding: 1.5rem;
    position: relative;
}

.activity-title-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.activity-meta-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.activity-category-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.activity-status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Progress Section */
.activity-progress-section {
    background: var(--background);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.progress-bar-container {
    background: var(--border);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--success-green));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Content Grid */
.activity-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.activity-content-grid::-webkit-scrollbar {
    width: 6px;
}

.activity-content-grid::-webkit-scrollbar-track {
    background: transparent;
}

.activity-content-grid::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.activity-content-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.activity-info-column,
.activity-timeline-column {
    padding: 1.5rem;
}

.activity-info-column {
    border-right: 1px solid var(--border);
    background: var(--surface);
}

.activity-timeline-column {
    background: var(--background);
}

/* Info Sections */
.info-section {
    margin-bottom: 2rem;
}

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

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Description */
.description-content {
    background: var(--background);
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-blue);
    line-height: 1.6;
    color: var(--text-dark);
}

/* Info Grid */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--background);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.info-item:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px var(--shadow);
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.info-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

.info-value.code {
    font-family: 'Courier New', monospace;
    background: var(--background);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Deadline States */
.info-item.deadline-overdue {
    border-color: var(--danger-red);
    background: rgba(244, 67, 54, 0.05);
}

.info-item.deadline-warning {
    border-color: var(--warning-amber);
    background: rgba(255, 193, 7, 0.05);
}

.info-item.deadline-normal {
    border-color: var(--success-green);
    background: rgba(76, 175, 80, 0.05);
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 2.5rem;
    bottom: -1rem;
    width: 2px;
    background: var(--border);
}

.timeline-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-item.completed .timeline-icon {
    background: var(--success-green);
    border-color: var(--success-green);
    color: white;
}

.timeline-content {
    flex: 1;
    padding-top: 0.25rem;
}

.timeline-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-action-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text-dark);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.quick-action-btn:hover:not(:disabled) {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
    transform: translateY(-1px);
}

.quick-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--background);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-body {
        max-height: 65vh;
    }
}

@media (max-width: 768px) {
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 1rem 1rem 0;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: 70vh;
    }
    
    .modal-actions {
        padding: 0.75rem 1rem 1rem;
        gap: 0.5rem;
    }
    

    
    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .activity-info {
        gap: 1rem;
    }
    
    .activity-status-display {
        gap: 0.5rem;
    }
    
    .status-badge,
    .category-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .status-buttons {
        flex-direction: column;
    }
    
    .status-btn {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 0.25rem;
    }
    
    .modal-content {
        width: 98%;
        max-height: 98vh;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 0.75rem 0.75rem 0;
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 0.75rem;
        max-height: 75vh;
    }
    
    .modal-actions {
        padding: 0.5rem 0.75rem 0.75rem;
        flex-direction: column;
    }
    

    

    
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .activity-info {
        gap: 0.75rem;
    }
    
    .activity-status-display {
        flex-direction: column;
        align-items: stretch;
    }
    
    .status-badge,
    .category-badge {
        padding: 0.5rem;
        text-align: center;
        justify-content: center;
    }
    
    .date-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .activity-description p {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .modal {
        padding: 0.1rem;
    }
    
    .modal-content {
        width: 99%;
        max-height: 99vh;
    }
    
    .modal-header h3 {
        font-size: 0.95rem;
    }
    
    .modal-body {
        padding: 0.5rem;
    }
    
    .modal-actions {
        padding: 0.5rem;
    }
}

/* Landscape orientation for mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
    .modal {
        padding: 0.1rem;
    }
    
    .modal-content {
        max-height: 95vh;
        width: 98vw;
    }
    
    .modal-body {
        max-height: 95vh;
    }
    
    .activity-details-card {
        margin: 0.25rem;
        max-height: 85vh;
    }
    
    .activity-content-grid {
        grid-template-columns: 1fr 1fr;
        min-height: 300px;
        max-height: 75vh;
        overflow-y: auto;
    }
    
    .activity-info-column {
        border-right: 1px solid var(--border);
        border-bottom: none;
    }
    
    .activity-header-section {
        padding: 0.75rem 1rem;
    }
    
    .activity-modal-title {
        font-size: 1.1rem;
    }
    
    .activity-meta-badges {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .activity-category-badge,
    .activity-status-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .activity-info-column,
    .activity-timeline-column {
        padding: 0.75rem;
    }
    
    .info-section {
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .info-item {
        padding: 0.5rem;
    }
    
    .timeline-item {
        gap: 0.5rem;
    }
    
    .timeline-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.8rem;
    }
    
    .quick-actions {
        flex-direction: row;
        gap: 0.4rem;
    }
    
    .quick-action-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        min-width: 80px;
    }
}

/* Activities Container */
.activities-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Activity Form Section */
#activity-form-section {
    display: none;
}

#activity-form-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Privacy Page Styles */
.privacy-intro {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 2rem;
    border: 3px solid var(--primary-blue);
}

.privacy-intro h2 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.privacy-intro p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

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

.privacy-container {
    display: grid;
    gap: 2rem;
}

.privacy-item {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
    border-left: 4px solid var(--primary-blue);
}

.privacy-item h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.privacy-content h4 {
    color: var(--text-dark);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.1rem;
}

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

.privacy-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.privacy-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.privacy-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: var(--text-dark);
}

.privacy-content strong {
    color: var(--primary-blue);
}

.privacy-content a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.privacy-content a:hover {
    text-decoration: underline;
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
    .app-footer {
        margin-bottom: 70px;
    }
    
    .header-content {
        gap: 0.75rem;
    }
    
    .app-logo {
        height: 32px;
    }
    
    .app-header h1 {
        font-size: 1.3rem;
    }
    
    .privacy-intro,
    .privacy-item {
        padding: 1.5rem;
    }
    
    .privacy-item h3 {
        font-size: 1.2rem;
    }
    
    .privacy-content h4 {
        font-size: 1rem;
    }
    
    .activity-compact-content {
        padding: 1rem;
        gap: 1rem;
    }
    
    .quick-actions-compact {
        flex-direction: column;
    }
    
    .quick-actions-compact .quick-action-btn {
        min-width: auto;
    }
    
    .info-grid-compact .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-grid-compact .info-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .header-content {
        gap: 0.5rem;
    }
    
    .app-logo {
        height: 28px;
    }
    
    .app-header h1 {
        font-size: 1.1rem;
    }
}

@media (max-width: 360px) {
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .app-logo {
        height: 32px;
    }
    
    .app-header h1 {
        font-size: 1rem;
    }
    
    /* Additional fixes for ultra-small screens */
    .activity-card {
        border-left-width: 3px;
    }
    
    .activity-title {
        line-height: 1.3;
    }
    
    .activity-description {
        line-height: 1.4;
    }
    
    /* Fix for bottom navigation */
    .bottom-nav {
        padding: 0.25rem 0;
    }
    
    .nav-item {
        padding: 0.25rem;
        min-width: 50px;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
    
    .nav-item span {
        font-size: 0.6rem;
    }
    
    /* Fix for footer */
    .app-footer {
        margin-bottom: 60px;
        padding: 0.75rem;
    }
    
    .footer-content {
        gap: 0.25rem;
    }
    
    .footer-links {
        gap: 0.25rem;
    }
    
    /* Ultra-small screen fixes */
    .app-main {
        padding: 0.25rem;
    }
    
    .activity-card {
        padding: 0.5rem;
        margin-bottom: 0.25rem;
    }
    
    .activity-title {
        font-size: 0.9rem;
    }
    
    .activity-description {
        font-size: 0.8rem;
    }
    
    .activity-category {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }
    
    .activity-status {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
    
    .primary-btn, .secondary-btn, .danger-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .stats-grid {
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}
