/* ==================================================================
   Weathercall TODO List — Branded Stylesheet
   Brand:
     primary    #2c5697   (Weathercall blue)
     secondary  #fcc917   (Weathercall yellow)
     skyblue    #75b1d1   (accent / banner background)
     surface    #f4f4f4   (page background)
   ================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sanchez:ital@0;1&family=Noto+Sans:wght@400;500;600;700&display=swap');

:root {
    --brand-primary:        #2c5697;
    --brand-primary-dark:   #1f4173;
    --brand-primary-light:  #e7edf6;
    --brand-secondary:      #fcc917;
    --brand-secondary-dark: #e0b00a;
    --brand-sky:            #75b1d1;
    --brand-bg:             #f4f4f4;
    --brand-surface:        #ffffff;
    --brand-text:           #000000;
    --brand-text-muted:     #5a6473;
    --brand-border:         #dcdfe4;

    --status-pending:       var(--brand-secondary);
    --status-in-progress:   var(--brand-primary);
    --status-completed:     #2e7d32;
    --status-cancelled:     #b00020;

    --radius:               8px;
    --shadow-sm:            0 1px 3px rgba(0,0,0,.06);
    --shadow-md:            0 4px 14px rgba(44,86,151,.10);
}

/* ----- Base ----- */
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--brand-bg);
    color: var(--brand-text);
    line-height: 1.55;
}
h1, h2, h3, h4 {
    font-family: 'Sanchez', Georgia, serif;
    font-weight: 400;
    color: var(--brand-primary);
    letter-spacing: -0.01em;
}
a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

/* ----- Header ----- */
.site-header {
    background: var(--brand-surface);
    border-bottom: 1px solid var(--brand-border);
    box-shadow: var(--shadow-sm);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1.5rem;
    gap: 1rem;
}
.site-header .brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.site-header .brand img {
    height: 44px;
    width: auto;
    display: block;
}
.site-header h1 {
    margin: 0;
    font-size: 1rem;
    color: var(--brand-text-muted);
    font-family: 'Noto Sans', sans-serif;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.site-header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.site-header nav a {
    color: var(--brand-text);
    font-weight: 500;
}
.site-header nav a:hover { color: var(--brand-primary); text-decoration: none; }
/* Button-styled nav links should keep their button colors */
.site-header nav a.btn-primary,
.site-header nav a.btn-primary:hover { color: #fff; }
.site-header nav a.btn-accent,
.site-header nav a.btn-accent:hover { color: var(--brand-text); }

/* Yellow accent strip under header */
.brand-strip {
    height: 4px;
    background: var(--brand-secondary);
}

/* ----- Hero banner (used on index) ----- */
.hero {
    width: 100%;
    background: var(--brand-sky) url('assets/banner.png') center/cover no-repeat;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 1.25rem;
}
.hero h2 {
    color: #fff;
    font-size: 1.6rem;
    margin: 0;
    padding: 1.5rem;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,.55);
}

/* ----- Footer ----- */
.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    color: var(--brand-text-muted);
    border-top: 1px solid var(--brand-border);
    background: var(--brand-surface);
}

/* ----- Tables ----- */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--brand-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
th, td {
    padding: .85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--brand-border);
    vertical-align: top;
}
th {
    background: var(--brand-primary);
    color: #fff;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-family: 'Noto Sans', sans-serif;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--brand-primary-light); }

/* ----- Status badges ----- */
.badge {
    display: inline-block;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge-pending     { background: var(--status-pending);     color: #5a4500; border-color: var(--brand-secondary-dark); }
.badge-in_progress { background: var(--status-in-progress); color: #fff; }
.badge-completed   { background: var(--status-completed);   color: #fff; }
.badge-cancelled   { background: var(--status-cancelled);   color: #fff; }

/* ----- Cards / Forms ----- */
.card {
    background: var(--brand-surface);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--brand-secondary);
}
.form-group { margin-bottom: 1.1rem; }
label {
    display: block;
    margin-bottom: .35rem;
    font-weight: 600;
    color: var(--brand-text);
    font-size: .92rem;
}
input[type=text],
input[type=date],
select,
textarea {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid var(--brand-border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--brand-text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(44,86,151,.18);
}

.form-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
    .site-header .container { flex-wrap: wrap; }
}

/* ----- Buttons ----- */
.btn {
    display: inline-block;
    padding: .55rem 1.1rem;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: .92rem;
    font-weight: 600;
    font-family: 'Noto Sans', sans-serif;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}
.btn-primary:hover {
    background: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
    color: #fff;
}
.btn-secondary {
    background: var(--brand-surface);
    color: var(--brand-primary);
    border-color: var(--brand-border);
}
.btn-secondary:hover {
    background: var(--brand-primary-light);
    color: var(--brand-primary-dark);
    border-color: var(--brand-primary);
}
.btn-accent {
    background: var(--brand-secondary);
    color: var(--brand-text);
    border-color: var(--brand-secondary-dark);
}
.btn-accent:hover {
    background: var(--brand-secondary-dark);
    color: var(--brand-text);
}
.btn-danger { background: var(--status-cancelled); color: #fff; border-color: var(--status-cancelled); }
.btn-danger:hover { background: #8a0019; border-color: #8a0019; color: #fff; }
.btn-small { padding: .3rem .65rem; font-size: .8rem; }

.actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.form-actions { margin-top: 1.5rem; display: flex; gap: .6rem; flex-wrap: wrap; }

/* ----- Flash / errors ----- */
.flash {
    padding: .8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
    border-left: 4px solid;
}
.flash-success { background: #e8f5e9; color: #1b5e20; border-color: #2e7d32; }
.flash-error   { background: #fdecea; color: #6e0010; border-color: #b00020; }
.flash-info    { background: var(--brand-primary-light); color: var(--brand-primary-dark); border-color: var(--brand-primary); }

.errors {
    background: #fdecea;
    color: #6e0010;
    border: 1px solid #f5b3bb;
    border-left: 4px solid #b00020;
    border-radius: 6px;
    padding: .8rem 1rem;
    margin-bottom: 1rem;
}
.errors ul { margin: .25rem 0 0 1.1rem; padding: 0; }

/* ----- Misc ----- */
.empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--brand-text-muted);
    background: var(--brand-surface);
    border-radius: var(--radius);
    border: 2px dashed var(--brand-border);
}
.muted { color: var(--brand-text-muted); font-size: .85rem; }
.text-right { text-align: right; }
.page-title { margin: 1.5rem 0 1rem; }

.delete-form { display: inline; }
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}
.filter-form select { padding: .4rem .55rem; }
