*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:"Segoe UI",sans-serif;
}

:root{
--bg:#080808;
--card:#111;
--card-hover:#171717;
--border:#222;
--text:#fff;
--muted:#999;
--danger:#ff3b30;
}

body{
background:var(--bg);
color:var(--text);
overflow-x:hidden;
}

@keyframes fadeUp{
from{
opacity:0;
transform:translateY(20px);
}
to{
opacity:1;
transform:translateY(0);
}
}

.dashboard{
display:flex;
min-height:100vh;
}

.sidebar{
width:260px;
min-width:260px;
height:100vh;
position:sticky;
top:0;
background:#0d0d0d;
border-right:1px solid var(--border);
padding:30px 20px;
display:flex;
flex-direction:column;
}

.sidebar h2{
font-size:2rem;
margin-bottom:40px;
}

.sidebar nav{
display:flex;
flex-direction:column;
gap:10px;
}

.sidebar a{
color:white;
text-decoration:none;
padding:14px 18px;
border-radius:14px;
transition:.25s;
}

.sidebar a:hover{
background:#1a1a1a;
transform:translateX(5px);
}

.sidebar a.active{
background:white;
color:black;
font-weight:700;
}

.logout-btn{
margin-top:auto;
background:var(--danger);
color:white;
border:none;
padding:14px;
border-radius:14px;
font-weight:700;
cursor:pointer;
transition:.25s;
}

.logout-btn:hover{
transform:translateY(-2px);
}

.main{
flex:1;
padding:40px;
animation:fadeUp .5s ease;
}

.page-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:30px;
gap:20px;
}

.page-header h1{
font-size:3rem;
}

.page-header p{
color:var(--muted);
margin-top:5px;
}

.add-btn,
.save-btn{
background:white;
color:black;
border:none;
padding:14px 24px;
border-radius:14px;
font-weight:700;
cursor:pointer;
transition:.25s;
}

.add-btn:hover,
.save-btn:hover{
transform:translateY(-3px);
box-shadow:0 0 20px rgba(255,255,255,.15);
}

#searchInput{
width:100%;
max-width:650px;
padding:16px;
background:#111;
border:1px solid #333;
color:white;
border-radius:14px;
margin-bottom:30px;
}

#searchInput:focus{
outline:none;
border-color:#666;
}

.stats-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
gap:20px;
margin-bottom:30px;
}

.stat-card{
background:var(--card);
border:1px solid var(--border);
border-radius:20px;
padding:25px;
transition:.25s;
}

.stat-card:hover{
transform:translateY(-5px);
background:var(--card-hover);
}

.stat-card h3{
color:var(--muted);
margin-bottom:10px;
}

.stat-card h2{
font-size:2.5rem;
}

.stat-card p{
color:#777;
margin-top:8px;
}

.dashboard-grid{
display:grid;
grid-template-columns:2fr 1fr;
gap:25px;
}

.products-grid{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(340px,1fr));
gap:25px;
}

.product-card{
background:var(--card);
border:1px solid var(--border);
border-radius:20px;
overflow:hidden;
transition:.3s;
}

.product-card:hover{
transform:translateY(-8px);
border-color:#444;
}

.product-card img{
width:100%;
height:240px;
object-fit:cover;
}

.product-info{
padding:22px;
}

.product-info h3{
margin-bottom:10px;
}

.price{
font-size:2rem;
font-weight:700;
margin-bottom:15px;
}

.product-info p{
color:#bdbdbd;
margin-bottom:6px;
}

.actions{
display:flex;
gap:10px;
margin-top:20px;
}

.edit-btn,
.delete-btn{
flex:1;
border:none;
padding:12px;
border-radius:12px;
cursor:pointer;
font-weight:700;
}

.edit-btn{
background:white;
color:black;
}

.delete-btn{
background:var(--danger);
color:white;
}

.table-card{
background:var(--card);
border:1px solid var(--border);
border-radius:20px;
padding:25px;
overflow-x:auto;
}

.table-card h2{
margin-bottom:20px;
}

table{
width:100%;
border-collapse:collapse;
}

th,
td{
padding:15px;
text-align:left;
border-bottom:1px solid #222;
}

th{
color:#999;
}

.summary-list p{
padding:14px 0;
border-bottom:1px solid #222;
color:#bbb;
}

.summary-list span{
float:right;
color:white;
font-weight:bold;
}

.status-badge{
padding:6px 10px;
border-radius:20px;
font-size:.85rem;
font-weight:bold;
}

.status-pending{
background:#ffc107;
color:#000;
}

.status-processing{
background:#2196f3;
color:white;
}

.status-shipped{
background:#9c27b0;
color:white;
}

.status-delivered{
background:#4caf50;
color:white;
}

.status-cancelled{
background:#f44336;
color:white;
}

.status-select,
.product-info select{
width:100%;
padding:12px;
margin-top:8px;
background:#000;
color:white;
border:1px solid #333;
border-radius:10px;
}

.modal{
display:none;
position:fixed;
inset:0;
background:rgba(0,0,0,.85);
justify-content:center;
align-items:center;
z-index:9999;
}

.modal-content{
width:90%;
max-width:700px;
background:#111;
border:1px solid #333;
border-radius:20px;
padding:30px;
animation:fadeUp .3s ease;
}

.modal-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:20px;
}

.close-btn{
width:40px;
height:40px;
border:none;
border-radius:10px;
background:var(--danger);
color:white;
cursor:pointer;
}

.form-grid{
display:grid;
gap:12px;
}

.form-grid input{
padding:14px;
background:#000;
border:1px solid #333;
border-radius:12px;
color:white;
}

.form-grid input:focus{
outline:none;
border-color:#555;
}

.login-container{
min-height:100vh;
display:flex;
justify-content:center;
align-items:center;
padding:20px;
}

.login-card{
width:100%;
max-width:500px;
background:#111;
border:1px solid #222;
border-radius:24px;
padding:40px;
text-align:center;
animation:fadeUp .5s ease;
}

.login-logo{
width:100px;
height:100px;
border-radius:50%;
object-fit:cover;
margin-bottom:20px;
}

.login-card h1{
margin-bottom:10px;
}

.login-card p{
color:#999;
margin-bottom:25px;
}

.login-card input{
width:100%;
padding:15px;
margin-bottom:15px;
background:#000;
border:1px solid #333;
border-radius:12px;
color:white;
}

.login-card button{
width:100%;
padding:15px;
border:none;
border-radius:12px;
background:white;
color:black;
font-weight:700;
cursor:pointer;
}

#message{
margin-top:15px;
color:#ff4d4d;
}

@media(max-width:1000px){
.dashboard-grid{
grid-template-columns:1fr;
}
}

@media(max-width:900px){

.dashboard{
flex-direction:column;
}

.sidebar{
width:100%;
min-width:100%;
height:auto;
position:relative;
border-right:none;
border-bottom:1px solid #222;
}

.main{
padding:20px;
}

.page-header{
flex-direction:column;
align-items:flex-start;
}

.products-grid{
grid-template-columns:1fr;
}

.stats-grid{
grid-template-columns:1fr;
}

footer{
margin-top:40px;
padding:30px;
text-align:center;
border-top:1px solid #222;
background:#0a0a0a;
}

footer p{
color:#777;
margin-bottom:10px;
}

.admin-footer-link{
color:#999;
text-decoration:none;
transition:.25s;
}

.admin-footer-link:hover{
color:white;
}

}