/* ==========================
   MAANVI ERP V2
========================== */

*{
margin:0;
padding:0;
box-sizing:border-box;
}

body{
font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;
background:#edf2f8;
color:#1f2937;
}

/* SIDEBAR */

.sidebar{
position:fixed;
left:0;
top:0;
width:200px;
height:100vh;
background:#162554;
overflow:auto;
scrollbar-width:thin;
}

.sidebar::-webkit-scrollbar{
width:6px;
}

.sidebar::-webkit-scrollbar-thumb{
background:#475569;
border-radius:20px;
}

.logo{
position:sticky;
top:0;
background:#162554;
z-index:10;
display:flex;
align-items:center;
gap:15px;
padding:20px;
color:#fff;
border-bottom:1px solid rgba(255,255,255,.08);
}

.logo-icon{
width:48px;
height:48px;
background:#2563eb;
border-radius:12px;
display:flex;
align-items:center;
justify-content:center;
font-size:20px;
}

.logo strong{
font-size:16px;
}

.logo small{
color:#cbd5e1;
}

.sidebar a{
display:flex;
align-items:center;
gap:15px;
padding:16px 22px;
color:#dbeafe;
text-decoration:none;
transition:.25s;
font-weight:600;
}

.sidebar a:hover{
background:#2563eb;
color:#fff;
}

.sidebar i{
width:22px;
text-align:center;
}

.active{
background:#2563eb!important;
color:#fff!important;
border-left:5px solid #60a5fa;
}

.active i{
color:#fff;
}

/* MAIN */

.main-content{
margin-left:200px;
min-height:100vh;
}

/* TOPBAR */

.topbar{
background:#fff;
height:60px;
display:flex;
align-items:center;
justify-content:space-between;
padding:0 30px;
box-shadow:0 5px 18px rgba(0,0,0,.05);
}

.topbar h2{
font-size:28px;
color:#162554;
}

.user-info{
display:flex;
align-items:center;
gap:10px;
font-weight:600;
}

.user-info small{
color:#64748b;
font-size:12px;
}

/* CONTENT */

.wrap{
padding:22px;
}

.page-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:20px;
}

.page-header h1{
font-size:44px;
margin-bottom:8px;
color:#162554;
}

.page-header p{
color:#64748b;
margin-top:6px;
}

/* GRID */

.grid{
display:grid;
grid-template-columns:repeat(4,minmax(0,1fr));
gap:16px;
margin-bottom:20px;
}

@media(max-width:1200px){
.grid{
grid-template-columns:repeat(2,1fr);
}
}

@media(max-width:768px){
.grid{
grid-template-columns:1fr;
}
}

/* CARD */

.card{
background:#fff;
border-radius:12px;
padding:18px;
border:1px solid #edf2f7;
box-shadow:none;
margin-bottom: 20px;
}

.card h2{
font-size:18px;
margin-bottom:15px;
font-weight:600;
}

/* KPI */

.stat{
border-left:5px solid #2563eb;
height:105px;
padding:16px;
display:flex;
flex-direction:column;
justify-content:center;
transition:.25s;
}

.stat:hover{
transform:translateY(-3px);
box-shadow:0 10px 24px rgba(0,0,0,.12);
}

.stat h2{
font-size:15px;
font-weight:600;
margin-bottom:12px;
color:#374151;
}

.stat p{
font-size:24px;
font-weight:700;
color:#2563eb;
margin-top:8px;
}

.blue{ border-left:5px solid #2563eb; }
.green{ border-left:5px solid #16a34a; }
.orange{ border-left:5px solid #ea580c; }
.red{ border-left:5px solid #dc2626; }

/* BUTTONS */

.btn, button {
display:inline-flex;
align-items:center;
justify-content:center;
padding:10px 18px;
border-radius:8px;
background:#2563eb;
color:#fff;
text-decoration:none;
font-size:14px;
font-weight:600;
border:none;
cursor:pointer;
transition:.2s;
font-family:inherit;
}

.btn:hover, button:hover {
background:#1d4ed8;
}

.btn.danger {
background:#dc2626;
}

.btn.danger:hover {
background:#b91c1c;
}

.btn i{
margin-right: 6px;
}

/* ===========================
   FORMS & INPUTS
=========================== */

.row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
margin-bottom: 20px;
}

.row div {
display: flex;
flex-direction: column;
}

label {
font-weight: 600;
margin-bottom: 6px;
font-size: 13px;
color: #475569;
}

input, select, textarea {
padding: 10px 14px;
border: 1px solid #d1d5db;
border-radius: 8px;
font-size: 14px;
font-family: inherit;
background: #fff;
color: #1f2937;
transition: 0.2s;
width: 100%;
outline: none;
box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.muted {
color: #64748b;
font-size: 13px;
margin-bottom: 15px;
display: block;
}

/* ===========================
   TABLES
=========================== */

.table-wrap{
max-height:420px;
overflow:auto;
}

table{
width:100%;
border-collapse:collapse;
font-size:14px;
}

thead{
background:#eff6ff;
}

th{
padding:12px;
font-weight:700;
text-align: left;
}

td{
padding:12px;
border-bottom:1px solid #edf2f7;
vertical-align:middle;
}

tbody tr{
transition:.2s;
}

tbody tr:hover{
background:#f8fafc;
}

/* ===========================
   PRODUCTS PAGE
=========================== */

.toolbar{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:15px;
}

.toolbar input{
width:320px;
max-width:100%;
}

.stock{
display:inline-block;
padding:5px 10px;
border-radius:20px;
font-size:13px;
font-weight:700;
color:#fff;
min-width:45px;
text-align:center;
}

.stock.success{ background:#16a34a; }
.stock.warning{ background:#f59e0b; }
.stock.danger{ background:#dc2626; }

#productTable td:nth-child(4),
#productTable td:nth-child(5),
#productTable td:nth-child(6),
#productTable td:nth-child(7){
font-weight:600;
}

/* CHART */

canvas{
width:100%!important;
height:250px!important;
}

/* MOBILE */

@media(max-width:900px){
.sidebar{
width:70px;
}

.logo strong,
.logo small,
.sidebar span{
display:none;
}

.logo{
justify-content:center;
}

.sidebar a{
padding:13px 18px;
font-size:15px;
}

.main-content{
margin-left:70px;
}

.topbar{
height:58px;
padding:0 24px;
background:#fff;
border-bottom:1px solid #e5e7eb;
box-shadow:none;
}

.page-header h1{
font-size:28px;
font-weight:700;
}

.wrap{
padding:20px;
}
}