/* 247HOME Portal Stylesheet — Portal-specific additions, Safari 12 fallbacks, and copied inline styles */

:root {
    --slate-100: #f1f5f9;
    --slate-300: #cbd5e1;
    --slate-700: #334155;
    --slate-800: #1e293b;
}

/* Match ELPortal layout.html body background and prevent outer scrollbar on page-fill */
body {
    background-color: #f4f7f9;
    padding-bottom: 0;
}

/* Slate text colour utilities matching ELPortal Product Manager */
.text-slate-400 { color: var(--slate-400) !important; }
.text-slate-500 { color: var(--slate-500) !important; }
.text-slate-600 { color: var(--slate-600) !important; }
.text-slate-700 { color: var(--slate-700) !important; }
.text-slate-800 { color: var(--slate-800) !important; }
.text-slate-900 { color: var(--slate-900) !important; }

/* Sidebar additions & inline styles extracted from ELPortal layout.html + Safari 12 fallbacks */
.navbar-vertical .nav {
    flex: 1 1 auto;
}

.navbar-vertical .logo .logo-text {
    gap: 0;
    text-decoration: none;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.navbar-vertical .logo .logo-icon {
    margin-right: 10px;
    font-size: 20px;
}

.navbar-vertical .logo .logo-accent {
    color: #60a5fa;
}

.navbar-vertical .logo .collapse-btn {
    border: none;
    outline: none;
    font-size: 1.1rem;
    box-shadow: none;
}

.navbar-vertical .menu-item {
    gap: 0;
}

.navbar-vertical .menu-item i {
    margin-right: 12px;
}

.navbar-vertical.collapsed .menu-item i {
    margin-right: 0;
}

.navbar-vertical .nav > li.sidebar-bottom-li {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    margin-bottom: 0;
}

.sidebar-profile-header {
    padding: 10px 20px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-profile-block {
    gap: 0;
    cursor: default;
}

.user-profile-block .avatar-icon {
    margin-right: 12px;
}

.navbar-vertical.collapsed .user-profile-block .avatar-icon {
    margin-right: 0;
}

.user-profile-block .user-role {
    font-size: 11px;
    opacity: 0.7;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-form {
    display: block;
    width: 100%;
}

.sidebar-logout-btn {
    width: calc(100% - 24px);
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
}

.sidebar-logout-btn i {
    color: #f87171;
    opacity: 1 !important;
}

.navbar-vertical.collapsed .sidebar-logout-btn {
    width: calc(100% - 10px) !important;
}

/* Main content area refinements */
.main-content {
    min-width: 0;
    padding: 20px 24px 24px 24px;
}

.main-content.page-fill {
    flex: 1 1 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Mobile & tablet sidebar + normal page scroll below 992px */
@media (max-width: 991.98px) {
    .navbar-vertical {
        width: 0;
        overflow: hidden;
        padding: 0;
    }

    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }

    .main-content.sidebar-collapsed {
        margin-left: 0;
    }

    .navbar-vertical.open {
        width: 250px;
        padding: 20px;
    }

    .main-content.pushed {
        margin-left: 250px;
    }

    .navbar-vertical-toggle {
        display: block;
    }

    .main-content.page-fill {
        height: auto;
        overflow: visible;
    }

    .inv-toolbar {
        flex-wrap: wrap;
    }
}

/* Login & account pages (copied from ELPortal HomeApp/templates/app/login.html) */
body.login-page {
    padding-bottom: 0;
}

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px 16px;
    background:
        radial-gradient(circle at 15% 20%, rgba(96, 165, 250, 0.35), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(96, 165, 250, 0.25), transparent 40%),
        linear-gradient(135deg, #1a4d80 0%, #2161a0 50%, #0f3460 100%);
}

.login-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 400px;
    margin-bottom: 0;
    border: none;
}

.login-card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: #2161a0;
    color: #ffffff;
    font-size: 22px;
    margin-bottom: 14px;
}

.login-header h1,
.login-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 0;
}

