﻿
/* ===============================
   TOP NAVIGATION AREA
=================================*/

.doc-top {
    display: flex;
    flex-direction: column;
    background-color: #f2f2f2;
    border-bottom: 1px solid #cfcfcf;
}


/* ===============================
   TABS (Dashboard | Documents | Search)
=================================*/

.doc-tabs {
    display: flex;
    background-color: #e6e6e6;
    padding-left: 10px;
    border-bottom: 1px solid #cfcfcf;
}

.tab-item {
    padding: 10px 20px;
    margin-right: 5px;
    background-color: #d9d9d9;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px 4px 0 0;
}

    .tab-item:hover {
        background-color: #cfcfcf;
    }

    .tab-item.active {
        background-color: #1f4e79;
        color: white;
        font-weight: bold;
    }


/* ===============================
   ICON TOOLBAR
=================================*/

.doc-icon-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background-color: #f8f8f8;
}

.icon-group {
    display: flex;
    align-items: center;
}

.icon-btn {
    background: none;
    border: 1px solid transparent;
    padding: 6px 8px;
    margin-right: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
}

    .icon-btn:hover {
        border: 1px solid #bdbdbd;
        background-color: #eaeaea;
    }

    .icon-btn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
        pointer-events: none;
    }
/* ===============================
   PAGING SECTION
=================================*/

.doc-paging {
    display: flex;
    align-items: center;
    font-size: 13px;
    gap: 6px;
    color: #333;
}

    .doc-paging select {
        padding: 2px 4px;
        font-size: 12px;
    }

.doc-count {
    margin-left: 15px;
    font-weight: 500;
}

/* ===============================
   GLOBAL CONTAINER
=================================*/

.doc-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f4f6f9;
    font-family: Arial, Helvetica, sans-serif;
}


/* ===============================
   TOP TOOLBAR
=================================*/

.doc-toolbar {
    height: 50px;
    background-color: #1f4e79;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.tb-btn {
    background-color: #2e75b6;
    border: none;
    color: white;
    padding: 6px 12px;
    margin-right: 5px;
    cursor: pointer;
    border-radius: 3px;
}

    .tb-btn:hover {
        background-color: #3c8bd6;
    }

.search-box {
    padding: 5px 10px;
    border-radius: 3px;
    border: none;
}


/* ===============================
   BODY LAYOUT
=================================*/

.doc-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}


/* ===============================
   LEFT SIDEBAR
=================================*/

.doc-sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 10px;
    background-color: #e9ecef;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

.folder-tree {
    list-style: none;
    padding: 10px;
    margin: 0;
}

    .folder-tree li {
        padding: 6px 5px;
        cursor: pointer;
    }

        .folder-tree li:hover {
            background-color: #f1f1f1;
        }


/* ===============================
   CENTER CONTENT
=================================*/

.doc-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}


/* ===============================
   DOCUMENT TABLE
=================================*/

.doc-table-container {
    flex: 1;
    overflow-y: auto;
    background-color: white;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
}

    .doc-table th {
        background-color: #2e75b6;
        color: white;
        padding: 8px;
        text-align: left;
    }

    .doc-table td {
        padding: 8px;
        border-bottom: 1px solid #eee;
    }

    .doc-table tbody tr:hover {
        background-color: #f1f7ff;
    }


/* ===============================
   PROPERTIES PANEL
=================================*/

.doc-properties {
    height: 180px;
    background-color: #ffffff;
    border-top: 1px solid #ddd;
}

