/* ==========================================================================
   Shop admin: page, header, cards and buttons
   Uses the storefront's base.css for colours, fonts and form fields
   ========================================================================== */

.admin {
    min-height: 100vh;
    background: #F7F5FB;
}

/* Header: dark purple bar with the shop's initials and name */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #2A1052;
    color: #FFFFFF;
}

.admin-header__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header__badge {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #FFFFFF;
    color: #2A1052;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-header__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-header__shop {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-header__sub {
    font-size: 12px;
    color: #D9CCF2;
}

.admin-header__logout-button {
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid #6B4FA0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.admin-header__logout-button:hover {
    background: #3D1F70;
}

/* Page */
.admin-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 14px 12px 32px;
}

.admin-card {
    padding: 16px;
    border-radius: var(--radius-lg);
    background: #FFFFFF;
    box-shadow: 0 1px 4px rgba(28, 21, 48, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-card__title {
    font-size: 20px;
    font-weight: 800;
    color: #1C1530;
}

.admin-card__text {
    font-size: 15px;
    line-height: 1.5;
    color: #3D3550;
}

.admin-card__note {
    font-size: 13px;
    color: #6A6080;
}

/* Buttons */
.admin-button {
    height: 52px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--radius-md);
    background: #15803D;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.admin-button:hover {
    background: #116A32;
}

.admin-button--full {
    width: 100%;
}

/* Login pages: one centred card */
.admin-login {
    max-width: 440px;
    margin: 24px auto 0;
}

.admin-login .flow-card {
    gap: var(--space-4);
}

.admin-login__other {
    margin-top: var(--space-4);
    text-align: center;
    font-size: 14px;
    color: #6A6080;
}

.admin-login__other a {
    font-weight: 700;
}

/* ==========================================================================
   Admin menu (Orders, Products, Settings): bottom bar on phones, under the header on computers
   ========================================================================== */

.admin-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #EEE8F5;
    background: #FFFFFF;
    display: grid;
    grid-auto-flow: column;     /* one equal column per menu item: the order desk sees only Orders */
    grid-auto-columns: 1fr;
}

.admin-nav__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #5E4F7A;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.admin-nav__item.is-current {
    color: #5B21B6;
    font-weight: 800;
}

.admin-nav__icon {
    width: 22px;
    height: 22px;
}

.admin-nav__count {
    position: absolute;
    top: 8px;
    left: calc(50% + 6px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    background: #D91E5B;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Room for the bottom bar */
.admin--with-nav .admin-main {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

/* Pages with their own action bar at the bottom don't show the menu */
.admin--order .admin-nav,
.admin--product-edit .admin-nav {
    display: none;
}

@media (min-width: 900px) {
    .admin-nav {
        position: static;
        height: 48px;
        padding: 0 calc((100% - 960px) / 2 + 12px);
        border-top: 0;
        border-bottom: 1px solid #EEE8F5;
        display: flex;
        gap: 8px;
    }

    .admin-nav__item {
        flex-direction: row;
        gap: 6px;
        padding: 0 12px;
        font-size: 14px;
        border-bottom: 3px solid transparent;
    }

    .admin-nav__item.is-current {
        border-bottom-color: #5B21B6;
    }

    .admin-nav__count {
        position: static;
    }

    .admin--with-nav .admin-main {
        padding-bottom: 32px;
    }

    .admin--order .admin-nav,
    .admin--product-edit .admin-nav {
        display: flex;
    }
}

/* ---------- "No access" page (admin/no-access.blade.php) ---------- */

.no-access {
    max-width: 420px;
    margin: 48px auto 0;
    padding: 28px 20px;
    border: 1px solid #EEE8F5;
    border-radius: 18px;
    background: #FFFFFF;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.no-access__icon {
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: #F1ECFB;
    color: #5B21B6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-access__icon .icon {
    width: 26px;
    height: 26px;
}

.no-access__title {
    margin: 4px 0 0;
    color: #1C1530;
    font-size: 18px;
    font-weight: 800;
}

.no-access__text {
    margin: 0;
    color: #5E4F7A;
    font-size: 14px;
    line-height: 1.5;
}

.no-access__button {
    margin-top: 8px;
}

/* ---------- Development-only quick login (App\Support\DevLogin) ---------- */

.dev-login {
    max-width: 420px;
    margin: var(--space-4) auto 0;
    padding: 14px;
    border: 2px dashed #F59E0B;
    border-radius: 14px;
    background: #FFF7E6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dev-login__title {
    margin: 0;
    color: #5A3A00;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dev-login__button {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #FCE3B0;
    border-radius: 10px;
    background: #FFFFFF;
    color: #1C1530;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.dev-login__button span {
    color: #C2410C;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.dev-login__note {
    margin: 0;
    color: #5A3A00;
    font-size: 12px;
}

/* Small buttons in rows and boxes: outline, or filled #5B21B6 (--main) */
.row-button {
    height: 36px;
    padding: 0 12px;
    border: 1.5px solid #E2D4F7;
    border-radius: 10px;
    background: #FFFFFF;
    color: #2A1052;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.row-button:hover {
    background: #F6F1FF;
}

.row-button--main {
    padding: 0 14px;
    border-color: #5B21B6;
    background: #5B21B6;
    color: #FFFFFF;
    font-weight: 800;
}

.row-button--main:hover {
    background: #4C1D95;
    color: #FFFFFF;
}
