:root {
    --brand-primary: #0d6efd;
    --brand-dark: #1e293b;
    --brand-accent: #dc3545;
    --brand-gold: #ffc107;
    --bg-light: #f8fafc;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: #334155;
    -webkit-tap-highlight-color: transparent;
}

/* Custom Header Navbar */
.app-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brand-title {
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Nav Pills Container & Link Styling - Pixel Perfect Symmetrical Alignment */
.nav-pills-container {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background: rgba(15, 23, 42, 0.6) !important;
    padding: 5px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.nav-link-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    min-width: 150px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    color: #cbd5e1 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    padding: 0 1.25rem !important;
    margin: 0 !important;
    transition: all 0.2s ease-in-out !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.nav-link-pill i {
    font-size: 1.15rem !important;
    line-height: 1 !important;
    margin-right: 0.5rem !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.nav-link-pill:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.nav-link-pill.active {
    color: #ffffff !important;
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4) !important;
}

/* Card Controls & Inputs */
.search-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-header-badge {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    font-weight: 600;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.btn-action {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-action:active {
    transform: scale(0.98);
}

/* Stock Thumbnail & Image Zoom */
.stock-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.stock-thumb:hover {
    transform: scale(1.05);
}

/* Highlight Search Words */
mark.search-highlight {
    background-color: #fef08a;
    color: #854d0e;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 600;
}

/* Responsive Table & Card Styles */
.mobile-card-item {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.bakiye-badge-positive {
    background-color: #dcfce7;
    color: #166534;
    font-weight: 700;
}

.bakiye-badge-negative {
    background-color: #fee2e2;
    color: #991b1b;
    font-weight: 700;
}

/* Custom Modal Backdrop & Content */
.custom-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.custom-modal-dialog {
    background: #ffffff;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.custom-modal-header {
    background: #1e293b;
    color: #ffffff;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
}

.custom-modal-footer {
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

/* Blazor Error UI Hide & Style */
#blazor-error-ui {
    background: #fff3cd;
    color: #664d03;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
    font-size: 0.875rem;
    border-top: 1px solid #ffecb5;
}

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