/* The Plan Tracker Styles */

.tpt-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Navigation */
.tpt-nav {
    background: linear-gradient(135deg, #DAC6AE 0%, #99ADB4 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.tpt-logo h1 {
    margin: 0 0 5px 0;
    font-size: 32px;
    font-weight: bold;
}

.tpt-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.tpt-nav-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tpt-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.tpt-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tpt-nav-btn.active {
    background: white;
    color: #99ADB4;
    border-color: white;
}

/* Cards */
.tpt-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Views */
.tpt-view {
    display: none;
}

.tpt-view.active {
    display: block;
}

/* Date Selector */
.tpt-date-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tpt-date-input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
}

.tpt-date-nav {
    width: 45px;
    height: 45px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.tpt-date-nav:hover {
    background: #f5f5f5;
    border-color: #99ADB4;
}

/* Auto-save Indicator */
.tpt-auto-save-indicator {
    text-align: right;
    margin-bottom: 15px;
    min-height: 20px;
}

#save-status {
    font-size: 14px;
    color: #666;
    padding: 5px 12px;
    border-radius: 20px;
    background: #f5f5f5;
}

#save-status.saving {
    background: #fff3cd;
    color: #9E391C;
}

#save-status.saved {
    background: #d4edda;
    color: #788C60;
}

/* Sections */
.tpt-section {
    margin-bottom: 35px;
}

.tpt-section-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tpt-section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: #99ADB4;
    border-radius: 2px;
}

/* Form Elements */
.tpt-input-group {
    margin-bottom: 20px;
}

.tpt-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.tpt-optional {
    font-size: 12px;
    font-weight: normal;
    color: #999;
    font-style: italic;
}

.tpt-input-group input[type="text"],
.tpt-input-group input[type="number"],
.tpt-input-group input[type="date"],
.tpt-input-group input[type="time"],
.tpt-input-group textarea,
.tpt-input-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.tpt-input-group input:focus,
.tpt-input-group textarea:focus {
    outline: none;
    border-color: #99ADB4;
}

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

/* Grid Layout */
.tpt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

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

/* Checkbox */
.tpt-checkbox-group {
    margin-bottom: 15px;
}

.tpt-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    cursor: pointer;
}

.tpt-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Buttons */
.tpt-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.tpt-btn-primary,
.tpt-btn-secondary {
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.tpt-btn-primary {
    background: linear-gradient(135deg, #99ADB4 0%, #66848F 100%);
    color: black;
}

.tpt-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.tpt-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
}

.tpt-btn-secondary:hover {
    background: #e0e0e0;
}

/* History List */
.tpt-history-list {
    margin-top: 30px;
}

.tpt-history-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #99ADB4;
    cursor: pointer;
    transition: all 0.3s;
}

.tpt-history-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.tpt-history-date {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.tpt-history-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.tpt-history-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Chart */
.tpt-chart {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    min-height: 300px;
}

/* Modal */
.tpt-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.tpt-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tpt-modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

.tpt-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.tpt-modal-close:hover {
    color: #333;
}

.tpt-share-preview {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.6;
}

.tpt-share-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    
    .tpt-nav {
        padding: 20px;
    }
    
    .tpt-logo h1 {
        font-size: 28px;
    }
    
    .tpt-card {
        padding: 20px;
    }
    
    .tpt-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .tpt-date-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tpt-date-input {
        min-width: 100%;
    }
}

/* Loading State */
.tpt-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.tpt-loading::after {
    content: '...';
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Empty State */
.tpt-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.tpt-empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #666;
}

.tpt-empty-state p {
    font-size: 16px;
}
