@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --sidebar-width: 260px;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
}

.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid red; }
.validation-message { color: red; }
.button-link { text-decoration: unset; }

#blazor-error-ui {
    background: lightyellow;
    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;
}

/* ===== Page Content ===== */
.content {
    padding: 0 1rem 1.5rem !important;
    background: var(--bs-body-bg, #f0f2f5);
    min-height: 100vh;
}

.content > .dxbl-gridlayout-root {
    width: 100%;
}

.content > .dxbl-gridlayout-root > .dxbl-gridlayout-root {
    width: 100%;
    max-width: 100%;
}

/* ===== Action Bar ===== */
.action-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bs-body-bg, #fff);
    border-radius: var(--bs-border-radius-lg, 12px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}

.action-bar .action-spacer {
    margin-left: auto;
}

/* ===== Filter Card ===== */
.filter-card {
    background: var(--bs-body-bg, #fff);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--bs-border-radius-lg, 12px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-card .filter-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color, #718096);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-card .filter-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 0.8rem;
    background: var(--bs-info, #4facfe);
    border-radius: 2px;
}

/* ===== Page Section ===== */
.page-section {
    background: var(--bs-body-bg, #fff);
    border-radius: var(--bs-border-radius-lg, 12px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.page-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bs-body-color, #1a202c);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-section h4::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1rem;
    background: var(--bs-primary, #667eea);
    border-radius: 2px;
}

.page-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

/* ===== Page Title ===== */
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--bs-body-color, #1a202c);
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--bs-secondary-color, #718096);
    margin-bottom: 1.5rem;
}

.page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title-row .page-title-group {
    flex: 1;
}

/* ===== Split Layout ===== */
.split-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .split-panel { grid-template-columns: 1fr; }
}

/* ===== Stat Grid ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ===== Section Helpers ===== */
.section-desc {
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #718096);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.import-format-box {
    background: var(--bs-tertiary-bg, #f8fafc);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--bs-border-radius, 8px);
    padding: 0.75rem 1rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
}

/* ===== History Section ===== */
.history-section {
    margin-top: 2rem;
}

.history-section h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--bs-body-color, #1a202c);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-section h4::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.25rem;
    background: var(--bs-primary, #667eea);
    border-radius: 2px;
}

/* ===== Metadata Info ===== */
.metadata-info {
    background: var(--bs-tertiary-bg, #f8fafc);
    border-radius: var(--bs-border-radius, 8px);
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #718096);
    border: 1px solid rgba(0,0,0,0.04);
}

/* ===== Scanner Page ===== */
.scanner-card {
    max-width: 560px;
    margin: 0 auto;
}

.scanner-page {
    max-width: 600px;
    margin: 0 auto;
}

.scanner-section {
    transition: all 0.3s ease;
}

.scanner-section-compact #scanner-host {
    max-height: 200px;
    overflow: hidden;
}

.scanner-section-compact #scanner-host > div {
    transform: scale(0.6);
    transform-origin: top center;
    margin-top: -60px;
    margin-bottom: -60px;
}

.scanner-placeholder {
    border: 2px dashed #dee2e6;
    border-radius: var(--bs-border-radius-lg, 12px);
    padding: 2.5rem 2rem;
    background: var(--bs-tertiary-bg, #f8fafc);
}

.scanner-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.scanner-hint {
    color: var(--bs-secondary-color, #718096);
    font-size: 0.85rem;
}

.scanner-spinner {
    width: 3rem;
    height: 3rem;
}

/* ===== Asset Result Card (Scanner) ===== */
.asset-result {
    margin-top: 1.5rem;
}

.asset-card {
    background: var(--bs-body-bg, #fff);
    border-radius: var(--bs-border-radius-lg, 16px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.06);
}

.asset-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.asset-barcode {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #718096);
    background: var(--bs-tertiary-bg, #f8fafc);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    letter-spacing: 0.02em;
}

.asset-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bs-body-color, #1a202c);
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.asset-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.asset-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    gap: 1rem;
}

.asset-detail-row .detail-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #718096);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}

.asset-detail-row .detail-value {
    font-size: 0.9rem;
    color: var(--bs-body-color, #1a202c);
    text-align: right;
    font-weight: 500;
}

.asset-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
}

@media (max-width: 576px) {
    .asset-card {
        padding: 1rem;
    }
    .asset-detail-row {
        flex-direction: column;
        gap: 0.15rem;
    }
    .asset-detail-row .detail-value {
        text-align: left;
    }
    .asset-card-actions {
        flex-direction: column;
    }
    .asset-card-actions .dxbl-btn {
        width: 100%;
    }
    .scanner-section-compact #scanner-host {
        max-height: 120px;
    }
    .scanner-section-compact #scanner-host > div {
        transform: scale(0.5);
        margin-top: -90px;
        margin-bottom: -90px;
    }
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: linear-gradient(135deg, var(--bs-primary, #667eea), var(--bs-primary-rgb, 102, 126, 234));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Fade In Animation ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeInUp 0.5s ease-out;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }

/* ===== Minimal Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }

/* ===== Flex helpers ===== */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--bs-secondary-color, #a0aec0);
}

.empty-state h4 {
    color: var(--bs-secondary-color, #718096);
    margin-bottom: 0.5rem;
}

/* ===== Login/Account ===== */
.manage-layout {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.large-input { height: 4.3125rem; font-size: 1.875rem; }
.button-group { display: flex; flex-direction: row; gap: 0.625rem; }
.confirm-button { margin-top: 0.3125rem; }
.display-desktop { display: block; }
.display-mobile { display: none; }

/* ===== Button Height ===== */
.dxbl-btn {
    --dxbl-btn-padding-y: 0.5rem;
    --dxbl-btn-padding-x: 1.25rem;
    min-height: 2.5rem;
    border-radius: 8px !important;
}

/* ===== Unified Input Height ===== */
.content input.form-control,
.content .dxbl-text-edit,
.content .dxbl-dropdown,
.content .dxbl-date-edit,
.content .dxbl-masked-input,
.content select,
.content textarea {
    min-height: 2.5rem !important;
    box-sizing: border-box;
}

.content .dxbl-text-edit .dxbl-text-edit-input,
.content .dxbl-dropdown .dxbl-dropdown-input {
    min-height: 2.5rem !important;
}

.content .dxbl-memo textarea {
    min-height: auto;
}

.dxbl-btn-icon-only {
    aspect-ratio: 1;
    width: auto;
    min-width: 2.5rem;
}

/* ===== Dashboard Stat Cards ===== */
.stat-card {
    padding: 1.75rem 1rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--bs-border-radius-lg, 12px) var(--bs-border-radius-lg, 12px) 0 0;
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color, #718096);
    margin-bottom: 0.35rem;
}

.stat-card .stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--bs-body-color, #1a202c);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.stat-card .dxbl-btn {
    width: 70%;
}

/* ===== Grid Popup Edit Form ===== */
.dxbl-grid-popup-edit-form .dxbl-popup-content {
    padding: 1.5rem !important;
}

/* ===== Grid Filter Row ===== */
.dxbl-grid .dxbl-grid-filter-row > td {
    padding-top: 0.05rem !important;
    padding-bottom: 0.05rem !important;
}

.dxbl-grid .dxbl-grid-filter-row .dxbl-text-edit,
.dxbl-grid .dxbl-grid-filter-row .dxbl-text-edit input,
.dxbl-grid .dxbl-grid-filter-row .dxbl-dropdown {
    min-height: 1.25rem !important;
    font-size: 0.75rem !important;
}

.dxbl-grid .dxbl-grid-filter-row .dxbl-btn {
    --dxbl-btn-padding-y: 0.1rem;
    --dxbl-btn-padding-x: 0.3rem;
    min-height: 1.25rem !important;
}

/* ===== DevExpress Progress Bar ===== */
.progress-row-functional { --dxbl-progress-bar-indicator-color: #2ecc71; }
.progress-row-inrepair { --dxbl-progress-bar-indicator-color: #f39c12; }
.progress-row-damaged { --dxbl-progress-bar-indicator-color: #e74c3c; }
.progress-row-intransit { --dxbl-progress-bar-indicator-color: #3498db; }

.stat-card-assets::before { background: #a8d8ea; }
.stat-card-assets .stat-value { color: #3b8dbd; }

.stat-card-spaces::before { background: #b5ead7; }
.stat-card-spaces .stat-value { color: #3da879; }

.stat-card-companies::before { background: #f8e0b0; }
.stat-card-companies .stat-value { color: #c4943a; }

.stat-card-users::before { background: #d4b5e8; }
.stat-card-users .stat-value { color: #8b5eab; }

/* ===== DxFormLayout ===== */
.dxbl-form-layout {
    background: var(--bs-body-bg, #fff);
    border-radius: var(--bs-border-radius-lg, 12px);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dxbl-form-layout .dxbl-form-layout-item-caption {
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    color: var(--bs-secondary-color, #718096) !important;
}

/* ===== Account icon backgrounds ===== */
.icon-external-provider { width: 1rem; height: 1rem; }
.icon-google { background-image: url("/images/account/providers/google-logo.svg"); }
.icon-facebook { background-image: url("/images/account/providers/facebook-logo.svg"); }
.icon-microsoft { background-image: url("/images/account/providers/microsoft-logo.svg"); }
.icon-twitter { background-image: url("/images/account/providers/x-logo.svg"); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .content { padding: 1rem !important; }
    h3 { font-size: 1.35rem; }
    .display-desktop { display: none; }
    .display-mobile { display: block; }
    .action-bar { flex-direction: column; }
    .action-bar .dxbl-btn { width: 100%; }
}

@media (max-width: 576px) {
    .content { padding: 0.75rem !important; }
    .page-section, .filter-card, .action-bar { padding: 1rem; }
    .stat-grid { grid-template-columns: 1fr; }
    .scanner-placeholder { padding: 1.5rem 1rem; }
}

/* ===== Bar Chart ===== */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bar-label {
    min-width: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-body-color, #1a202c);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    flex: 1;
    height: 24px;
    background: var(--bs-tertiary-bg, #f0f2f5);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s ease;
    min-width: 4px;
}

.bar-value {
    min-width: 80px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bs-body-color, #1a202c);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ===== Mobile Scanner Page ===== */
.mobile-scanner-full {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 1000;
    overflow: hidden;
}

.mobile-scanner-full #scanner-host {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.mobile-scanner-full #scanner-host > div {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mobile-scanner-full #reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.scanner-start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(0,0,0,0.5);
}

.btn-start-camera {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 24px;
    color: #fff;
    padding: 1.5rem 3rem;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.btn-start-camera:active {
    transform: scale(0.96);
    background: rgba(255,255,255,0.25);
}

.camera-icon-large {
    font-size: 3rem;
}

.scanner-spinner {
    width: 3rem;
    height: 3rem;
}

.scanner-loading-text {
    color: rgba(255,255,255,0.7);
    margin-top: 1rem;
}

.scanner-status-text {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    z-index: 10;
}

.scanner-active-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
}

.scan-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: rgba(79,172,254,0.8);
    border-style: solid;
}

.scan-corner-tl { top: 30%; left: 10%; border-width: 3px 0 0 3px; border-radius: 8px 0 0 0; }
.scan-corner-tr { top: 30%; right: 10%; border-width: 3px 3px 0 0; border-radius: 0 8px 0 0; }
.scan-corner-bl { bottom: 30%; left: 10%; border-width: 0 0 3px 3px; border-radius: 0 0 0 8px; }
.scan-corner-br { bottom: 30%; right: 10%; border-width: 0 3px 3px 0; border-radius: 0 0 8px 0; }

.scan-line {
    position: absolute;
    top: 30%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4facfe, transparent);
    animation: scanMove 2s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(79,172,254,0.6);
}

@keyframes scanMove {
    0%, 100% { top: 30%; }
    50% { top: calc(70% - 2px); }
}

.scan-hint-text {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    z-index: 10;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

.btn-close-scanner {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    backdrop-filter: blur(4px);
}

/* ===== Mobile Full-Screen Result ===== */
.mobile-result-full {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 1.5rem 1.5rem;
}

.result-logo {
    text-align: center;
    margin-bottom: 1.25rem;
}

.result-logo img {
    height: 36px;
    width: auto;
}


.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.result-barcode {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #718096);
    background: var(--bs-tertiary-bg, #f0f2f5);
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
}

.result-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
}

.result-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bs-body-color, #1a202c);
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.result-row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.result-row .result-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #718096);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.result-row .result-value {
    font-size: 0.95rem;
    color: var(--bs-body-color, #1a202c);
    font-weight: 500;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-action-primary {
    width: 100%;
    background: var(--bs-primary, #667eea);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-action-primary:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-action-secondary {
    width: 100%;
    background: var(--bs-tertiary-bg, #f0f2f5);
    color: var(--bs-body-color, #1a202c);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-action-secondary:active {
    transform: scale(0.97);
    background: #e5e7eb;
}

/* ===== Mobile Asset Edit Page ===== */
.mobile-asset-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bs-body-bg, #f0f2f5);
    z-index: 1000;
    overflow-y: auto;
    padding: 0 0 2rem;
}

.mobile-asset-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-back-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--bs-primary, #667eea);
}

.mobile-asset-header-logo img {
    height: 28px;
    width: auto;
}

.mobile-new-btn {
    background: var(--bs-primary, #667eea);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.mobile-asset-title {
    padding: 1.25rem 1.25rem 0.5rem;
}

.mobile-asset-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.mobile-asset-barcode {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #718096);
    margin-top: 0.25rem;
}

.mobile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--bs-secondary-color, #718096);
}

.mobile-form {
    padding: 0.75rem 1.25rem 1.5rem;
}

.mobile-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.mobile-alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.mobile-field-group {
    margin-bottom: 1rem;
}

.mobile-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #718096);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.mobile-input, .mobile-select, .mobile-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    background: #fff;
    color: var(--bs-body-color, #1a202c);
    font-family: inherit;
    transition: border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.mobile-input:focus, .mobile-select:focus, .mobile-textarea:focus {
    outline: none;
    border-color: var(--bs-primary, #667eea);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.mobile-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.mobile-textarea {
    resize: vertical;
    min-height: 80px;
}

.mobile-field-row {
    display: flex;
    gap: 0.75rem;
}

.mobile-field-row .mobile-field-group {
    flex: 1;
}

.mobile-photo-preview {
    margin-bottom: 0.5rem;
}

.mobile-photo-preview img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.mobile-file-input {
    width: 100%;
    padding: 0.6rem 0;
    font-size: 0.9rem;
}

.mobile-form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.mobile-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.mobile-btn:active {
    transform: scale(0.97);
}

.mobile-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mobile-btn-primary {
    background: var(--bs-primary, #667eea);
    color: #fff;
}

.mobile-btn-secondary {
    background: var(--bs-tertiary-bg, #f0f2f5);
    color: var(--bs-body-color, #1a202c);
    border: 1px solid rgba(0,0,0,0.08);
}

.mobile-meta-info {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bs-tertiary-bg, #f8fafc);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #718096);
}

.mobile-history {
    margin-top: 1.5rem;
}

.mobile-history h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.mobile-history-item {
    background: var(--bs-tertiary-bg, #f8fafc);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mobile-history-item .history-date {
    font-weight: 600;
    color: var(--bs-body-color, #1a202c);
}

.mobile-history-item .history-desc {
    color: var(--bs-secondary-color, #718096);
    font-size: 0.8rem;
}


