/* ===========================
   FONT & GLOBAL RESET
=========================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #c7d2fe 0, #e0f2fe 40%, #f9fafb 80%);
  color: #0f172a;
}

/* ===========================
   HEADER / APP BRANDING
=========================== */
header {
  padding: 16px 0 4px 0;
}

/* NAVBAR – shared across all pages */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    margin-bottom: 24px;
    border-radius: 0 0 18px 18px;
}

.navbar h1 {
    margin: 0;
    font-size: 1.3rem;
}

.navbar h1 a {
    text-decoration: none;
    color: #111827;
}

.navbar h1 a:hover {
    text-decoration: none;
}

/* Right side of navbar */

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-username {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Nav buttons / links */

.nav-link {
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #111827;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.18s ease-out;
}

/* Primary action (e.g. Register) */

.nav-primary {
    border: none;
    background: linear-gradient(135deg, #ff5ac4, #7c5cff);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(124, 92, 255, 0.45);
}

/* Logout button slightly red */

.nav-logout {
    border-color: rgba(239, 68, 68, 0.5);
}

/* HOVER ANIMATIONS */

.nav-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.95);
}

.nav-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(124, 92, 255, 0.55);
    filter: brightness(1.02);
}

.nav-logout:hover {
    background: rgba(248, 113, 113, 0.12);
}


/* ===========================
   MAIN APP CARD
=========================== */
.container {
  width: 92%;
  max-width: 1050px;
  margin: 10px auto 30px auto;
  background: rgba(255, 255, 255, 0.88);
  padding: 24px;
  border-radius: 22px;
  box-shadow:
    0 22px 45px rgba(15,23,42,0.18),
    0 0 0 1px rgba(148,163,184,0.25);
  backdrop-filter: blur(12px);
}

/* Page title / subtitle */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}

.page-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.page-header span {
  font-size: 13px;
  color: #64748b;
}

/* ===========================
   AUTH BOX (LOGIN / REGISTER)
=========================== */
.auth-box {
  max-width: 420px;
  margin: 30px auto 40px auto;
}

/* ===========================
   FORMS
=========================== */
form {
  margin-bottom: 24px;
}

label {
  display: block;
  font-weight: 500;
  margin-top: 12px;
  color: #334155;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: 12px;
  border: 1px solid #d4d4d8;
  font-size: 14px;
  background: #f9fafb;
  transition: border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.05s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.25);
  transform: translateY(-1px);
}

textarea {
  min-height: 80px;
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
  color: #9ca3af;
  font-size: 13px;
}

/* Buttons */
button {
  padding: 11px 26px;
  margin-top: 18px;
  background: linear-gradient(120deg, #6366f1, #ec4899);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  box-shadow: 0 10px 24px rgba(99,102,241,0.45);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(99,102,241,0.55);
  filter: brightness(1.03);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(99,102,241,0.5);
}

/* Links */
a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

/* Small text */
.small-text {
  font-size: 13px;
  color: #6b7280;
}

/* Error / message text */
.message-error {
  color: #b91c1c;
  font-size: 13px;
}

.message-success {
  color: #166534;
  font-size: 13px;
}

/* ===========================
   ALERTS (REMINDERS)
=========================== */
.alert {
  background: #fef9c3;
  border-left: 4px solid #eab308;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #854d0e;
}

.alert::before {
  content: "⏰";
}

/* ===========================
   DASHBOARD LAYOUT
=========================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 24px;
}

@media (max-width: 860px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Card blocks */
.card {
  background: #f9fafb;
  border-radius: 18px;
  padding: 18px 18px 20px 18px;
  border: 1px solid #e5e7eb;
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.8);
}

