header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #f0f0f1;
  border-bottom: 1px solid #dcdcde;
  font-family: sans-serif;
}
.site-title {
  font-size: 16px;
  font-weight: 600;
  color: #23282d;
}
h1, h2, h3, h4, h5, h6{
  font-weight:700!important;   
}
 /* ===========
       Base & Theme
   =========== */
:root{
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-primary: #2563eb;   /* blue-600 */
  --color-primary-hover: #1e4fd5;
  --color-secondary: #10b981;
  --color-secondary-hover: #059669;
  --color-text: #0f172a;      /* slate-900 */
  --color-muted: #64748b;     /* slate-500 */
  --color-border: #e2e8f0;    /* slate-200 */
  --color-accent: #ef4444;    /* red-500 for alerts */
  --sidebar-width: 260px;
  --topbar-height: 56px;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(15,23,42,0.08);
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--color-text);
  background: var(--color-bg);
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

/* ===========
   Layout
   =========== */
header.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand .logo {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.brand .system-name {
  font-size: 16px;
}

.top-actions {
  display: flex; align-items: center; gap: 12px;
}
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
}
.btn-icon:hover { background: #f9fafb; }
.btn-container{
    display:flex;
    flex-direction:row;
    justify-content:center;
    align-items:center;
    gap:20px;
}

.btn-container .btn-primary, .btn-container .btn-secondary, .btn-container .btn-tertiary{
    width:auto;
}
.btn-container .btn-back{
    padding:0.75rem;
}
.user-menu {
  position: relative;
  cursor: pointer;
  font-size: 14px;
  color: #23282d;
}
.user-menu-name {
  padding: 6px 10px;
  border-radius: 3px;
}
.user-menu:hover .user-menu-dropdown {
  display: block;
}
.user-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  min-width: 150px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  z-index: 999;
}
.user-menu-dropdown a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: #23282d;
}
.user-menu-dropdown a:hover {
  background: #f6f7f7;
}
.user-menu:hover { background: #f9fafb; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #e0e7ff; /* indigo-100 */
  color: #3730a3;      /* indigo-800 */
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.username { font-weight: 600; }
.caret { font-size: 12px; color: var(--color-muted); }

.dropdown {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 6px);
  width: 180px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 1001;
}
.user-menu:hover .dropdown,
.user-menu:focus-within .dropdown { display: block; }
.dropdown a {
  display: block; padding: 10px 12px; color: var(--color-text);
}
.dropdown a:hover { background: #f8fafc; }

aside.sidebar {
  position: fixed;
  top: var(--topbar-height); left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 14px;
  overflow-y: auto;
  z-index: 900;
  transition: transform .25s ease;
}
.sidebar .section-label {
  font-size: 12px;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 6px 8px 10px;
}
.nav-item {
  margin: 2px 0;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-text);
}
.nav-link:hover { background: #f1f5f9; }
.nav-link.active {
  background: #eaf2ff;
  color: var(--color-primary);
  font-weight: 600;
  border: 1px solid #dbeafe;
}
.nav-icon {
  width: 20px; height: 20px; border-radius: 4px;
  background: #e2e8f0;
}

main.content, footer {
  position: relative;
  margin-top: 0px;
  margin-left: var(--sidebar-width);
  padding: 22px;
  min-height: calc(100vh - var(--topbar-height) - 60px);
}
.page {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}
.page-title { font-size: 20px; font-weight: 700; }
.page-tools { display: flex; gap: 8px; }
.btn {
  padding: 8px 12px; border: 1px solid var(--color-border);
  border-radius: 8px; background: var(--color-surface); cursor: pointer;
}
.btn.primary {
  background: var(--color-primary); color: #fff; border-color: var(--color-primary);
}
.btn.primary:hover { background: var(--color-primary-hover); }

footer.footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 44px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--color-muted);
  z-index: 800;
}

/* ===========
   Responsive
   =========== */
@media (max-width: 1024px) {
  aside.sidebar {
    transform: translateX(-100%);
  }
  aside.sidebar.open {
    transform: translateX(0);
  }
  main.content, footer {
    margin-left: 0;
  }
  .brand .system-name { font-size: 15px; }
}

.crs-dashboard-container {
    display: flex;
    min-height: 80vh;
    flex-direction:column;
}
.crs-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #1e1e2f;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.crs-header .site-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.crs-header .user-info {
    font-size: 14px;
}

.crs-dashboard-title {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
}

