:root {
    --ink: #16251e;
    --muted: #647067;
    --surface: #f4f6f4;
    --line: #dce3dd;
    --green: #1f6b46;
    --green-dark: #174f35;
    --orange: #e9832d;
    --white: #ffffff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--white); line-height: 1.55; }
a { color: inherit; }
.container { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 10; }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { text-decoration: none; font-size: 1.35rem; font-weight: 900; letter-spacing: -.04em; }
.brand span { color: var(--orange); }
nav { display: flex; gap: 20px; align-items: center; }
nav a { text-decoration: none; font-weight: 650; }
.nav-logout { margin: 0; }
.nav-logout button { padding: 0; background: none; color: var(--ink); font-weight: 650; }
.nav-logout button:hover { background: none; color: var(--green); }
.nav-add { color: var(--green); }

.mobile-nav { display: none; position: relative; }
.mobile-nav summary { min-width: 48px; min-height: 48px; display: grid; grid-template-columns: 22px auto; grid-template-rows: repeat(3, 4px); align-content: center; column-gap: 8px; row-gap: 4px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; list-style: none; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary span { width: 22px; height: 2px; grid-column: 1; background: var(--ink); border-radius: 2px; }
.mobile-nav summary strong { grid-column: 2; grid-row: 1 / 4; align-self: center; font-size: .9rem; }
.mobile-nav nav { position: absolute; top: calc(100% + 9px); right: 0; width: min(300px, calc(100vw - 32px)); display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 16px 40px rgba(22,37,30,.16); }
.mobile-nav nav a, .mobile-nav .nav-logout button { width: 100%; min-height: 46px; display: flex; align-items: center; padding: 11px 13px; border-radius: 8px; text-align: left; }
.mobile-nav nav a:hover, .mobile-nav .nav-logout button:hover { background: var(--surface); }
.mobile-nav .nav-logout { width: 100%; }

.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 5px; padding: 0 5px; border-radius: 99px; background: var(--orange); color: white; font-size: .72rem; font-weight: 850; }
.hero { padding: 72px 0 58px; background: linear-gradient(135deg, #eff7f1, #fff7ee); }
.hero h1 { max-width: 780px; margin: 8px 0 14px; font-size: clamp(2.1rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -.055em; }
.hero p:not(.eyebrow) { max-width: 700px; color: var(--muted); font-size: 1.08rem; }
.eyebrow, .reference { color: var(--green); text-transform: uppercase; letter-spacing: .11em; font-size: .78rem; font-weight: 800; }
.section { padding-block: 42px; }
.filter-card { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 12px 40px rgba(22,37,30,.07); margin-top: -72px; position: relative; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.wide { grid-column: span 2; }
label { font-size: .9rem; font-weight: 750; }
input, select, textarea { width: 100%; border: 1px solid #bdc9c0; border-radius: 9px; padding: 11px 12px; font: inherit; background: white; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(31,107,70,.15); border-color: var(--green); }
.actions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }
button, .button, .button-secondary { border: 0; border-radius: 9px; padding: 11px 16px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; display: inline-block; }
button, .button { background: var(--green); color: white; }
button:hover, .button:hover { background: var(--green-dark); }
.button-secondary { background: var(--surface); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.section-heading h2 { font-size: 1.7rem; margin: 0 0 20px; }
.section-heading span { color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.product-card { min-width: 0; height: 100%; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: white; }
.product-image { width: 100%; aspect-ratio: 3/2; display: block; flex: 0 0 auto; position: relative; background: var(--surface); overflow: hidden; }
.product-image img, .detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image img { object-position: center top; }
.placeholder { height: 100%; display: grid; place-items: center; color: #7b887f; font-weight: 800; background: linear-gradient(135deg, #edf1ee, #dfe7e1); }
.badge { position: absolute; top: 12px; left: 12px; background: var(--orange); color: white; padding: 5px 9px; border-radius: 99px; font-size: .75rem; font-weight: 800; }
.product-body { min-width: 0; height: 100%; display: flex; flex-direction: column; padding: 20px; }
.product-body h3 { min-height: 2.8em; margin: 4px 0 8px; font-size: 1.15rem; line-height: 1.4; overflow-wrap: anywhere; }
.product-body h3 a { display: block; text-decoration: none; }
.product-body p { color: var(--muted); margin: 5px 0; }
.product-body .reference { min-height: 1.2em; margin-top: 0; }
.product-body .dimensions { min-height: 1.55em; }
.product-body .dimensions + p { min-height: 3.1em; }
.product-body .dimensions { color: var(--ink); font-weight: 800; }
.price-row { width: 100%; border-top: 1px solid var(--line); margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price-row strong { font-size: 1.25rem; }
.price-row a { color: var(--green); font-weight: 800; }
.empty-state { grid-column: 1/-1; padding: 50px; text-align: center; background: var(--surface); border-radius: 16px; }
.detail-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: start; }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--green); font-weight: 750; }
.detail-image { min-height: 440px; border-radius: 18px; overflow: hidden; background: var(--surface); }
.detail-content h1 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.04em; line-height: 1.05; margin: 6px 0 10px; }
.detail-price { font-size: 1.8rem; font-weight: 900; margin: 8px 0; }
.status { display: inline-block; padding: 5px 9px; border-radius: 99px; background: #e6f5eb; color: var(--green-dark); font-size: .8rem; font-weight: 800; }
.status-reserved { background: #fff0df; color: #8c4e17; }
.specs { border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; text-align: right; }
.warning { margin-top: 20px; padding: 14px; border-left: 4px solid var(--orange); background: #fff7ee; }
.inquiry-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; background: var(--surface); border-radius: 20px; margin-bottom: 60px; padding-inline: 34px; }
.inquiry-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inquiry-form .field:nth-of-type(4), .inquiry-form .field:nth-of-type(5), .inquiry-form button { grid-column: 1/-1; }
.inquiry-form ul { margin: 0; padding-left: 18px; }
.has-error input, .has-error textarea, .has-error select { border-color: #a62424; }
.error { color: #a62424; }
.success-card { max-width: 680px; text-align: center; padding-block: 100px; }
.messages { padding-top: 12px; }
.message { padding: 12px 14px; background: #e6f5eb; border-radius: 8px; }
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: .9rem; }

.form-page { padding: 54px 0 80px; background: var(--surface); }
.form-shell { max-width: 900px; }
.form-intro { margin-bottom: 26px; }
.form-intro h1 { margin: 5px 0 8px; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.04em; }
.form-intro p:last-child { color: var(--muted); margin: 0; }
.product-form { display: grid; gap: 20px; }
.product-form fieldset { border: 1px solid var(--line); border-radius: 18px; padding: 24px; background: var(--white); margin: 0; }
.product-form legend { padding: 0 10px 0 0; font-size: 1.1rem; font-weight: 850; }
.product-form legend span { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px; border-radius: 50%; background: var(--green); color: white; font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-top: 10px; }
.form-grid .full { grid-column: 1 / -1; }
.help { color: var(--muted); line-height: 1.35; }
.input-affix { display: flex; align-items: stretch; }
.input-affix input { border-radius: 0; }
.input-affix span { display: grid; place-items: center; padding: 0 12px; border: 1px solid #bdc9c0; background: var(--surface); color: var(--muted); font-weight: 750; }
.input-affix span:first-child { border-right: 0; border-radius: 9px 0 0 9px; }
.input-affix span:last-child { border-left: 0; border-radius: 0 9px 9px 0; }
.check-group { align-self: end; display: grid; gap: 9px; padding-bottom: 3px; }
.check-row { display: flex; align-items: center; gap: 9px; font-weight: 650; }
.check-row input { width: 18px; height: 18px; accent-color: var(--green); }
.form-submit { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.95); box-shadow: 0 8px 30px rgba(22,37,30,.12); }
.form-alert { padding: 12px 14px; border-left: 4px solid #a62424; background: #fff0f0; color: #801b1b; }
.login-page { min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 48px 16px; background: var(--surface); }
.login-card { width: min(440px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 18px 50px rgba(22,37,30,.1); }
.login-card h1 { margin: 4px 0; font-size: 2.2rem; }
.login-card > p:not(.eyebrow) { color: var(--muted); margin-top: 0; }
.login-form { display: grid; gap: 18px; margin-top: 24px; }

.manage-page { min-height: calc(100vh - 150px); padding: 48px 0 80px; background: var(--surface); }
.manage-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.manage-heading h1 { margin: 4px 0; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.04em; }
.manage-heading p:last-child { color: var(--muted); margin: 0; }
.manage-filters { display: grid; grid-template-columns: 2fr 1fr auto auto; align-items: end; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.manage-summary { margin: 24px 0 10px; color: var(--muted); font-weight: 750; }
.manage-list { display: grid; gap: 10px; }
.manage-row { display: grid; grid-template-columns: 88px minmax(220px, 1fr) auto auto; gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.manage-thumb { width: 88px; height: 68px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: var(--surface); color: var(--muted); font-size: .72rem; }
.manage-thumb img { width: 100%; height: 100%; object-fit: cover; }
.manage-main h2 { margin: 1px 0; font-size: 1.05rem; }
.manage-main p { margin: 0; color: var(--muted); font-size: .9rem; }
.manage-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.manage-actions > a { font-size: .88rem; font-weight: 750; }
.manage-actions .button-secondary { padding: 8px 11px; }
.delete-link { color: #a62424; }
.delete-card { width: min(560px, 100%); }
.delete-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.danger-button { background: #a62424; }
.danger-button:hover { background: #7d1919; }
.status-draft, .status-archived { background: #e9edeb; color: #4d5b52; }
.status-sold { background: #e5e8f5; color: #343e79; }

.inquiry-filters { display: flex; align-items: end; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.inquiry-filters .field { min-width: 240px; }
.inquiry-list { display: grid; gap: 16px; }
.inquiry-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.inquiry-card.inquiry-new { border-left: 5px solid var(--orange); }
.inquiry-card-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; padding: 20px 22px 12px; }
.inquiry-card-head h2 { margin: 2px 0; font-size: 1.15rem; }
.inquiry-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 12px 22px; background: var(--surface); }
.inquiry-meta div { display: grid; }
.inquiry-meta span, .inquiry-footer > span { color: var(--muted); font-size: .78rem; }
.inquiry-meta a, .inquiry-meta strong { font-size: .9rem; }
.inquiry-message { padding: 20px 22px; }
.inquiry-footer { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 14px 22px; border-top: 1px solid var(--line); }
.inquiry-footer form { display: flex; align-items: end; gap: 8px; }
.inquiry-footer form label { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.inquiry-footer select { width: auto; padding: 8px 10px; }
.inquiry-footer button { padding: 8px 12px; }
.inquiry-status-new { background: #fff0df; color: #8c4e17; }
.inquiry-status-handled { background: #e6f5eb; color: var(--green-dark); }
.inquiry-status-closed { background: #e9edeb; color: #4d5b52; }
@media (max-width: 900px) {
    .filter-card { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .field.wide { grid-column: 1/-1; }
    .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .detail-grid, .inquiry-section { grid-template-columns: 1fr; }
    .manage-row { grid-template-columns: 72px 1fr auto; }
    .manage-thumb { width: 72px; height: 60px; }
    .manage-actions { grid-column: 2 / -1; justify-content: flex-start; }
    .inquiry-meta { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
    .desktop-nav { display: none; }
    .mobile-nav { display: block; }
    .header-inner { min-height: 64px; }
}
@media (max-width: 620px) {
    .container { width: min(100% - 24px, 1160px); }
    input, select, textarea { min-height: 46px; font-size: 16px; }
    input[type="checkbox"] { min-height: 0; }
    input[type="file"] { min-height: 52px; padding: 8px; }
    button, .button, .button-secondary { min-height: 46px; }
    .section { padding-block: 30px; }
    .filter-card { padding: 18px; margin-top: -48px; }
    .actions { flex-wrap: wrap; }
    .actions > * { flex: 1; text-align: center; }
    .form-page, .manage-page { padding: 30px 0 64px; }
    .form-intro { margin-bottom: 18px; }
    .product-form { gap: 14px; }
    .product-form legend { line-height: 1.3; }
    .input-affix { min-width: 0; }
    .input-affix input { min-width: 0; }
    .filter-card, .inquiry-form { grid-template-columns: 1fr; }
    .field.wide, .inquiry-form .field, .inquiry-form button { grid-column: 1; }
    .product-grid { grid-template-columns: 1fr; }
    .product-body { padding: 18px; }
    .product-body h3, .product-body .dimensions + p { min-height: 0; }

    .hero { padding-top: 48px; }
    .detail-image { min-height: 300px; }
    .manage-heading { align-items: stretch; flex-direction: column; }
    .manage-heading .button { text-align: center; }
    .manage-filters { grid-template-columns: 1fr 1fr; }
    .manage-row { grid-template-columns: 60px 1fr; gap: 12px; }
    .manage-thumb { width: 60px; height: 54px; }
    .manage-row > .status { grid-column: 2; justify-self: start; }
    .manage-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
    .manage-actions a { min-height: 44px; display: grid; place-items: center; padding: 8px; border-radius: 8px; background: var(--surface); text-align: center; }
    .inquiry-filters { align-items: stretch; flex-direction: column; }
    .inquiry-filters .field { min-width: 0; width: 100%; }
    .inquiry-meta { grid-template-columns: 1fr; }
    .inquiry-footer { align-items: stretch; flex-direction: column; }
    .inquiry-footer form { align-items: stretch; }
    .inquiry-footer form select { flex: 1; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: 1; }
    .product-form fieldset { padding: 18px; }
    .form-submit { justify-content: stretch; padding: 10px; }
    .form-submit a, .form-submit button { flex: 1; text-align: center; }
}