.properties-header {
    padding: 8px;
    background-color: red;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

.properties-content {
    padding: 10px;
    font-size: 14px;
}


/* ===============================
   RIGHT PREVIEW PANEL
=================================*/

.doc-preview {
    width: 350px;
    background-color: #ffffff;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 10px;
    background-color: #e9ecef;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

.preview-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
}
.folder-row {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

    .folder-row:hover {
        background-color: #eef4ff;
    }

.selected-folder .folder-row {
    background-color: #1f4e79;
    color: white;
    box-shadow: 0 0 8px rgba(31, 78, 121, 0.6);
}

.expand-icon {
    width: 18px;
    cursor: pointer;
    font-size: 12px;
}

.expand-placeholder {
    width: 18px;
    color: transparent;
}

.folder-children {
    margin-left: 16px;
    border-left: 1px dashed #d0d0d0;
    padding-left: 6px;
}
/* =========================================
   SIDEBAR TREE STYLE (LogicalDOC Style)
========================================= */

.doc-sidebar {
    width: 260px;
    background-color: #f4f4f4;
    border-right: 1px solid #cfcfcf;
    overflow-y: auto;
    font-size: 13px;
}

/* Node wrapper */
.tree-node {
    margin-left: 12px;
}

/* Row */
.tree-row {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.15s ease;
}

    /* Hover */
    .tree-row:hover {
        background-color: #e6f0ff;
    }

    /* Selected */
    .tree-row.selected {
        background-color: #4da3ff;
        color: white;
    }

/* Expand icon */
.tree-expand {
    width: 16px;
    font-weight: bold;
    color: #0078d4;
    cursor: pointer;
    text-align: center;
    margin-right: 4px;
}

/* Folder icon */
.tree-folder-icon {
    margin-right: 6px;
    color: #666;
    font-size: 14px;
}

/* Label */
.tree-label {
    flex: 1;
}

/* Children container */
.tree-children {
    margin-left: 14px;
    border-left: 1px solid #d8d8d8;
    padding-left: 6px;
}
/* Overlay */
.context-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

/* Menu box */
.context-menu {
    position: fixed;
    width: 240px;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    padding: 5px 0;
    z-index: 1000;
}

/* Items */
.context-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

    .context-item:hover {
        background-color: #f3f3f3;
    }

    .context-item.danger {
        color: #d32f2f;
    }

.context-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 6px 0;
}









/*work flow css starts here*/

.workflow-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    line-height: 40px;
    color: white;
    font-weight: bold;
    margin: auto;
}

.workflow-line {
    height: 3px;
    background-color: #ccc;
    flex: 1;
    margin-top: 21px;
}

.completed {
    background-color: #28a745;
}

.current {
    background-color: #ffc107;
}

.pending {
    background-color: #6c757d;
}

.rejected {
    background-color: #dc3545;
}


/* ===============================================================
   MY INBOX PAGE  (DocumentsMyInbox.razor)
   All inbox-* classes + supporting overrides
================================================================ */

/* ── Shell ─────────────────────────────────────────────────── */
.receiving-page.inbox-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px 28px;
    background: #f8fafc;
    min-height: 100vh;
}

/* ── Page header ────────────────────────────────────────────── */
.inbox-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.inbox-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.inbox-header-icon-tile {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .30);
}

.inbox-header-text h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.inbox-header-text p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #64748b;
}

.inbox-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Stats row ──────────────────────────────────────────────── */
.inbox-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.inbox-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .04);
    transition: box-shadow .15s;
}

.inbox-stat:hover {
    box-shadow: 0 3px 10px rgba(15, 23, 42, .09);
}

.inbox-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.inbox-stat-icon.blue   { background: #eff6ff; color: #2563eb; }
.inbox-stat-icon.yellow { background: #fffbeb; color: #d97706; }
.inbox-stat-icon.green  { background: #f0fdf4; color: #16a34a; }
.inbox-stat-icon.red    { background: #fef2f2; color: #dc2626; }

.inbox-stat-body {
    display: flex;
    flex-direction: column;
}

.inbox-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #94a3b8;
    font-weight: 600;
}

.inbox-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}

.inbox-val-warn   { color: #d97706; }
.inbox-val-ok     { color: #16a34a; }
.inbox-val-danger { color: #dc2626; }

/* ── Controls row ───────────────────────────────────────────── */
.inbox-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .04);
}

.inbox-search-wrap {
    position: relative;
    flex: 1 1 220px;
    min-width: 180px;
}

.inbox-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
    pointer-events: none;
}

.inbox-search-input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.inbox-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    background: #fff;
}

.inbox-select-wrap {
    position: relative;
    flex: 0 0 auto;
}

.inbox-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 30px 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}

