/* Goals Manager - Brand Style Guide Applied */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Custom Fields font - using a similar alternative (Syne) since Fields requires license */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&display=swap');

/* CSS Variables - Brand Color Palette */
:root {
    /* Primary Colors */
    --coral: #D76262;           /* Signal coral - arrows, CTAs, key highlights */
    --saffron: #F59E0B;         /* Electric saffron - emphasis points */

    /* Text Colors */
    --text-main: #2B2B2B;       /* Soft charcoal - body text */
    --text-secondary: #6B6763;  /* Warm gray - sub-labels, supporting info */

    /* Background Colors */
    --bg-primary: #F7F5F2;      /* Warm off-white - main background */
    --bg-secondary: #F0EEEA;    /* Soft warm gray - subtle panels, chat bubbles */

    /* Borders & Dividers */
    --divider: #D6D1CB;         /* Subtle stone - borders, separators */

    /* Typography */
    --font-display: 'Syne', sans-serif;     /* Headlines - Fields alternative */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;  /* Body text */
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    padding: 24px;
}

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

header {
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--divider);
}

header h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

header .date {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

h2 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

h3 {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
}

.goals-section {
    background-color: #fff;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 18px;
    border: 1px solid var(--divider);
    box-shadow: 0 1px 3px rgba(43, 43, 43, 0.05);
}

.goals-list {
    list-style: none;
    padding-left: 0;
}

.goals-list li {
    padding: 10px 0;
    padding-left: 20px;
    position: relative;
    font-family: var(--font-body);
    color: var(--text-main);
}

.goals-list li:before {
    content: "";
    position: absolute;
    left: 2px;
    top: 18px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--coral);
}

.goals-list .description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 5px;
    display: block;
}

.no-goals {
    color: var(--text-secondary);
    font-style: italic;
    padding: 10px 0;
    font-family: var(--font-body);
}

.no-goals a {
    color: var(--coral);
    text-decoration: none;
    font-weight: 500;
}

.no-goals a:hover {
    text-decoration: underline;
}

.entry-section {
    background-color: #fff;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 18px;
    border: 1px solid var(--divider);
    box-shadow: 0 1px 3px rgba(43, 43, 43, 0.05);
}

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

.form-group label {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 15px;
}

.form-group textarea,
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--divider);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    resize: vertical;
    background-color: white;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

/* Button system — one base, color variants, one size modifier.
   Works identically for <a> and <button> so buttons in a row match. */
.btn-primary,
.btn-secondary,
.btn-accent,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 18px;
    font-size: 14px;
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-primary { background-color: var(--coral); color: white; }
.btn-secondary { background-color: #6B7280; color: white; }
.btn-accent { background-color: var(--saffron); color: white; }
.btn-danger { background-color: #B0413E; color: white; }

.btn-primary:hover { background-color: #C24545; transform: translateY(-1px); }
.btn-secondary:hover { background-color: #565D68; transform: translateY(-1px); }
.btn-accent:hover { background-color: #D98908; transform: translateY(-1px); }
.btn-danger:hover { background-color: #963532; transform: translateY(-1px); }

.btn-primary:active,
.btn-secondary:active,
.btn-accent:active,
.btn-danger:active { transform: translateY(0); }

/* Small size modifier for inline / dense rows */
.btn-sm {
    min-height: 34px;
    padding: 6px 14px;
    font-size: 13px;
}

/* Tiny outline button — e.g. "Mark done" next to a failed goal */
.btn-mini {
    background: none;
    border: 1px solid #16a34a;
    color: #16a34a;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: var(--font-body);
    transition: background-color 0.15s, color 0.15s;
}

.btn-mini:hover { background: #16a34a; color: white; }

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

.recent-list {
    list-style: none;
    padding-left: 0;
}

.recent-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--divider);
    font-family: var(--font-body);
}

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

.entry-date {
    font-weight: 600;
    color: var(--saffron);
    margin-right: 10px;
}

.entry-tasks {
    color: var(--text-main);
}

.messages {
    margin-bottom: 20px;
}

.message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-family: var(--font-body);
    font-weight: 500;
}

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

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

.message.warning {
    background-color: #FFF6E5;
    color: #7A4B00;
    border: 1px solid #F8D9A0;
}

.info-message {
    background-color: #FEF3C7;
    color: #92400E;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid var(--saffron);
    font-family: var(--font-body);
    font-weight: 500;
}

footer {
    padding-top: 20px;
    border-top: 2px solid var(--divider);
    color: var(--text-secondary);
    font-size: 14px;
    font-family: var(--font-body);
}

footer a {
    color: inherit;
    text-decoration: none;
}

.footer-group {
    margin-bottom: 14px;
}

.footer-group:last-child {
    margin-bottom: 0;
}

.footer-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid var(--divider);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    line-height: 1.2;
    white-space: nowrap;
}

.footer-btn:hover {
    border-color: var(--coral);
    color: var(--coral);
    background: white;
    text-decoration: none;
}

/* Emphasis elements using saffron sparingly */
strong {
    color: var(--text-main);
    font-weight: 600;
}

small {
    font-size: 13px;
}

/* Responsive design */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 18px;
    }
}

/* Additional branded elements */
a:not(.btn-primary) {
    transition: color 0.2s;
}

/* Clean, structured layout principles */
section {
    margin-bottom: 25px;
}

/* Generous spacing for clarity */
.goals-list li + li {
    margin-top: 8px;
}
