:root {
  --primary: #4361ee;
  --primary-light: #4895ef;
  --primary-dark: #3f37c9;
  --secondary: #4cc9f0;
  --success: #4ade80;
  --danger: #f87171;
  --warning: #fbbf24;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 20px;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 100px; /* Add padding to bottom to prevent content from being hidden behind fixed buttons */
}

/* Passkey Overlay Styles */
.passkey-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.passkey-container {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 400px;
  padding: 30px;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.passkey-header {
  margin-bottom: 25px;
}

.passkey-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
}

.passkey-header h2 {
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-size: 22px;
}

.passkey-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.passkey-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-group {
  position: relative;
}

.input-group i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.input-group input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Toggle passkey visibility button */
.toggle-passkey {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.toggle-passkey:hover {
  color: var(--primary);
}

.passkey-error {
  color: var(--danger);
  font-size: 14px;
  display: none;
  animation: fadeIn 0.3s ease;
}

.passkey-submit {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.passkey-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.passkey-info {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 5px;
}

.passkey-forgot {
  margin-top: 10px;
  font-size: 14px;
}

.passkey-forgot a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.passkey-forgot a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

/* Notification Styles */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification {
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 400px;
  animation: slideIn 0.3s ease;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.fade-out {
  opacity: 0;
  transform: translateX(30px);
}

.notification.success {
  background-color: #ecfdf5;
  border-left: 4px solid var(--success);
}

.notification.error {
  background-color: #fef2f2;
  border-left: 4px solid var(--danger);
}

.notification.warning {
  background-color: #fffbeb;
  border-left: 4px solid var(--warning);
}

.notification i {
  font-size: 20px;
}

.notification.success i {
  color: var(--success);
}

.notification.error i {
  color: var(--danger);
}

.notification.warning i {
  color: var(--warning);
}

.notification-message {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

/* Session timeout modal */
.timeout-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.timeout-modal-content {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 400px;
  padding: 25px;
  text-align: center;
}

.timeout-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
}

.timeout-header i {
  font-size: 40px;
  color: var(--warning);
  margin-bottom: 10px;
}

.timeout-header h3 {
  color: var(--text-primary);
  font-size: 20px;
}

.timeout-modal-content p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.timeout-modal-content #countdown {
  font-weight: bold;
  color: var(--danger);
}

.timeout-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn-stay,
.btn-logout {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-stay {
  background-color: var(--primary);
  color: white;
  border: none;
}

.btn-stay:hover {
  background-color: var(--primary-dark);
}

.btn-logout {
  background-color: white;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-logout:hover {
  background-color: #f8f9fa;
  color: var(--danger);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.container {
  max-width: 900px;
  margin: 20px auto;
  background-color: transparent;
}

/* Adjust header section to accommodate logout button */
.header-section {
  position: relative;
  padding-top: 10px;
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary-dark);
  text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 16px;
}

.device-indicator {
  margin-top: 15px;
  font-size: 14px;
  color: var(--text-light);
  padding: 5px 10px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.7);
  display: inline-block;
}

.device-icon {
  display: none;
  align-items: center;
  justify-content: center;
}

.mobile .mobile-only,
.tablet .tablet-only,
.desktop .desktop-only {
  display: inline-flex;
}

.form-card,
.task-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 25px;
  box-shadow: var(--shadow);
  margin-bottom: 25px;
  transition: var(--transition);
}

.form-card:hover,
.task-section:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.form-row {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 250px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--text-primary);
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 16px;
  transition: var(--transition);
  background-color: var(--bg-light);
}

textarea {
  padding: 12px;
  resize: vertical;
  min-height: 70px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.section-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 15px;
}

.task-title {
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
}

.task-status-header {
  width: 180px;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
}

.task-wrapper {
  margin-bottom: 15px;
}

.task-card {
  display: flex;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--radius);
  background-color: var(--bg-light);
  transition: var(--transition);
  border-left: 4px solid transparent;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.task-card:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateX(5px);
}

.status-selesai {
  border-left-color: var(--success);
}

.status-proses {
  border-left-color: var(--warning);
}

.status-tertunda {
  border-left-color: var(--danger);
}

.task-description {
  flex: 1;
  display: flex;
  align-items: flex-start;
}

.task-content {
  flex: 1;
}

.task-label {
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
  cursor: pointer;
}

.checkbox-container {
  margin-right: 15px;
  padding-top: 3px;
}

.custom-checkbox {
  display: block;
  position: relative;
  cursor: pointer;
  height: 24px;
  width: 24px;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 24px;
  width: 24px;
  background-color: white;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  transition: var(--transition);
}

