:root {
  --primary-color: #2563eb;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success-color: #16a34a;
  --danger-color: #dc2626;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

/* Header Navbar */
#navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #0f172a;
  color: #fff;
  padding: 1rem 2rem;
}

.navbar-compact {
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
}

.brand-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-main {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.auth-card .brand-main {
  color: #0f172a !important;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.brand-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: #38bdf8;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #ffffff;
}

/* Base Layout Containers */
.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.app-layout {
  display: flex;
  min-height: calc(100vh - 55px);
}

.main-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.section-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

input, select, textarea {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.95rem;
}

/* Pill Select Dropdown */
.type-filter-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #334155;
}

.type-filter-wrap label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e293b;
}

.type-filter-wrap select {
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.35rem 2rem 0.35rem 0.85rem;
  font-size: 0.88rem;
  color: #0f172a;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%3C475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.type-filter-wrap select:focus {
  border-color: #2563eb;
}

/* Buttons */
.btn {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-secondary { background-color: #64748b; color: white; }
.btn-danger { background-color: var(--danger-color); color: white; }
.btn-logout { background-color: #fee2e2; color: #991b1b; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.85rem; }
.btn-outline-sm {
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: #334155;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.78rem;
}

.btn-text-sm {
  border: none;
  background: transparent;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.75rem;
}

/* Utilities */
.hidden { display: none !important; }
.error-msg { color: var(--danger-color); font-size: 0.9rem; margin-top: 0.5rem; }
.sub-text {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0.15rem 0 0 0;
}


/* Smooth transition for all buttons */
.btn {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Primary Button (+ Add New Task, Modify Task, Create Task) */
.btn-primary { 
  background-color: var(--primary-color); 
  color: white; 
}
.btn-primary:hover { 
  background-color: #1d4ed8; 
}

/* Secondary Button (Cancel, Prev/Next Month) */
.btn-secondary { 
  background-color: #64748b; 
  color: white; 
}
.btn-secondary:hover { 
  background-color: #475569; 
}

/* Danger Button (Delete Task) */
.btn-danger { 
  background-color: var(--danger-color); 
  color: white; 
}
.btn-danger:hover { 
  background-color: #b91c1c; 
}

/* Logout Button */
.btn-logout { 
  background-color: #fee2e2; 
  color: #991b1b; 
}
.btn-logout:hover { 
  background-color: #fecaca; 
  color: #7f1d1d; 
}

/* Outline Button (Details, View Enrolled Students) */
.btn-outline-sm {
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: #334155;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.78rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-outline-sm:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Text Button (Sidebar All filter) */
.btn-text-sm {
  border: none;
  background: transparent;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.75rem;
  transition: color 0.15s ease;
}
.btn-text-sm:hover {
  color: #1d4ed8;
  text-decoration: underline;
}