/* ================= ROOT ================= */

:root{
--primary:#0b5ed7;
--bg:#f4f6f9;
--card:#ffffff;
--text:#111827;
--border:#e5e7eb;
}

body.dark{
--bg:#0f172a;
--card:#1e293b;
--text:#f1f5f9;
--border:#334155;
}

/* ================= BASE ================= */

*{
box-sizing:border-box;
font-family:Segoe UI,Arial;
}

body{
margin:0;
background:var(--bg);
color:var(--text);
}

/* ================= APP LAYOUT ================= */

.app{
display:flex;
min-height:100vh;
}

/* ================= SIDEBAR ================= */
.sidebar{
transition:0.3s ease;
}

.sidebar{
width:230px;
background:var(--primary);
color:white;
padding:15px;
position:fixed;
top:0;
bottom:0;
left:0;
}

.sidebar .brand{
display:flex;
align-items:center;
gap:10px;
margin-bottom:20px;
}

.sidebar .brand img{
width:42px;
height:auto;
}

.sidebar a{
display:block;
color:white;
padding:10px;
border-radius:8px;
text-decoration:none;
margin-bottom:6px;
}

.sidebar a:hover{
background:rgba(255,255,255,.15);
}

/* ================= MAIN ================= */

.main{
margin-left:230px;
flex:1;
}

/* ================= TOPBAR ================= */

.topbar{
height:60px;
background:var(--card);
display:flex;
align-items:center;
justify-content:space-between;
padding:0 20px;
border-bottom:1px solid var(--border);
}

/* ================= BUTTON ================= */

.btn{
background:var(--primary);
color:white;
border:none;
padding:8px 14px;
border-radius:8px;
cursor:pointer;
}

/* ================= DASHBOARD ================= */

.grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:15px;
padding:20px;
}

.card{
background:var(--card);
padding:18px;
border-radius:12px;
box-shadow:0 4px 10px rgba(0,0,0,.05);
}

/* ================= LOGIN PAGE ================= */

.login-page{
display:flex;
align-items:center;
justify-content:center;
height:100vh;
background:linear-gradient(120deg,#0b5ed7,#2563eb);
}

.login-box{
background:white;
width:340px;
padding:25px;
border-radius:14px;
box-shadow:0 10px 25px rgba(0,0,0,.2);
text-align:center;
}

.login-box img{
width:70px;
margin-bottom:10px;
}

.login-box h2{
margin:10px 0 5px;
}

.login-box p{
font-size:13px;
color:#666;
margin-bottom:15px;
}

.login-box input{
width:100%;
padding:10px;
margin-bottom:12px;
border-radius:8px;
border:1px solid #ddd;
}

.login-box button{
width:100%;
padding:10px;
border:none;
border-radius:8px;
background:#0b5ed7;
color:white;
font-weight:bold;
}

/* ================= MOBILE ================= */

.menu-btn{display:none;font-size:22px;}

@media(max-width:900px){

.sidebar{
left:-240px;
transition:.3s;
}

.sidebar.active{
left:0;
}

.main{
margin-left:0;
}

.menu-btn{
display:block;
}

.login-box{
width:90%;
}
}
/* ===== TOPBAR ===== */

.left-top{
display:flex;
align-items:center;
gap:10px;
}

.right-top{
display:flex;
align-items:center;
gap:15px;
}

/* ===== NOTIFICATION ===== */

.notify-box{
position:relative;
cursor:pointer;
}

.notify-box i{
font-size:18px;
}

.badge{
position:absolute;
top:-6px;
right:-6px;
background:red;
color:white;
font-size:11px;
padding:2px 6px;
border-radius:50%;
}

.notify-panel{
position:absolute;
top:65px;
right:20px;
background:var(--card);
width:260px;
border-radius:10px;
box-shadow:0 6px 15px rgba(0,0,0,.15);
display:none;
z-index:999;
}

.notify-panel.show{
display:block;
}

.notify-item{
padding:10px;
border-bottom:1px solid var(--border);
}

.notify-item small{
display:block;
opacity:.6;
font-size:12px;
}

/* ===== DASHBOARD ANIMATION ===== */

.card{
transition:0.25s ease;
cursor:pointer;
}

.card:hover{
transform:translateY(-5px);
box-shadow:0 10px 20px rgba(0,0,0,.12);
}

/* ===== CARD NUMBER STYLE ===== */

.card h3{
margin:0;
font-size:18px;
}

.card span{
font-size:28px;
font-weight:bold;
display:block;
margin-top:6px;
color:var(--primary);
}

/* ===== ACTIVE MENU ===== */

.sidebar a.active{
background:rgba(255,255,255,.2);
font-weight:600;
}
/* ===== GLOBAL SEARCH ===== */

.search-box{
position:relative;
}

.search-box input{
padding:7px 10px;
border-radius:8px;
border:1px solid var(--border);
background:var(--card);
color:var(--text);
width:200px;
}

#searchResults{
position:absolute;
top:40px;
left:0;
width:100%;
background:var(--card);
border-radius:8px;
box-shadow:0 6px 15px rgba(0,0,0,.15);
display:none;
max-height:260px;
overflow-y:auto;
z-index:999;
}

