*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:"Segoe UI",sans-serif;
}

/* layout */

.layout{
display:flex;
min-height:100vh;
}

/* sidebar */

.sidebar{
width:220px;
background:#111827;
color:white;
padding:20px;
}

.sidebar h2{
margin-bottom:30px;
}

.sidebar ul{
list-style:none;
}

.sidebar li{
padding:12px;
cursor:pointer;
border-radius:6px;
margin-bottom:6px;
}

.sidebar li:hover{
background:#374151;
}

/* main */

.main{
flex:1;
background:#f3f4f6;
padding:25px;
}

/* header */

.header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:20px;
}

.header button{
padding:8px 12px;
border:none;
background:#111827;
color:white;
border-radius:6px;
cursor:pointer;
}

/* cards */

.card{
background:white;
padding:20px;
border-radius:10px;
box-shadow:0 5px 20px rgba(0,0,0,0.1);
margin-bottom:20px;
}

.card h3{
margin-bottom:15px;
}

/* form */

input{
width:100%;
padding:10px;
margin-bottom:10px;
border:1px solid #ccc;
border-radius:6px;
}

button{
padding:10px;
border:none;
border-radius:6px;
background:#2563eb;
color:white;
cursor:pointer;
}

button:hover{
background:#1d4ed8;
}

/* tables */

table{
width:100%;
border-collapse:collapse;
margin-top:15px;
}

th,td{
padding:8px;
border:1px solid #ddd;
text-align:center;
}

th{
background:#2563eb;
color:white;
}

tr:nth-child(even){
background:#f9fafb;
}

/* action buttons */

.actions{
margin-top:15px;
display:flex;
gap:10px;
}

/* dark mode */

.dark{
background:#111827;
color:white;
}

.dark .main{
background:#1f2937;
}

.dark .card{
background:#374151;
color:white;
}

.dark table th{
background:#4b5563;
}

.dragging{
background:#fde68a !important;
}

td{
font-weight:500;
}

td:contains("Maths"){
background:#dbeafe;
}

td:contains("English"){
background:#fef3c7;
}

td:contains("Science"){
background:#dcfce7;
}

td:contains("SST"){
background:#fce7f3;
}

td:contains("Hindi"){
background:#ede9fe;
}

td:contains("Computer"){
background:#cffafe;
}

table{
border-radius:8px;
overflow:hidden;
}

th{
position:sticky;
top:0;
background:#1d4ed8;
}

td{
transition:0.2s;
}

td:hover{
transform:scale(1.05);
background:#fde68a !important;
}

.stats{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
gap:15px;
margin-bottom:20px;
}

.stat-card{
background:white;
padding:20px;
border-radius:10px;
box-shadow:0 5px 15px rgba(0,0,0,0.1);
text-align:center;
}

.stat-card h3{
font-size:28px;
color:#2563eb;
}

.stat-card p{
color:#555;
}

#output{
overflow-x:auto;
}