﻿@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Fraunces:opsz,wght@9..144,500;9..144,700&display=swap');

:root {
    --ink: #16342b;
    --muted: #64766e;
    --leaf: #2d7559;
    --lime: #d8ed87;
    --paper: #f6f5ef;
    --line: #dfe5d9
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif
}

.site-nav {
    background: var(--ink);
    padding: 18px 0
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
    letter-spacing: -.02em
}

.navbar-brand:hover {
    color: var(--lime)
}

.brand-tree-icon {
    width: 26px;
    height: 26px;
    fill: currentColor;
    color: var(--lime) !important;
    flex: 0 0 auto
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--lime);
    color: var(--ink);
    margin-right: 8px
}

.nav-register-btn {
    padding: .62rem 1.05rem;
    font-size: .92rem;
    line-height: 1
}

.nav-register-btn span {
    margin-left: 4px
}

.site-footer {
    padding: 28px 0;
    color: #8b9a92;
    font-size: .85rem
}

.site-footer a {
    color: var(--leaf)
}

h1,
h2 {
    font-family: 'Fraunces', serif;
    letter-spacing: -.04em
}

.hero {
    position: relative;
    isolation: isolate;
    background: var(--ink) url('../image/phal_vatika.jpg') center center / cover no-repeat;
    color: #fff;
    min-height: 600px;
    display: grid;
    align-items: center
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(8, 31, 23, .9) 0%, rgba(8, 31, 23, .64) 48%, rgba(8, 31, 23, .28) 100%)
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .72rem;
    font-weight: 700;
    color: var(--leaf);
    margin-bottom: 18px
}

.hero .eyebrow {
    color: var(--lime)
}

h1 {
    font-size: clamp(3rem, 5vw, 6.5rem);
    line-height: .94;
    margin: 0 0 24px
}

.hero h1 em {
    color: var(--lime);
    font-style: normal
}

.hero-copy {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #c2cec5;
    max-width: 510px;
    margin-bottom: 32px
}

.btn-primary {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--ink);
    font-weight: 700
}

.btn-primary:hover {
    background: #c6df69;
    border-color: #c6df69;
    color: var(--ink)
}

/*
.old-hero-orchard {
    height: 390px;
    position: relative;
    overflow: hidden;
    background: #245443;
    border-radius: 48% 48% 4px 4px
}

.sun {
    position: absolute;
    right: 15%;
    top: 12%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #f1ce75
}

.ground {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 23%;
    background: #173b31;
    border-radius: 50% 50% 0 0
}

.tree {
    position: absolute;
    bottom: 17%;
    z-index: 1
}

.tree i {
    display: block;
    background: #5c3d28;
    width: 22px;
    height: 145px;
    margin: auto;
    border-radius: 20px
}

.tree b {
    display: block;
    background: #77a85d;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    position: absolute;
    bottom: 85px;
    left: -70px;
    box-shadow: 55px 25px 0 #5f954f, -45px 28px 0 #84b467
}

.tree-one {
    left: 31%;
    transform: scale(.8)
}

.tree-two {
    right: 23%;
    transform: scale(1.1)
}
*/

.hero-orchard {
    height: 390px;
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: url('../image/my fruit tree.png') center center / cover no-repeat;
    box-shadow: 0 14px 30px rgba(12, 31, 19, 0.18);
}

.hero-orchard::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 25, 20, 0.08), rgba(10, 25, 20, 0.25));
}

.hero-note {
    position: absolute;
    left: 28px;
    bottom: 24px;
    color: #f3fbe7;
    font-size: .9rem;
    z-index: 2;
    background: rgba(16, 55, 38, 0.52);
    backdrop-filter: blur(2px);
    padding: 10px 14px;
    border-radius: 999px;
}

.hero-note strong {
    color: #fff
}

.principles {
    padding: 84px 0;
    background: #fff
}

.principle {
    border-top: 1px solid var(--line);
    padding-top: 20px
}

.principle span,
.section-label {
    font-size: .72rem;
    letter-spacing: .15em;
    color: var(--leaf);
    font-weight: 700
}

