/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #e3f2fd;
  min-height: 100vh;
  margin: 0;
  padding-top: 70px; /* Space for fixed navbar */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Form styles */
.form-container {
  width: 90%;
  max-width: 450px;
  margin: 50px auto;
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

.form-container h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #1f2937;
  font-size: 32px;
  font-weight: bold;
}

.form-container form {
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-row-two-col {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.input-group {
  flex: 1;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #555;
}

.input-group .password-container {
  position: relative;
}

.input-group .password-container input {
  width: 100%;
  padding: 12px;
  padding-right: 60px; /* Space for the button */
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group .password-container input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.input-group .password-container button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #3498db;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  text-decoration: underline;
}

.input-group .password-container button:hover {
  color: #217dbb;
}

.input-group input:not(.password-container input) {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:not(.password-container input):focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #555;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

/* Password container for toggle button */
.password-container {
  position: relative;
}

.password-container input {
  padding-right: 60px; /* Space for the button */
}

.password-container button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #3498db;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  text-decoration: underline;
}

.password-container button:hover {
  color: #217dbb;
}

.form-group input.is-available {
  border-color: #28a745;
}

.form-group input.is-taken {
  border-color: #dc3545;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.1s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #217dbb;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
  height: 38px;
  padding: 8px 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-success {
  background-color: #27ae60;
  color: white;
}

.btn-success:hover {
  background-color: #229954;
}

.btn-warning {
  background-color: #f39c12;
  color: white;
  height: 38px;
  padding: 8px 15px;
  display: inline-block;
}

.btn-warning:hover {
  background-color: #e67e22;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
  height: 38px;
  padding: 8px 15px;
  display: inline-block;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-full {
  width: 100%;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.form-footer {
  text-align: center;
  margin-top: 20px;
  color: #666;
}

.form-footer a {
  color: #3498db;
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
  color: #333;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.navbar-brand h1 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
}

.navbar-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-display-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-profile-pic {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.navbar-profile-pic:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar-profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.navbar-initial-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: #3498db;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
}

.navbar-username-text {
  color: #333;
  font-weight: bold;
  font-size: 16px;
}

.profile-link-wrapper {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-link-wrapper:hover .navbar-profile-pic {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Error message */
.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

/* Message styles */
.message {
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 20px;
  border: 1px solid;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
}

.header h1 {
  color: #2c3e50;
}

/* Dashboard */
.dashboard {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Statistics Bar */
.stats-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 200px;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
  text-align: center;
  transition: box-shadow 0.3s;
}

.stat-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-card .count {
  display: block;
  font-size: 36px;
  font-weight: bold;
  color: #3498db;
  margin-bottom: 5px;
}

.stat-card .label {
  display: block;
  font-size: 14px;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card.overdue-tasks .count {
  color: #e74c3c;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.dashboard-header h2 {
  color: #2c3e50;
}

.no-tasks {
  text-align: center;
  padding: 50px 20px;
  color: #666;
}

.no-tasks a {
  color: #3498db;
  text-decoration: none;
}

.no-tasks a:hover {
  text-decoration: underline;
}

/* Task list */
.task-list {
  display: grid;
  gap: 20px;
}

.task-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s;
  position: relative;
  border: 1px solid #e0e0e0;
}

.task-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.task-content h3 {
  margin-bottom: 10px;
  color: #2c3e50;
  font-weight: bold;
}

.task-content p {
  margin-bottom: 10px;
  color: #666;
}

.task-content small {
  color: #3498db;
  font-weight: bold;
  font-style: normal;
}

.checkmark {
  color: #27ae60;
  font-size: 18px;
  font-weight: bold;
  margin-left: 10px;
}

.task-actions {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.task-actions .btn {
  width: 120px;
  height: 38px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 12px;
}

/* Error container */
.error-container {
  text-align: center;
  padding: 50px 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.error-container h1 {
  color: #e74c3c;
  margin-bottom: 20px;
}

.error-container p {
  color: #666;
  margin-bottom: 30px;
}

/* Profile specific styles */
.profile-section {
  margin-bottom: 30px;
}

.profile-section h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: bold;
}

.account-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.account-info-data {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dee2e6;
}

.info-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.info-item label {
  font-weight: 700;
  color: #495057;
}

.info-item span {
  color: #6c757d;
  font-weight: 500;
}

.btn-edit-profile {
  padding: 8px 15px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s, transform 0.1s;
}

.btn-edit-profile:hover {
  background-color: #217dbb;
  transform: translateY(-2px);
}

.btn-edit-profile:active {
  transform: translateY(0);
}

/* Profile picture styles */
.profile-picture-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.profile-pic-wrapper {
  position: relative;
  display: inline-block;
}

.profile-picture {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #3498db;
}

.initial-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #3498db;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  font-weight: bold;
  border: 3px solid #3498db;
}

.camera-icon {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: white;
  font-size: 14px;
  border: 2px solid white;
  transition: background-color 0.3s;
}

.camera-icon:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

.upload-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.upload-form input[type="file"] {
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 5px;
  background-color: #f8f9fa;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #1f2937;
  font-size: 24px;
  font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .form-container {
    margin: 20px auto;
    padding: 20px;
  }

  .dashboard {
    padding: 20px;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .task-actions {
    justify-content: center;
  }

  .form-actions {
    flex-direction: column;
  }

  .profile-info {
    padding: 15px;
  }

  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .modal-content {
    padding: 20px;
    width: 95%;
  }
}
