/* ====== GENERAL ====== */
body {
  margin: 0;
  font-family: "ibm-plex-sans", sans-serif;
  background-color: #ffffff;
  color: #222;
}

/* ====== SUMMARY ROW ====== */
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin: 40px auto 60px;
  flex-wrap: wrap;
  max-width: 1200px;
  padding: 0 20px;
  background-color: #fff;
}

.summary-left {
  flex: 1;
  min-width: 350px;
}

.welcome-text {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: #111827;
}

.summary-status {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Garamond", sans-serif;
}


.status-item {
  display: flex;
  align-items: center;
}

.status-label {
  font-weight: 500;
  color: #000;
  font-size: 1.8rem;
  width: 220px;   /* fixed width ensures values align perfectly */
  display: inline-block;
}

.status-value {
  font-weight: 500;
  font-size: 1.5rem;
  color: #222;
  margin-left: 8px; /* spacing between label and value */
}


.status-value.active {
  color: #22c55e;
  text-decoration: none;
}

.status-value.inactive {
  color: #ef4444;
}

.summary-right {
  flex: 1;
  text-align: center;
}

.summary-logo {
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0 auto;
}


html {
  scroll-behavior: smooth;
}

/* ====== TRADE SECTION ====== */
.trade-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 80px;
  flex-wrap: wrap;
  padding: 60px 80px;
  background-color: #1e3a8a; /* remove white box */
  box-shadow: none;        /* remove shadow */
  border: none;            /* remove border */
  border-radius: 0;        /* no rounded corners */
  text-align: left;
}

/* ====== LEFT FORM ====== */
.trade-form-wrapper {
  flex: 1;
  min-width: 350px;
}

.trade-heading {
  font-size: 2rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.trade-subtext {
  color: #cbd5e1;
  font-size: 1rem;
  margin-bottom: 24px;
}

.trade-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  width: 100%;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #e2e8f0;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  font-size: 1rem;
  background: rgba(255,255,255,0.1);
  color: #000;
  outline: none;
  transition: all 0.25s ease;
}

.form-group select:focus,
.form-group input:focus {
  border-color: #60a5fa;
  background: rgba(255,255,255,0.15);
}

.trade-info {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  color: #e5e7eb;
}

.trade-btn {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.trade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99,102,241,0.3);
}

/* ====== IMAGE ====== */
.trade-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 320px;
}

.trade-image img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(99,102,241,0.25));
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .trade-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 60px;
    padding: 40px 20px;
  }

  .trade-form-wrapper {
    max-width: 500px;
  }

  .trade-image img {
    width: 80%;
  }
}

/* ===== FLASH MESSAGE OVERLAY (CENTERED MODAL) ===== */
.flash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  animation: fadeIn 0.3s ease-out;
}

.flash-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 40px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 420px;
  width: 90%;
  animation: popUp 0.4s ease-out;
}

/* Message text */
.flash-message {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  padding: 8px 0;
}

/* Category color codes */
.flash-message.success {
  color: #16a34a;
}

.flash-message.error,
.flash-message.danger {
  color: #dc2626;
}

.flash-message.warning {
  color: #ca8a04;
}

/* Animations */
@keyframes popUp {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: scale(0.95); }
}

/* Auto-hide after 3.5 s */
.flash-overlay {
  animation: fadeIn 0.3s ease-out, fadeOut 0.5s ease-in 3.5s forwards;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-section {
  margin: 60px auto;
  max-width: 1000px;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 30px;
  color: #111827;
}

/* Table styling */
.portfolio-table-wrapper {
  overflow-x: auto;
}

.portfolio-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.95rem;
  border-radius: 12px;
  overflow: hidden;
}

.portfolio-table th {
  background-color: #f1f5f9;
  color: #374151;
  font-weight: 600;
  padding: 12px;
}

.portfolio-table td {
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
}

.portfolio-table tr:hover {
  background-color: #f9fafb;
  transition: background 0.3s ease;
}

.portfolio-summary {
  margin-top: 20px;
  text-align: center;
  font-size: 1.1rem;
  background: #f3f4f6;
  padding: 10px 20px;
  border-radius: 10px;
}

.net-worth-summary {
  margin-top: 25px;
  background: #f9fafb;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #2563eb;
}

.net-worth-summary h3 {
  margin-bottom: 10px;
  color: #1e3a8a;
}

.net-worth-summary p {
  margin: 4px 0;
  color: #111;
}