.principle h2 {
    font-size: 1.8rem;
    margin: 16px 0 8px
}

.principle p,
.form-heading p {
    color: var(--muted);
    line-height: 1.6
}

.form-shell {
    background: var(--paper)
}

.form-heading {
    max-width: 720px;
    margin-bottom: 45px
}

.form-heading h1 {
    font-size: clamp(3rem, 6vw, 5.5rem)
}

.form-section {
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 34px;
    margin-bottom: 2px
}

.form-label {
    font-size: .85rem;
    font-weight: 700
}

.form-control,
.form-select {
    border-color: var(--line);
    border-radius: 3px;
    padding: .8rem 1rem
}

.form-control:focus,
.form-select:focus {
    border-color: var(--leaf);
    box-shadow: 0 0 0 .2rem rgba(45, 117, 89, .12)
}

.location-panel {
    margin-top: 18px;
    padding: 28px;
    background: #e7f0dc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.location-panel h2 {
    font-size: 1.8rem;
    margin: 0 0 6px
}

.location-panel p {
    color: var(--muted);
    margin: 0 0 18px
}

.location-readout {
    text-align: right
}

.location-readout strong,
.location-readout span {
    display: block
}

.location-readout span {
    color: var(--leaf);
    font-size: .8rem;
    margin-top: 5px
}

.summary-box {
    background: var(--ink);
    color: #fff;
    padding: 34px
}

.summary-box .section-label {
    color: var(--lime)
}

.confirm-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #c2cec5
}

.confirm-check input {
    margin-top: 4px;
    accent-color: var(--lime)
}

.photo-upload-wrap {
    margin-top: 8px
}

.photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px
}

.photo-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 155px;
    justify-content: center;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer
}

.photo-action span {
    font-size: 1.1rem
}

.photo-preview {
    max-width: 240px;
    max-height: 180px;
    object-fit: cover;
    margin-top: 10px
}

.success-page {
    min-height: 75vh
}

.success-card {
    max-width: 720px;
    margin: auto;
    text-align: center;
    background: #fff;
    padding: 55px 8%;
    border-top: 4px solid var(--leaf)
}

.success-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--lime);
    font-size: 1.6rem;
    margin: 0 auto 20px
}

.success-card h1 {
    font-size: 3.3rem
}

.success-card small,
.success-card strong {
    display: block
}

.success-card small {
    color: var(--muted);
    margin-bottom: 5px
}

.plantation-code {
    background: #e7f0dc;
    margin: 30px auto 0;
    padding: 16px
}

.plantation-code span {
    display: block;
    color: var(--leaf);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .15em
}

.plantation-code strong {
    font-size: 2rem;
    letter-spacing: .05em
}

.success-photo {
    max-width: 100%;
    max-height: 280px;
    object-fit: cover;
    margin-top: 25px
}

@media(max-width:767px) {
    .hero {
        min-height: auto
    }

    .hero-orchard {
        height: 270px
    }

    .principles {
        padding: 54px 0
    }

    .form-section {
        padding: 25px 18px
    }

    .location-panel {
        display: block
    }

    .location-readout {
        text-align: left;
        margin-top: 22px
    }

    .success-card {
        padding: 40px 20px
    }

    .success-card h1 {
        font-size: 2.6rem
    }
}

@media print {

    .site-nav,
    .site-footer,
    .btn {
        display: none !important
    }

    .success-page {
        min-height: 0
    }

    .success-card {
        box-shadow: none
    }
}

.admin-main {
    min-height: calc(100vh - 74px);
    background: #f0f2eb
}

.admin-title {
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    margin: 0
}

.site-nav small {
    font-size: .62rem;
    letter-spacing: .12em
}

.stat-card,
.admin-panel {
    background: #fff;
    padding: 22px;
    border: 1px solid var(--line)
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: .75rem
}

.stat-card strong {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 2.3rem;
    margin-top: 10px
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px
}

.panel-heading h2,
.admin-panel h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.45rem;
    margin: 0
}

.panel-heading a,
.back-link {
    color: var(--leaf);
    font-size: .82rem
}

