/* ================================================================
   МЕНЕДЖЕРСЬКА ПАНЕЛЬ
   ================================================================ */

/* ── Загальний layout ── */
.manager-wrap {
    display: flex;
    min-height: calc(100vh - 160px);
    margin: -32px -20px;
}

/* ── Сайдбар ── */
.manager-wrap .admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #1a2e4a;   /* синюватий — відрізняється від адмінки */
    display: flex;
    flex-direction: column;
}

.manager-wrap .admin-logo {
    padding: 20px 16px 16px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    border-bottom: 1px solid #2a4060;
}

.manager-wrap .admin-nav {
    flex: 1;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.manager-wrap .admin-nav-btn {
    background: none;
    border: none;
    color: #aac4e0;
    font-size: 14px;
    text-align: left;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
}
.manager-wrap .admin-nav-btn:hover  { background: #243a58; color: #fff; }
.manager-wrap .admin-nav-btn.active { background: #1565c0; color: #fff; }

.manager-wrap .admin-sidebar-footer {
    padding: 16px;
    border-top: 1px solid #2a4060;
}
.manager-wrap .admin-back-link { color: #7a9cbf; font-size: 13px; }
.manager-wrap .admin-back-link:hover { color: #fff; opacity: 1; }

/* ── Контент ── */
.manager-wrap .admin-content {
    flex: 1;
    padding: 28px 32px;
    background: #f5f7fa;
    overflow-y: auto;
}

/* ── Список замовлень ── */
.orders-mgr-list { display: flex; flex-direction: column; gap: 4px; }

.orders-mgr-row {
    display: grid;
    grid-template-columns: 80px 100px 1fr 80px 130px 160px;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    background: #fff;
    border: 1px solid #e0e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 14px;
}
.orders-mgr-row:hover { border-color: #1565c0; background: #f0f6ff; }

.omr-id     { font-weight: bold; color: #1a2e4a; }
.omr-date   { color: #999; font-size: 13px; }
.omr-client { color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omr-items  { color: #aaa; text-align: center; font-size: 13px; }
.omr-total  { font-weight: bold; color: #1565c0; text-align: right; }

/* ── Статуси ── */
.order-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 10px;
    text-align: center;
    white-space: nowrap;
}

.st-null      { background: #f5f5f5;  color: #999; }
.st-new       { background: #fff8e1;  color: #f57c00; }
.st-read      { background: #e3f2fd;  color: #1565c0; }
.st-accepted  { background: #e8f5e9;  color: #2e7d32; }
.st-invoiced  { background: #f3e5f5;  color: #6a1b9a; }
.st-paid      { background: #e0f2f1;  color: #00695c; }
.st-work      { background: #fff3e0;  color: #e65100; }
.st-shipped   { background: #e8eaf6;  color: #283593; }
.st-arrived   { background: #f1f8e9;  color: #33691e; }
.st-delivered { background: #e0f7fa;  color: #006064; }
.st-done      { background: #e8f5e9;  color: #1b5e20; }
.st-rejected  { background: #ffebee;  color: #b71c1c; }


/* ================================================================
   МОБІЛА
   ================================================================ */
@media (max-width: 768px) {

    /* Сайдбар переїжджає наверх */
    .manager-wrap { flex-direction: column; margin: -20px -12px; }

    .manager-wrap .admin-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        min-height: auto;
    }

    .manager-wrap .admin-logo {
        padding: 10px 14px;
        border-bottom: none;
        border-right: 1px solid #2a4060;
        font-size: 14px;
    }

    .manager-wrap .admin-nav {
        flex-direction: row;
        flex: none;
        padding: 6px 8px;
        gap: 4px;
        flex-wrap: wrap;
    }

    .manager-wrap .admin-nav-btn {
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 4px;
    }

    .manager-wrap .admin-sidebar-footer {
        padding: 6px 12px;
        margin-left: auto;
        border-top: none;
    }

    .manager-wrap .admin-content { padding: 16px 12px; }

    /* Рядок замовлення — два рядки */
    .orders-mgr-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 4px 12px;
        padding: 12px;
    }

    /* Рядок 1: номер + клієнт */
    .omr-id     { grid-column: 1; grid-row: 1; }
    .omr-client { grid-column: 2; grid-row: 1; text-align: right; }

    /* Рядок 2: сума + статус */
    .omr-total  { grid-column: 1; grid-row: 2; text-align: left; }
    .order-status { grid-column: 2; grid-row: 2; justify-self: end; }

    /* Ховаємо другорядне */
    .omr-date, .omr-items { display: none; }
}