.crs-dashboard-column{
    display:flex;
    flex-direction:column;
    gap:20px;
}
.crs-summary-cards {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.crs-summary-card {
    flex: 1;
    min-width: 180px;
    background: var(--color-primary-hover);
    color: #fff;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.crs-summary-card .number {
    font-size: 2rem;
    margin: 0;
}
.crs-summary-card p {
    margin: 0.3rem 0 0;
    font-size: 0.95rem;
}
.crs-dashboard-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr 1fr;
}
.crs-course-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.crs-course-card h4 {
    margin-top: 0;
    color: #222;
}
.crs-course-card .button {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 10px;
}
.crs-course-card .button:hover {
    background: #005177;
}

/* Notification */
.crs-notice {
  margin: 15px 0;
  padding: 12px 18px;
  border-radius: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 1;
  transition: opacity .3s ease;
}

.crs-notice.success {
  background: #e6f7e9;
  border-left: 4px solid #28a745;
  color: #155724;
}

.crs-notice.error {
  background: #fdecea;
  border-left: 4px solid #dc3545;
  color: #721c24;
}

.crs-notice.warning {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  color: #856404;
}

/* Fade-out effect when JS removes it */
.crs-notice.hide {
    opacity: 0;
}

.number{
    font-weight:700;
}

/* Manage Course */
.manage-course-marks{
    margin-top:20px;
}

/* Login Form */
.login-form-wrapper{
    margin: 0;
    background: #f5f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-container {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-header h1 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    font-size: 0.9rem;
    color: #64748b;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input, .form-group select {
    width: 100%;
    margin-top:10px;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input[type="checkbox"]{
    display:inline-block;
    width:auto;
}

.form-group input[name="rememberme"]{
    display:inline-block;
    float:left;
    margin-right:10px;
    margin-top:7px;
}

.form-group input[type="file"]{
    max-width:300px;
}

.form-group input:focus {
    border-color: var(--color-border);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.button{
    width: auto;
    color:black;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--color-primary);   
    color: #fff;

}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-secondary{
    background: var(--color-secondary);
    color:#ffffff;
}

.btn-secondary:hover{
    background: var(--color-secondary-hover);
}

.btn-tertiary{
    background:transparent;
    color:black;
    border:1px solid black;
}

.btn-tertiary:hover{
    background:black;
    color:white;
}

.btn-upload-marks, .btn-upload{
    max-width:80px;
}

.btn-danger{
    width: 100%;
    padding: 0.75rem;
    background: #ff0000;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover{
    background-color:#d80000;
}

.login-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.login-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Table */
/* Base table styling */
table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  color: #0f172a; /* dark text */
}

/* Table header */
thead {
  background-color: #f8fafc; /* light gray background */
}

thead th {
  text-align: left;
  padding: 12px;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
}

/* Table body rows */
tbody tr {
  border-bottom: 1px solid #e2e8f0;
}

tbody td {
  padding: 12px;
}

/* Hover effect for rows */
tbody tr:hover {
  background-color: #f1f5f9;
}

/* Zebra striping */
tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

/* Highlight selected row (optional) */
tbody tr.selected {
  background-color: #eaf2ff; /* light blue */
}

/* Responsive overflow */
.table-container {
  overflow-x: auto;
}

/* Optional: Add primary color for header border */
thead th {
  border-bottom: 2px solid #2563eb;
}

table tr td .highlight{
    color:var(--color-primary);
    text-decoration:underline;
}

table tr td .highlight:hover{
    color:var(--color-primary-hover);
    text-decoration:underline;
}

.crs-action-menu {
    position: relative;
    display: inline-block;
}

.crs-action-dots {
    cursor: pointer;
    font-size: 22px;
    padding: 5px;
    line-height: 1;
    user-select: none;
}

.crs-action-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 25px;
    background: #fff;
    border: 1px solid #ddd;
    min-width: 150px;
    z-index: 9999;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.crs-action-dropdown a,
.crs-action-dropdown .dropdown-button-link {
    display: block;
    padding: 10px 14px;
    color: #333;
    text-decoration: none;
    border: 0;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}

.crs-action-dropdown a:hover,
.crs-action-dropdown .dropdown-button-link:hover {
    background: #f2f2f2;
}


/* User Not Login */
.crs-not-logged-in {
    display: flex;
    justify-content: center;
    padding: 40px 0;
    align-items: center;
    height: 100vh;
}
.crs-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}
.crs-title {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 700;
}
.crs-text {
    margin-bottom: 20px;
    color: #555;
    font-size: 16px;
}
.crs-btn-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.crs-btn {
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    display: inline-block;
}
.crs-btn-primary {
    background: #2271b1;
    color: #fff;
}
.crs-btn-secondary {
    background: #f0f0f0;
    color: #333;
}
.crs-btn:hover {
    opacity: 0.9;
}

.flex{
    display:flex;
}

.flex-col{
    flex-direction:column;
}

.gap-10{
    gap:10px;
}

.jc-center{
    justify-content:center;
}