:root {
    --bg-color: #f0f2f5;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #2d3436;
    --text-muted: #636e72;
    --primary: #6c5ce7;
    --primary-hover: #5b4bc4;
    --green: #00b894;
    --yellow: #fdcb6e;
    --red: #ff7675;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="dark"] {
    --bg-color: #1e272e;
    --card-bg: rgba(45, 52, 54, 0.95);
    --text-main: #f5f6fa;
    --text-muted: #dcdde1;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; }

body { background: var(--bg-color); color: var(--text-main); transition: var(--transition); min-height: 100vh; }

/* Navbar */
.navbar { display: flex; justify-content: space-between; padding: 1.2rem 3rem; background: var(--card-bg); backdrop-filter: blur(10px); box-shadow: 0 4px 15px rgba(0,0,0,0.05); align-items: center; position: sticky; top: 0; z-index: 100; }
.navbar h1 { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.nav-controls { display: flex; gap: 1.5rem; align-items: center; }
.target-box { display: flex; align-items: center; gap: 0.5rem; background: var(--bg-color); padding: 0.5rem 1rem; border-radius: 10px; font-weight: 500; }
.target-box input { width: 50px; background: transparent; border: none; outline: none; color: var(--text-main); font-weight: 700; text-align: center; font-size: 1rem; }

/* Layout */
.container { padding: 2rem 3rem; max-width: 1400px; margin: auto; }
.card { background: var(--card-bg); border-radius: var(--border-radius); padding: 1.8rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; backdrop-filter: blur(10px); transition: var(--transition); border: 1px solid rgba(255,255,255,0.1); }
.card:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }

/* Dashboard Grids */
.dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.grid-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; margin-bottom: 2rem; }

/* Stat Cards */
.primary-gradient { background: linear-gradient(135deg, var(--primary), #a29bfe); color: white; }
.primary-gradient h3, .primary-gradient h2 { color: white; }
.primary-gradient .progress-bar { background: rgba(255,255,255,0.3); }
.stat-card h3 { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1rem; font-weight: 500; }
.stat-card h2 { font-size: 2.5rem; font-weight: 700; }
.stat-details p { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text-muted); }
.stat-details strong { color: var(--text-main); font-size: 1.2rem; }

/* Progress Bar */
.progress-bar { width: 100%; height: 12px; background: var(--bg-color); border-radius: 10px; overflow: hidden; margin-top: 15px; }
.progress { height: 100%; transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s; border-radius: 10px; }

/* Typography & Headers */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 2px solid var(--bg-color); padding-bottom: 0.8rem; }
.section-header h2 { font-size: 1.3rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.badge { background: var(--primary); color: white; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.9rem; font-weight: 500; }

/* Buttons */
.btn { padding: 0.6rem 1.2rem; border: none; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 0.9rem; transition: var(--transition); display: flex; align-items: center; gap: 0.5rem; justify-content: center; color: white; }
.btn.success { background: var(--green); }
.btn.danger { background: var(--red); }
.btn.warning { background: var(--yellow); color: #2d3436; width: 100%; margin-top: 1rem; }
.btn:hover { filter: brightness(1.1); transform: scale(1.05); }
.icon-btn { background: none; border: none; font-size: 1.5rem; color: var(--text-main); cursor: pointer; transition: var(--transition); }
.icon-btn:hover { color: var(--primary); transform: rotate(15deg); }
.btn-group { display: flex; gap: 0.8rem; }

/* Subject Cards */
.subjects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.subject-card { border: 1px solid rgba(108, 92, 231, 0.1); padding: 1.5rem; border-radius: 16px; background: var(--bg-color); transition: var(--transition); }
.subject-card:hover { border-color: var(--primary); }
.subject-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.subject-header h3 { font-size: 1.2rem; margin: 0; }
.subject-card p { color: var(--text-muted); font-weight: 500; margin-bottom: 1rem; }
.status-text { font-size: 0.85rem; font-weight: 600; padding: 0.8rem; border-radius: 10px; background: var(--card-bg); color: var(--text-main); display: flex; align-items: center; gap: 0.5rem; }

/* Toast Notification */
.toast { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); background: var(--green); color: white; padding: 1rem 2rem; border-radius: 30px; font-weight: 600; box-shadow: 0 10px 20px rgba(0,184,148,0.3); transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.26, 1.55); z-index: 1000; }
.toast.show { bottom: 30px; }

/* Responsive */
@media (max-width: 900px) {
    .grid-layout { grid-template-columns: 1fr; }
    .container { padding: 1rem; }
    .navbar { padding: 1rem; }
}