.card h3 {
  margin-top: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

/* ===========================
   TABLE (TASK LIST)
=========================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  margin-top: 10px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  background: #f3f4f6;
  padding: 10px 10px;
  text-align: left;
  font-weight: 600;
  color: #374151;
}

td {
  padding: 8px 10px;
  border-top: 1px solid #e5e7eb;
  vertical-align: middle;
}

tbody tr:hover {
  background: #f9fafb;
}

/* URGENT badge */
.urgent {
  color: #b91c1c;
  background: #fee2e2;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

/* ===========================
   ACTION LINKS
=========================== */
.action-links a {
  margin-right: 8px;
  font-weight: 600;
  font-size: 12px;
}

.action-links a:nth-child(1) {
  color: #0891b2;
}

.action-links a:nth-child(2) {
  color: #b91c1c;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 700px) {
  .container {
    width: 94%;
    padding: 18px;
  }

  .navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  table, th, td {
    font-size: 11.5px;
  }

  button {
    width: 100%;
    text-align: center;
  }
}
.risk-low {
    color: #16a34a;  /* green */
    font-weight: 600;
}

.risk-medium {
    color: #f97316; /* orange */
    font-weight: 600;
}

.risk-high {
    color: #dc2626; /* red */
    font-weight: 600;
}

.risk-critical {
    color: #ffffff;
    background: #dc2626;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Welcome banner – matches the soft card style */

.welcome-banner {
    background: #ffffff;
    padding: 20px 22px;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    margin-bottom: 26px;
    border-left: 5px solid #7c5cff; /* pastel purple accent line */
}

.welcome-banner h3 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    color: #111827;
}

.welcome-banner p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.85;
}

/* ===== GLOBAL NAVBAR STYLING ===== */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    margin-bottom: 24px;
    border-radius: 0 0 18px 18px;
}

.navbar h1 {
    margin: 0;
    font-size: 1rem;
}

.navbar h1 a {
    text-decoration: none;
    color: inherit;
}

/* Navbar right section */

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-username {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Navbar links / buttons */

.nav-link {
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #111827;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.18s ease-out;
}

.nav-primary {
    border: none;
    background: linear-gradient(135deg, #ff5ac4, #7c5cff);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(124, 92, 255, 0.45);
}

.nav-logout {
    border-color: rgba(239, 68, 68, 0.5);
}

/* Hover animations */
.nav-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.95);
}

.nav-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(124, 92, 255, 0.55);
    filter: brightness(1.02);
}

.nav-logout:hover {
    background: rgba(248, 113, 113, 0.12);
}

/* ===== GLOBAL BUTTONS ===== */
.btn-gradient {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #ff5ac4, #7c5cff);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(124, 92, 255, 0.45);
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}

.btn-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(124, 92, 255, 0.6);
}

.btn-outline {
    display: inline-block;
    padding: 11px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(255,255,255,0.9);
    color: #475569;
    text-decoration: none;
    transition: all 0.18s ease-out;
}

.btn-outline:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

/* ===== WELCOME BANNER (dashboard) ===== */

.welcome-banner {
    background: #ffffff;
    padding: 20px 22px;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    margin-bottom: 26px;
    border-left: 5px solid #7c5cff;
}

.welcome-banner h3 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    color: #111827;
}

.welcome-banner p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.85;
}
/* AUTH PAGES LAYOUT (Login & Register) */

.auth-wrapper {
    max-width: 460px;
    margin: 40px auto 60px;
}

.auth-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px 24px 26px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.page-header h2 {
    margin: 0 0 4px;
    font-size: 1.5rem;
}

.page-header span {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Form styling */

.auth-form {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 6px;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: #7c5cff;
    box-shadow: 0 0 0 1px rgba(124,92,255,0.3);
}

.auth-btn {
    margin-top: 14px;
    width: 100%;
    text-align: center;
}

/* Messages */

.message-error,
.message-success {
    margin-top: 12px;
    margin-bottom: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.message-error {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
    border: 1px solid rgba(248, 113, 113, 0.6);
}

.message-success {
    background: rgba(22, 163, 74, 0.08);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.6);
}

.auth-footer-text {
    margin-top: 14px;
    font-size: 0.88rem;
    color: #6b7280;
    text-align: center;
}

.auth-footer-text a {
    color: #7c5cff;
    text-decoration: none;
}

.auth-footer-text a:hover {
    text-decoration: underline;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-box {
  background: white;
  padding: 24px;
  border-radius: 14px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.modal-box h3 {
  margin-top: 0;
}

.modal-close {
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}
/* =========================
   REVIEW CARD WIDTH FIX
   ========================= */

.review-card {
  max-width: 520px;     /* controls width */
  margin-top: 30px;
}

/* Optional: make it align nicely with grid */
@media (min-width: 900px) {
  .review-card {
    margin-left: auto;
    margin-right: auto;
  }
}
.review-card p {
  line-height: 1.5;
}

.review-card a {
  font-size: 0.9rem;
}
.star-rating {
  display: flex;
  gap: 10px;
  font-size: 2rem;
  cursor: pointer;
}

.star {
  color: #d1d5db;
  transition: transform 0.2s ease, color 0.2s ease;
}

.star:hover {
  transform: scale(1.2);
}

.star.active {
  color: #f59e0b;
  animation: pop 0.25s ease;
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}
