/* ===============================
   PMC EQUIPMENT SYSTEM UI
================================= */

/* RESET */
*{
margin:0;
padding:0;
box-sizing:border-box;
}

/* BODY */
body{
font-family:'Segoe UI', Arial, sans-serif;
background:linear-gradient(135deg,#0f1f3d,#1b2b47);
min-height:100vh;
color:#fff;
}

/* ===============================
   CONTAINER
================================= */

.container{
max-width:1100px;
margin:auto;
padding:30px 20px;
}

/* ===============================
   HEADER
================================= */

.main-header{
background:rgba(0,0,0,0.4);
backdrop-filter:blur(10px);
padding:15px 0;
border-bottom:1px solid rgba(255,255,255,0.1);
}

.header-wrapper{
max-width:1100px;
margin:auto;
display:flex;
justify-content:space-between;
align-items:center;
}

.header-left{
display:flex;
align-items:center;
gap:10px;
}

.header-left img{
height:40px;
}

.header-left h1{
font-size:18px;
font-weight:600;
}

.main-header nav a{
color:#fff;
text-decoration:none;
margin-left:20px;
font-size:14px;
transition:.3s;
}

.main-header nav a:hover{
color:#38bdf8;
}

/* ===============================
   ADMIN LAYOUT
================================= */

.admin-layout{
max-width:1100px;
margin:auto;
}

/* ===============================
   DASHBOARD STATS
================================= */

.stats-row{
display:flex;
gap:25px;
margin-bottom:30px;
}

.stat-card{
flex:1;
background:linear-gradient(135deg,#ffffff,#f4f7fc);
border-radius:14px;
padding:28px;
text-align:center;
box-shadow:0 8px 25px rgba(0,0,0,0.15);
transition:0.25s;
position:relative;
overflow:hidden;
}

.stat-card:hover{
transform:translateY(-4px);
box-shadow:0 12px 30px rgba(0,0,0,0.2);
}

.stat-card h2{
font-size:42px;
color:#2563eb;
margin-bottom:5px;
}

.stat-card p{
color:#555;
font-weight:500;
}

/* ===============================
   CARDS
================================= */

.card{
background:#fff;
color:#222;
padding:22px;
border-radius:12px;
box-shadow:0 6px 20px rgba(0,0,0,0.1);
margin-bottom:25px;
transition:.2s;
}

.card:hover{
transform:translateY(-3px);
}

.card h3{
margin-bottom:15px;
font-size:17px;
}

/* ===============================
   GRID
================================= */

.dashboard-grid{
display:grid;
grid-template-columns:1fr 1fr;
gap:25px;
}

/* ===============================
   TABLE
================================= */

table{
width:100%;
border-collapse:collapse;
margin-top:12px;
font-size:14px;
}

th{
background:#f1f5f9;
color:#222;
font-weight:600;
padding:11px;
}

td{
padding:11px;
border-bottom:1px solid #e4e4e4;
}

/* ===============================
   BUTTONS
================================= */

button{
background:linear-gradient(135deg,#2563eb,#1d4ed8);
color:white;
border:none;
padding:7px 14px;
border-radius:6px;
cursor:pointer;
font-size:13px;
transition:0.2s;
}

button:hover{
transform:translateY(-1px);
box-shadow:0 5px 12px rgba(0,0,0,0.2);
}

/* ===============================
   STATUS BADGES
================================= */

.status-badge{
padding:4px 10px;
border-radius:12px;
font-size:12px;
font-weight:600;
}

.status-pending{
background:#fff3cd;
color:#856404;
}

.status-issued{
background:#cce5ff;
color:#004085;
}

.status-returned{
background:#d4edda;
color:#155724;
}

/* ===============================
   RETURN BUTTON
================================= */

.return-btn{
background:#28a745;
padding:6px 12px;
margin-left:6px;
}

.return-btn:hover{
background:#218838;
}

/* ===============================
   FOOTER
================================= */

.main-footer{
margin-top:50px;
text-align:center;
padding:20px;
background:rgba(0,0,0,0.3);
backdrop-filter:blur(10px);
font-size:13px;
border-top:1px solid rgba(255,255,255,0.1);
}

/* ===============================
   RESPONSIVE
================================= */

@media (max-width:768px){

.stats-row{
flex-direction:column;
}

.dashboard-grid{
grid-template-columns:1fr;
}

.header-wrapper{
flex-direction:column;
gap:10px;
}

}

tr:hover{
background:#f8fbff;
transition:0.2s;
}

.admin-panel{
display:flex;
min-height:100vh;
}

/* SIDEBAR */

.sidebar{
width:220px;
background:#0f172a;
padding:25px 15px;
display:flex;
flex-direction:column;
gap:15px;
}

.sidebar .logo{
color:white;
margin-bottom:20px;
text-align:center;
}

.sidebar a{
color:#cbd5f5;
text-decoration:none;
padding:10px;
border-radius:6px;
font-size:14px;
}

.sidebar a:hover{
background:#1e293b;
color:white;
}

/* MAIN CONTENT */

.main-content{
flex:1;
}

.loading-screen{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(15,23,42,0.9);
display:flex;
justify-content:center;
align-items:center;
z-index:999;
}

.loader{
width:45px;
height:45px;
border:4px solid #ddd;
border-top:4px solid #2563eb;
border-radius:50%;
animation:spin 1s linear infinite;
}

@keyframes spin{
0%{transform:rotate(0deg);}
100%{transform:rotate(360deg);}
}

.skeleton{
height:12px;
background:linear-gradient(90deg,#eee,#ddd,#eee);
background-size:200% 100%;
animation:skeleton 1.5s infinite;
border-radius:6px;
}

@keyframes skeleton{
0%{background-position:200% 0;}
100%{background-position:-200% 0;}
}

@keyframes fadeUp{
from{
opacity:0;
transform:translateY(15px);
}
to{
opacity:1;
transform:translateY(0);
}
}
height:12px;
background:linear-gradient(
90deg,
#eee,
#ddd,
#eee
);
background-size:200% 100%;
animation:skeleton 1.5s infinite;
border-radius:6px;
}

@keyframes skeleton{
0%{background-position:200% 0;}
100%{background-position:-200% 0;}
}
.card{
animation:fadeUp 0.5s ease;
}

@keyframes fadeUp{
from{
opacity:0;
transform:translateY(15px);
}
to{
opacity:1;
transform:translateY(0);
}
}
.equipment-grid{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
gap:20px;
}

.equipment-card{
background:#fff;
color:#222;
padding:18px;
border-radius:10px;
box-shadow:0 5px 15px rgba(0,0,0,0.1);
}
.search-box{
margin-bottom:15px;
}

.search-box input{
width:100%;
padding:10px 14px;
border-radius:8px;
border:none;
background:#f1f5f9;
font-size:14px;
outline:none;
}

.search-box input:focus{
box-shadow:0 0 0 2px #2563eb33;
}

/* LOGIN PAGE */

.login-container{
display:flex;
justify-content:center;
align-items:center;
height:80vh;
}

.login-card{
background:#ffffff;
padding:35px;
border-radius:12px;
width:350px;
box-shadow:0 10px 25px rgba(0,0,0,0.2);
color:#222;
}

.login-card h2{
margin-bottom:20px;
text-align:center;
}

.login-card select,
.login-card input{
width:100%;
padding:10px;
margin-bottom:12px;
border-radius:6px;
border:1px solid #ccc;
font-size:14px;
}

.login-card button{
width:100%;
padding:10px;
border:none;
background:#2563eb;
color:white;
border-radius:6px;
cursor:pointer;
font-size:14px;
}

.login-card button:hover{
background:#1d4ed8;
}

.signup-link{
text-align:center;
margin-top:10px;
font-size:13px;
}

/* ===============================
   SIGNUP PAGE
================================ */

.signup-container{
display:flex;
justify-content:center;
align-items:center;
min-height:80vh;
}

.signup-card{
background:#ffffff;
padding:35px;
border-radius:12px;
width:420px;
box-shadow:0 10px 30px rgba(0,0,0,0.2);
color:#222;
}

.signup-card h2{
text-align:center;
margin-bottom:20px;
}

.signup-form{
display:grid;
grid-template-columns:1fr 1fr;
gap:12px;
}

.signup-form input,
.signup-form select{
width:100%;
padding:10px;
border-radius:6px;
border:1px solid #ccc;
font-size:14px;
}

.signup-form button{
grid-column:1 / span 2;
padding:10px;
background:#2563eb;
border:none;
color:white;
border-radius:6px;
cursor:pointer;
}

.signup-form button:hover{
background:#1d4ed8;
}

.signup-link{
text-align:center;
margin-top:12px;
font-size:13px;
}

/* ===============================
   STUDENT REQUEST FORM
================================ */

.glass-card{
background:rgba(255,255,255,0.08);
backdrop-filter:blur(12px);
border-radius:12px;
padding:25px;
margin-bottom:25px;
border:1px solid rgba(255,255,255,0.15);
box-shadow:0 10px 25px rgba(0,0,0,0.25);
}

.glass-card h2,
.glass-card h3{
margin-bottom:15px;
font-weight:600;
}

/* FORM GRID */

.glass-card input,
.glass-card select{
width:100%;
padding:10px;
margin-top:10px;
border-radius:6px;
border:none;
background:rgba(255,255,255,0.15);
color:white;
font-size:14px;
}

.glass-card input::placeholder{
color:#ddd;
}

.glass-card select option{
color:black;
background:white;
}

/* BUTTON */

.glass-card button{
margin-top:15px;
padding:10px;
border:none;
border-radius:6px;
background:#2563eb;
color:white;
cursor:pointer;
font-size:14px;
transition:.2s;
}

.glass-card button:hover{
background:#1d4ed8;
transform:translateY(-1px);
}

.form-label{
display:block;
margin-top:14px;
margin-bottom:6px;
font-size:13px;
color:#cbd5f5;
}

/* RETURN DATE INPUT */

input[type="date"]{

width:100%;
padding:12px 14px;
margin-top:10px;

background:rgba(255,255,255,0.08);
border:1px solid rgba(255,255,255,0.15);
border-radius:8px;

color:#ffffff;
font-size:14px;

outline:none;
transition:0.25s;

}

/* Focus effect */

input[type="date"]:focus{

border-color:#3b82f6;
box-shadow:0 0 0 2px rgba(59,130,246,0.25);

}

/* Calendar icon styling */

input[type="date"]::-webkit-calendar-picker-indicator{

filter:invert(1);
opacity:0.8;
cursor:pointer;

}

/* ===============================
   QR SCANNER
================================ */

/* QR SCANNER CONTAINER */

#reader{
width:100%;
max-width:450px;
height:320px;
margin:auto;
border-radius:14px;
overflow:hidden;
position:relative;
background:#000;
box-shadow:0 10px 25px rgba(0,0,0,0.4);
}

/* Force video to fill container */

#reader video{
width:100% !important;
height:100% !important;
object-fit:cover;
border-radius:14px;
}

/* Canvas layer */

#reader canvas{
width:100% !important;
height:100% !important;
}

