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

:root {
    --primary-color: #2563eb;
    --secondary-color: #0f766e;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --text-color: #111827;
    --light-bg: #f3f4f6;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --accent-bg: #1f2937;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--light-bg);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-color);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

header {
    background: var(--accent-bg);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    opacity: 0.85;
    font-size: 1.1em;
}

main {
    padding: 30px;
}

.section {
    margin-bottom: 30px;
}

.hidden {
    display: none;
}

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

.form-group.inline {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.form-group.inline > div {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

input[type="text"],
input[type="number"],
input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: none;
    letter-spacing: 0;
}

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

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

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

.btn-secondary:hover {
    background: #115e59;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.2);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    padding: 8px 20px;
    font-size: 14px;
}

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

/* Goal Display */
.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.goal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.goal-header h2 {
    color: var(--primary-color);
    font-size: 2em;
}

/* Progress Circle */
.progress-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.progress-circle {
    position: relative;
}

.progress-ring-bg {
    fill: none;
    stroke: var(--light-bg);
    stroke-width: 12;
}

.progress-ring {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 12;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#progressPercentage {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
}

/* Status Card */
.status-card {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.status-row:last-child {
    border-bottom: none;
}

.status-row.on-track {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.label {
    font-weight: 600;
    color: #666;
}

.value {
    font-weight: 700;
    color: var(--text-color);
}

.badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.badge.on-track {
    background: var(--primary-color);
    color: white;
}

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

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

.badge.completed {
    background: #7c3aed;
    color: white;
}

/* Targets Card */
.targets-card {
    background: var(--accent-bg);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.targets-card h3 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
}

.targets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.target-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.target-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.target-value {
    font-size: 1.8em;
    font-weight: bold;
}

/* Update Section */
.update-section {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 12px;
}

.update-section h3 {
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Footer */
footer {
    background: var(--light-bg);
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 2em;
    }
    
    .goal-header {
        flex-direction: column;
        gap: 15px;
    }

    .goal-actions {
        width: 100%;
        justify-content: center;
    }
    
    .targets-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.inline {
        flex-direction: column;
    }
    
    .form-group.inline input {
        width: 100%;
    }
}