.inbox-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.inbox-select-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 11px;
    pointer-events: none;
}

.inbox-ctrl-divider {
    width: 1px;
    height: 28px;
    background: #e2e8f0;
    flex-shrink: 0;
}

.inbox-view-toggle {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.inbox-view-btn {
    padding: 7px 14px;
    border: none;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .12s, color .12s;
}

.inbox-view-btn:first-child {
    border-right: 1px solid #e2e8f0;
}

.inbox-view-btn.active,
.inbox-view-btn:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* ── Table ──────────────────────────────────────────────────── */
.inbox-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .04);
}

.inbox-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.inbox-table thead tr {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.inbox-table thead th {
    padding: 11px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
    white-space: nowrap;
}

.inbox-table thead th.col-dot {
    width: 28px;
    padding-left: 16px;
}

.inbox-row {
    border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
}

.inbox-row:last-child {
    border-bottom: none;
}

.inbox-row:hover {
    background: #f8fafc;
}

.inbox-row td {
    padding: 11px 14px;
    vertical-align: middle;
}

/* Status dot column */
.inbox-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #cbd5e1;
    display: inline-block;
    margin-left: 4px;
}

.inbox-row.status-pending  .inbox-dot,
.inbox-dot--status-pending  { background: #f59e0b; }

.inbox-row.status-approved .inbox-dot,
.inbox-dot--status-approved { background: #22c55e; }

.inbox-row.status-rejected .inbox-dot,
.inbox-dot--status-rejected { background: #ef4444; }

/* Document cell */
.inbox-doc-title {
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-doc-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Step cell */
.inbox-step-name {
    font-weight: 500;
    color: #334155;
}

.inbox-step-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Status badge */
.inbox-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.inbox-status-badge.status-pending  { background: #fffbeb; color: #d97706; }
.inbox-status-badge.status-approved { background: #f0fdf4; color: #16a34a; }
.inbox-status-badge.status-rejected { background: #fef2f2; color: #dc2626; }
.inbox-status-badge                 { background: #f1f5f9; color: #475569; } /* fallback */

/* Date cell */
.inbox-date-cell {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

/* Empty row */
.inbox-empty-row td {
    padding: 40px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* ── Pagination ─────────────────────────────────────────────── */
.inbox-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 0 2px;
    flex-wrap: wrap;
}

.inbox-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, border-color .12s, color .12s;
}

.inbox-page-btn:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

.inbox-page-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 700;
}

.inbox-page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ── Flow grid ──────────────────────────────────────────────── */
.inbox-flow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.inbox-flow-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .04);
    transition: box-shadow .15s, transform .15s;
}

.inbox-flow-card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, .10);
    transform: translateY(-2px);
}

.inbox-flow-card.status-pending  { border-top: 3px solid #f59e0b; }
.inbox-flow-card.status-approved { border-top: 3px solid #22c55e; }
.inbox-flow-card.status-rejected { border-top: 3px solid #ef4444; }

.inbox-flow-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px 10px;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.inbox-flow-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Empty state ────────────────────────────────────────────── */
.inbox-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    gap: 10px;
}

.inbox-empty-state i {
    font-size: 36px;
    color: #cbd5e1;
}

.inbox-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .inbox-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .inbox-flow-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .receiving-page.inbox-shell {
        padding: 14px 12px;
    }

    .inbox-stats-row {
        grid-template-columns: 1fr;
    }

    .inbox-table-wrap {
        overflow-x: auto;
    }

    .inbox-controls-row {
        gap: 8px;
    }
}


/* ============================================================
   ManageDocuments  —  /documents page  (md- prefix)
   ============================================================ */

/* ── Shell ──────────────────────────────────────────────────── */
.md-shell {
    padding: 24px 20px 48px;
    min-height: 100%;
}

/* ── Page header ────────────────────────────────────────────── */
.md-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.md-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.md-header-icon-tile {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37, 99, 235, .22);
}

    .md-header-icon-tile i {
        color: #fff;
        font-size: 18px;
    }

.md-header-text h1 {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px;
    line-height: 1.2;
}

.md-header-text span {
    font-size: 13px;
    color: #64748b;
}

.md-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

/* ── Progress bar ───────────────────────────────────────────── */
.md-progress {
    height: 3px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-bottom: 16px;
    overflow: hidden;
}

.md-progress-bar {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    border-radius: 2px;
    animation: md-progress-slide 1.4s ease-in-out infinite;
}

@keyframes md-progress-slide {
    0%   { margin-left: -40%; }
    100% { margin-left: 100%; }
}

/* ── Controls row (search + page size + range) ──────────────── */
.md-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

/* Search */
.md-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    height: 38px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    transition: border-color .18s, box-shadow .18s;
}

    .md-search-wrap:focus-within {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
    }

.md-search-icon {
    color: #94a3b8;
    font-size: 13px;
    flex-shrink: 0;
}

.md-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13.5px;
    color: #0f172a;
    font-family: inherit;
}

    .md-search-input::placeholder { color: #94a3b8; }

.md-search-count {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    padding-left: 6px;
    border-left: 1px solid #e2e8f0;
}

/* Right controls */
.md-right-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.md-pagesize-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
}

/* Select wrappers */
.md-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.md-select,
.md-select-sm {
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #0f172a;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
    padding-right: 28px;
}

.md-select {
    height: 38px;
    padding: 0 28px 0 11px;
    width: 100%;
}

.md-select-sm {
    height: 34px;
    padding: 0 26px 0 10px;
}

.md-select:focus,
.md-select-sm:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.md-select-chevron {
    position: absolute;
    right: 8px;
    font-size: 10px;
    color: #94a3b8;
    pointer-events: none;
}

.md-range-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 5px 10px;
    white-space: nowrap;
}

    .md-range-badge i { color: #94a3b8; font-size: 12px; }

/* ── Table ──────────────────────────────────────────────────── */
.md-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 1px 6px rgba(15, 23, 42, .05);
}

.md-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    color: #0f172a;
}

    .md-table thead tr {
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
    }

    .md-table th {
        padding: 11px 14px;
        font-size: 11.5px;
        font-weight: 600;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: .45px;
        white-space: nowrap;
    }

.md-th-sortable {
    cursor: pointer;
    user-select: none;
    transition: background .14s;
}

    .md-th-sortable:hover {
        background: #f1f5f9;
    }

.md-sort-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 5px;
    color: #2563eb;
    font-size: 11px;
}

.md-sort-hint {
    margin-left: 5px;
    color: #cbd5e1;
    font-size: 10px;
    opacity: 0;
    transition: opacity .14s;
}

.md-th-sortable:hover .md-sort-hint { opacity: 1; }

    .md-table tbody tr {
        border-bottom: 1px solid #f1f5f9;
    }

    .md-table tbody tr:last-child { border-bottom: none; }

.md-row {
    cursor: pointer;
    transition: background .14s;
}

    .md-row:hover { background: #f8fafc; }

    .md-table td {
        padding: 11px 14px;
        vertical-align: middle;
    }

.md-empty-row {
    text-align: center;
    padding: 44px 0 !important;
    color: #94a3b8;
    font-size: 13.5px;
}

    .md-empty-row i {
        display: block;
        font-size: 30px;
        margin-bottom: 10px;
        color: #cbd5e1;
    }

/* ── Pagination ─────────────────────────────────────────────── */
.md-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.md-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    color: #475569;
    font-family: inherit;
    cursor: pointer;
    transition: all .16s;
}

    .md-page-btn:hover:not(:disabled) {
        background: #f1f5f9;
        border-color: #cbd5e1;
        color: #0f172a;
    }

    .md-page-btn.active {
        background: #2563eb;
        border-color: #2563eb;
        color: #fff;
        font-weight: 600;
    }

    .md-page-btn:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

/* ── Modal fields ───────────────────────────────────────────── */
.md-modal-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.md-modal-field--full {
    grid-column: 1 / -1;
}

.md-modal-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.md-req {
    color: #dc2626;
    margin-left: 2px;
}

.md-input {
    height: 38px;
    padding: 0 11px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    color: #0f172a;
    background: #fff;
    font-family: inherit;
    width: 100%;
    transition: border-color .18s, box-shadow .18s;
}

    .md-input:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    }

.md-input-sm {
    height: 30px;
    font-size: 12.5px;
}

.md-asc-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
}

/* Saving banner */
.md-saving-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #eff6ff;
    border-bottom: 1px solid #bfdbfe;
    font-size: 13px;
    color: #1e40af;
}

    .md-saving-banner i { color: #2563eb; }

/* Delete modal body */
.md-delete-body {
    padding: 4px 0 8px;
}

.md-delete-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 6px;
}

.md-delete-text {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* Checkbox row */
.md-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #0f172a;
    cursor: pointer;
    font-weight: 500;
    margin-top: 4px;
}

/* Filter checks */
.md-filter-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 2px;
}

.md-filter-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #0f172a;
    transition: background .14s, border-color .14s;
}

    .md-filter-check-item:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
    }

/* Inbox workflow action modal: keep it above layout, chat, and Bootstrap backdrops. */
.inbox-action-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    overflow: auto !important;
    background: rgba(15, 23, 42, .62) !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 2147483000 !important;
    pointer-events: auto !important;
}

.inbox-action-modal {
    position: relative !important;
    z-index: 2147483001 !important;
    width: min(520px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 48px) !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 12px !important;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .34), 0 8px 22px rgba(15, 23, 42, .18) !important;
}

.inbox-action-modal .modal-form {
    max-height: min(56vh, 420px);
    overflow-y: auto;
}

.inbox-action-modal .modal-actions {
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .md-shell { padding: 14px 10px 32px; }

    .md-page-header { gap: 10px; }

    .md-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .md-controls-row { flex-direction: column; align-items: stretch; }

    .md-search-wrap { max-width: 100%; }

    .md-right-controls { justify-content: space-between; }

    .md-filter-checks { grid-template-columns: 1fr; }
}


/* ===============================================================
   E-COMMERCE SHELL  (EcommerceLP.razor — /ecommerce/admin)
   Inherits admin-shell / admin-tab-bar / admin-pane from above.
   Only overrides specific to the ecommerce variant go here.
================================================================ */

/* Blue accent for the active tab (vs purple in admin) */
.ecom-shell .admin-header-icon-tile {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 2px 8px rgba(14, 165, 233, .30);
}

.ecom-shell .admin-tab-btn:hover {
    color: #0284c7;
    background: #f0f9ff;
}

.ecom-shell .admin-tab-btn.active {
    color: #0284c7;
}

/* 4-col welcome grid for the 8 ecom sections */
.ecom-welcome-cards {
    grid-template-columns: repeat(4, 1fr);
    max-width: 880px;
}

.ecom-shell .admin-welcome-card:hover {
    border-color: #7dd3fc;
    box-shadow: 0 4px 14px rgba(14, 165, 233, .12);
}

/* Wider tab bar — 8 tabs need more room; scroll on overflow */
.ecom-shell .admin-tab-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

.ecom-shell .admin-tab-bar::-webkit-scrollbar {
    display: none;
}

@media (max-width: 860px) {
    .ecom-welcome-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .ecom-welcome-cards {
        grid-template-columns: 1fr;
    }
}
}


/* ===============================================================
   ADMIN PANEL SECTIONS  (AdminModulesPanel / AdminWarehousesPanel)
================================================================ */

.admin-panel-section {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 400px;
}

.admin-panel-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-panel-section-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-panel-section-title > i {
    font-size: 22px;
    color: #2563eb;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.admin-panel-section-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.admin-panel-section-title span {
    font-size: 12px;
    color: #64748b;
}

/* ── Modules grid ───────────────────────────────────────────── */
.admin-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.admin-module-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
    user-select: none;
}

.admin-module-card input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}

.admin-module-card:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.admin-module-card.selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .08);
}

.admin-module-card-body {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.admin-module-icon {
    font-size: 13px;
    color: #93c5fd;
    flex-shrink: 0;
}

.admin-module-name {
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-module-check {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 13px;
    color: #2563eb;
}

.admin-modules-count {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

/* ── Empty state ────────────────────────────────────────────── */
.admin-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 20px;
    text-align: center;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
}

.admin-empty-state i {
    font-size: 32px;
    color: #cbd5e1;
}

.admin-empty-state p {
    margin: 0;
    font-size: 13px;
}

@media (max-width: 600px) {
    .admin-panel-section { padding: 14px 12px; }
    .admin-modules-grid { grid-template-columns: 1fr 1fr; }
}


/* ===============================================================
   ADMIN PANEL  (AdminLP.razor — /adminlp)
================================================================ */

/* ── Shell ─────────────────────────────────────────────────── */
.admin-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f8fafc;
}

/* ── Page header ────────────────────────────────────────────── */
.admin-page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px 0;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-header-icon-tile {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(124, 58, 237, .30);
}

.admin-header-text h1 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.admin-header-text span {
    font-size: 12px;
    color: #64748b;
}

/* ── Tab bar ────────────────────────────────────────────────── */
.admin-tab-bar {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 16px 28px 0;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-tab-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: color .15s, background .15s;
    white-space: nowrap;
    outline: none;
}

.admin-tab-btn i {
    font-size: 13px;
}

.admin-tab-btn:hover {
    color: #2563eb;
    background: #eff6ff;
}

.admin-tab-btn.active {
    color: #2563eb;
    font-weight: 700;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
    z-index: 1;
}

.admin-tab-indicator {
    display: none; /* indicator handled via border-bottom trick above */
}

/* ── Content pane ───────────────────────────────────────────── */
.admin-pane {
    flex: 1;
    background: #fff;
    border-top: none;
    overflow: auto;
    isolation: isolate
    /* Allow position:fixed children (modals) to escape this scroll container
       and be positioned relative to the viewport, not this element.
       overflow:auto on a flex child can trap fixed descendants in some browsers. */
    transform: none;
    contain: none;
}

/* Modals rendered inside the admin panel tabs must break out of the
   scroll container. Force the overlay to be viewport-relative. */
.admin-pane .modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1200 !important;
}

.admin-pane .modal-backdrop {
    z-index: 1190 !important;
    position: fixed !important;
    inset: 0 !important;
}

/* Strip the inner page headers when embedded
   (the admin shell already has a header) */
.admin-pane .ecm-page {
    padding-top: 0;
}

.admin-pane .ecm-header {
    padding: 16px 24px 10px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.admin-pane .settings-shell,
.admin-pane > div > .toolbar,
.admin-pane > div {
    padding: 0;
}

/* ── Welcome screen ─────────────────────────────────────────── */
.admin-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 40px;
    text-align: center;
    gap: 12px;
}

.admin-welcome-icon {
    font-size: 40px;
    color: #bfdbfe;
    margin-bottom: 8px;
}

.admin-welcome h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.admin-welcome p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.admin-welcome-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
    max-width: 700px;
    width: 100%;
}

.admin-welcome-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: box-shadow .15s, transform .15s, border-color .15s;
}

.admin-welcome-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 14px rgba(124, 58, 237, .12);
    transform: translateY(-2px);
}

.admin-welcome-card i {
    font-size: 24px;
    color: #2563eb;
    margin-bottom: 4px;
}

.admin-welcome-card strong {
    font-size: 14px;
    color: #0f172a;
}

.admin-welcome-card span {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 700px) {
    .admin-tab-bar {
        padding: 12px 12px 0;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .admin-tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .admin-page-header {
        padding: 14px 12px 0;
    }

    .admin-welcome-cards {
        grid-template-columns: 1fr;
    }
}

