*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;background:#070b0e;color:#f5f0df}body{min-height:100vh;background-image:radial-gradient(circle at 15% 20%,#ff641510 0 1px,transparent 2px),radial-gradient(circle at 80% 10%,#53d8e610 0 1px,transparent 2px),linear-gradient(#070b0e,#0a1015);background-size:31px 31px,43px 43px,auto}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.center{min-height:100vh;display:grid;place-items:center;padding:22px}.card{background:linear-gradient(145deg,#0e171cfa,#0a1116f5);border:1px solid #234a56;border-radius:8px;padding:28px;box-shadow:0 0 0 1px #ff6a1a12,0 24px 70px #000a}.narrow{width:min(100%,460px)}.brand{font-family:Arial Black,Impact,sans-serif;font-size:1.35rem;font-weight:900;letter-spacing:.08em;color:#f6f0d9;text-shadow:2px 0 #ff651c33}.brand span{color:#ff6a1a}.eyebrow,.kicker{font-size:.72rem;letter-spacing:.2em;text-transform:uppercase;color:#57d7e4;font-weight:900;margin:24px 0 8px}h1{font-family:Arial Black,Impact,sans-serif;font-size:clamp(2rem,5vw,3.2rem);line-height:.95;letter-spacing:.02em;margin:.4rem 0;color:#f6f0d9}h2{font-family:Arial Black,Impact,sans-serif;letter-spacing:.02em;margin-top:0}h3{margin:0}.orange{color:#ff6a1a}p{color:#b9c0b7;line-height:1.55}.muted{color:#7f9295}.tiny{font-size:.75rem}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #ff6a1a;border-radius:5px;padding:12px 17px;background:#ff6a1a;color:#090c0e;font-weight:900;cursor:pointer;text-transform:uppercase;letter-spacing:.04em}.btn:hover{filter:brightness(1.08)}.btn.secondary{background:transparent;color:#f4ede0}.btn.cyan{border-color:#53d8e6;background:#10252a;color:#7ce8f1}.btn.danger{border-color:#a83b31;background:#311614;color:#ffd5cf}.btn.small{padding:8px 10px;font-size:.76rem}.alert,.success{padding:12px 14px;border-radius:5px;margin:14px 0}.alert{background:#351817;border:1px solid #8f392f;color:#ffd8d1}.success{background:#102a24;border:1px solid #2f7160}.success code{display:block;font-size:1.45rem;color:#75e8ef;margin-top:7px}form{display:grid;gap:14px;margin-top:18px}label{display:grid;gap:7px;font-size:.82rem;font-weight:900;color:#d8d7cb;text-transform:uppercase;letter-spacing:.04em}input,select,textarea{width:100%;background:#070d11;border:1px solid #2a4d57;border-radius:4px;color:#f6f0df;padding:12px 13px;outline:none}textarea{min-height:100px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:#55d9e5;box-shadow:0 0 0 3px #55d9e51c}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.three{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.shell{min-height:100vh;display:grid;grid-template-columns:260px 1fr}.sidebar{background:#080d10f5;border-right:1px solid #193640;padding:24px 16px;display:flex;flex-direction:column;gap:26px;position:relative}.sidebar:before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,#ff6a1a,#ffd23f,#53d8e6)}nav{display:grid;gap:5px}nav a,.logout{padding:11px 12px;border:1px solid transparent;border-radius:4px;color:#a9b7b5;font-size:.86rem}nav a:hover,nav a.active{background:#0d1a20;border-color:#24515e;color:#fff}.logout{margin-top:auto}.workspace{min-width:0}.top{min-height:68px;border-bottom:1px solid #193640;display:flex;justify-content:space-between;align-items:center;padding:10px 28px;background:#080d10d9;position:sticky;top:0;z-index:5;backdrop-filter:blur(8px)}.top .who{text-align:right;display:grid}.top small{color:#64dbe5}.menu{display:none;background:none;border:0;color:#fff;font-size:1.4rem}.page{padding:34px clamp(20px,5vw,70px) 60px}.hero{border-bottom:1px dashed #24515e;padding-bottom:25px;margin-bottom:25px}.statusline{display:inline-flex;gap:10px;align-items:center;border:1px solid #24515e;background:#0c1b20;padding:7px 10px;color:#63dbe6;font-size:.75rem;letter-spacing:.1em}.dot{width:7px;height:7px;border-radius:50%;background:#ff6a1a;box-shadow:0 0 10px #ff6a1a}.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.tile,.panel{background:linear-gradient(145deg,#0d171c,#091014);border:1px solid #21434d;border-radius:7px;padding:20px}.tile strong{display:block;font-family:Arial Black,Impact,sans-serif;font-size:2rem;color:#f6f0df}.tile span{color:#5fdce7;font-size:.74rem;text-transform:uppercase;letter-spacing:.12em}.actions{display:flex;flex-wrap:wrap;gap:10px;margin:22px 0}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.tablewrap{overflow:auto;border:1px solid #21434d;border-radius:6px}table{width:100%;border-collapse:collapse;min-width:680px;background:#091115}th,td{text-align:left;padding:13px 14px;border-bottom:1px solid #17343d}th{color:#5edce7;font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;background:#0c181d}td{color:#d8d9ce}.badge{display:inline-block;padding:4px 7px;border:1px solid #355b63;border-radius:3px;font-size:.7rem;color:#7fe7ef;text-transform:uppercase}.badge.orange{border-color:#8f4b26;color:#ff9b62}.searchbar{display:flex;gap:8px;margin:15px 0 20px}.searchbar input{flex:1}.searchbar .btn{white-space:nowrap}.itemrow{display:grid;grid-template-columns:1fr 100px auto;gap:10px;align-items:end;padding:12px 0;border-bottom:1px dashed #21434d}.itemrow:last-child{border:0}.codebox{font-size:1.2rem;letter-spacing:.12em;color:#73e5ee;border:1px dashed #2c6772;padding:10px;display:inline-block}.binhead{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.meta{display:flex;gap:8px;flex-wrap:wrap}.empty{padding:30px;text-align:center;color:#789092;border:1px dashed #21434d}.userrow{display:flex;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px dashed #21434d}.userrow small{display:block;color:#789092;margin-top:4px}.rowactions{display:flex;gap:6px}.rowactions form{margin:0}.restricted{text-align:center}.restricted .lock{font-size:3rem;color:#ff6a1a}.label-preview{width:320px;max-width:100%;background:#fff;color:#000;padding:16px;border-radius:4px}.label-preview .labeltitle{font:900 18px Arial}.label-preview .labelcode{font:12px monospace;margin-top:4px}.label-grid{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center}.matrix{width:86px;height:86px;background:repeating-linear-gradient(45deg,#000 0 5px,#fff 5px 10px);border:5px solid #fff;outline:2px solid #000}.note{border-left:3px solid #ff6a1a;padding:10px 12px;background:#1a1410;color:#c9c4b7}
@media(max-width:1000px){.tiles{grid-template-columns:repeat(2,1fr)}.grid3{grid-template-columns:1fr 1fr}}
@media(max-width:800px){.shell{display:block}.sidebar{position:fixed;z-index:20;inset:0 22% 0 0;transform:translateX(-110%);transition:.2s;box-shadow:20px 0 60px #000}.nav-open .sidebar{transform:translateX(0)}.menu{display:block}.top{padding:10px 16px}.page{padding:24px 16px 45px}.grid2,.grid3,.two,.three{grid-template-columns:1fr}.tiles{grid-template-columns:1fr 1fr}.binhead{display:block}.itemrow{grid-template-columns:1fr 80px}.itemrow form{grid-column:1/-1}.searchbar{flex-direction:column}.userrow{flex-direction:column}.rowactions{width:100%}.rowactions form{flex:1}.rowactions .btn{width:100%}.card{padding:22px}}
@media(max-width:480px){.tiles{grid-template-columns:1fr}.top .who small{display:none}h1{font-size:2.15rem}.btn{width:100%}.actions .btn{width:100%}}
@media print{body{background:#fff}.sidebar,.top,.no-print{display:none!important}.workspace,.shell{display:block}.page{padding:0}.label-preview{width:2.2in;border:1px solid #000}.matrix{width:.65in;height:.65in}}

.photo-card{border:1px solid #21434d;border-radius:7px;overflow:hidden;background:#091014}
.photo-card img{display:block;width:100%;max-height:420px;object-fit:contain;background:#05080a}
.photo-placeholder{min-height:180px;display:grid;place-items:center;color:#789092;border:1px dashed #21434d}
.qrbox{background:#fff;padding:14px;display:inline-block;border-radius:4px}
.qrbox svg{display:block;width:220px;height:220px}
.typepill{display:inline-block;border:1px solid #ff6a1a;color:#ff9b62;padding:5px 8px;border-radius:4px;font-size:.72rem;text-transform:uppercase}
.description{white-space:pre-wrap;color:#d8d9ce;line-height:1.55}
@media(max-width:600px){.qrbox svg{width:190px;height:190px}}

.qr-custom-card{margin:24px 0;padding:22px;border:1px solid #1e4b55;border-radius:8px;background:rgba(4,18,22,.72)}
.qr-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0 20px}
.qr-choice{display:flex!important;gap:12px;align-items:flex-start;padding:16px;border:1px solid #24464e;border-radius:7px;background:#081418;cursor:pointer}
.qr-choice:has(input:checked){border-color:#55e6f2;box-shadow:0 0 0 1px rgba(85,230,242,.2) inset}
.qr-choice input{width:auto;margin-top:4px}
.qr-choice span{display:grid;gap:4px}.qr-choice small{color:#8ca0a4}
.qr-preview-large{width:min(100%,340px);aspect-ratio:1;display:grid;place-items:center}
.qr-preview-large svg{width:100%;height:100%;display:block}
.inline-check{display:flex!important;align-items:center;gap:9px}.inline-check input{width:auto}
input[type=color]{height:48px;padding:4px;cursor:pointer}
@media(max-width:650px){.qr-choice-grid{grid-template-columns:1fr}}

.reset-code-box{display:grid;gap:10px;margin-bottom:18px}
.reset-code-box code{font-size:1.35rem;letter-spacing:.12em;user-select:all}

.simple-form{max-width:850px}.simple-form textarea{min-height:140px}.optional-box{margin:14px 0;padding:14px 16px;border:1px solid #24464e;border-radius:7px;background:rgba(5,18,22,.55)}.optional-box summary{cursor:pointer;font-weight:700}.optional-box label{margin-top:14px}.simple-cards,.search-results{display:grid;gap:12px}.simple-card,.search-result{display:block;padding:18px;border:1px solid #183d45;border-radius:8px;background:rgba(5,17,21,.82);text-decoration:none;color:inherit}.simple-card:hover,.search-result:hover{border-color:#55e6f2;transform:translateY(-1px)}.simple-card p,.search-result p{margin:10px 0;color:#d7dedf}.contents-display{font-size:1.05rem;line-height:1.65}.big-status{font-size:1.35rem;font-weight:800;text-transform:uppercase}

/* V6 photo UX */
.tracked-card{border:1px solid #24515b!important;border-left:3px solid #ff6b1a!important;padding:20px!important;box-shadow:0 8px 26px rgba(0,0,0,.16)}
.card-badges{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.photo-badge{border-color:#36dce8!important;color:#79f5ff!important}
.photo-preview-button{display:flex;flex-direction:column;align-items:flex-start;gap:7px;margin-top:16px;padding:0;border:0;background:transparent;color:#7e969a;cursor:zoom-in;max-width:100%}
.itemphoto{display:block;width:auto!important;height:auto!important;max-width:min(420px,100%)!important;max-height:300px!important;object-fit:contain!important;border:1px solid #28535c;border-radius:7px;background:#050d10;box-shadow:0 10px 28px rgba(0,0,0,.28)}
.photo-preview-button:hover .itemphoto{border-color:#61e7ef}.photo-preview-button span{font-size:.76rem}
.photo-lightbox[hidden]{display:none}.photo-lightbox{position:fixed;z-index:99999;inset:0;background:rgba(0,0,0,.94);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px}.photo-lightbox-stage{width:100%;height:calc(100vh - 80px);display:flex;align-items:center;justify-content:center;overflow:auto}.photo-lightbox-stage img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}.photo-lightbox-close{position:fixed;right:20px;top:16px;z-index:100000;width:46px;height:46px;border:1px solid #5be4ed;background:#071317;color:#fff;border-radius:50%;font-size:30px;line-height:1;cursor:pointer}.photo-lightbox p{margin:5px 0 0;color:#91a5a8;font-size:.78rem}.lightbox-open{overflow:hidden}
.photo-history{margin-top:22px;padding-top:16px;border-top:1px solid #1e454d}.photo-history h3{margin:0 0 10px}.history-strip{display:flex;gap:10px;overflow-x:auto;padding-bottom:6px}.history-thumb{flex:0 0 92px;border:1px solid #28535c;background:#061216;border-radius:6px;padding:5px;color:#9eafb1;cursor:zoom-in}.history-thumb img{width:80px;height:64px;object-fit:cover;border-radius:3px;display:block}.history-thumb small{display:block;margin-top:4px;font-size:.65rem}
.photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}.photo-gallery-card{display:block;border:1px solid #28515a;border-radius:8px;overflow:hidden;background:rgba(4,15,18,.9);text-decoration:none;color:inherit;transition:.15s}.photo-gallery-card:hover{border-color:#55e6f2;transform:translateY(-2px)}.photo-gallery-image{height:210px;background:#03090b;display:flex;align-items:center;justify-content:center}.photo-gallery-image img{width:100%;height:100%;object-fit:contain}.photo-gallery-info{padding:14px}.photo-gallery-info p{min-height:42px;margin:11px 0;color:#d5dddd}
@media(max-width:700px){.itemphoto{max-width:100%!important;max-height:240px!important}.photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.photo-gallery-image{height:145px}.photo-gallery-info{padding:10px}.photo-gallery-info p{font-size:.8rem}.photo-lightbox{padding:8px}.photo-lightbox-stage{height:calc(100vh - 60px)}}


/* ============================================================
   V6.1 HARD PHOTO SIZE FIX
   These rules intentionally override all older inventory image
   sizing so photos NEVER become full-page/full-screen in normal
   scrolling views.
   ============================================================ */

/* Tracked-item detail page */
.photo-preview-button {
    display: inline-flex !important;
    width: auto !important;
    max-width: 360px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    align-items: flex-start !important;
}

.photo-preview-button .itemphoto,
img.itemphoto {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 360px !important;
    max-height: 240px !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 !important;
}

/* Photo search = actual thumbnail grid, NOT giant images */
.photo-gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(210px, 260px)) !important;
    gap: 16px !important;
    align-items: start !important;
    justify-content: start !important;
}

.photo-gallery-card {
    display: block !important;
    width: 100% !important;
    max-width: 260px !important;
    height: auto !important;
    overflow: hidden !important;
}

.photo-gallery-image {
    display: flex !important;
    width: 100% !important;
    height: 170px !important;
    min-height: 0 !important;
    max-height: 170px !important;
    overflow: hidden !important;
    align-items: center !important;
    justify-content: center !important;
    background: #03090b !important;
}

.photo-gallery-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 170px !important;
    object-fit: cover !important;
    object-position: center !important;
}

.photo-gallery-info {
    min-height: 115px !important;
}

/* Photo history thumbnails */
.history-thumb,
.history-thumb img {
    max-width: 92px !important;
}
.history-thumb img {
    width: 80px !important;
    height: 64px !important;
    object-fit: cover !important;
}

/* Full-screen behavior ONLY exists after the user clicks a photo. */
.photo-lightbox-stage img {
    width: auto !important;
    height: auto !important;
    max-width: 96vw !important;
    max-height: 90vh !important;
    object-fit: contain !important;
}

@media (max-width: 700px) {
    .photo-preview-button {
        max-width: 280px !important;
    }

    .photo-preview-button .itemphoto,
    img.itemphoto {
        max-width: 280px !important;
        max-height: 190px !important;
    }

    .photo-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .photo-gallery-card {
        max-width: none !important;
    }

    .photo-gallery-image {
        height: 125px !important;
        max-height: 125px !important;
    }

    .photo-gallery-image img {
        max-height: 125px !important;
    }

    .photo-gallery-info {
        min-height: 100px !important;
    }
}
