* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

:root {
  --bg-color: #f5f5f7;
  --input-bg: #ffffff;

  --text-primary: #000000;
  --text-secondary: #3c3c4399;

  --input-border: #d1d1d6;

  --accent-color: #007aff;
  --accent-hover: #006fe6;

  --accent-green: #34c759;
  --accent-green-hover: #28b14b;

  --success-color: #30d158;
  --success-hover: #27b84c;

  --error-color: #ff3b30;
  --error-hover: #e02d24;

  --button-bg: #007aff;
  --button-bg-hover: #006fe6;
  --button-text: #ffffff;
}

.showbuzz {
  color: red;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease-in-out;
}

.showbuzz:hover {
  text-decoration: underline;
  transition: 0.2s ease-in-out;
}

body {
  overflow: hidden;
}

.container {
  height: 100vh;
  width: 100vw;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}

.container h1 {
  text-align: center;
  color: var(--accent-color);
}

.login-box {
  height: 400px;
  width: 400px;
  margin: 0 20px;
  background-color: var(--input-bg);
  border-radius: 12px;
  padding: 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.login-box-heading {
  color: var(--accent-color);
  font-size: large;
  display: flex;
  justify-content: center;
}

.login-box-userid h3 {
  color: var(--text-secondary);
  font-size: large;
  margin-bottom: 4px;
}

.login-box-userid input {
  width: 100%;
  height: 44px;
  padding: 12px 16px;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

.login-box-userid input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

.login-box-userpass h3 {
  color: var(--text-secondary);
  font-size: large;
  margin-bottom: 4px;
}

.login-box-userpass input {
  width: 100%;
  height: 44px;
  padding: 12px 16px;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

.login-box-userpass input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

.login-box-button button {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: none;
  font-size: 1.0625rem;
  background-color: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.login-box-button button:hover {
  background-color: var(--button-bg-hover);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.login-footer {
  width: 100%;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
  font-size: medium;
}

.login-footer a {
  text-decoration: none;
  color: #ff3b30;
}

.footer {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
  font-size: medium;
  margin-top: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.footer p {
  font-size: small;
  font-weight: 500;
  color: #aaa;
}

.footer a {
  text-decoration: none;
  color: #ff3b30;
}

.dashboard-container {
  height: 100vh;
  width: 100vw;
  display: flex;
}

.side-bar {
  background-color: var(--input-bg);
  width: 17%;
  min-width: 200px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-right: 1px solid var(--input-border);
}

.side-bar-heading {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.side-bar-heading h3 {
  font-size: x-large;
  margin-bottom: 13px;
  color: var(--accent-color);
  cursor: pointer;
}

.side-bar-heading a {
  background-color: var(--bg-color);
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 12px;
  margin: 8px 0;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.side-bar-heading a:hover {
  background-color: var(--button-bg-hover);
  color: var(--button-text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.side-bar-heading a.active {
  background-color: var(--button-bg);
  color: var(--button-text);
  font-weight: 500;
}

.side-bar-footer p {
  font-size: small;
  font-weight: 500;
  color: #aaa;
}

.main-content {
  background-color: var(--bg-color);
  width: 85%;
  height: 100%;
  padding: 20px 35px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar h2 {
  font-size: 22px;
  color: var(--accent-color);
  cursor: pointer;
}

.profile {
  display: flex;
  align-items: center;
  background-color: var(--button-text);
  padding: 6px 12px;
  gap: 10px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dashboard-card {
  background-color: white;
  height: 80%;
  width: 100%;
  margin-top: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dashboard-card h3 {
  font-size: xx-large;
  color: var(--accent-color);
}

.dashboard-card p {
  color: #aaa;
  margin-top: 6px;
  font-size: large;
}

.summary-container {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}

.summary-card {
  background: white;
  flex: 1;
  text-align: center;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.summary-card h4 {
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.summary-card p {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-color);
}

.student-dashboard-card {
  background-color: var(--input-bg);
  height: 80%;
  width: 100%;
  margin-top: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 20px 24px;
}

.topbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.topbar-left {
  flex: 1;
}

.topbar-left input {
  width: 98%;
  min-width: 260px;
  padding: 10px 14px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background-color: var(--input-bg);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all 0.2s ease-in-out;
}

.topbar-left input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
  outline: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-right select {
  padding: 10px 24px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background-color: var(--input-bg);
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: border 0.2s ease;
}

.topbar-right select:focus {
  border-color: var(--accent-color);
  outline: none;
}

.topbar-right button {
  background-color: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 12px;
  padding: 10px 28px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.topbar-right button:hover {
  background-color: var(--button-bg-hover);
}

.student-table {
  flex-grow: 1;
  overflow-y: auto;
  margin-top: 10px;
}

.student-table table {
  width: 100%;
  border-collapse: collapse;
}

.student-table th,
.student-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.student-table th {
  background: #f0f4f8;
}

.student-edit {
  padding: 3px 8px;
  background-color: var(--success-color);
  color: white;
  border: 1px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.student-edit:hover {
  background-color: var(--success-hover);
  transition: 0.2s ease-in-out;
}

.student-delete {
  padding: 3px 8px;
  background-color: var(--error-color);
  color: white;
  border: 1px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.student-delete:hover {
  background-color: var(--error-hover);
  transition: 0.2s ease-in-out;
}

/* Modal backdrop */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: none; /* hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal content box */
.modal-content {
  background-color: var(--input-bg);
  padding: 32px 28px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  width: 360px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  animation: modal-pop 0.25s ease-out;
}

/* Modal pop animation */
@keyframes modal-pop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Modal heading */
.modal-content h3 {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 16px;
  text-align: center;
  font-weight: 600;
}

/* Input fields */
.modal-content input,
.modal-content select {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  outline: none;
  background-color: var(--input-bg);
  color: var(--text-secondary);
  appearance: none; /* remove default dropdown arrow style */
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.2s ease-in-out;
}
.modal-content input:focus,
.modal-content select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 8px rgba(0, 122, 255, 0.2);
  color: var(--text-primary);
}

/* Labels for select fields */
.modal-content label {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: block;
}

/* Modal buttons container */
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Buttons */
.modal-buttons button {
  padding: 10px 24px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

/* Save button */
#modal-save {
  background-color: var(--button-bg);
  color: var(--button-text);
}

#modal-save:hover {
  background-color: var(--button-bg-hover);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Cancel button */
#modal-cancel {
  background-color: #e0e0e0;
  color: #333;
}

#modal-cancel:hover {
  background-color: #d1d1d6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Chrome, Safari, Edge, Opera */
#modal-marks::-webkit-outer-spin-button,
#modal-marks::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
#modal-marks[type="number"] {
  -moz-appearance: textfield;
}

#delete-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: none; /* hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#delete-modal .modal-content {
  background-color: var(--input-bg);
  padding: 28px 24px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  width: 360px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modal-pop 0.25s ease-out;
}

#delete-modal h3 {
  font-size: 1.1rem;
  color: var(--accent-color);
  margin-bottom: 24px;
  text-align: center;
  font-weight: 600;
}

#delete-modal .modal-buttons {
  display: flex;
  justify-content: space-evenly;
  gap: 12px;
  width: 100%;
}

#delete-confirm,
#delete-cancel {
  padding: 10px 24px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#delete-confirm {
  background-color: #ff3b30;
  color: white;
}

#delete-confirm:hover {
  background-color: #e0342a;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

#delete-cancel {
  background-color: #e0e0e0;
  color: #333;
}

#delete-cancel:hover {
  background-color: #d1d1d6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.courses-dashboard-card {
  background-color: var(--input-bg);
  height: 80%;
  width: 100%;
  margin-top: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px 24px;
  overflow-y: auto;
}

.courses-dashboard-card::-webkit-scrollbar {
  width: 6px;
}

.courses-dashboard-card::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 6px;
}

.course-block {
  background-color: #f0f4f8;
  border-radius: 12px;
  border: 1px solid #e6e6e6;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  transition: all 0.25s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.course-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-color);
}

.course-block-heading h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  text-align: center;
}

.course-block-sub-heading {
  font-size: 1rem;
  color: #777;
  line-height: 1.4;
  text-align: center;
}

.attendance-dashboard-card {
  background-color: var(--input-bg);
  height: 80%;
  width: 100%;
  margin-top: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: 30px 36px;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: xx-large;
  font-weight: 500;
}

.about-dashboard-card {
  background-color: var(--input-bg);
  height: 80%;
  width: 100%;
  margin-top: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: 30px 36px;
  overflow-y: auto;
}

.about-section {
  max-width: 800px;
  margin: 0 auto;
}

.about-section h3 {
  font-size: 1.6rem;
  color: var(--accent-color);
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 600;
}

.about-section p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-section hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 24px 0;
}

.settings-dashboard-card {
  background-color: var(--input-bg);
  height: 80%;
  width: 100%;
  margin-top: 16px;
  border-radius: 16px; /* slightly bigger radius for Apple feel */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* subtle shadow */
  padding: 32px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-section h3 {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 12px;
  border-bottom: 1px solid #e3e3e3;
  padding-bottom: 6px;
}

.settings-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.settings-group label {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.settings-group input {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #d1d1d1;
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: white;
  transition: all 0.2s ease-in-out;
}

.settings-group input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 8px rgba(0, 122, 255, 0.2);
  outline: none;
}

#update-settings {
  align-self: flex-start;
  padding: 12px 32px;
  background-color: var(--button-bg);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

#update-settings:hover {
  background-color: var(--button-bg-hover);
}
