/*!
 * Shop-type dashboard block — the tiles and shortcuts that differ between a
 * pharmacy, a mobile shop, a computer shop and a general shop.
 *
 * Presentation only. Which tiles appear, and what they count, is decided in
 * config/shop_profiles.php and computed by ShopProfileUtil; nothing here
 * changes a figure or grants access to anything.
 *
 * Deliberately quiet: it sits above the existing dashboard, not instead of it,
 * so it borrows the same card language as the due panels beside it rather than
 * introducing a second one. Only the two tiles that mean "act on this" —
 * expiring and expired stock — are allowed any colour.
 */

.shop-profile-block {
    margin-top: 4px;
}

/* ---- Tiles -------------------------------------------------------- */

.shop-profile-stats {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.sp-tile {
    background: #fff;
    border: 1px solid #E8E4EF;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(27, 24, 50, .05);
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
}

.sp-tile:hover {
    box-shadow: 0 4px 12px rgba(27, 24, 50, .08);
    transform: translateY(-1px);
}

.sp-tile__link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 16px;
    color: inherit;
    text-decoration: none;
}
.sp-tile__link:hover,
.sp-tile__link:focus {
    color: inherit;
    text-decoration: none;
}
.sp-tile__link:focus-visible {
    outline: 2px solid #7C3AED;
    outline-offset: -2px;
}

.sp-tile__icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    background: #F3EDFE;
    color: #7C3AED;
}

.sp-tile__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sp-tile__value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    color: #3B1063;
}

.sp-tile__label {
    font-size: 12px;
    color: #6B6484;
    line-height: 1.3;
    /* Long labels wrap rather than pushing the tile wider */
    overflow-wrap: anywhere;
}

/* The two tiles that mean "act on this". Everything else stays neutral so
   these keep their meaning. */
.sp-tile--warning .sp-tile__icon { background: #FDF1DE; color: #8A4B08; }
.sp-tile--warning .sp-tile__value { color: #8A4B08; }

.sp-tile--danger { border-color: #F3C9C9; }
.sp-tile--danger .sp-tile__icon { background: #FCE8E8; color: #B91C1C; }
.sp-tile--danger .sp-tile__value { color: #B91C1C; }

/* ---- Quick actions ------------------------------------------------ */

.sp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: #FAF8FD;
    border: 1px solid #E8E4EF;
    border-radius: 14px;
}

.sp-actions__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #6B6484;
    margin-right: 4px;
}

.sp-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid #E6E0F0;
    border-radius: 9px;
    background: #fff;
    color: #3B1063;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}
.sp-action:hover,
.sp-action:focus {
    border-color: #C4A2F8;
    background: #F5EFFE;
    color: #3B1063;
    text-decoration: none;
}
.sp-action:focus-visible {
    outline: 2px solid #7C3AED;
    outline-offset: 2px;
}
.sp-action .fa { color: #7C3AED; }

/* ---- Small screens ------------------------------------------------ */

@media (max-width: 767px) {
    .sp-tile__value { font-size: 19px; }
    .sp-tile__icon { width: 34px; height: 34px; font-size: 15px; }
    .sp-tile__link { padding: 12px 13px; gap: 10px; }

    /* The actions become a scrolling strip rather than wrapping into a tall
       stack that pushes the real dashboard off the first screen. */
    .sp-actions {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .sp-action { flex: none; }
    .sp-actions__title { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .sp-tile { transition: none; }
    .sp-tile:hover { transform: none; }
    .sp-action { transition: none; }
}
