/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #444;
}

/* Moving Gradient Background */
body {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}
.week-card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
  margin-top: 20px;
}

.week-card {
  flex: 0 0 calc(20% - 16px);
  padding: 16px;
  border-radius: 12px;
  background-color: #f9f9f9;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-weight: 500;
  border: 1px solid #ddd;
}

.week-card small {
  font-size: 12px;
  color: #666;
}

.week-card:hover {
  transform: translateY(-4px);
  background-color: #e6f0ff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

#uploadCards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.upload-card {
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s ease;
}

.upload-card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.upload-card h4 {
  margin-bottom: 10px;
  color: #333;
}

.upload-card label {
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
  color: #444;
}

.upload-card input[type="text"],
.upload-card input[type="file"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.upload-card input[type="text"]:focus {
  border-color: #3399ff;
  outline: none;
}

.upload-card button {
  padding: 10px 16px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.upload-card button:hover {
  background-color: #45a049;
}

.upload-card #status {
  margin-top: 10px;
  font-size: 13px;
}

/* admin.css */

#searchBar {
  margin-bottom: 20px;
  padding: 10px 15px;
  width: 100%;
  max-width: 400px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 25px;
  outline: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s ease;
}

#searchBar:focus {
  border-color: #f57c00;
}

#student-ul {
  list-style: none;
  padding: 0;
}

.student-item {
  margin-bottom: 10px;
  cursor: pointer;
}

.student-name {
  font-size: 16px;
  color: #333;
  background: none;
  background-color: transparent;
  padding: 0;
  border: none;
}

.student-item:hover .student-name {
  text-decoration: underline;
  color: #f57c00;
}


.student-item button {
  background: none;
  background-color: transparent;
  border: none;
  padding: 0;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  color: #333;
  appearance: none;
  -webkit-appearance: none;
}


.student-item button:hover {
  text-decoration: underline;
  color: #f57c00;
}


@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Navbar */
.navbar {
  height: 100px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.navbar .logo {
  font-weight: bold;
  font-size: 1.4rem;
}

.navbar .user-info {
  display: flex;
  align-items: center;
}

.navbar .user-info img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 10px;
}

/* Layout */
.dashboard {
  display: flex;
  align-items: stretch;  /* ensures children stretch vertically */
  min-height: calc(100vh - 60px); /* navbar height adjustment */
  width: 100%;
  backdrop-filter: blur(10px);
}


.sidebar {
  width: 220px;
  height: auto;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding-top: 20px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: stretch; /* KEY: makes the sidebar fill vertical space in flex container */
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li {
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.sidebar ul li:hover {
  background: rgba(255, 255, 255, 0.2);
  border-left: 4px solid #23d5ab;
}

.main-content {
  flex-direction: column;
  padding: 20px;
  width: 100%;
}

.content-row {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.content-left {
  flex: 2;
}

.right-column {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  max-height: 500px;
  overflow-y: auto;
  width: 300px; /* Or any preferred width */
}

.search-container {
  margin-top: 20px;
  width: 100%;
}

.left-column {
  flex: 2;
}
.right-column {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  max-height: 80vh;
  overflow-y: auto;
}

.right-column h3 {
  margin-top: 0;
  font-size: 1.4rem;
  color: #333;
  border-bottom: 2px solid #23d5ab;
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.student-item {
  padding: 10px;
  margin-bottom: 8px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.student-item:hover {
  background: #e0f7fa;
  transform: translateY(-2px);
}

.main-content h2 {
  margin-bottom: 15px;
  font-size: 1.8rem;
  color: #333;
}

.main-content p {
  font-size: 1rem;
  line-height: 1.6;
}

/* Login Page */
.login-container {
  max-width: 400px;
  margin: 120px auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.login-container h2 {
  margin-bottom: 20px;
  color: #333;
}

.login-container input, .login-container button {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  border: none;
  border-radius: 8px;
}

.login-container input {
  background: #f0f0f0;
}

.login-container input:focus {
  outline: none;
  border: 1px solid #23d5ab;
  box-shadow: 0 0 5px rgba(35, 213, 171, 0.5);
}

.login-container button {
  background: linear-gradient(135deg, #23d5ab, #23a6d5);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-container button:hover {
  background: linear-gradient(135deg, #23a6d5, #23d5ab);
  transform: translateY(-2px);
}

.error {
  color: red;
  margin-top: 10px;
  font-size: 0.9rem;
}

/* Beautiful Pastel Buttons */
.main-content button, .button-group button {
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  margin: 5px 10px 10px 0;
  color: #333;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.main-content button:hover, .button-group button:hover {
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.main-content button:active, .button-group button:active {
  transform: scale(0.98);
}

/* Fee Table */
.fee-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.fee-table th {
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  padding: 12px;
  text-align: left;
  font-weight: bold;
  color: #333;
}

.fee-table td {
  padding: 12px;
  border-bottom: 1px solid #ddd;
}

.fee-table tr:last-child td {
  border-bottom: none;
}

.fee-table input[type="number"] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #f8f8f8;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.fee-table input[type="number"]:focus {
  border-color: #23d5ab;
  box-shadow: 0 0 5px rgba(35, 213, 171, 0.5);
  outline: none;
  background: #fff;
}

.total-label {
  margin-top: 10px;
  font-weight: bold;
  font-size: 1.2rem;
  color: #333;
  background: linear-gradient(to right, #ffd1ff, #fad0c4);
  border-radius: 12px;
  padding: 10px 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  float: right;
}

.analytics-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  margin-right: 20px;
  flex: 2;  /* Takes up most of the empty space */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.analytics-box h3 {
  margin-top: 0;
  font-size: 1.6rem;
  color: #333;
  border-bottom: 2px solid #23d5ab;
  padding-bottom: 8px;
}

.analytics-summary {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.analytics-summary div {
  flex: 1 1 30%;
  background: #f5f5f5;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.analytics-chart {
  width: 100%;
  height: 300px;
}

.sidebar ul li.active {
  background: rgba(255,255,255,0.2);
  border-left: 4px solid #23d5ab;
}
.icon-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

.icon-button {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px; /* rectangular with rounded corners */
  margin: 10px 0;
  padding: 10px 20px;
  width: 100%; /* make it fill the sidebar width */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}


.icon-button img {
  width: 24px;
  height: 24px;
}

.search-container {
  margin-top: 20px;
  position: relative;
}

.search-container input {
  width: 100%;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid #ccc;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.suggestions-list {
  position: absolute;
  background: #fff;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  margin-top: 5px;
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 10px;
  cursor: pointer;
}

.suggestion-item:hover {
  background: #f0f0f0;
}

.student-form {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.student-form input {
  padding: 8px;
  font-size: 16px;
}

.student-form button {
  padding: 10px;
  font-size: 16px;
  background-color: #ff7f50;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 6px;
}

.student-form button:hover {
  background-color: #e3673b;
}

.status-message {
  margin-top: 10px;
  font-weight: bold;
}

.student-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f3f3f3;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 6px;
}

.delete-button {
  background: #ff4d4d;
  color: white;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 4px;
}

.delete-button:hover {
  background: #e60000;
}
.student-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f7f7f7;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 8px;
}

.delete-button {
  background-color: #ff4d4d;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 6px 12px;
  cursor: pointer;
}

.delete-button:hover {
  background-color: #e60000;
}
