/* ==========================================================================
   list.css — data-list table used by feature list pages (products, …).
   Image + name/subtitle cell, tidy columns, icon actions. Theme-aware.
   ========================================================================== */

.ptable-wrap {
    overflow-x: auto;
}
.ptable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.ptable th {
    text-align: left;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.ptable td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.ptable tbody tr:last-child td {
    border-bottom: none;
}

/* Order / booking status dropdown — compact so the whole label (Pending,
   Shipped, Payment confirmed…) stays visible on every device. Tight side
   padding + a small custom caret shrink the native "mark" area; width:auto
   lets the select size to its text. */
.status-sel {
    width: auto;
    min-width: 120px;
    max-width: 100%;
    margin: 0;
    padding: 10px 22px 10px 4px;
    font-size: 13.5px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 11px;
}
.ptable tbody tr:hover {
    background: var(--panel-2);
}

/* Product cell: thumbnail + name / subtitle */
.pcell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pthumb {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 9px;
    overflow: hidden;
    background: var(--panel-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}
.pthumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Icon placeholder (e.g. services, which have no photo) */
.pthumb-icon {
    color: var(--brand-2);
    font-size: 22px;
}
.pthumb-icon svg {
    width: 1em;
    height: 1em;
}
.pname {
    font-weight: 700;
    font-size: 14px;
}
.psub {
    color: var(--muted);
    font-size: 12.5px;
    margin-top: 2px;
}

/* Icon action buttons */
.pactions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.iconbtn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 16px;
    line-height: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--muted);
}
.iconbtn-sm svg {
    width: 1em;
    height: 1em;
}
.iconbtn-sm:hover {
    color: var(--brand-2);
    border-color: var(--brand);
}
.iconbtn-sm.danger:hover {
    color: var(--bad);
    border-color: var(--bad);
}

/* Payment-method brand logo (payment settings rows). White pill so the logo
   stays legible on both light and dark themes. */
.paylogo {
    height: 20px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    /* background: #fff;
    border: 1px solid var(--border); */
    border-radius: 6px;
    /* padding: 3px 8px; */
}

/* ==========================================================================
   Staff cards — vertical: photo on top, then time / name / desc / services /
   days off, with icon actions.
   ========================================================================== */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.staff-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 16px;
    /* text-align: center; */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.staff-card.off {
    opacity: 0.55;
}
.staff-av {
    width: 100%;
    /* height: 72px; */
    /* border-radius: 50%; */
    background: var(--panel-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    overflow: hidden;
    margin-bottom: 10px;
    flex: 0 0 auto;
}
.staff-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.staff-time {
    font-size: 15px;
    color: var(--muted);
}
.staff-name {
    font-weight: 800;
    font-size: 15px;
    text-align: start;
    margin: 6px 0;
}
.staff-desc {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 3px;
}
.staff-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-top: 10px;
}
.staff-daysoff {
    margin-top: 10px;
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    align-items: center;
}
.staff-daysoff .lbl {
    width: 100%;
    color: var(--muted);
    margin-bottom: 2px;
}
.staff-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ==========================================================================
   Toggle switch — used in list tables (e.g. menu availability). Green = on.
   ========================================================================== */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    vertical-align: middle;
}
.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}
.switch .slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s;
}
.switch .slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.18s;
}

.switch input:checked + .slider::before {
    transform: translateX(18px);
}
.switch input:disabled + .slider {
    opacity: 0.55;
    cursor: default;
}