.custom-checkbox:hover input ~ .checkmark {
  border-color: var(--primary-light);
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.custom-checkbox .checkmark:after {
  left: 8px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.hidden {
  display: none !important;
}

/* Expanded inputs section styling */
.expand-inputs {
  background-color: #f9fafb;
  padding: 15px;
  border-radius: 0 0 8px 8px;
  margin-top: -5px;
  border-left: 3px solid #a5a3f5;
  animation: fadeIn 0.3s ease;
}

.task-notes {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.note-column {
  flex: 1;
}

.note-column label {
  display: block;
  margin-bottom: 8px;
  color: #6b7280;
  font-weight: 500;
  font-size: 14px;
}

.note-column textarea {
  width: 100%;
  min-height: 60px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background-color: #fff;
  resize: none;
  font-size: 14px;
}

.task-status {
  width: 180px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.status-select {
  flex: 1;
  padding-left: 12px;
}

.info-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 18px;
}

.info-btn:hover {
  background-color: rgba(67, 97, 238, 0.1);
  transform: scale(1.1);
}

/* Fixed action buttons */
.form-actions {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 100;
}

.submit-btn,
.reset-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: none;
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.reset-btn {
  background-color: white;
  color: var(--text-secondary);
}

.submit-btn:hover,
.reset-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.2), 0 3px 6px rgba(0, 0, 0, 0.15);
}

.submit-btn i,
.reset-btn i {
  font-size: 24px;
}

/* Hide button text, show only icons */
.btn-text {
  display: none;
}

/* Logout button */
.logout-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout-btn:hover {
  background-color: #f8f9fa;
  color: var(--danger);
}

.logout-btn i {
  font-size: 16px;
}

.footer {
  margin-top: auto;
  text-align: center;
  padding: 20px;
  color: var(--text-light);
  font-size: 14px;
}

/* Expiry info in notification */
.notification .expiry-info {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 3px;
}

/* Responsive Design for Mobile Devices */
@media (max-width: 768px) {
  body {
    padding: 10px;
    padding-bottom: 100px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  }

  .container {
    margin: 10px;
    padding: 0;
  }

  h1 {
    font-size: 24px;
  }

  .subtitle {
    font-size: 14px;
  }

  .form-card,
  .task-section {
    padding: 15px;
    border-radius: var(--radius);
  }

  .form-row {
    flex-direction: column;
    gap: 15px;
  }

  .task-card {
    flex-direction: column;
    padding: 15px;
  }

  .task-label {
    font-size: 15px;
  }

  .task-status {
    width: 100%;
    margin-top: 15px;
    justify-content: space-between;
  }

  .status-select {
    max-width: 80%;
  }

  .task-notes {
    flex-direction: column;
    gap: 15px;
  }

  /* Adjust fixed buttons for mobile */
  .form-actions {
    bottom: 20px;
    right: 20px;
    flex-direction: row;
    gap: 15px;
  }

  .submit-btn,
  .reset-btn {
    width: 50px;
    height: 50px;
  }

  .submit-btn i,
  .reset-btn i {
    font-size: 20px;
  }

  .section-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .task-status-header {
    width: 100%;
    text-align: left;
  }

  /* Adjust passkey container for mobile */
  .passkey-container {
    padding: 20px;
    width: 95%;
  }

  .logout-btn {
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    font-size: 12px;
  }

  .logout-btn i {
    font-size: 14px;
  }

  /* Adjust timeout modal for mobile */
  .timeout-modal-content {
    width: 95%;
    padding: 20px;
  }

  .timeout-actions {
    flex-direction: column;
    gap: 10px;
  }

  .btn-stay,
  .btn-logout {
    width: 100%;
  }
}

/* Tablet-specific styles */
@media (min-width: 769px) and (max-width: 1023px) {
  .container {
    max-width: 700px;
  }

  h1 {
    font-size: 28px;
  }

  .task-card {
    padding: 18px;
  }

  .task-status {
    width: 150px;
  }
}

/* Desktop-specific enhancements */
@media (min-width: 1024px) {
  .container {
    max-width: 900px;
  }

  .form-card,
  .task-section {
    padding: 30px;
  }

  .task-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .task-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
  }
}

/* Mobile simplifications */
.mobile .task-card {
  border-left-width: 8px;
  margin-bottom: 10px;
}

.mobile .info-btn {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.mobile .device-indicator {
  position: fixed;
  top: 10px;
  right: 10px;
  margin: 0;
  font-size: 12px;
  padding: 3px 8px;
  z-index: 10;
}

/* Add tooltip for fixed buttons */
.action-tooltip {
  position: relative;
}

.action-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.action-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}
