* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f5f8;
    color: #1f2937;
}


/* =========================
   ШАПКА
========================= */

header {
    background: #101b2d;
    box-shadow: 0 2px 8px #0003;
}

.wrap {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 21px;
}

.nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
}

.nav a:hover {
    text-decoration: underline;
}


/* =========================
   ГЛАВНАЯ / ПОИСК
========================= */

.hero {
    text-align: center;
    padding: 55px 10px 35px;
}

.hero h1 {
    font-size: 42px;
    margin: 0 0 10px;
}

.hero p {
    color: #64748b;
    font-size: 18px;
}

.search {
    display: flex;
    max-width: 750px;
    margin: 30px auto;
    gap: 12px;
}

.search input {
    flex: 1;
}

input,
select {
    width: 100%;
    padding: 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

button {
    border: 0;
    border-radius: 8px;
    padding: 13px 22px;
    font-size: 16px;
    cursor: pointer;
    background: #2563eb;
    color: white;
}

button:hover {
    opacity: 0.9;
}

.results-title {
    text-align: center;
    margin: 25px 0;
}


/* =========================
cat > /opt/cartridge-locator/static/style.css <<'EOF'
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f5f8;
    color: #1f2937;
}


/* =========================
   ШАПКА
========================= */

header {
    background: #101b2d;
    box-shadow: 0 2px 8px #0003;
}

.wrap {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 21px;
}

.nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
}

.nav a:hover {
    text-decoration: underline;
}


/* =========================
   ГЛАВН========================= */Я / ПОИСК
========================= */

.hero {
    text-align: center;
    padding: 55px 10px 35px;
}

.hero h1 {
    font-size: 42px;
    margin: 0 0 10px;
}

.hero p {
    color: #64748b;
    font-size: 18px;
}

.search {
    display: flex;
    max-width: 750px;
    margin: 30px auto;
    gap: 12px;
}

.search input {
    flex: 1;
}

input,
select {
    width: 100%;
    padding: 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

button {
    border: 0;
    border-radius: 8px;
    padding: 13px 22px;
    font-size: 16px;
    cursor: pointer;
    background: #2563eb;
    color: white;
}

button:hover {
    opacity: 0.9;
}

.results-title {
    text-align: center;
    margin: 25px 0;
}


/* =========================


.result-layout {
    background: white;
    border: 1px solid #d8dee8;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 25px;

    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;

    box-shadow: 0 2px 12px #00000010;
}

.card {
    background: white;
}

.cartridge-info {
    border-right: 1px solid #e2e8f0;
    padding-right: 25px;
}

.cartridge-info h2 {
    margin-top: 0;
}

.info-block p {
    margin: 14px 0;
    font-size: 17px;
}

.quantity {
    margin-top: 25px;
    font-size: 17px;
}

.note {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    line-height: 1.5;
}


/* =========================
   СХЕМА СТЕЛЛАЖЕЙ
========================= */

.rack-panel h2 {
    text-align: center;
    margin-top: 0;
}

.rack-diagrams {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 42px;
    flex-wrap: wrap;
}


/* ОБЩИЙ СТЕЛЛАЖ */

.rack {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 14px;
    border-radius: 12px;
}

.rack h3 {
    text-align: center;
    margin: 0 0 14px;
    font-size: 15px;
}


/* =========================
   ЛЕВЫЙ СТЕЛЛАЖ
========================= */

.left-sections {
    display: flex;
    gap: 8px;
}

.rack-section {
    width: 130px;
    min-width: 130px;
}

.section-title {
    background: #315eb5;
    color: white;
    text-align: center;
    padding: 10px 5px;
    font-weight: bold;
    border-radius: 6px 6px 0 0;
}


/* =========================
   ПОЛКА
========================= */

.shelf {
    min-height: 39px;

    border: 1px solid #aeb8c5;
    border-top: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 4px 6px;

    font-size: 13px;

    background: #f8fafc;

    white-space: nowrap;

    overflow: hidden;
}


/* ВЫБРАННАЯ ПОЛКА */

.shelf.selected {
    background: #86efac;
    border-color: #22c55e;

    color: #14532d;

    font-weight: bold;

    box-shadow: inset 0 0 0 1px #22c55e;

    overflow: visible;
}


/* НАДПИСЬ "ЗДЕСЬ" */
.location-marker {
    display: inline-block;

    margin-left: 5px;

    font-size: 10px;

    font-weight: bold;

    white-space: nowrap;

    color: #166534;
}


/* =========================
   ПРАВЫЙ СТЕЛЛАЖ
========================= */

.right-rack {
    width: 180px;
}

.right-rack h3 {
    color: #166534;
}

.right-shelves {
    width: 100%;
}


/* =========================
   ПОДСКАЗКА
========================= */

.diagram-hint {
    margin-top: 20px;
    padding: 14px;

    text-align: center;

    background: #ecfdf5;

    border: 1px solid #bbf7d0;

    border-radius: 8px;

    color: #166534;
}


/* =========================
   АДМИНКА
========================= */

.panel {
    margin: 20px 0;
    background: white;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 10px #0001;
}

.login {
    max-width: 450px;
    margin: 60px auto;
    background: white;
    border-radius: 12px;
    padding: 22px;
}

.login form,
.gridform {
    display: grid;
    gap: 14px;
}

.gridform {
    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));

    align-items: end;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}


/* =========================
   ТАБЛИЦЫ
========================= */

.tablewrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.actions {
    display: flex;
    gap: 8px;
}

.actions form {
    margin: 0;
}

.danger {
    background: #dc2626;
    padding: 8px 10px;
}


/* =========================
   УВЕДОМЛЕНИЯ
========================= */

.flash {
    padding: 14px;
    border-radius: 8px;
    margin: 15px 0;
}

.success {
    background: #dcfce7;
}

.error {
    background: #fee2e2;
}


/* =========================
   ПУСТОЙ РЕЗУЛЬТАТ
========================= */

.empty {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px #0001;
}


/* =========================
   ПЛАНШЕТЫ
========================= */

@media (max-width: 850px) {

    .result-layout {
        grid-template-columns: 1fr;
    }

    .cartridge-info {
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;

        padding-right: 0;
        padding-bottom: 20px;
    }

    .rack-diagrams {
        gap: 20px;
    }
}


/* =========================
   ========================= */

@media (max-width: 600px) {

    .wrap {
        padding: 14px;
    }

    .nav {
        flex-direction: column;
        gap: 12px;
    }

    .nav a {
        margin-left: 10px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .search {
        flex-direction: column;
    }

    .left-sections {
        width: 100%;
        gap: 3px;
    }

    .rack-section {
        width: 33%;
        min-width: 0;
    }

    .shelf {
        font-size: 10px;
        padding: 3px 1px;
    }

    .location-marker {
        display: none;
    }

    .right-rack {
        width: 100%;
    }
}

/* =========================
   ИСП========================= */

.result-layout {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.cartridge-info {
    flex: 0 0 260px;
}

.rack-panel {
    flex: 1;
    margin: 0;
    padding: 0;
    align-self: flex-start;
}

.rack-panel h2 {
    margin: 0 0 20px 0;
    padding: 0;
}


/* Планшеты и телефоны */

@media (max-width: 850px) {

    .result-layout {
        display: block;
    }

    .cartridge-info {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;

        padding-right: 0;
        padding-bottom: 20px;

        margin-bottom: 25px;
    }

}
