/* ====== General Body & Font ====== */
body {
  font-family: 'Poppins', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  overflow: auto;
  position: relative;
}

/* ====== Shared container (Login/Register) ====== */
.container {
  background: rgba(255, 255, 255, 0.9);
  padding: 2.5rem 3.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  width: 450px;
  max-width: 100%;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.container:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.95);
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #333;
}

/* ====== Form Fields ====== */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
  text-align: left;
}
.form-group label {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #888;
  transition: all 0.3s ease;
  pointer-events: none;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: white;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: #667eea;
  box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
  outline: none;
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:not(:placeholder-shown) + label,
.form-group.has-value label {
  top: 0;
  font-size: 0.8rem;
  color: #667eea;
  background-color: white;
  padding: 0 5px;
  border-radius: 20px;
}

/* ====== Password toggle ====== */
.password-container {
  position: relative;
}
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #667eea;
  font-size: 1.2rem;
}

/* ====== Buttons ====== */
button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  margin-top: 1.5rem;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ====== Background Bubbles (Reusable) ====== */
.bubble-container,
.bubbles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: -1;
}

.bubbles span,
.bubble {
  position: absolute;
  bottom: -50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  opacity: 0.6;
  animation: rise 10s infinite ease-in-out;
}

.bubbles span:nth-child(1) { width: 20px; height: 20px; left: 10%; animation-duration: 6s; }
.bubbles span:nth-child(2) { width: 25px; height: 25px; left: 30%; animation-duration: 7s; }
.bubbles span:nth-child(3) { width: 15px; height: 15px; left: 50%; animation-duration: 5s; }
.bubbles span:nth-child(4) { width: 30px; height: 30px; left: 70%; animation-duration: 8s; }
.bubbles span:nth-child(5) { width: 10px; height: 10px; left: 90%; animation-duration: 6s; }
.bubbles span:nth-child(6) { width: 22px; height: 22px; left: 20%; animation-duration: 9s; }
.bubbles span:nth-child(7) { width: 18px; height: 18px; left: 40%; animation-duration: 10s; }
.bubbles span:nth-child(8) { width: 35px; height: 35px; left: 60%; animation-duration: 7s; }
.bubbles span:nth-child(9) { width: 15px; height: 15px; left: 80%; animation-duration: 8s; }
.bubbles span:nth-child(10) { width: 12px; height: 12px; left: 95%; animation-duration: 6s; }

@keyframes rise {
  0% { transform: translateY(0); opacity: 0.6; }
  50% { opacity: 1; }
  100% { transform: translateY(-100vh); opacity: 0; }
}
@keyframes animate {
  0% {
      transform: translateY(100vh) scale(0);
    }
    100% {
      transform: translateY(-10vh) scale(1);
    }
  }