.login-card .form-group {
    margin-bottom: 18px;
}

.login-card .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

.login-card .form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.2s;
}

.login-card .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 11px 12px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.login-btn:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.error-msg {
    background: #fef2f2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    border: 1px solid #fecaca;
    text-align: center;
}

/* Home dashboard */
.home-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
}

.home-updated {
    font-size: 0.875rem;
    color: var(--slate-500);
    margin-top: 0.5rem;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 1.5rem;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.home-card {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-card:hover,
.home-card:focus {
    color: inherit;
    border-color: var(--slate-300);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.home-card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.home-card-arrow {
    color: var(--slate-400);
    transition: transform 0.15s ease, color 0.15s ease;
}

.home-card:hover .home-card-arrow,
.home-card:focus .home-card-arrow {
    color: var(--slate-700);
    transform: translateX(2px);
}

.home-card-stat {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 0.25rem;
}

.home-card-desc {
    font-size: 0.875rem;
    color: var(--slate-500);
}

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
}

/* Shared Inventory & Products toolbar */
.list-toolbar {
    flex: 0 0 auto;
}

.list-toolbar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.list-toolbar-head h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
}

.list-toolbar-meta {
    font-size: 12px;
    color: var(--slate-500);
    margin: 0.15rem 0 0.5rem 0;
}

.list-toolbar-search {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.list-toolbar-search .list-search-box {
    flex: 1 1 auto;
    max-width: 40rem;
    resize: vertical;
    font-size: 13px;
    border-radius: 8px;
    border-color: var(--slate-200);
}

.list-toolbar-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.list-toolbar-btns {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.list-toolbar-btns .btn {
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .list-toolbar-search {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .list-toolbar-search .list-search-box {
        max-width: none;
        width: 100%;
    }

    .list-toolbar-controls {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Inventory & Products toolbar and sticky scroll card */
.inv-toolbar {
    display: flex;
    align-items: flex-start;
    flex: 0 0 auto;
}

.inv-heading {
    flex: 0 0 auto;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.inv-heading h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0 0 0.15rem 0;
}

.inv-heading p {
    font-size: 12px;
    color: var(--slate-500);
    margin: 0;
}

.inv-toolbar #inv-search,
.inv-toolbar .prod-search-box {
    flex: 1 1 auto;
    max-width: 36rem;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    resize: vertical;
    font-size: 13px;
    border-radius: 8px;
    border-color: var(--slate-200);
}

.inv-toolbar-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.inv-toolbar-actions .btn {
    margin-bottom: 0.25rem;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border-color: var(--slate-200);
    color: var(--slate-600);
}

.inv-card {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border-radius: 14px;
    margin-bottom: 0;
}

.inv-card:hover {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

/* Inventory & Products tables styled after ELPortal */
.text-muted-zero {
    color: #cbd5e1 !important;
    font-weight: 700;
}

.inv-table td.text-end,
.pd-inv-table td.text-end,
.pd-on-po-val,
.prod-stock-cell,
.prod-images-cell,
.pd-kit-qty {
    font-variant-numeric: tabular-nums;
}

.inv-table {
    font-size: 13px;
}

.inv-table thead th,
.pd-inv-table thead th,
.pd-kit-table thead th {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate-500);
    background-color: #f1f5f9;
    --bs-table-bg: #f1f5f9;
    border-bottom: 1px solid var(--slate-200);
}

.inv-table thead th {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px;
}

.inv-table .inv-sticky-col {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: #ffffff;
}

.inv-table tbody tr:hover .inv-sticky-col {
    background-color: var(--slate-100);
}

.inv-table thead .inv-sticky-col {
    z-index: 3;
    background-color: #f1f5f9;
    --bs-table-bg: #f1f5f9;
}

.inv-table .wh-start {
    border-left: 1px solid var(--slate-200);
}

.inv-table .inv-col-fit {
    width: 1%;
    white-space: nowrap;
}

.inv-table .inv-col-num {
    width: 14%;
}

.inv-item-asin,
.inv-inb-eta {
    font-size: 11px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--slate-500);
}

.inv-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.inv-table th.sortable:hover {
    background-color: #e2e8f0;
}

.inv-table th.sortable .sort-icon {
    color: var(--slate-400);
    margin-left: 0.25rem;
    font-size: 0.75rem;
}

.inv-table th.sortable[aria-sort="ascending"] .sort-icon,
.inv-table th.sortable[aria-sort="descending"] .sort-icon {
    color: #2161a0;
}

.inv-item-link {
    color: var(--ai-blue);
    text-decoration: none;
}

.inv-item-link:hover {
    text-decoration: underline;
}

/* Products list table (ELPortal Product Manager style) */
.prod-table thead th {
    background-color: var(--slate-50);
    --bs-table-bg: var(--slate-50);
    color: var(--slate-400);
    padding: 10px 14px;
}

.prod-table tbody td {
    padding: 7px 14px;
}

.prod-thumb-col {
    width: 56px;
}

.prod-list-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background-color: #ffffff;
    border: 1px solid var(--slate-200);
}

.prod-thumb-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--slate-100);
    border: 1px solid var(--slate-200);
    color: var(--slate-400);
}

.prod-row {
    cursor: pointer;
}

.prod-item-link {
    font-weight: 700;
    color: var(--slate-900);
    text-decoration: none;
}

.prod-item-link:hover {
    color: var(--ai-blue);
    text-decoration: underline;
}

.prod-item-name {
    font-size: 11px;
    line-height: 1.4;
    color: var(--slate-500);
    max-width: 38rem;
}

.prod-images-count {
    color: var(--slate-500);
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    th.prod-asin-col,
    td.prod-asin-col,
    th.prod-cat-col,
    td.prod-cat-col {
        display: none;
    }

    .prod-item-name {
        max-width: 14rem;
    }
}

/* Product detail layout */
.pd-back-link {
    color: var(--slate-600);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.pd-back-link i {
    margin-right: 6px;
    font-size: 10px;
}

.pd-back-link:hover {
    color: var(--ai-blue);
}

.pd-header-card {
    padding: 16px 20px;
    border-radius: 12px;
    border-color: var(--slate-200) !important;
}

.pd-header-card:hover {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

.pd-main-thumb-wrap {
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .pd-main-thumb-wrap {
        margin-right: 1rem;
        margin-bottom: 0;
    }
}

.thumb {
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background-color: #ffffff;
    object-fit: contain;
}

.pd-main-thumb {
    width: 110px;
    height: 110px;
}

.pd-main-thumb-empty {
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--slate-100);
    color: var(--slate-400);
}

.pd-header-text {
    flex: 1 1 16rem;
    min-width: 0;
}

.pd-title-code {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--slate-900);
    margin: 0;
}

.pd-name {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--slate-600);
    margin: 0.25rem 0 0.5rem;
}

.pd-ids {
    font-size: 12px;
    color: var(--slate-600);
    margin: 0 0 0.25rem;
}

.pd-id {
    margin-right: 1rem;
    white-space: nowrap;
}

.pd-id-label {
    color: var(--slate-400);
    font-weight: 600;
}

.pd-listing-title {
    font-size: 12px;
    color: var(--slate-500);
    margin: 0;
}

.pd-columns {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}

.pd-left-col {
    flex: 0 0 340px;
    max-width: 340px;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
    margin-right: 1.5rem; /* not flex gap: iPad Safari 12 */
}

.pd-right-col {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.pd-widget-card {
    padding: 0;
    border-radius: 10px;
    border-color: var(--slate-200) !important;
    overflow: hidden;
}

.pd-widget-card:hover {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

.pd-widget-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate-800);
    background-color: var(--slate-50);
    border-bottom: 1px solid var(--slate-200) !important;
    padding: 10px 14px;
    margin-bottom: 0;
}

.pd-widget-body {
    padding: 12px 14px;
    font-size: 12px;
}

.pd-right-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 18px 18px 18px;
    border-radius: 12px;
    border-color: var(--slate-200) !important;
    margin-bottom: 0;
}

.pd-right-card:hover {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

.pd-tabs-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--slate-200);
    margin-bottom: 1rem;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.pd-tabs-bar .pim-tabs {
    margin-bottom: -1px;
    margin-right: 1rem;
}

.pd-right-card .tab-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

@media (max-width: 991.98px) {
    .pd-columns {
        flex-direction: column;
    }

    .pd-left-col {
        flex: none;
        max-width: 100%;
        height: auto;
        overflow-y: visible;
        padding-right: 0;
        margin-right: 0;
    }

    .pd-right-col {
        height: auto;
    }

    .pd-right-card {
        overflow: visible;
    }

    .pd-right-card .tab-content {
        overflow: visible;
    }
}

.pd-inv-table th,
.pd-inv-table td,
.pd-kit-table th,
.pd-kit-table td {
    font-size: 11.5px;
}

.pd-on-po-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--slate-200);
    padding-top: 8px;
    margin-top: 8px;
    font-size: 12px;
}

.pd-on-po-label {
    color: var(--slate-500);
    font-weight: 600;
}

.pd-on-po-val {
    color: var(--slate-900);
    font-weight: 700;
}

.pd-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-gap: 0.45rem 1rem;
    gap: 0.45rem 1rem;
    margin: 0;
    font-size: 12px;
}

.pd-dl dt {
    color: var(--slate-500);
    font-size: 11.5px;
    font-weight: 600;
    margin: 0;
}

.pd-dl dd {
    color: var(--slate-900);
    font-weight: 600;
    margin: 0;
}

.pd-coll-row {
    padding: 8px;
    border: 1px solid var(--slate-200);
    border-radius: 6px;
    background: #ffffff;
    margin-bottom: 8px;
    transition: background-color 0.15s ease;
}

.pd-coll-row:last-child {
    margin-bottom: 0;
}

.pd-coll-row:hover {
    background-color: var(--slate-50);
}

.pd-coll-thumb {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-right: 10px;
}

.pd-coll-thumb-empty {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--slate-100);
    color: var(--slate-400);
    flex-shrink: 0;
    margin-right: 10px;
}

.pd-coll-sku {
    font-size: 11.5px;
}

.pd-coll-name {
    font-size: 10.5px;
}

/* Product detail section cards (ELPortal Content tab section boxes) */
.pd-section-card {
    padding: 0;
    border-radius: 8px;
    border-color: var(--slate-200) !important;
    overflow: hidden;
    margin-bottom: 1rem;
}

.pd-section-card:hover {
    box-shadow: none;
}

.pd-section-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-800);
    background-color: var(--slate-50);
    border-bottom: 1px solid var(--slate-200) !important;
    padding: 10px 14px;
    margin-bottom: 0;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}

.pd-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-800);
}

.pd-group-count {
    font-size: 10.5px;
}

.pd-content-table {
    font-size: 12px;
}

.pd-content-table th,
.pd-content-table td {
    padding: 10px 12px !important;
    border-top: 1px solid var(--slate-100);
    vertical-align: top;
}

.pd-content-table tr:first-child > th,
.pd-content-table tr:first-child > td {
    border-top: 0;
}

.pd-content-label {
    width: 30%;
    font-size: 12px;
    font-weight: 600 !important;
    color: var(--slate-500) !important;
}

.pd-content-val {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--slate-900);
}

.pd-preline {
    white-space: pre-line;
}

.pd-erp-tag {
    font-size: 9.5px;
    font-weight: 600;
}

/* Media grid & viewer */
.pd-media-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate-600);
    border-bottom: 1px solid var(--slate-200);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.pd-viewer-img {
    max-height: 70vh;
    object-fit: contain;
}

.pd-doc-row {
    padding: 10px 14px;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 8px;
}

.pd-doc-row:last-child {
    margin-bottom: 0;
}

.pd-doc-main {
    margin-right: 10px;
}

.pd-doc-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: #fee2e2;
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 10px;
}

/* Timeline (Change Log tab) */
.pd-timeline {
    border-left: 2px solid var(--slate-200);
    padding-left: 1rem;
}

.pd-timeline-item {
    position: relative;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid var(--slate-200);
}

.pd-timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.pd-timeline-meta > * {
    margin-right: 6px;
}

.pd-timeline-date {
    font-size: 11px;
    color: var(--slate-500);
}

.pd-timeline-diff {
    font-size: 12px;
    word-break: break-word;
}

/* Flex children that hold long text must be allowed to shrink */
.min-w-0 {
    min-width: 0;
}

/* Django messages error tag -> Bootstrap danger palette */
.alert-error {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

/* Content & Media editing controls */
.pd-edited-tag {
    font-size: 9.5px;
    font-weight: 600;
}

.pd-edit-section,
.pd-save-section,
.pd-cancel-section {
    font-size: 11px;
    border-radius: 5px;
    padding: 0.25rem 0.625rem;
}

.pd-section-edit-actions {
    display: none;
}

.pd-section-card.is-editing .pd-section-edit-actions {
    display: flex;
}

.pd-section-card.is-editing .pd-edit-section {
    display: none !important;
}

.pd-content-edit {
    display: none;
}

.pd-section-card.is-editing .pd-content-display {
    display: none !important;
}

.pd-section-card.is-editing .pd-content-edit {
    display: block;
}

.pd-content-edit .form-control,
.pd-content-edit .form-select {
    font-size: 12px;
}

.pd-content-edit textarea.form-control {
    line-height: 1.5;
}

.pd-section-card.is-editing .content-row-empty.d-none {
    display: table-row !important;
}

.pd-section-card.is-editing .pd-content-table > tbody > tr > * {
    --bs-table-bg-state: var(--bs-table-active-bg, rgba(0, 0, 0, 0.05));
    background-color: var(--bs-table-active-bg, rgba(0, 0, 0, 0.05));
}

.pd-office-suggestion {
    margin-top: 0.375rem;
}

.pd-office-label {
    font-size: 10px;
    margin-right: 0.25rem;
}

.pd-office-btn {
    font-size: 9.5px;
    max-width: 100%;
    white-space: normal;
    text-align: left;
}

.media-grid {
    grid-gap: 10px;
}

.pd-media-header-left {
    margin-right: 0.5rem;
}

.pd-media-heading {
    font-size: 13.5px;
    margin-right: 0.5rem;
}

.pd-media-counts {
    font-size: 11.5px;
}

.pd-media-header-btn {
    font-size: 11.5px;
    border-radius: 6px;
    padding: 5px 12px;
    border-color: var(--slate-300);
    color: var(--slate-700);
}

.pd-media-header-btn i {
    font-size: 10px;
}

.pd-media-header-btn + .pd-media-header-btn {
    margin-left: 0.5rem;
}

#tab-media.is-organizing #media-organize-btn {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.pd-organize-bar {
    display: none;
    padding: 8px 14px;
    top: 0;
    z-index: 25;
    border-color: var(--slate-300) !important;
}

#tab-media.is-organizing .pd-organize-bar {
    display: block;
}

.pd-organize-controls {
    font-size: 12px;
}

.pd-org-item {
    margin-right: 0.5rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.pd-organize-select {
    font-size: 12px;
    border-radius: 6px;
    padding: 2px 24px 2px 8px;
}

.pd-organize-move-btn,
.pd-organize-done-btn {
    font-size: 11.5px;
    border-radius: 6px;
    padding: 3px 10px;
}

.pd-organize-clear-btn {
    font-size: 12px;
}

.pd-empty-cats {
    display: none;
    font-size: 12px;
}

#tab-media.is-organizing .pd-empty-cats {
    display: block;
}

