/* 
   GLOBAL DESIGN SYSTEM (AUTO TEXT SWITCH)
 */

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

:root {
  --text-primary: #1a1a1a;
  --text-secondary: #444;
  --card-bg: rgba(255,255,255,0.88);
  --card-border: rgba(0,0,0,0.08);
  --btn-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

body.dark {
  --text-primary: #f1f1f1;
  --text-secondary: #cccccc;
  --card-bg: rgba(20,20,20,0.88);
  --card-border: rgba(255,255,255,0.08);
  --btn-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

/* 
   BASE
 */

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

body {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);

  /* Slight depth overlay + background image */
  background:
    linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)),
    url("bg-light.png") no-repeat center center / cover;

  transition: background 0.6s ease, color 0.3s ease;
}

body.dark {
  background:
    linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)),
    url("bg-dark.png") no-repeat center center / cover;
}

/* 
   NAVBAR
 */

.navbar {
  display: flex;
  flex-direction: column;   /* mobile first */
  align-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}

.navbar > div {
  display: flex;
  align-items: center;
  gap: 15px; /* clean spacing between items */
}

.logo {
  font-weight: 600;
}

/* 
   PREMIUM NAV BUTTON ANIMATION
 */

.nav-btn {
  position: relative;
  padding: 8px 20px;
  border-radius: 30px;
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  overflow: hidden;

  transition: transform 0.25s ease,
              box-shadow 0.25s ease,
              background 0.3s ease;
}

/* Subtle gradient shimmer */
.nav-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.4),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

/* Hover bounce + shimmer */
.nav-btn:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.nav-btn:hover::before {
  transform: translateX(100%);
}

/* Active press effect */
.nav-btn:active {
  transform: scale(0.96);
}

/* Primary button */
.nav-btn.primary {
  background: linear-gradient(135deg, #ff6a00, #ee0979);
  color: #fff;
  border: none;
}

@keyframes navBounce {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(-6px); }
}