/* SCAN LASER LINE */

/* SCANNER FRAME */

#reader::before{
content:"";
position:absolute;
top:50%;
left:50%;
width:220px;
height:220px;
transform:translate(-50%,-50%);
border:3px solid rgba(255,255,255,0.6);
border-radius:12px;
box-shadow:
0 0 0 9999px rgba(0,0,0,0.45);
pointer-events:none;
}

/* SCAN LINE */

#reader::after{
content:"";
position:absolute;
width:200px;
height:2px;
background:linear-gradient(to right,transparent,#ff0000,transparent);
top:calc(50% - 100px);
left:50%;
transform:translateX(-50%);
animation:scanLine 2s linear infinite;
}

@keyframes scanLine{
0%{top:calc(50% - 100px);}
100%{top:calc(50% + 100px);}
}

/* SUCCESS FLASH */

.scan-success{
animation:successFlash .5s;
}

@keyframes successFlash{
0%{box-shadow:0 0 0px #00ff00;}
50%{box-shadow:0 0 25px #00ff00;}
100%{box-shadow:0 0 0px #00ff00;}
}

/* ERROR FLASH */

.scan-error{
animation:errorFlash .5s;
}

@keyframes errorFlash{
0%{box-shadow:0 0 0px red;}
50%{box-shadow:0 0 25px red;}
100%{box-shadow:0 0 0px red;}
}

/* ===============================
   MANUAL ENTRY
================================ */

.manual-entry{
display:flex;
gap:10px;
margin-top:10px;
}

.manual-entry input{
flex:1;
}

/* ===============================
   EQUIPMENT PREVIEW
================================ */

.preview-container{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
gap:15px;
margin-top:15px;
}

.equipment-card{
background:rgba(255,255,255,0.12);
padding:14px;
border-radius:10px;
border-left:4px solid #38bdf8;
color:#ffffff;
font-size:13px;
min-width:150px;
box-shadow:0 5px 15px rgba(0,0,0,0.25);
transition:.25s;
}

.equipment-card strong{
font-size:14px;
color:#ffffff;
display:block;
margin-bottom:4px;
}

.equipment-card:hover{
transform:translateY(-3px);
background:rgba(255,255,255,0.18);
}

/* ===============================
   ACTION SELECT
================================ */

#actionType{
margin-bottom:10px;
}

/* ===============================
   MOBILE RESPONSIVE
================================ */

@media(max-width:768px){

.glass-card{
padding:20px;
}

#reader{
max-width:100%;
}

.preview-container{
flex-direction:column;
}

}

#reader{
width:100%;
max-width:400px;
height:300px;
margin:auto;
border-radius:10px;
overflow:hidden;
background:black;
}

.password-modal{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.7);
display:none;
justify-content:center;
align-items:center;
z-index:9999;
}

.password-box{
background:#fff;
padding:30px;
border-radius:10px;
width:320px;
text-align:center;
}

.password-box input{
width:100%;
padding:10px;
margin-top:10px;
border-radius:6px;
border:1px solid #ccc;
}

.password-box button{
margin-top:15px;
width:100%;
padding:10px;
background:#2563eb;
color:white;
border:none;
border-radius:6px;
cursor:pointer;
}