


:root {
    --pf-admin-primary: #2c7be5;
    --pf-admin-secondary: #748194;
    --pf-admin-success: #00d27a;
    --pf-admin-danger: #e63757;
    --pf-admin-warning: #f5803e;
    --pf-admin-info: #27bcfd;
    --pf-admin-dark: #0b1929;
    --pf-admin-light: #f9fafd;
    --pf-admin-border: #e3e6f0;
}


.admin-main {
    background-color: var(--pf-admin-light);
}


.admin-sidebar {
    background-color: white;
    border-right: 1px solid var(--pf-admin-border);
}

.admin-sidebar .nav-link {
    color: var(--pf-admin-secondary);
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: var(--pf-admin-primary);
    background-color: rgba(44, 123, 229, 0.1);
}

.admin-sidebar .nav-link i {
    width: 20px;
    margin-right: 0.5rem;
}

.nav-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--pf-admin-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-link-icon:hover {
    color: var(--pf-admin-primary);
    background-color: rgba(44, 123, 229, 0.1);
}


.card {
    border: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--pf-admin-border);
    padding: 1rem 1.25rem;
    font-weight: var(--pf-fw-medium);
}


.form-control:focus,
.form-select:focus {
    border-color: var(--pf-admin-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 123, 229, 0.25);
}


.btn-primary {
    background-color: var(--pf-admin-primary);
    border-color: var(--pf-admin-primary);
}

.btn-primary:hover {
    background-color: #2368c4;
    border-color: #2368c4;
}

.btn-success {
    background-color: var(--pf-admin-success);
    border-color: var(--pf-admin-success);
}

.btn-danger {
    background-color: var(--pf-admin-danger);
    border-color: var(--pf-admin-danger);
}


.table thead th {
    border-bottom: 2px solid var(--pf-admin-border);
    color: var(--pf-admin-secondary);
}


.form-control:focus,
.form-select:focus {
    border-color: var(--pf-admin-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 123, 229, 0.25);
}


.config-value {
    overflow-wrap: break-word;
    word-break: break-word;
}

.config-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #f0f3f7;
    border-radius: 0.25rem;
    font-weight: var(--pf-fw-medium);
}

.config-table .config-row-top td {
    border-bottom: none;
}

.config-table .config-row-bottom {
    border-bottom: 1px solid #dee2e6;
}

.config-table .config-row-bottom td {
    padding-top: 0;
    background-color: white;
    font-size: 0.875rem;
    border-bottom: none;
}

.config-metadata {
    padding: 0.25rem 0;
}

.config-table tbody tr.config-row-top:hover td,
.config-table tbody tr.config-row-top:hover + tr.config-row-bottom td {
    background-color: #f8f9fa !important;
}

.config-table tbody tr.config-row-bottom:hover td,
.config-table tbody tr.config-row-top:has(+ tr.config-row-bottom:hover) td {
    background-color: #f8f9fa !important;
}


.is-system {
    color: var(--pf-admin-warning);
}

.is-encrypted {
    color: var(--pf-admin-info);
}


.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pf-admin-secondary);
}


#blazor-error-ui {
    background: #fee2e2;
    color: #dc2626;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    color: #dc2626;
}


@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--pf-admin-border);
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-main {
        padding: 1rem;
    }
}

/* GitHub-style Horizontal Timeline for Order Events */
.timeline-horizontal {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 24px 12px;
    scroll-behavior: smooth;
    position: relative;
}


.timeline-horizontal-line {
    position: absolute;
    top: 36px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.timeline-horizontal-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 220px;
    flex-shrink: 0;
    position: relative;
}

.timeline-horizontal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: white;
    margin-bottom: 12px;
    z-index: 1;
    flex-shrink: 0;
}

.timeline-horizontal-dot.processed {
    background: #10b981;
    border-color: #10b981;
}

.timeline-horizontal-dot.failed {
    background: #ef4444;
    border-color: #ef4444;
}

.timeline-horizontal-dot.pending {
    background: #f59e0b;
    border-color: #f59e0b;
}

.timeline-horizontal-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    width: 100%;
    font-size: 13px;
    color: #374151;
}

.timeline-event-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.timeline-event-header strong {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.timeline-icon-success {
    color: #10b981;
    flex-shrink: 0;
}

.timeline-icon-error {
    color: #ef4444;
    flex-shrink: 0;
}

.timeline-event-time {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.timeline-event-time-precise {
    margin-left: 6px;
    color: #9ca3af;
}

.timeline-event-meta {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 6px;
}

.timeline-event-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    padding: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    font-size: 12px;
    color: #991b1b;
    line-height: 1.4;
}

.timeline-event-error svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.timeline-event-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.timeline-details-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 12px;
    padding: 0;
    cursor: pointer;
    font-weight: 500;
}

.timeline-details-toggle:hover {
    color: #374151;
}

