:root{
    color-scheme:dark;
    font-family:Inter,system-ui,Arial,sans-serif;
    background:#080f1e;
    color:#f8fafc
}
*{
    box-sizing:border-box
}
body{
    margin:0
}
header{
    background:#111e34;
    border-bottom:1px solid #263b59
}
.wrap{
    max-width:1150px;
    margin:auto;
    padding:24px
}
.head,.top,.card-head,.actions{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px
}
.head{
    padding-top:16px;
    padding-bottom:16px
}
h1{
    margin:0;
    font-size:clamp(25px,4vw,36px)
}
h1 span,.id{
    color:#35b6ff
}
header p,.top p,.hint,.card p{
    color:#a9bbd4
}
h2{
    margin:0 0 14px
}
.top{
    margin:14px 0 22px
}
button,.button{
    border:0;
    background:#1684ff;
    color:#fff;
    padding:13px 17px;
    border-radius:10px;
    font-weight:700;
    cursor:pointer;
    font-size:15px;
    text-decoration:none;
    text-align:center
}
button:hover,.button:hover{
    filter:brightness(1.15)
}
.secondary,.outline{
    background:transparent;
    border:1px solid #2876ba;
    color:#5ac6ff
}
.filters{
    display:flex;
    gap:12px;
    margin-bottom:18px
}
.filters input{
    flex:1
}
.filters select{
    width:200px
}
input,select{
    width:100%;
    padding:13px;
    background:#0c1729;
    color:white;
    border:1px solid #33516e;
    border-radius:9px;
    font:inherit
}
label{
    display:block;
    font-size:14px;
    color:#d7e5f7;
    margin:14px 0 0
}
label input,label select{
    margin-top:7px
}
.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));
    gap:16px
}
.card,.dialog{
    background:#15263d;
    border:1px solid #2a4d70;
    border-radius:17px;
    padding:24px
}
.card p{
    overflow-wrap:anywhere
}
.id{
    font-size:22px;
    font-weight:800
}
.pill{
    font-size:12px;
    border:1px solid #54708b;
    padding:6px 9px;
    border-radius:99px
}
.actions{
    margin-top:20px
}
.actions button{
    flex:1
}
.login{
    max-width:450px;
    margin:70px auto
}
.login form button,.dialog form button,.qr-dialog .button{
    width:100%;
    margin-top:20px
}
.hidden{
    display:none!important
}
.overlay{
    position:fixed;
    inset:0;
    background:#000c;
    z-index:10;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:15px;
    overflow-y:auto
}
.dialog{
    position:relative;
    width:100%;
    max-width:470px;
    max-height:95vh;
    overflow-y:auto
}
.close{
    position:absolute;
    right:12px;
    top:10px;
    background:transparent;
    font-size:30px;
    padding:0 10px
}
.qr-dialog{
    text-align:center;
    max-width:440px
}
.qr-bg{
    background:white;
    padding:18px;
    border-radius:14px;
    margin:20px auto
}
.qr-bg img{
    width:100%;
    max-width:330px;
    display:block;
    margin:auto
}
.permalink{
    overflow-wrap:anywhere;
    color:#9fcdf2;
    font-size:13px
}
.hint{
    font-size:12px;
    line-height:1.5
}
#toast{
    position:fixed;
    bottom:18px;
    right:18px;
    background:#244d73;
    border-radius:10px;
    padding:12px 18px;
    display:none;
    z-index:20
}
@media(max-width:650px){
    .wrap{
        padding:16px
    }
    .head{
        align-items:flex-start
    }
    .head p{
        font-size:12px
    }
    .filters{
        flex-direction:column
    }
    .filters select{
        width:100%
    }
    .top{
        align-items:flex-start;
        flex-direction:column
    }
    .top button{
        width:100%
    }
    .card{
        padding:18px
    }
    .actions{
        flex-direction:column
    }
    .actions button{
        width:100%
    }
    .dialog{
        padding:20px
    }
}