.pd-empty-cat-chip {
    display: inline-block;
    padding: 4px 12px;
    border: 1.5px dashed var(--slate-300);
    background: var(--slate-50);
    color: var(--slate-600);
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.pd-empty-cat-chip .fa-arrow-down {
    font-size: 10px;
    opacity: 0.6;
}

.pd-empty-cat-chip.pd-drop-over {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.pd-media-drop.pd-drop-over {
    background-color: var(--bs-primary-bg-subtle, #cfe2ff);
    border: 1px solid var(--bs-primary, #0d6efd);
    border-radius: 0.5rem;
}

.pd-media-group-heading {
    font-size: 11px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pd-media-card {
    border-color: var(--slate-200) !important;
    min-width: 0;
}

.pd-media-tile {
    display: block;
    width: 100%;
    height: 120px;
    text-decoration: none;
}

@supports (aspect-ratio: 1 / 1) {
    .pd-media-card {
        aspect-ratio: 1 / 1;
    }

    .pd-media-tile {
        height: 100%;
    }
}

.pd-media-img {
    object-fit: contain;
    background-color: #ffffff;
}

.pd-media-check-wrap {
    display: none;
    top: 6px;
    left: 6px;
    width: 18px;
    height: 18px;
    z-index: 15;
}

#tab-media.is-organizing .pd-media-check-wrap {
    display: block;
}

.pd-media-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-color: var(--slate-400);
}

#tab-media.is-organizing .pd-media-card {
    cursor: pointer;
}

#tab-media.is-organizing .pd-media-card.is-selected {
    outline: 3px solid #2563eb;
    outline-offset: -3px;
}

.pd-media-hover-overlay {
    display: none;
    background: rgba(15, 23, 42, 0.55);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

.pd-media-card:hover .pd-media-hover-overlay {
    display: flex;
}

#tab-media.is-organizing .pd-media-hover-overlay {
    display: none !important;
}

.pd-media-hover-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    font-size: 11px;
}

.pd-media-delete-form {
    margin-left: 0.5rem;
}

.pd-media-empty {
    font-size: 13px;
}

.pd-media-empty-icon {
    font-size: 24px;
    opacity: 0.4;
}

.pd-upload-modal-title {
    font-size: 14px;
}

.pd-upload-dropzone {
    position: relative;
    overflow: hidden;
    border-style: dashed !important;
    border-color: var(--slate-300) !important;
    cursor: pointer;
    transition: all 0.2s;
}

.pd-upload-dropzone.is-dragover {
    border-color: #2563eb !important;
    background-color: #eff6ff !important;
}

.pd-upload-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pd-upload-icon-circle {
    width: 44px;
    height: 44px;
    border-color: var(--slate-200) !important;
}

.pd-upload-cloud-icon {
    font-size: 20px;
}

.pd-upload-drop-title {
    font-size: 13px;
}

.pd-upload-drop-hint {
    font-size: 11px;
}

.pd-upload-cat-label,
.pd-upload-cat-select,
.pd-upload-cancel-btn,
.pd-upload-submit-btn {
    font-size: 12px;
}

.pd-upload-cat-select {
    border-radius: 6px;
}

.pd-upload-cancel-btn {
    border-color: var(--slate-300) !important;
}

.pd-upload-file-list {
    max-height: 280px;
    overflow-y: auto;
}

.pd-upload-file-row {
    border-color: var(--slate-200) !important;
    margin-bottom: 0.5rem;
}

.pd-upload-file-row:last-child {
    margin-bottom: 0;
}

.pd-upload-file-icon {
    font-size: 13px;
    margin-right: 0.5rem;
}

.pd-upload-file-name {
    font-size: 12px;
    margin-right: 0.5rem;
}

.pd-upload-file-size {
    font-size: 11px;
    margin-right: 0.5rem;
}

.pd-upload-file-status {
    font-size: 11px;
}
