@font-face {
    font-family: BYekan;
    src: url('../../../Plugins/fonts/BYekan.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
:root { color-scheme: light; }
* { box-sizing: border-box; }
html, body { min-height: 100%; direction: ltr !important; }
body { margin: 0; font-family: BYekan, Arial, Tahoma, sans-serif; background: #f5f7fb; color: #1f2937; text-align: left; }
main, header, section, form, table, th, td, label, input, textarea, button { direction: ltr; }
#languageToggle { display: none !important; }
img, video { display: block; max-width: 100%; }
button, input, textarea { font-family: inherit; }
header img { width: 44px; height: 44px; max-width: 44px; object-fit: contain; flex: 0 0 44px; }
.orb { position: fixed; z-index: -1; width: 24rem; height: 24rem; border-radius: 50%; filter: blur(80px); opacity: .35; pointer-events: none; }
.orb-a { right: -8rem; top: -8rem; background: #c4b5fd; }
.orb-b { left: -10rem; bottom: -10rem; background: #bfdbfe; }
.btn-primary, .btn-secondary, .btn-ghost { border-radius: 12px; padding: .7rem 1rem; font-weight: 700; cursor: pointer; transition: .2s; }
.btn-primary { border: 0; background: #5b4be7; color: #fff; box-shadow: 0 8px 20px #5b4be733; }
.btn-primary:hover { background: #4938d5; transform: translateY(-1px); }
.btn-secondary, .btn-ghost { border: 1px solid #e3e7f0; background: #fff; color: #5b4be7; }
.btn-ghost { padding: .55rem .8rem; color: #65708a; font-size: .82rem; }
.auth-shell { display: grid; grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: center; min-height: 70vh; }
.auth-copy { max-width: 650px; }
.eyebrow { color: #5b4be7; font-size: .72rem; font-weight: 800; letter-spacing: .15em; }
.auth-copy h1 { margin: 1rem 0; color: #20202f; font-size: clamp(2.2rem, 5vw, 4.5rem); line-height: 1.35; }
.auth-copy p { max-width: 560px; color: #667085; font-size: 1.05rem; line-height: 2; }
.feature-list { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; color: #5d6780; font-size: .9rem; }
.auth-card, .panel { border: 1px solid #fff; border-radius: 26px; background: #fff; box-shadow: 0 20px 60px #1f29510e; }
.auth-card { justify-self: end; width: 100%; max-width: 430px; padding: 2rem; }
.tabs { display: flex; margin-bottom: 1.5rem; border-bottom: 1px solid #edf0f5; }
.tabs button { border: 0; padding: .8rem 1rem; background: transparent; color: #98a1b5; font-weight: 700; cursor: pointer; }
.tabs button.active { border-bottom: 2px solid #5b4be7; color: #5b4be7; }
label { display: block; margin-bottom: .8rem; color: #59647d; font-size: .84rem; font-weight: 700; }
input, textarea { display: block; width: 100%; margin-top: .4rem; border: 1px solid #e7eaf2; border-radius: 11px; padding: .72rem .85rem; outline: none; background: #fbfcfe; color: #263047; }
input:focus, textarea:focus { border-color: #8d83f1; box-shadow: 0 0 0 3px #5b4be714; }
.form-message { margin-top: 1rem; color: #d14343; font-size: .8rem; }
.page-title { margin-top: .4rem; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.stat-card { display: flex; align-items: center; gap: .7rem; border-radius: 15px; padding: .7rem 1rem; background: #fff; box-shadow: 0 10px 30px #1f29510b; }
.stat-card b { color: #5b4be7; font-size: 1.5rem; }
.stat-card span { color: #8490a8; font-size: .8rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(0, 1.05fr); align-items: start; gap: 1.5rem; }
.panel { min-width: 0; padding: 1.4rem; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.panel-head h2 { margin: 0; font-size: 1.2rem; }
.panel-head p { margin: .25rem 0 0; color: #96a0b3; font-size: .8rem; }
.live-dot { border-radius: 20px; padding: .35rem .6rem; background: #eafaf2; color: #19a66a; font-size: .75rem; }
.camera-wrap { position: relative; display: flex; align-items: center; justify-content: center; height: 250px; overflow: hidden; border-radius: 18px; background: #19213b; }
.camera-wrap video { width: 100%; height: 100%; object-fit: cover; }
.camera-wrap p { position: absolute; bottom: 12px; margin: 0; border-radius: 10px; padding: .35rem .7rem; background: #0008; color: #fff; font-size: .75rem; }
.scan-frame { position: absolute; width: 68%; height: 55%; border: 2px solid #9eebca; border-radius: 18px; box-shadow: 0 0 0 999px #0002; }
.scan-frame i { position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: #61edb0; box-shadow: 0 0 4px #61edb0; animation: scan 2s infinite; }
@keyframes scan { 50% { top: 100%; } }
.camera-actions { display: flex; gap: .6rem; margin: 1rem 0; }
.scan-form { border-top: 1px solid #edf0f5; padding-top: 1rem; }
.table-scroll { max-height: 640px; overflow: auto; }
table { width: 100%; min-width: 650px; border-collapse: collapse; }
th, td { border-bottom: 1px solid #f0f2f6; padding: .85rem .6rem; text-align: left; white-space: nowrap; font-size: .8rem; }
th { color: #99a2b5; font-size: .72rem; }
td code { display: block; color: #4d43c5; font-family: monospace; direction: ltr; text-align: left; }
td small, .user-row small { display: block; margin-top: .2rem; color: #adb5c3; font-size: .68rem; }
.user-pill, .role { border-radius: 15px; padding: .25rem .55rem; background: #f0efff; color: #5b4be7; font-size: .7rem; }
.delete { border: 0; background: none; color: #d55353; cursor: pointer; font: inherit; font-size: .75rem; }
.empty { padding: 3rem; text-align: center; color: #a4adbd; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; }
.user-row { display: flex; align-items: center; gap: .7rem; border: 1px solid #edf0f5; border-radius: 15px; padding: .7rem; background: #fafbfe; }
.avatar { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 12px; background: #e9e7ff; color: #5b4be7; font-weight: 800; }
.role { margin-left: auto; margin-right: 0; }
footer { padding: 3rem 0 1rem; text-align: center; color: #a4adbd; font-size: .72rem; }
footer a { color: #5b4be7; }
@media (max-width: 1100px) { .dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .auth-shell { grid-template-columns: 1fr; gap: 2rem; } .auth-card { justify-self: stretch; max-width: none; } .auth-copy h1 { font-size: 2.4rem; } .orb { width: 16rem; height: 16rem; } }
@media (max-width: 520px) { .panel { padding: 1rem; border-radius: 20px; } .panel-head { align-items: center; } .panel-head .btn-secondary { padding: .55rem; font-size: .72rem; } .camera-actions { flex-wrap: wrap; } .camera-actions button { flex: 1; min-width: 140px; } .stat-card { width: 100%; justify-content: center; } .auth-copy h1 { font-size: 2rem; } .auth-copy p { font-size: .92rem; } .feature-list { display: grid; gap: .55rem; } .btn-ghost { padding: .5rem .6rem; font-size: .7rem; } header { align-items: flex-start; } header > div { flex-wrap: wrap; justify-content: flex-end; } }
.scan-success { border-color: #51e2a0; box-shadow: 0 0 0 999px #0002, 0 0 0 6px #51e2a066; }
.save-message { margin-top: .7rem; color: #159669; font-size: .8rem; font-weight: 700; }
.product-match { display: none; margin: .25rem 0 1rem; padding: 15px; border: 1px solid #dfe4f2; border-radius: 16px; background: #f8f9ff; }
.product-match.is-visible { display: block; }
.product-match.not-found { border-color: #f0d3a5; background: #fffaf0; }
.product-match-title { display: block; margin-bottom: 10px; color: #202a4a; font-size: 14px; }
.product-match-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.product-match-grid span { color: #7d87a2; font-size: 11px; }
.product-match-grid b { display: block; margin-top: 3px; color: #202a4a; font-size: 13px; overflow-wrap: anywhere; }
.saved-product-meta { display: block; margin-top: 4px; color: #7d87a2; font-size: 11px; line-height: 1.6; white-space: normal; }
.editable-products-panel { margin-top: 24px; }
.editable-products-scroll input { min-width: 120px; padding: 8px 10px; border: 1px solid #dfe4f2; border-radius: 9px; background: #fff; color: #202a4a; font-size: 12px; }
.editable-products-scroll input:focus { border-color: #6654ed; outline: 3px solid rgba(102,84,237,.12); }
.editable-products-scroll .table-save { min-width: 66px; padding: 8px 12px; font-size: 12px; }
@media (max-width: 800px) { .editable-products-panel { margin-top: 16px; } .editable-products-scroll input { min-width: 135px; } }
.admin-user-form { display: grid; grid-template-columns: 1fr 1fr 150px auto; gap: .7rem; margin-bottom: 1rem; padding: 1rem; border: 1px solid #edf0f5; border-radius: 16px; background: #fafbfe; }
.admin-user-form input, .admin-user-form select { margin: 0; }
.admin-user-form button { white-space: nowrap; }

/* Mobile layout: compact spacing, readable tap targets, and no forced vertical whitespace. */
@media (max-width: 640px) {
    body { overflow-x: hidden; }
    main.relative.mx-auto { padding: 16px; }
    main.relative.mx-auto > header { margin-bottom: 24px; gap: 12px; }
    main.relative.mx-auto > header > a { min-width: 0; }
    main.relative.mx-auto > header > a span { min-width: 0; }
    main.relative.mx-auto > header > a b { font-size: 16px; }
    main.relative.mx-auto > header > a small { display: block; max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
    main.relative.mx-auto > header > div { gap: 6px; }
    main.relative.mx-auto > header .btn-ghost { padding: 8px 9px; font-size: 11px; white-space: nowrap; }
    .auth-shell { min-height: auto; gap: 24px; padding: 4px 0 0; }
    .auth-copy { width: 100%; }
    .eyebrow { font-size: 10px; letter-spacing: .1em; }
    .auth-copy h1 { margin: 10px 0 12px; font-size: 30px; line-height: 1.45; }
    .auth-copy p { font-size: 14px; line-height: 1.9; }
    .feature-list { margin-top: 16px; font-size: 12px; }
    .auth-card { padding: 20px; border-radius: 20px; }
    .tabs { margin-bottom: 18px; }
    .tabs button { flex: 1; padding: 10px 8px; font-size: 13px; }
    label { margin-bottom: 12px; font-size: 12px; }
    input, textarea { padding: 11px 12px; font-size: 13px; }
    .dashboard-grid { gap: 16px; }
    .page-title { font-size: 22px; line-height: 1.5; }
    .camera-wrap { height: 220px; }
    .scan-form { padding-top: 16px; }
    th, td { padding: 10px 8px; }
    footer { padding-top: 24px; }
    .admin-user-form { grid-template-columns: 1fr; gap: .6rem; }
    .admin-user-form button { width: 100%; }
}

/* Match the iPragma tool-card pattern used by PassGen. */
@media (min-width: 801px) {
    .auth-shell { grid-template-columns: 1.05fr .95fr; max-width: 1024px; min-height: 0; margin: 24px auto 0; overflow: hidden; border: 1px solid #fff; border-radius: 2rem; background: rgba(255,255,255,.9); box-shadow: 0 24px 80px rgba(31,41,81,.10); }
    .auth-copy { order: 2; max-width: none; min-height: 570px; padding: 40px; background: #202a4a; color: #fff; }
    .auth-copy h1 { color: #fff; font-size: 36px; }
    .auth-copy p { color: #d8def0; }
    .feature-list { color: #c8d0e7; }
    .auth-card { order: 1; justify-self: stretch; max-width: none; border: 0; border-radius: 0; box-shadow: none; padding: 40px; }
}
    @media (max-width: 800px) {
        .auth-shell { display: flex; flex-direction: column; gap: 16px; margin-top: 0; border: 0; background: transparent; box-shadow: none; }
        .auth-copy { order: 1; padding: 24px; border-radius: 1.25rem; background: #202a4a; color: #fff; }
        .auth-copy h1 { color: #fff; font-size: 30px; }
        .auth-copy p { color: #d8def0; }
        .feature-list { color: #c8d0e7; }
        .auth-card { order: 2; padding: 20px; border: 1px solid #e4e8f2; border-radius: 1.25rem; background: #fff; box-shadow: 0 16px 36px rgba(31,41,81,.08); }
    }