.result-item{
padding:8px 10px;
border-bottom:1px solid var(--border);
cursor:pointer;
font-size:13px;
}

.result-item:hover{
background:rgba(0,0,0,.05);
}

/* Mobile */

@media(max-width:900px){
.search-box input{
width:130px;
}
}

/* ===== LOADER ===== */

#loader{
position:fixed;
top:0;
left:0;
right:0;
bottom:0;
background:var(--bg);
display:flex;
align-items:center;
justify-content:center;
z-index:9999;
}

.spinner{
width:40px;
height:40px;
border:4px solid #ccc;
border-top:4px solid var(--primary);
border-radius:50%;
animation:spin 1s linear infinite;
}

@keyframes spin{
0%{transform:rotate(0deg);}
100%{transform:rotate(360deg);}
}

/* ===== GLASS MODE ===== */

body.glass .topbar,
body.glass .card,
body.glass .sidebar{
background:rgba(255,255,255,0.18);
backdrop-filter:blur(12px);
border:1px solid rgba(255,255,255,0.2);
}

body.dark.glass .topbar,
body.dark.glass .card,
body.dark.glass .sidebar{
background:rgba(30,41,59,0.65);
}

/* ===== TOAST ===== */

#toastBox{
position:fixed;
bottom:20px;
right:20px;
z-index:99999;
}

.toast{
background:var(--primary);
color:white;
padding:12px 15px;
border-radius:10px;
margin-top:10px;
min-width:260px;
box-shadow:0 6px 15px rgba(0,0,0,.25);
animation:slideIn .4s ease;
}

.toast small{
display:block;
opacity:.8;
margin-top:5px;
}

@keyframes slideIn{
from{transform:translateX(100%);}
to{transform:translateX(0);}
}

.pipeline{
display:flex;
gap:15px;
padding:20px;
}

.stage{
background:var(--card);
flex:1;
padding:10px;
border-radius:10px;
min-height:300px;
}

.kanban{
background:var(--primary);
color:white;
padding:8px;
border-radius:6px;
margin-top:8px;
cursor:grab;
}

.notify-clear{
display:block;
text-align:center;
padding:8px;
cursor:pointer;
color:var(--primary);
}
.notify-panel{
position:absolute;
top:70px;
right:20px;
width:300px;
background:var(--card);
border-radius:12px;
box-shadow:0 10px 25px rgba(0,0,0,.2);
display:none;
z-index:9999;
overflow:hidden;
}

.notify-panel.show{
display:block;
}

.notify-item{
padding:12px;
border-bottom:1px solid var(--border);
}

.notify-item b{
font-size:14px;
display:block;
}

.notify-item small{
font-size:12px;
opacity:.7;
}

.notify-clear{
display:block;
padding:10px;
text-align:center;
cursor:pointer;
color:var(--primary);
font-weight:600;
}

.notify-item b{
font-size:13px;
}

.notify-item[data-cat="HR"]{border-left:4px solid #0b5ed7;}
.notify-item[data-cat="Sales"]{border-left:4px solid #198754;}
.notify-item[data-cat="Finance"]{border-left:4px solid #dc3545;}

.notify-panel{
position:absolute;
top:60px;
right:20px;
width:300px;
background:#fff;
border-radius:10px;
box-shadow:0 6px 15px rgba(0,0,0,.2);
display:none;
z-index:999;
}

.notify-panel.show{
display:block;
}

.notify-item{
padding:10px;
border-bottom:1px solid #eee;
}

.notify-item[data-cat="HR"]{border-left:4px solid blue;}
.notify-item[data-cat="Sales"]{border-left:4px solid green;}
.notify-item[data-cat="Finance"]{border-left:4px solid red;}

.badge{
background:red;
color:#fff;
padding:2px 6px;
border-radius:50%;
font-size:12px;
}

