:root {
    --orange: #d44b00;
    --orange-dark: #bb3f00;
    --orange-soft: #fff3e8;
    --yellow-soft: #fff6bf;
    --border: #d8d8d8;
    --text: #111827;
    --muted: #6b7280;
    --bg: #f7f7f7;
    --card: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

button, input { font: inherit; }

.page {
    width: 100%;
    min-height: 100vh;
}

.topbar {
    height: 68px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    border: 1px solid #ddd;
    background: #fff;
    color: var(--orange);
    font-weight: 800;
    font-size: 13px;
}

.brand-title {
    font-weight: 700;
    font-size: 17px;
    line-height: 1.1;
}

.brand-subtitle {
    color: #6b7280;
    font-size: 12px;
    margin-top: 3px;
}

.theme-button {
    width: 44px;
    height: 44px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 50%;
    font-size: 21px;
    cursor: pointer;
}

.container {
    width: min(760px, calc(100% - 22px));
    margin: 10px auto 28px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.section-title h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
}

.section-icon {
    width: 34px;
    height: 34px;
    background: #fff2bc;
    color: var(--orange);
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.section-icon.location { font-size: 20px; }

label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin: 10px 0 6px;
}

.required { color: var(--orange); }

input[type="text"] {
    width: 100%;
    height: 43px;
    border: 1px solid #bdbdbd;
    border-radius: 12px;
    padding: 0 12px;
    color: #333;
    outline: none;
    background: #fff;
    text-transform: uppercase;
}

input[type="text"]:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(212,75,0,.10);
}

.hint, .counter {
    color: #666;
    font-size: 11px;
    margin-top: 4px;
}

.counter {
    color: #777;
}

.coord-box {
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 13px;
    padding: 9px;
}

.coord-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 2px 4px 9px;
}

.coord-row small {
    display: block;
    color: #777;
    font-size: 10px;
    margin-bottom: 2px;
}

.coord-row strong {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.outline-button {
    height: 43px;
    border: 1.5px solid var(--orange);
    background: #fff;
    color: var(--orange);
    border-radius: 22px;
    font-weight: 700;
    cursor: pointer;
}

.outline-button:hover { background: var(--orange-soft); }

.outline-button:disabled,
.submit-button:disabled {
    opacity: .55;
    cursor: wait;
}

.map-wrap {
    margin-top: 9px;
    border: 1px solid #ddd;
    border-radius: 13px;
    overflow: hidden;
    position: relative;
}

#map {
    width: 100%;
    height: 300px;
}

.map-hint {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 500;
    background: rgba(255,255,255,.94);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 11px;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.submit-button {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: var(--orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    margin: 8px 0;
}

.submit-button:hover { background: var(--orange-dark); }

.submit-button .arrow { font-size: 24px; font-weight: 400; }

.help-box {
    background: var(--yellow-soft);
    border-left: 4px solid #f0a900;
    border-radius: 10px;
    padding: 10px 11px;
    display: flex;
    gap: 9px;
    align-items: flex-start;
    color: #666;
    font-size: 11px;
    line-height: 1.45;
}

.help-icon { color: var(--orange); font-size: 14px; }
.help-box a { color: var(--orange); font-weight: 800; }

.message {
    margin-top: 8px;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
}

.message.success { background: #e9f8ed; color: #146c2e; border: 1px solid #bce8c7; }
.message.error { background: #fff0f0; color: #9d1c1c; border: 1px solid #f1c0c0; }

.hidden { display: none !important; }

/* Admin */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 8px; border-bottom: 1px solid #e5e5e5; text-align: left; white-space: nowrap; }
th { background: #fafafa; }
.empty { text-align: center; color: #777; padding: 24px; }

@media (max-width: 560px) {
    .topbar { height: 61px; padding: 0 12px; }
    .brand-title { font-size: 15px; }
    .brand-subtitle { font-size: 10px; }
    .brand-logo { width: 34px; height: 34px; }

    .container {
        width: calc(100% - 20px);
        margin-top: 9px;
    }

    .card { padding: 13px; }
    .button-row { grid-template-columns: 1fr 1fr; }
    #map { height: 280px; }
}


/* Submit success animation */
.success-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .28s ease;
}

.success-overlay.show {
    opacity: 1;
}

.success-card {
    width: min(330px, 100%);
    background: #fff;
    border-radius: 22px;
    padding: 28px 22px 24px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
    transform: scale(.86) translateY(10px);
    transition: transform .32s cubic-bezier(.2,.8,.2,1);
}

.success-overlay.show .success-card {
    transform: scale(1) translateY(0);
}

.success-check-wrap {
    width: 78px;
    height: 78px;
    margin: 0 auto 16px;
}

.success-check {
    width: 78px;
    height: 78px;
    overflow: visible;
}

.success-check-circle {
    fill: #fff7ef;
    stroke: var(--orange);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: success-circle .55s ease-out forwards;
}

.success-check-mark {
    fill: none;
    stroke: var(--orange);
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 34;
    stroke-dashoffset: 34;
    animation: success-mark .38s .38s ease-out forwards;
}

.success-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
}

.success-subtitle {
    margin-top: 7px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
}

@keyframes success-circle {
    to { stroke-dashoffset: 0; }
}

@keyframes success-mark {
    to { stroke-dashoffset: 0; }
}
