:root {
    --green-dark: #003d2b;
    --green: #2f8f2f;
    --green-light: #59b947;
    --bg: #f4f8f5;
    --text: #14231c;
    --muted: #68756f;
    --card: #fff;
    --danger: #b42318;
    --gold: #a15c00;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

.topbar {
    background: linear-gradient(135deg, #003d2b, #075239);
    color: #fff;
    padding: 18px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 26px;
    font-weight: bold;
    letter-spacing: 2px;
}

.subbrand {
    font-size: 12px;
    opacity: .85;
    margin-top: 4px;
}

.logout {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.nav {
    background: #fff;
    border-bottom: 1px solid #dbe7df;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
}

.nav a {
    background: #edf6ef;
    color: var(--green-dark);
    padding: 10px 12px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    font-weight: bold;
    font-size: 14px;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 18px;
}

.card {
    background: var(--card);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    margin-bottom: 18px;
}

h1, h2, h3 {
    color: var(--green-dark);
}

input, select, textarea {
    width: 100%;
    padding: 13px;
    margin: 8px 0 14px;
    border: 1px solid #cfd9d3;
    border-radius: 10px;
    font-size: 16px;
}

textarea {
    min-height: 110px;
}

button, .btn {
    display: inline-block;
    border: 0;
    background: var(--green);
    color: #fff;
    padding: 13px 17px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}

.btn.secondary,
button.secondary {
    background: #e8eee9;
    color: var(--green-dark);
}

.btn.warn,
button.warn {
    background: var(--gold);
}

.btn.danger,
button.danger {
    background: var(--danger);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.metric {
    font-size: 34px;
    font-weight: bold;
    color: var(--green-dark);
}

.label {
    color: var(--muted);
    font-size: 14px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid #edf1ee;
    text-align: left;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf6ef;
    color: var(--green-dark);
    font-weight: bold;
    font-size: 13px;
}

/* Photos */
.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.photo-card {
    width: 300px;
    max-width: 100%;
    text-align: center;
}

.photo-thumb {
    width: 300px !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    cursor: pointer;
    display: block;
}

.photo-thumb:hover {
    opacity: .85;
}

.photo-delete-btn {
    margin-top: 8px;
    width: 300px;
    max-width: 100%;
}

.condition-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 8px 0 14px;
}

.condition-row label {
    background: #edf6ef;
    padding: 10px 12px;
    border-radius: 999px;
    font-weight: bold;
}

.condition-row input {
    width: auto;
    margin: 0 5px 0 0;
}

.footer {
    text-align: center;
    padding: 25px;
    color: var(--muted);
}

.notice {
    background: #fff8e6;
    border-left: 5px solid #d99a00;
    padding: 14px;
    border-radius: 10px;
}

@media (max-width: 700px) {
    .container {
        padding: 12px;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table th {
        display: none;
    }

    .table tr {
        margin-bottom: 14px;
        border: 1px solid #e1e8e3;
        border-radius: 12px;
        overflow: hidden;
    }

    .photo-grid {
        display: block;
    }

    .photo-card {
        width: 100%;
        margin-bottom: 16px;
    }

    .photo-thumb,
    .photo-delete-btn {
        width: 100% !important;
    }
}