/* Goals Tracker - Main Stylesheet */

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.site-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    padding: 15px 20px;
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-box h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 10px;
}

.tagline {
    text-align: center;
    color: var(--gray);
    margin-bottom: 30px;
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

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

.help-text {
    font-size: 12px;
    color: var(--gray);
    margin-top: 20px;
    text-align: center;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-warning h3 {
    margin-bottom: 10px;
}

.alert-warning ul {
    margin-left: 20px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    color: var(--dark);
}

/* Card */
.card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card h2 {
    margin-bottom: 20px;
    color: var(--dark);
}

/* Goals Grid */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.goal-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary);
}

.goal-card.status-at_risk {
    border-left-color: var(--danger);
}

.goal-card.status-on_track {
    border-left-color: var(--success);
}

.goal-card.status-completed {
    border-left-color: var(--gray);
    opacity: 0.7;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.goal-header h3 {
    color: var(--dark);
    font-size: 18px;
    flex: 1;
}

.category-badge {
    background: var(--light);
    color: var(--dark);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    text-transform: capitalize;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transition: width 0.3s;
}

.progress-text {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 15px;
}

.streak {
    font-weight: 600;
    color: var(--warning);
    margin-bottom: 15px;
}

.checked-in {
    color: var(--success);
    font-weight: 600;
}

.quick-checkin {
    margin-bottom: 10px;
}

.goal-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Milestone List */
.milestone-list {
    list-style: none;
}

.milestone-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.milestone-list li:last-child {
    border-bottom: none;
}

.milestone-info {
    flex: 1;
}

.milestone-date {
    font-weight: 600;
    color: var(--primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* Quick Action Page */
.quick-action-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.quick-action-container {
    background: white;
    padding: 60px 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 500px;
}

.quick-action-container .icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.quick-action-container h1 {
    color: var(--dark);
    margin-bottom: 15px;
}

.quick-action-container p {
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

/* Settings Page */
.settings-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.settings-section h2 {
    margin-bottom: 20px;
    color: var(--dark);
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.preference-info p {
    font-size: 13px;
    color: var(--gray);
}

.preference-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
        font-size: 14px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .goals-grid {
        grid-template-columns: 1fr;
    }
    
    .milestone-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .preference-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