.timeline-event-data {
    margin-top: 8px;
    padding: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 11px;
    color: #374151;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

i.empty-state-icon {
    font-size: 2.5rem;
}

/* ApiHealthOverlay Component */
.api-health-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.health-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    margin: 20px;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.health-modal-content {
    padding: 40px;
    text-align: center;
}

.health-icon {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 20px;
}

.health-modal h3 {
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.5rem;
}

.health-details {
    margin-bottom: 30px;
}

.error-message {
    color: #dc3545;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 1rem;
}

.failure-count {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.health-actions {
    margin-bottom: 20px;
}

.retry-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #6c757d;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.health-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.health-btn:hover {
    background-color: #0056b3;
}

.health-btn:active {
    transform: translateY(1px);
}

.health-info {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
    margin-top: 20px;
}

.api-health-overlay .text-muted {
    color: #6c757d;
    font-size: 0.875rem;
}

.api-health-overlay .me-1 {
    margin-right: 0.25rem;
}

.api-health-overlay .me-2 {
    margin-right: 0.5rem;
}

/* NotificationContainer Component */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
}

.notification-container .alert {
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* OrdersBrowserView Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

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

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.timeline-marker.status-processed {
    background-color: #198754;
    color: white;
}

.timeline-marker.status-failed {
    background-color: #dc3545;
    color: white;
}

.timeline-marker.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.timeline-line {
    position: absolute;
    left: -24px;
    top: 36px;
    bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

.timeline-item:last-child .timeline-line {
    display: none;
}

.timeline-content {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid #dee2e6;
}

.timeline-content.status-processed {
    border-left-color: #198754;
}

.timeline-content.status-failed {
    border-left-color: #dc3545;
}

.timeline-content.status-pending {
    border-left-color: #ffc107;
}

.event-data-container {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    margin-top: 10px;
    font-size: 0.875rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

/* EmailHistoryView Email Viewer */
.email-viewer {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #dadce0;
}

.email-header {
    padding: 20px 24px;
}

.email-subject {
    color: #202124;
    font-weight: 400;
    font-size: 22px;
    line-height: 28px;
    margin: 0;
}

.email-meta-row {
    border-top: 1px solid #f1f3f4;
    padding-top: 16px;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.sender-name {
    color: #202124;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.sender-email {
    font-size: 12px;
    color: #5f6368;
}

.email-date {
    font-size: 12px;
    color: #5f6368;
}

.email-recipient {
    color: #5f6368;
    font-size: 13px;
}

.email-badges {
    margin-top: 8px;
}

.email-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #dadce0;
}

.email-content {
    min-height: 300px;
    background: white;
}

.email-html-content {
    border: none;
    background: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #202124;
}

.email-plaintext {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #202124;
    background: white;
    border: none;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.email-text-content {
    background: white;
    border: none;
}

/* Index Pages (Activity, Customers, Inventory, Reports, System) */
.feature-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    text-align: center;
    padding: 1rem;
    background: rgba(var(--bs-primary-rgb), 0.1);
    border-radius: 12px;
    width: fit-content;
    margin: 0 auto;
}

.feature-icon i.text-warning + * {
    background: rgba(var(--bs-warning-rgb), 0.1);
}

.feature-icon i.text-success + * {
    background: rgba(var(--bs-success-rgb), 0.1);
}

.feature-icon i.text-info + * {
    background: rgba(var(--bs-info-rgb), 0.1);
}

.feature-icon i.text-secondary + * {
    background: rgba(var(--bs-secondary-rgb), 0.1);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* AdminLayout Sidebar */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    transition: width 0.3s ease;
    height: 100vh;
    z-index: 1020;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-right: 1px solid #e3e6f0;
}

.admin-sidebar.collapsed {
    width: 70px;
}

.admin-sidebar.collapsed .nav-text {
    display: none;
}

.admin-sidebar.collapsed .nav-link {
    justify-content: center;
}

.admin-sidebar.collapsed .nav-link i {
    margin-right: 0;
}

.admin-main {
    margin-left: 260px;
    padding-top: 76px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    background-color: var(--phoenix-light);
}

.admin-main.sidebar-collapsed {
    margin-left: 70px;
}

.sidebar-nav-area {
    flex: 1;
    overflow-y: auto;
}

.sidebar-bottom {
    border-top: 1px solid #e3e6f0;
}

.nav-link.active {
    color: var(--phoenix-primary) !important;
    background-color: rgba(44, 123, 229, 0.1);
}

.admin-main .container-fluid {
    padding-top: 1rem;
}

.avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.avatar-m {
    width: 32px;
    height: 32px;
}

.avatar-lg {
    width: 56px;
    height: 56px;
}

.avatar-xl {
    width: 64px;
    height: 64px;
}

.bg-primary-soft {
    background-color: rgba(44, 123, 229, 0.1);
}

.bg-success-soft {
    background-color: rgba(0, 210, 122, 0.1);
}

.bg-warning-soft {
    background-color: rgba(245, 128, 62, 0.1);
}

.bg-info-soft {
    background-color: rgba(39, 188, 253, 0.1);
}

.bg-soft-primary {
    background-color: #e7f2ff;
}

.fs-10 {
    font-size: 0.625rem;
}

.badge-outline-light {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background-color: transparent;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}
/* Modal Tab Navigation - Matches PfClient styling */
.modal-tab-navigation {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
}

.modal-tab-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
}

.modal-tab-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.modal-tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: white;
}

.modal-tab-btn i {
    font-size: 1.125rem;
}

/* Form placeholder text styling - WI 5422 */
.form-control::placeholder {
    color: #6c757d;
    opacity: 0.5;
}

.form-control::-webkit-input-placeholder {
    color: #6c757d;
    opacity: 0.5;
}

.form-control::-moz-placeholder {
    color: #6c757d;
    opacity: 0.5;
}

.form-select::placeholder {
    color: #6c757d;
    opacity: 0.5;
}