.quick-links a {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding: 16px 0;
    color: var(--ink);
    text-decoration: none
}

.quick-links a span {
    color: var(--leaf)
}

.filter-bar {
    background: #fff;
    border: 1px solid var(--line);
    padding: 14px
}

.table {
    --bs-table-bg: transparent
}

.table th {
    color: var(--muted);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
    border-bottom-color: var(--line)
}

.table td {
    border-bottom-color: var(--line)
}

.table td small {
    display: block;
    color: var(--muted);
    font-size: .75rem;
    margin-top: 3px
}

.approved-plantations-table-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(22, 52, 43, .06)
}

.approved-plantations-table {
    min-width: 680px;
    margin-bottom: 0;
    --bs-table-hover-bg: #f2f6ef
}

.approved-plantations-table thead th {
    padding: 16px 18px;
    background: var(--ink);
    color: #fff;
    border-bottom: 0;
    white-space: nowrap
}

.approved-plantations-table tbody th,
.approved-plantations-table tbody td {
    padding: 14px 18px;
    vertical-align: middle
}

.approved-plantations-table tbody th {
    color: var(--leaf);
    font-size: .875rem;
    white-space: nowrap
}

.approved-plantation-photo-link {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: #edf3e9;
    border: 1px solid var(--line);
    border-radius: 4px
}

.approved-plantation-photo-link:hover,
.approved-plantation-photo-link:focus-visible {
    background: var(--lime);
    border-color: var(--leaf)
}

.approved-plantation-thumbnail {
    display: block;
    width: 10px;
    height: 10px;
    object-fit: cover
}

.status {
    display: inline-block;
    padding: 5px 9px;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700
}

.status-pending {
    background: #fff0c7;
    color: #8b6816
}

.status-approved {
    background: #dff1d8;
    color: #296744
}

.status-rejected {
    background: #f8dfda;
    color: #9d4435
}

.detail-panel {
    height: 100%
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 25px
}

.detail-grid small,
.detail-grid strong {
    display: block
}

.detail-grid small {
    color: var(--muted);
    font-size: .72rem
}

.detail-grid strong {
    margin-top: 4px
}

.detail-photo {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    margin: 10px 0;
    cursor: zoom-in;
    transition: transform .2s ease, box-shadow .2s ease
}

.detail-photo:hover,
.detail-photo:focus-visible {
    transform: scale(1.02);
    box-shadow: 0 8px 22px rgba(12, 31, 19, .2);
    outline: 3px solid var(--lime);
    outline-offset: 3px
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 24px;
    background: rgba(5, 16, 12, .9);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease
}

.image-lightbox.is-open {
    opacity: 1;
    pointer-events: auto
}

.image-lightbox-image {
    display: block;
    max-width: min(1100px, 94vw);
    max-height: 88vh;
    object-fit: contain;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .45)
}

.image-lightbox-close {
    position: absolute;
    top: 14px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    background: rgba(0, 0, 0, .25);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--ink)
}

.lightbox-open {
    overflow: hidden
}

.map-small {
    height: 240px;
    margin-top: 20px
}

.map-large {
    height: calc(100vh - 240px);
    min-height: 450px
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--ink)
}

.login-card {
    background: #fff;
    width: min(100% - 32px, 450px);
    padding: 45px
}

.login-card h1 {
    font-size: 3.5rem
}

.login-card .navbar-brand {
    color: var(--ink)
}

.login-card .brand-mark {
    color: var(--ink)
}

@media(max-width:767px) {
    .detail-grid {
        grid-template-columns: 1fr
    }

    .map-large {
        min-height: 500px
    }
}

.description-input-wrap {
    position: relative
}

.description-input-wrap textarea {
    padding-right: 48px
}

.voice-input-button {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--leaf);
    color: #fff;
    cursor: pointer;
    line-height: 1
}

.voice-input-button:hover,
.voice-input-button:focus-visible,
.voice-input-button.is-listening {
    background: var(--lime);
    color: var(--ink);
    outline: 2px solid var(--lime);
    outline-offset: 2px
}

.voice-input-button:disabled {
    opacity: .55;
    cursor: not-allowed
}