:root {
    --bg: #f5f8ff;
    --ink: #0f1d34;
    --muted: #5d6b83;
    --line: #dce5f5;
    --surface: #ffffff;
    --brand: #1f5fbf;
    --brand2: #ff7f1f;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); text-decoration: none; }
.container { width: min(1180px, 94%); margin: 0 auto; }
.admin-top { background: #102b61; color: #dce7ff; padding: 12px 0; }
.admin-nav { background: #fff; border-bottom: 1px solid var(--line); }
.admin-nav .row { display: flex; gap: 14px; align-items: center; justify-content: space-between; min-height: 70px; flex-wrap: wrap; }
.menu { display: flex; gap: 12px; flex-wrap: wrap; }
.menu a { padding: 8px 10px; border-radius: 8px; color: #2d3d5a; font-weight: 700; }
.menu a.active { background: #e8f1ff; color: #0b3f96; }
.btn { border: 0; border-radius: 8px; padding: 10px 14px; font-weight: 700; cursor: pointer; display: inline-block; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-accent { background: var(--brand2); color: #fff; }
.btn-muted { background: #e9effa; color: #1a335d; }
.btn-danger { background: #d7354a; color: #fff; }
main { padding: 24px 0 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.grid-4 { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); }
label { display: block; font-weight: 700; margin: 10px 0 5px; }
input, select, textarea { width: 100%; border: 1px solid #cdd9f0; border-radius: 8px; padding: 10px; font: inherit; background: #fff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
th { background: #f1f6ff; }
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.alert-ok { background: #e7f7ed; color: #165f2d; border: 1px solid #b8ebc9; }
.alert-err { background: #ffecee; color: #86202e; border: 1px solid #f6c5cb; }
.kpi { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; }
.kpi b { display: block; font-size: 1.3rem; }
.small { color: var(--muted); font-size: .9rem; }
.flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.line-clamp-2 {
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.45;
    max-width: 320px;
}
.image-preview-wrap {
    margin-top: 8px;
    width: min(460px, 100%);
    position: relative;
}
.image-preview-ratio {
    display: inline-block;
    margin-bottom: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #0b3f96;
    background: #e8f1ff;
    border: 1px solid #c9dcff;
}
.image-preview {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #cdd9f0;
    background: #f5f8ff;
}
.color-select {
    max-width: 360px;
}
.color-preview-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}
.color-chip {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-block;
    border: 1px solid rgba(15, 29, 52, 0.2);
    vertical-align: middle;
}
.title-image-preview {
    margin-top: 8px;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    border: 1px solid #cdd9f0;
    object-fit: contain;
    background: #f5f8ff;
    display: block;
    padding: 6px;
}
.image-remove-btn {
    position: absolute;
    top: 36px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform .16s ease, color .16s ease, opacity .16s ease;
    opacity: 0.98;
}
.image-remove-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
    filter:
        drop-shadow(0 0 1px rgba(0, 0, 0, 0.95))
        drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95))
        drop-shadow(0 0 10px rgba(0, 0, 0, 0.55));
}
.image-remove-btn:hover {
    color: #fef08a;
    transform: translateY(-1px);
    opacity: 1;
}
.image-remove-btn.is-active {
    color: #fca5a5;
    opacity: 1;
}
@media (max-width: 900px) { .grid-4, .grid-2 { grid-template-columns: 1fr; } }