.nav-btn:hover {
  animation: navBounce 0.3s ease forwards;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.nav-btn.primary {
  background: linear-gradient(
    135deg,
    #ff6a00,
    #ee0979,
    #6a11cb
  );
  background-size: 200% 200%;
  animation: navGradientShift 6s ease infinite;
}

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

.icon-btn {
  margin-right: 10px;
  padding: 8px 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}



/* 
   HERO SECTION
 */

.hero {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-content {
  text-align: center;
  padding: 60px;
  backdrop-filter: blur(25px);
  background: var(--card-bg);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;   /* controls spacing between heading, text, button */
}

.hero-content h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
}


/* 
   BUTTONS
 */

.gradient-btn {
  padding: 14px 36px;
  border-radius: 40px;
  font-weight: 600;
  color: #fff;
  border: none;
  cursor: pointer;

  background: linear-gradient(
    135deg,
    #ff6a00,
    #ee0979,
    #6a11cb,
    #2575fc
  );

  background-size: 300% 300%;
  animation: gradientShift 6s ease infinite;
  box-shadow: var(--btn-shadow);
  transition: 0.3s ease;
}

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

.gradient-btn:hover {
  transform: translateY(-5px);
}

/* 
   AUTH SECTION
 */

.auth-section {
  min-height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-card {
  width: 380px;
  padding: 40px;
  backdrop-filter: blur(25px);
  background: var(--card-bg);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 10px;
}

.auth-subtext {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.input-group {
  margin-bottom: 15px;
}

.input-group input,
.input-group textarea,
.input-group select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  outline: none;
}

.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

/*  PREMIUM RESET MODAL  */

.reset-modal {
  position: fixed;
  inset: 0;
  background: var(--card-bg);
  backdrop-filter: blur(3px);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  animation: fadeIn 0.3s ease;
}
.reset-modal {
  transition: opacity 0.3s ease;
}

.reset-content {
  position: relative;
  width: 350px;
  padding: 30px 25px;
  border-radius: 16px;
  background: white;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideUp 0.3s ease;
}

.reset-content h3 {
  margin: 0;
}

.reset-sub {
  font-size: 13px;
  color: #666;
}

.reset-content input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.reset-btn {
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  cursor: pointer;
  transition: 0.3s ease;
}

.reset-btn:hover {
  transform: translateY(-2px);
}

.reset-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.reset-message {
  font-size: 12px;
  min-height: 16px;
}

.reset-success {
  color: #2ecc71;
}

.reset-error {
  color: #e74c3c;
}

/* Reset close button base style */
.reset-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.reset-close:hover {
  transform: rotate(90deg);
  opacity: 0.8;
}

/* Light mode */
body:not(.dark) .reset-close {
  color: #333;
}

/* Dark mode */
body.dark .reset-close {
  color: #ffffff;
}

/* Dark Mode */
body.dark .reset-content {
  background: #1e1e1e;
  color: white;
}

body.dark .reset-sub {
  color: #aaa;
}

body.dark .reset-content input {
  background: #2b2b2b;
  border: 1px solid #444;
  color: white;
}

.hidden {
  display: none;
}

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

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/*  SUCCESS STATE  */

.reset-success-box {
  margin-top: 10px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.checkmark-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #2ecc71;
  margin: 0 auto 10px;
  position: relative;
  animation: popIn 0.4s ease;
}

.checkmark {
  width: 25px;
  height: 12px;
  border-left: 4px solid white;
  border-bottom: 4px solid white;
  position: absolute;
  top: 22px;
  left: 17px;
  transform: rotate(-45deg);
  animation: drawCheck 0.4s ease forwards;
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes drawCheck {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/*  LOGIN FORM SPACING FIX  */

.login-form {
  display: flex;
  width: 100%;
  flex-direction: column;
}

.input-group {
  margin-bottom: 18px;
}

/* Align Forgot Password to LEFT */
.form-row {
  width: 100%;
  display: flex;
  justify-content: flex-start;   
  align-items: center;
  margin-top: -6px;
  margin-bottom: 22px;
}


/* Forgot Password */

.forgot-link {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #962ff7b4;
  cursor: pointer;
  padding: 12px;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

.forgot-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Premium Login Button */
.login-btn {
  width: 100%;
  padding: 14px;
  border-radius: 40px;
  border: none;
  font-weight: 600;
  font-size: 15px;
  background: linear-gradient(135deg, #ff2ea6, #7b2ff7);
  color: white;
  box-shadow: 0 15px 35px rgba(123, 47, 247, 0.35);
  transition: all 0.3s ease;
}

.login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(123, 47, 247, 0.5);
}

.signup-text {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.form-row {
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding-bottom: 12px;
}
.login-card {
  padding: 40px 35px;
}
.form-row {
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding-bottom: 12px;
}
/* 
   DASHBOARD LAYOUT FIXED HEIGHT
 */

.dashboard-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
}

.board {
  display: flex;
  flex-direction: column;   /* MOBILE FIRST */
  gap: 20px;
  padding: 20px;
}

/* 
   COLUMN STRUCTURE FIX
 */

.column {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.column.collapsed .task-list {
  display: none;
}

.column-header {
  display: flex;
  justify-content: space-between;
  border-radius: 12px;
  align-items: center;
  cursor: pointer;
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.column.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

/* Column title stays fixed */
.column h3 {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--card-bg);
  padding: 10px 0;
  margin-bottom: 15px;
  font-size: 1.5rem;
  border-bottom: 0.5px solid var(--card-border);
}

/* ONLY task list scrolls */
.task-list {
  max-height: 60vh;
  overflow-y: auto;
}

/* Smooth scrollbar */
.task-list::-webkit-scrollbar {
  width: 6px;
}

.task-list::-webkit-scrollbar-thumb {
  background: rgba(120,120,120,0.4);
  border-radius: 6px;
}

/* Smooth scrollbar */
.column::-webkit-scrollbar {
  width: 6px;
}

.column::-webkit-scrollbar-thumb {
  background: rgba(150,150,150,0.4);
  border-radius: 6px;
}

.task-card {
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  background: #ffffff;
  color: #000;
  cursor: grab;
}

body.dark .task-card {
  background: #2a2a2a;
  color: #fff;
}

/* 
   PREMIUM MODAL SYSTEM
 */

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 9999;
}

/* Hidden state */
.modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Background fade */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  transition: opacity 0.3s ease;
}

/* Modal card */
.modal-content {
  position: relative;
  width: 420px;
  padding: 30px;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);

  transform: scale(1);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Scale effect when hidden */
.modal.hidden .modal-content {
  transform: scale(0.85);
  opacity: 0;
}

/* Close button */
.modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 20px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-primary);
}


/* 
   STICKY BOTTOM FOOTER (PERFECT CENTER)
*/

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-footer {
  margin-top: auto;          /* pushes footer to bottom */
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

/* 
   RESPONSIVE
 */

@media (min-width: 900px) {

  .navbar {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .board {
    flex-direction: row;   /* desktop horizontal */
    align-items: flex-start;
  }

  .column {
    flex: 1;
    min-width: 300px;
  }

  .task-list {
    max-height: 70vh;
  }

}

/* 
    DARK MODE SYSTEM
*/

body {
  transition: background 0.6s ease, color 0.4s ease;
}

/* Animated Page Fade */
body {
  opacity: 0;
  animation: pageFade 0.8s ease forwards;
}

@keyframes pageFade {
  to { opacity: 1; }
}

/* Toggle Button */
.theme-toggle {
  position: relative;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Icon base */
.theme-toggle .icon {
  position: absolute;
  font-size: 18px;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Moon visible in light mode */
.theme-toggle .moon {
  opacity: 1;
  transform: rotate(0deg);
}

/* Sun hidden in light mode */
.theme-toggle .sun {
  opacity: 0;
  transform: rotate(90deg);
}

/* When dark mode active */
body.dark .theme-toggle .moon {
  opacity: 0;
  transform: rotate(-90deg);
}

body.dark .theme-toggle .sun {
  opacity: 1;
  transform: rotate(0deg);
}


.task-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 8px;
}

.status-select {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: #fff;
}

body.dark .status-select {
  background: #1e1e1e;
  color: #fff;
}



/*  CAPSULE ACTION BUTTONS  */

.edit-btn,
.delete-btn {
  position: relative;
  padding: 6px 14px;              
  border-radius: 20px;            
  border: none;
  cursor: pointer;
  font-size: 0.78rem;             
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 10px;               
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

/*  EDIT BUTTON  */
.edit-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.edit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(37,99,235,0.35);
}

.edit-btn:active {
  transform: scale(0.96);
}

/*DELETE BUTTON  */
.delete-btn {
  background: linear-gradient(135deg, #ff4d4d, #e63946);
  color: #fff;
}

.delete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(230,57,70,0.35);
}

.delete-btn:active {
  transform: scale(0.96);
}

/* Dark mode refinements */
body.dark .edit-btn {
  background: linear-gradient(135deg, #4f8dfd, #1e40af);
}

body.dark .delete-btn {
  background: linear-gradient(135deg, #ff6b6b, #c1121f);
}
/* 
   TASK MOVE ANIMATION
 */
.task-card {
  position: relative;
  border-radius: 14px; /* match your actual radius */
  overflow: hidden; /* prevents glow spill */
}
.task-card {
  transition: transform 0.25s ease,
              opacity 0.25s ease;
}

.task-card.moving {
  opacity: 0.5;
  transform: scale(0.95);
}

/* Column highlight while dragging */
.column.drag-over {
  border: 2px dashed #6a11cb;
  background: rgba(106,17,203,0.08);
}

.task-list {
  transition: all 0.3s ease;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.priority-badge {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  color: white;
    text-transform: capitalize; 

}

.priority-low {
  background-color: #2ecc71;
}

.priority-medium {
  background-color: #f1c40f;
  color: black;
}



.priority-high {
  background-color: #e74c3c;
  color: white;
}

/* High Priority Card Accent */
.task-card.high-priority {
  border: 2px solid rgba(231, 76, 60, 0.6);
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.25);
  transition: all 0.3s ease;
}

/* Smooth pulse effect */
.task-card.high-priority::after {
  content: "";
  position: absolute;
  inset: -2px; /* slightly outside border */
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 18px rgba(231, 76, 60, 0.4);
  opacity: 0.4;
  animation: borderPulse 2s infinite;
}

@keyframes borderPulse {
  0% {
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
  }
  50% {
    box-shadow: 0 0 22px rgba(231, 76, 60, 0.6);
  }
  100% {
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
  }
}

/* 🚨 High + Overdue Critical Glow */
.task-card.critical-task {
  border: 2px solid rgba(255, 0, 0, 0.9);
  box-shadow:
    0 0 25px rgba(255, 0, 0, 0.6),
    0 0 45px rgba(255, 0, 0, 0.4);
  animation: criticalPulse 1.5s infinite;
}

/* Strong pulse animation */
@keyframes criticalPulse {
  0% {
    box-shadow:
      0 0 15px rgba(255, 0, 0, 0.4),
      0 0 30px rgba(255, 0, 0, 0.2);
  }
  50% {
    box-shadow:
      0 0 35px rgba(255, 0, 0, 0.9),
      0 0 60px rgba(255, 0, 0, 0.6);
  }
  100% {
    box-shadow:
      0 0 15px rgba(255, 0, 0, 0.4),
      0 0 30px rgba(255, 0, 0, 0.2);
  }
}

.column[data-status="completed"] .task-card {
  opacity: 0.7;
  box-shadow: none !important;
  animation: none !important;
}

.locked-task {
  opacity: 0.6;
}

.locked-task .edit-btn {
  display: none;
}

.locked-task .status-select {
  background: #ddd;
  cursor: not-allowed;
}

.task-card {
  position: relative;
}

.task-timestamps {
  margin-top: 8px;
  font-size: 11px;
  font-style: italic;
  text-align: right;
  opacity: 0.7;
  letter-spacing: 0.3px;
}

/* Light mode */
body:not(.dark) .task-timestamps {
  color: rgba(0, 0, 0, 0.45);
}

/* Dark mode (Improved Contrast) */
body.dark .task-timestamps {
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
}

.task-due {
  margin-top: 8px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.countdown {
  font-weight: 600;
  color: #ff4d4d;
}

body.dark .countdown {
  color: #ff6b6b;
}


.overdue-task {
  border-left: 4px solid #ff4d4d;
}

.critical-task {
  border-left: 4px solid #ff0000;
  background: rgba(255,0,0,0.05);
}

/*  COMPLETION STATUS  */

.task-due.completed {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Early → Green */
.task-due.completed-early {
  color: #2ecc71;
}

/* On time → Amber */
.task-due.completed-ontime {
  color: #f1c40f;
}

/* Late → Red */
.task-due.completed-late {
  color: #e74c3c;
}

/* Dark mode refinements */
body.dark .task-due.completed-early {
  color: #4cd964;
}

body.dark .task-due.completed-late {
  color: #ff6b6b;
}

.gradient-btn,
.nav-btn,
.edit-btn,
.delete-btn,
.status-select {
  min-height: 44px;   /* touch-friendly */
}

.modal-content {
  width: 90%;
  max-width: 420px;
}