/* ====== Enhanced Dashboard Sidebar ====== */
/* ====== Enhanced Sidebar ====== */
    .sidebar {
      width: 70px;
      background: rgba(255, 255, 255, 0.05);
      backdrop-filter: blur(15px);
      color: white;
      padding-top: 25px;
      display: flex;
      flex-direction: column;
      align-items: center;
      box-shadow: 2px 0 20px rgba(0, 0, 0, 0.25);
      transition: width 0.5s ease, padding 0.5s ease, background 0.3s ease;
      overflow: hidden;
      position: fixed;
      height: 100%;
      left: 0;
      top: 0;
      z-index: 2;
      border-right: 1px solid rgba(255, 255, 255, 0.1);
    }
    .sidebar:hover {
      width: 260px;
      align-items: flex-start;
      padding-left: 20px;
      background: rgba(255, 255, 255, 0.1);
    }
    .sidebar h2 {
      font-size: 22px;
      font-weight: 600;
      letter-spacing: 1px;
      opacity: 0;
      color: #fff;
      margin-bottom: 25px;
      transition: opacity 0.5s ease-in-out 0.3s, transform 0.5s ease;
    }
    .sidebar:hover h2 {
      opacity: 1;
      transform: translateX(0);
    }
    .nav-links {
      width: 100%;
      margin-top: 30px;
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      max-height: calc(100vh - 100px);
      padding-right: 5px;
    }
    .nav-links::-webkit-scrollbar { width: 6px; }
    .nav-links::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.3);
      border-radius: 3px;
    }
    .nav-links a {
      display: flex;
      align-items: center;
      text-decoration: none;
      color: white;
      padding: 15px 12px;
      border-radius: 10px;
      margin: 8px 10px;
      transition: all 0.4s ease;
      position: relative;
      overflow: hidden;
    }
    .nav-links a::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      width: 0;
      background: linear-gradient(135deg, #667eea, #764ba2);
      z-index: 0;
      border-radius: 10px;
      transition: width 0.4s ease;
    }
    .nav-links a:hover::before { width: 100%; }
    .nav-links i, .nav-links span {
      position: relative;
      z-index: 1;
    }
    .nav-links i {
      font-size: 20px;
      width: 45px;
      text-align: center;
      transition: transform 0.3s ease;
    }
    .nav-links span {
      opacity: 0;
      transition: opacity 0.6s ease-in-out 0.3s;
      white-space: nowrap;
      margin-left: 10px;
      font-weight: 500;
      font-size: 1rem;
    }
    .sidebar:hover .nav-links span { opacity: 1; }
    .nav-links a:hover i { transform: rotate(-10deg) scale(1.1); }
    .nav-links a.active {
      background: linear-gradient(135deg, #667eea, #764ba2);
      box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
    }

/* ====== Main Content Layout ====== */
.main-content {
  flex-grow: 1;
  margin-left: 80px; /* Sidebar collapsed */
  padding: 20px;
  transition: margin-left 0.5s ease-in-out;
  
  /* Fix: align everything to top-left instead of center */
  display: flex;
  flex-direction: column;
  align-items: stretch;    /* take full width */
  justify-content: flex-start; /* start at top */
  min-height: 100vh;       /* ensure full page height */
  box-sizing: border-box;
}

.sidebar:hover ~ .main-content {
  margin-left: 260px; /* Sidebar expanded */
}

/* ====== Header (Top Bar) ====== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  border-radius: 12px;
  color: white;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 25px;
  backdrop-filter: blur(12px);
}

/* ====== Dashboard Grid & Cards ====== */
.dashboard-grid {
  flex: 1; /* fill remaining space */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  align-items: start; /* keep cards aligned at the top */
}

.card {
  background: rgba(255, 255, 255, 0.9);
  padding: 25px 20px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.35s cubic-bezier(0.25,1,0.5,1), 
              box-shadow 0.3s ease-in-out;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}
.card h3 { font-size: 1.4rem; color: #222; margin-bottom: 12px; }
.card p  { font-size: 1rem; color: #666; }

/* ======Profile image ====== */
.user-profile { display: flex; align-items: center; }
.user-profile img {
  width: 50px; height: 50px; border-radius: 50%; margin-right: 10px;
  transition: transform 0.3s ease-in-out;
}
.user-profile img:hover { transform: scale(1.1); }

/* ====== view assignments ====== */
        body {
            display: block;
            height: auto;
            min-height: 100vh;
            overflow: auto;
            padding: 0;
            margin: 0;
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .content-wrapper {
            display: flex;
            min-height: 100vh;
        }
        
        .table-container {
            flex: 1;
            padding: 30px;
            margin-left: 70px;
            transition: margin-left 0.5s ease;
        }
        
        .sidebar:hover ~ .content-wrapper .table-container {
            margin-left: 260px;
        }
        
        /* Page title styling */
        .page-title {
            color: #333;
            text-align: center;
            margin-bottom: 30px;
            font-size: 28px;
            position: relative;
            padding-bottom: 10px;
        }
        
        .page-title:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 4px;
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 2px;
        }
        
        /* Adjust table styles for better visibility */
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(5px);
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 8px 32px rgba(0,0,0,0.2);
        }

        th, td {
            padding: 15px 12px;
            text-align: center;
            border-bottom: 1px solid rgba(0,0,0,0.1);
            color: #333;
        }

        th {
            background: rgba(102, 126, 234, 0.9);
            color: white;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 14px;
        }

        tr:hover {
            background: rgba(102, 126, 234, 0.1);
            transition: background 0.3s ease-in-out;
        }
        
        /* Message styling */
        .message {
            color: #4CAF50;
            background: rgba(255, 255, 255, 0.9);
            padding: 12px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            display: inline-block;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        /* Button styling */
        .button {
            display: inline-block;
            padding: 8px 15px;
            margin: 4px 2px;
            border-radius: 6px;
            text-decoration: none;
            font-weight: 500;
            font-size: 13px;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
        }
        
        .edit-btn {
            background: #4CAF50;
            color: white;
        }
        
        .edit-btn:hover {
            background: #3e8e41;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        
        .delete-btn {
            background: #f44336;
            color: white;
        }
        
        .delete-btn:hover {
            background: #d32f2f;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        
        .view-btn {
            background: #2196F3;
            color: white;
        }
        
        .view-btn:hover {
            background: #0b7dda;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        
        /* No assignments message */
        .no-assignments {
            text-align: center;
            padding: 30px;
            color: #666;
            font-style: italic;
        }
        
        /* Responsive adjustments */
        @media (max-width: 992px) {
            .table-container {
                margin-left: 0;
                padding: 20px 15px;
            }
            
            table {
                display: block;
                overflow-x: auto;
            }
            
            .sidebar:hover ~ .content-wrapper .table-container {
                margin-left: 0;
            }
        }

.edit-assignment-container {
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            width: 100%;
            max-width: 600px;
        }
.content-wrapper-edit-assignments {
            flex: 1;
            padding: 30px;
            margin-left: 70px;
            transition: margin-left 0.5s ease;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            min-height: 100vh;
            padding-top: 50px;
        }
.btn-container {
            display: flex;
            justify-content: space-between;
            margin-top: 30px;
        }
        
        .btn {
            padding: 12px 25px;
            border: none;
            border-radius: 8px;
            font-family: 'Poppins', sans-serif;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .btn-primary {
            background: linear-gradient(90deg, #667eea, #764ba2);
            color: white;
        }
        
        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }
        
        .btn-secondary {
            background: #f8f9fa;
            color: #333;
            max-height: max-content;
            border: 1px solid #ddd;
        }
        
        .btn-secondary:hover {
            background: #e9ecef;
        }
        
        .sidebar:hover ~ .content-wrapper-edit-assignments {
            margin-left: 260px;
        }
        
        /* Responsive adjustments */
        @media (max-width: 768px) {
            .content-wrapper {
                margin-left: 0;
                padding: 20px;
            }
            
            .sidebar:hover ~ .content-wrapper {
                margin-left: 0;
            }
            
            .btn-container {
                flex-direction: column;
                gap: 15px;
            }
            
            .btn {
                width: 100%;
            }
        }
        .form-group input[type="datetime-local"] {
            padding: 12px;
            font-family: 'Poppins', sans-serif;
        }
        
        /* Ensure all inputs have the same height */
        .form-group input, .form-group select {
            height: 48px;
            box-sizing: border-box;
        }

        .edit-assignements-btn-container {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Added this to vertically center items */
    margin-top: 30px;
    gap: 15px;
}

/* Consistent button styling */
.edit-assignements-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-flex; /* Changed to flex for better alignment */
    align-items: center; /* Center content vertically */
    justify-content: center; /* Center content horizontally */
    box-sizing: border-box;
    flex: 1;
    height: 48px; /* Fixed height for consistent sizing */
    line-height: normal; /* Reset line-height for consistency */
    vertical-align: middle; /* Ensure vertical alignment */
}

.edit-assignements-btn-primary {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
}
.edit-assignements-btn-primary-container {
    margin-top:20px;
}

.edit-assignements-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.edit-assignements-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.edit-assignements-btn-secondary:hover {
    background: #e9ecef;
    text-decoration: none;
    color: #333;
    transform: translateY(-3px); /* Added hover effect to match primary */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .edit-assignements-btn-container {
        flex-direction: column;
    }
    
    .edit-assignements-btn {
        width: 100%;
    }
}
    /* Responsive adjustments */
    @media (max-width: 768px) {
        .edit-assignements-btn-container {
            flex-direction: column;
        }
        
        .edit-assignements-btn {
            width: 100%;
        }
    }
    
/* ====== Fix for Login/Registration Container Centering ====== */
body.login-register-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    position: relative;
}

/* Ensure container is centered */
.login-register-page .container {
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

/* Fix bubble positioning for login/register pages */
.login-register-page .bubble-container {
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Alternative approach if the above doesn't work */
.alternative-centering-fix {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    padding: 20px !important;
}
.edit-btn {
            background: #FFC107;
            color: #000;
        }
        
        .edit-btn:hover {
            background: #e0a800;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        
        .delete-btn {
            background: #DC3545;
            color: white;
        }
        
        .delete-btn:hover {
            background: #c82333;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        
        .add-btn {
            background: #28A745;
            color: white;
            padding: 10px 20px;
            padding-left: 100px;
            font-size: 16px;
        }
        
        .add-btn:hover {
            background: #218838;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        
        .back-btn {
            background: #6c757d;
            color: white;
            padding: 10px 20px;
            margin-top: 20px;
            display: inline-block;
        }
        
        .back-btn:hover {
            background: #5a6268;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }