:root {
    --ink: #18202a;
    --muted: #647386;
    --line: #cfd7e3;
    --paper: #ffffff;
    --soft: #eef3f8;
    --panel: #0f1720;
    --panel-2: #162230;
    --brand: #0077ff;
    --brand-dark: #0057bd;
    --cyan: #00a7c7;
    --accent: #13a86b;
    --warning: #d88900;
    --danger: #b42318;
    --shadow: 0 18px 42px rgba(20, 31, 44, 0.14);
    --grid-line: rgba(0, 119, 255, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
        linear-gradient(0deg, var(--grid-line) 1px, transparent 1px),
        var(--soft);
    background-size: 34px 34px;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 56px);
    color: #ecf5ff;
    background: rgba(15, 23, 32, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    border-radius: 8px;
    font-weight: 800;
    font-size: 24px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 28px rgba(0, 119, 255, 0.35);
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: #9fb2c7;
    font-size: 12px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.nav a,
.filters a,
.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.nav a,
.filters a,
.button.ghost {
    color: var(--ink);
    background: #ffffff;
    border-color: var(--line);
}

.site-header .nav a {
    color: #d7e6f7;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.site-header .nav a:hover {
    color: #ffffff;
    background: rgba(0, 167, 199, 0.18);
    border-color: rgba(0, 167, 199, 0.55);
}

.nav a:hover,
.filters a:hover,
.filters a.active,
.button.ghost:hover {
    border-color: var(--brand);
    color: var(--brand-dark);
}

.button,
button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.button:hover,
button:hover {
    background: var(--brand-dark);
}

main {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 28px;
    align-items: end;
    padding: 50px 0 34px;
}

.hero::before {
    content: "";
    display: block;
    grid-column: 1 / -1;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--cyan), var(--accent), transparent);
    border-radius: 999px;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 10px 0 14px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 640px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.eyebrow,
.meta-row span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 0 10px;
    color: #064a61;
    background: #e8fbff;
    border: 1px solid #b8edf7;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.search-panel,
.form-shell,
.table-shell {
    padding: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.search-panel {
    position: relative;
}

.search-panel::after,
.detail-panel::after,
.login-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 72px;
    height: 3px;
    background: var(--cyan);
}

.search-panel label,
.data-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin: 10px 0 16px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fbfdff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(13, 110, 253, 0.18);
    border-color: var(--brand);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-section,
.detail-layout,
.form-shell,
.table-shell {
    margin: 22px 0 48px;
}

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-title h1,
.section-title h2 {
    margin: 0;
    font-size: 28px;
}

.section-title p {
    margin: 0;
    color: var(--muted);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
}

.product-card {
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(20, 31, 44, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 119, 255, 0.45);
    box-shadow: 0 18px 38px rgba(20, 31, 44, 0.14);
}

.product-image {
    display: block;
    aspect-ratio: 4 / 3;
    background:
        linear-gradient(135deg, rgba(0, 119, 255, 0.12), rgba(19, 168, 107, 0.12)),
        #e7edf4;
}

.product-image img,
.inquiry-product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder,
.detail-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 220px;
    place-items: center;
    color: var(--muted);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
        linear-gradient(135deg, #dfe8f3, #bfcfe1);
    background-size: 22px 22px, 22px 22px, auto;
    font-size: 26px;
    font-weight: 800;
}

.product-body {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-body h3,
.product-body p {
    margin: 0;
}

.product-body p {
    color: var(--muted);
}

.price,
.detail-price {
    color: var(--accent);
    font-size: 20px;
}

.card-actions,
.detail-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.card-actions .button {
    flex: 1 1 105px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 28px;
    align-items: start;
}

.zoom-wrap {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    background: #dfe7f1;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: zoom-in;
}

.zoomable {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    transform-origin: center;
    transition: transform 0.18s ease;
}

.zoom-wrap.is-zooming .zoomable {
    transform: scale(2.1);
}

.detail-panel {
    position: relative;
    display: grid;
    gap: 16px;
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.detail-panel h1,
.detail-panel h2,
.detail-panel p {
    margin: 0;
}

.detail-panel h1 {
    font-size: 34px;
    line-height: 1.12;
}

.brand-line {
    color: var(--muted);
    font-weight: 700;
}

.spec-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
}

.form-shell,
.table-shell {
    max-width: 940px;
}

.table-shell.wide {
    max-width: none;
}

.data-form {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.notice,
.empty-state {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 700;
}

.notice.success {
    color: #0f5132;
    background: #d1e7dd;
    border: 1px solid #badbcc;
}

.notice.error {
    color: var(--danger);
    background: #f8d7da;
    border: 1px solid #f1aeb5;
}

.empty-state {
    color: var(--muted);
    background: #ffffff;
    border: 1px dashed var(--line);
}

.inquiry-product {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.inquiry-product img {
    width: 86px;
    height: 70px;
    border-radius: 8px;
}

.inquiry-product strong,
.inquiry-product span {
    display: block;
}

.inquiry-product span {
    color: var(--accent);
    font-weight: 800;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: #425064;
    background: #edf3f9;
    font-size: 13px;
    text-transform: uppercase;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 26px clamp(18px, 4vw, 56px);
    color: #a8b7c8;
    background: var(--panel);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer p {
    margin: 4px 0 0;
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 28px;
    align-items: center;
    min-height: calc(100vh - 180px);
    padding: 42px 0;
}

.login-copy {
    padding: 34px;
    color: #ecf5ff;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        var(--panel);
    background-size: 28px 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-copy h1 {
    margin: 12px 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.04;
}

.login-copy p {
    margin: 0;
    color: #a8b7c8;
    font-size: 18px;
}

.login-card {
    position: relative;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-card h2 {
    margin: 0;
}

.admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 34px 0 20px;
    padding: 28px;
    color: #ecf5ff;
    background:
        linear-gradient(120deg, rgba(0, 119, 255, 0.24), transparent 42%),
        var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.admin-hero h1,
.admin-hero p {
    margin: 0;
}

.admin-hero h1 {
    margin-top: 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
}

.admin-hero p {
    color: #a8b7c8;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.metric-card {
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--cyan);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    color: var(--panel);
    font-size: 42px;
    line-height: 1;
}

@media (max-width: 820px) {
    .site-header,
    .site-footer,
    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        justify-content: flex-start;
    }

    .hero,
    .detail-layout,
    .form-grid,
    .login-layout,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .admin-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero {
        padding-top: 34px;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .zoom-wrap,
    .zoomable {
        min-height: 320px;
    }
}

@media (max-width: 480px) {
    main {
        width: min(100% - 24px, 1180px);
    }

    .nav a,
    .filters a,
    .button,
    button {
        width: 100%;
    }

    .card-actions .button,
    .detail-actions .button,
    .form-actions .button,
    .form-actions button {
        flex-basis: 100%;
    }
}