/* =============================================================
   MSTech Tap — Dashboard profesional, escritorio y móvil
   ============================================================= */
:root { --bg: #07101e; --surface: #101f35; --line: #294262; --blue: #1699ff; }
body { background: var(--bg); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 244px; flex-shrink: 0; background: linear-gradient(170deg,#05101e,#0c2442); border-right: 1px solid #174d81; padding: 25px 15px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar.hidden { display: none; }
.brand { display: flex; gap: 10px; align-items: center; padding: 10px 12px 35px; }
.brand-icon { font-size: 37px; color: #22b7ff; }
.brand strong { display: block; font-size: 20px; white-space: nowrap; }
.brand em { font-style: normal; color: #2db7ff; }
.brand small { display: block; color: #94accb; font-size: 12px; margin-top: 4px; }
.side-nav { display: grid; gap: 9px; }
.nav-btn { text-align: left; background: transparent; color: #c3d6ec; font-size: 15px; border: 1px solid transparent; }
.nav-btn:hover { background: #163555; }
.nav-btn.active { background: linear-gradient(90deg,#0069dc,#148cff); color: #fff; }
.sidebar-foot { margin-top: auto; color: #8bb5d6; font-size: 13px; padding: 15px; border-top: 1px solid #22476b; }
.workspace { flex: 1; min-width: 0; padding: 25px clamp(16px,3vw,45px); }
.workspace-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 24px; border-bottom: 1px solid #233954; margin-bottom: 25px; }
.workspace-top h1 { font-size: clamp(23px,3vw,32px); }
.workspace-top p { color: #9db5d0; margin: 8px 0 0; }
.top-right { display: flex; align-items: center; gap: 12px; }
.admin-chip { color: #c6e7ff; font-size: 13px; white-space: nowrap; }
.dashboard { max-width: 1550px; margin: 0 auto; }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin-bottom: 18px; }
.stat { border-radius: 15px; padding: 20px; min-height: 132px; border: 1px solid #206eb2; background: linear-gradient(130deg,#0c315f,#10213b); display: grid; gap: 7px; }
.stat span { font-weight: 650; color: #c5e6ff; }
.stat strong { font-size: clamp(26px,3vw,39px); line-height: 1.1; }
.stat small { color: #a9bfd9; }
.stat-green { background: linear-gradient(130deg,#063d36,#102d2f); border-color: #168c6c; }
.stat-amber { background: linear-gradient(130deg,#44300d,#292512); border-color: #b98a26; }
.stat-purple { background: linear-gradient(130deg,#332055,#201c38); border-color: #7952c7; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin-bottom: 20px; }
.panel { background: #101e32; border: 1px solid #244c78; border-radius: 16px; padding: 20px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-title h3 { margin: 0 0 16px; font-size: 18px; }
.panel-title span { font-size: 12px; color: #70c6ff; }
.recent-item,.type-item { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid #223a57; color: #c5d5e8; }
.recent-item:last-child,.type-item:last-child { border: 0; }
.recent-item strong,.type-item strong { color: #fff; }
#inventory-title { margin: 0 0 16px; }
#inventory-title h2 { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,360px),1fr)); gap: 16px; }
.card { background: #12243d; border: 1px solid #2b517b; }
.card .actions button { min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media(max-width:1050px) { .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .sidebar { width: 205px; } }
@media(max-width:700px) { .app-shell { display: block; } .sidebar { position: relative; height: auto; width: 100%; padding: 12px; } .brand { padding: 5px 8px 10px; } .side-nav { display: flex; overflow-x: auto; gap: 5px; } .nav-btn { flex-shrink: 0; padding: 10px 13px; font-size: 13px; } .sidebar-foot { display: none; } .workspace { padding: 18px 13px; } .workspace-top { align-items: flex-start; } .admin-chip { display: none; } .overview-grid { grid-template-columns: 1fr; } .stat { padding: 14px; min-height: 116px; } .stat span { font-size: 13px; } .filters { flex-direction: column; } .filters select { width: 100%; } }
