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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f6f7fb;
    color: #2c3043;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #006f44; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
}

/* ----- Header / nav ----- */
.site-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.site-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}
.site-header h1 a { color: #1f2937; }
.site-header h1 a:hover { text-decoration: none; }

nav { display: flex; gap: 1rem; align-items: center; }
nav .welcome { color: #6b7280; font-size: 0.9rem; }

main {
    flex: 1;
    padding: 2rem 0;
}

/* ----- Footer ----- */
.site-footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* ----- Hero / landing page ----- */
.hero {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-align: center;
}
.hero h2 {
    font-size: 1.875rem;
    margin-bottom: 1rem;
    color: #1f2937;
}
.hero .lead {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}
.step {
    text-align: center;
    padding: 1.25rem;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: #006f44;
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: #6b7280; font-size: 0.95rem; }

.deadline {
    margin: 1.5rem 0;
    padding: 0.75rem;
    background: #fef3c7;
    border-radius: 8px;
    color: #92400e;
}
.deadline.closed {
    background: #fee2e2;
    color: #991b1b;
}

.cta {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* ----- Buttons ----- */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.15s;
}
.btn-primary {
    background: #006f44;
    color: white;
}
.btn-primary:hover {
    background: #005233;
    text-decoration: none;
}
.btn-secondary {
    background: white;
    color: #006f44;
    border: 1px solid #d1d5db;
}
.btn-secondary:hover {
    background: #f9fafb;
    text-decoration: none;
}
.btn-link-danger {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
}
.btn-link-danger:hover { text-decoration: underline; }

/* ----- Forms ----- */
.form-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.form-card h2 { margin-bottom: 0.5rem; }
.form-card > p { color: #6b7280; margin-bottom: 1.5rem; }

label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
    color: #374151;
}
input[type=email],
input[type=text],
input[type=password],
input[type=file] {
    display: block;
    width: 100%;
    margin-top: 0.375rem;
    padding: 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}
input:focus {
    outline: 2px solid #006f44;
    outline-offset: 1px;
    border-color: #006f44;
}
small {
    display: block;
    color: #6b7280;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    font-weight: normal;
}

.alt-action {
    margin-top: 1.5rem;
    text-align: center;
    color: #6b7280;
}

/* ----- Flash messages ----- */
.flash {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
}
.flash-success {
    background: #d1fae5;
    color: #065f46;
}
.flash-error {
    background: #fee2e2;
    color: #991b1b;
}
.flash-warning {
    background: #fef3c7;
    color: #92400e;
}
.flash ul { margin-left: 1.25rem; }

/* ----- Dashboard ----- */
.dashboard h2 { margin-bottom: 0.25rem; }
.dashboard .muted { color: #6b7280; margin-bottom: 1.5rem; }

.upload-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px dashed #d1d5db;
}
.upload-card h3 { margin-bottom: 1rem; }
.file-input {
    display: block;
    margin-bottom: 1rem;
}
.file-input input[type=file] {
    margin-top: 0.5rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.photo-tile {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.photo-tile img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.photo-actions {
    padding: 0.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}
.filename {
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.empty {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    color: #6b7280;
}

/* ----- Admin ----- */
.admin-dashboard h2 { margin-bottom: 1rem; }
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.admin-actions { display: flex; gap: 0.5rem; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
}
.stat-num {
    font-size: 2rem;
    font-weight: 600;
    color: #006f44;
}
.stat-label { color: #6b7280; font-size: 0.875rem; }

.admin-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    border-collapse: collapse;
    overflow: hidden;
}
.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}
.admin-table th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table .muted { color: #9ca3af; }

@media (max-width: 600px) {
    .admin-table { font-size: 0.875rem; }
    .admin-table th, .admin-table td { padding: 0.5rem; }
}

/* ----- Password reset panel ----- */
.reset-link-panel {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.reset-link-panel h3 { margin-bottom: 0.5rem; color: #713f12; }
.reset-link-panel .muted { color: #713f12; opacity: 0.85; }
.reset-link-row {
    display: flex;
    gap: 0.5rem;
    margin: 0.75rem 0;
}
.reset-link-row input {
    flex: 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875rem;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
}
.small { font-size: 0.8125rem; }

/* Inline link-style button (for reset action in table rows) */
.btn-link {
    background: none;
    border: none;
    color: #006f44;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    font-family: inherit;
}
.btn-link:hover { text-decoration: underline; }

.row-actions { white-space: nowrap; }

/* ----- Trust statement on landing page ----- */
.trust-statement {
    max-width: 720px;
    margin: 1.5rem auto 0;
    padding: 1.25rem 1.5rem;
    background: #f1f5f9;
    border-left: 3px solid #94a3b8;
    border-radius: 6px;
    color: #475569;
    font-size: 0.95rem;
}
.trust-statement h3 {
    margin-bottom: 0.5rem;
    color: #334155;
    font-size: 1rem;
}
.trust-statement p { margin-bottom: 0.5rem; }
.trust-statement p:last-child { margin-bottom: 0; }
.trust-statement a { color: #006f44; }

/* ----- Header brand (logo + title) ----- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    color: #1f2937;
}
.brand:hover { text-decoration: none; }
.brand-logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .brand-logo { height: 28px; }
    .brand-text { font-size: 0.95rem; }
}