.net-worth-summary .highlight {
  color: #16a34a;
  margin-top: 10px;
}

.no-portfolio {
  text-align: center;
  color: #6b7280;
  font-size: 1rem;
  margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .portfolio-section {
    margin: 40px 10px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .portfolio-table th, .portfolio-table td {
    font-size: 0.9rem;
    padding: 8px;
  }
}

/* ===== SHARED TABLE STYLE ===== */
.table-wrapper {
  overflow-x: auto;
  margin-top: 10px;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dashboard-table th {
  background-color: #f1f5f9;
  padding: 12px;
  font-weight: 600;
  color: #374151;
  text-align: center;
}

.dashboard-table td {
  padding: 10px 12px;
  text-align: center;
  border-top: 1px solid #e5e7eb;
}

.dashboard-table tr:hover {
  background: #f9fafb;
  transition: 0.3s;
}

/* ===== CASHBOOK & TRANSACTIONS ===== */
.cashbook-section,
.transactions-section {
  margin: 60px auto;
  max-width: 1000px;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 1.6rem;
  text-align: center;
  font-weight: 600;
  color: #111827;
  margin-bottom: 20px;
}

.no-data {
  text-align: center;
  color: #6b7280;
  margin: 20px 0;
  font-size: 1rem;
}

.credit {
  color: #16a34a;
  font-weight: 600;
}

.debit {
  color: #dc2626;
  font-weight: 600;
}

/* ====== FOOTER ====== */
.footer {
  background: #111827;
  color: #f9fafb;
  text-align: center;
  padding: 30px 0;
  margin-top: 60px;
  width: 100%;
}

.footer-container {
  max-width: 900px;
  margin: 0 auto;
}

.footer p {
  margin: 6px 0;
  font-size: 0.95rem;
}

.footer-subtext {
  color: #9ca3af;
  font-size: 0.85rem;
}

section {
  scroll-margin-top: 80px; /* offset for sticky navbar */
}

/* ===== NAVBAR CONTAINER ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between; /* keeps logo left and links right */
  align-items: center;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ===== LOGO ===== */
.brand-logo {
  height: 40px;
  width: auto;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.brand-logo:hover {
  transform: scale(1.05);
}

/* ===== NAV LINKS ===== */
.navbar-right ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-right a {
  text-decoration: none;
  color: #1f2937;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s ease, border-bottom 0.2s ease;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.navbar-right a:hover {
  color: #2563eb;
  border-bottom: 2px solid #2563eb;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 700px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .navbar-right ul {
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
  }

  .navbar-right a {
    font-size: 0.95rem;
  }
}


/* ============================================
   HELP NOW SYSTEM (clean + isolated)
   ============================================ */

/* Floating Help Button */
.help-floating-btn {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 60px;
  height: 60px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  transition: 0.2s ease;
  z-index: 2000;
}

.help-floating-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 22px rgba(0,0,0,0.28);
}

/* Modal backdrop */
.help-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2100;
}

/* CHAT BOX CONTAINER */
.help-chat-box {
  width: 90%;
  max-width: 360px;
  height: 520px;
  background: #ffffff;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 40px rgba(0,0,0,0.32);
  animation: helpPop 0.25s ease-out;
  overflow: hidden;
}

/* Header */
.help-chat-header {
  padding: 16px 20px;
  background: #1e3a8a;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.help-close-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  color: white;
  cursor: pointer;
}

/* Message container */
.help-chat-messages {
  flex: 1;
  padding: 14px;
  background: #f5f7fa;
  overflow-y: auto;
}

/* Message bubble */
.help-message {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 10px;
  line-height: 1.35;
}

/* Student bubble */
.help-message.student {
  background: #dbeafe;
  margin-left: auto;
}

/* Admin bubble */
.help-message.admin {
  background: #fee2e2;
  margin-right: auto;
}

/* Input area */
.help-chat-input {
  display: flex;
  padding: 10px;
  gap: 10px;
  border-top: 1px solid #ddd;
}

.help-chat-input input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.help-chat-input button {
  padding: 10px 16px;
  background: #2563eb;
  border: none;
  color: white;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.help-chat-input button:hover {
  background: #1d4ed8;
}

/* Opening animation */
@keyframes helpPop {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}


.help-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #dc2626;
  color: white;
  padding: 3px 7px;
  font-size: 12px;
  border-radius: 50%;
  font-weight: bold;
}

.hidden {
  display: none !important;
}

