/* =====================================================
   GLOBAL RESET & BASE
===================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f1f5f9;
  color: #0f172a;
  line-height: 1.6;
}

.hidden {
  display: none;
}

/* =====================================================
   TOP BAR
===================================================== */
.topbar {
  background: linear-gradient(90deg, #020617, #020617);
  color: #ffffff;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.brand-sub {
  font-size: 12px;
  font-weight: 600;
  color: #60a5fa;
}

/* =====================================================
   TOP ACTIONS
===================================================== */
.top-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.balance-box {
  display: flex;
  align-items: center;
}

.balance-btn {
  background: #2563eb;
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.balance-btn:hover {
  background: #1e40af;
}

.balance {
  margin-left: 10px;
  font-weight: 700;
}

/* =====================================================
   PROFILE
===================================================== */
.profile {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  background: #2563eb;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-text {
  display: flex;
  flex-direction: column;
  font-size: 13px;
}

.profile-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  background: #ffffff;
  color: #020617;
  width: 230px;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.18);
  z-index: 50;
}

.profile-dropdown h4 {
  font-size: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
}

.profile-dropdown p {
  font-size: 13px;
  margin: 6px 0;
}

/* =====================================================
   LAYOUT
===================================================== */
.layout {
  display: flex;
  min-height: calc(100vh - 68px);
}

/* =====================================================
   SIDEBAR
===================================================== */
.sidebar {
  width: 240px;
  background: #020617;
  color: #cbd5f5;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 15px 22px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar li:hover {
  background: #1e293b;
  color: #ffffff;
}

.sidebar li.active {
  background: #2563eb;
  color: white;
}

/* =====================================================
   MAIN CONTENT
===================================================== */
.content {
  flex: 1;
  padding: 32px;
}

/* =====================================================
   SECTION ANIMATION
===================================================== */
.section {
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   DASHBOARD CARDS
===================================================== */
.dash-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.dash-card h3 {
  margin-bottom: 12px;
  font-size: 17px;
}

/* =====================================================
   RISK METER
===================================================== */
.risk-meter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meter {
  flex: 1;
  height: 10px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 65%;
  background: linear-gradient(
    90deg,
    #22c55e,
    #facc15,
    #ef4444
  );
}

/* =====================================================
   PAYMENT FORM
===================================================== */
.payment-box label {
  font-weight: 600;
  margin-top: 14px;
  display: block;
}

.payment-box input {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
}

.payment-box input:focus {
  outline: none;
  border-color: #2563eb;
}

.payment-box button {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.payment-box button:hover {
  background: #1e40af;
}

/* =====================================================
   STATUS BOX
===================================================== */
.status-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
}

/* =====================================================
   REQUEST CARDS
===================================================== */
.request-card {
  padding: 16px;
  border-radius: 10px;
  margin-top: 14px;
}

.request-card.flagged {
  background: #fff7ed;
  border-left: 6px solid #f97316;
}

.request-card.safe {
  background: #ecfeff;
  border-left: 6px solid #22c55e;
}

.request-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.btn-accept {
  background: #22c55e;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.btn-reject {
  background: #ef4444;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

/* =====================================================
   FOUNDER CORNER
===================================================== */
.founder-corner {
  border-left: 6px solid #2563eb;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.founder-highlight {
  font-weight: 800;
  color: #1e40af;
}

/* =====================================================
   SETTINGS
===================================================== */
.settings label {
  font-size: 14px;
  display: block;
  margin: 10px 0;
}

.risk-high {
  background: #ffe5e5;
  color: #b30000;
}

.risk-low {
  background: #e6fff1;
  color: #006633;
}

.risk-review {
  background: #fff6d6;
  color: #996600;
}

/* Risk badges */
.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.badge-low {
  background: #dcfce7;
  color: #166534;
}

.badge-medium {
  background: #fef3c7;
  color: #92400e;
}

/* Fraud Alerts specific */
.badge-high {
  background: #fee2e2;
  color: #991b1b;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* =========================
   TRANSACTION TABLE STYLING
   ========================= */

.txn-table-wrapper {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
  margin-top: 20px;
}

/* Table base */
.txn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* Header */
.txn-table thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #0f172a, #020617);
  color: #e5e7eb;
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.3px;
  z-index: 2;
}

/* Rows */
.txn-table tbody tr {
  transition: all 0.25s ease;
}

.txn-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
  transform: scale(1.01);
}

/* Cells */
.txn-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #0f172a;
}

/* Amount emphasis */
.txn-table td:nth-child(2) {
  font-weight: 600;
}

/* =========================
   RISK BADGES
   ========================= */


/* =========================
   STATUS TAGS
   ========================= */

.status-approved {
  color: #166534;
  font-weight: 700;
}

.status-held {
  color: #9a3412;
  font-weight: 700;
}

/* =========================
   EMPTY STATE
   ========================= */

.table-empty {
  text-align: center;
  padding: 30px;
  color: #64748b;
  font-style: italic;
}

.btn-review {
  background: #fef9c3;
  color: #854d0e;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 6px;
}

.btn-block {
  background: #fee2e2;
  color: #991b1b;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-review:hover,
.btn-block:hover {
  transform: scale(1.05);
}

table td {
  vertical-align: middle;
}

.btn-review,
.btn-block {
  display: inline-block;
}

td button {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

td {
  overflow: visible !important;
}

.action-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  cursor: pointer;
  margin-right: 6px;
}

.review-btn {
  background: #2563eb;
  color: white;
}

.block-btn {
  background: #dc2626;
  color: white;
}


/* Fraud Analytics Card – Wider Version */
.fraud-analytics {
  background: #ffffff;
  border-radius: 18px;
  padding: 26px 32px;
  margin: 40px auto;
  max-width: 520px; /* 🔥 wider card */
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Title */
.fraud-analytics h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 18px;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Chart size increased */
.fraud-analytics canvas {
  width: 320px !important;
  height: 320px !important;
  margin: 0 auto;
  display: block;
}

/* ===== Fraud Analytics – Full Width Dashboard Box ===== */

.fraud-analytics {
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 32px;
  margin: 40px 24px;        /* left-right same as dashboard boxes */
  width: calc(100% - 48px); /* 🔥 full horizontal stretch */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  max-width: none;
}

/* Title alignment same as other cards */
.fraud-analytics h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Chart center but NOT limiting width */
.fraud-analytics canvas {
  display: block;
  margin: 0 auto;
  max-width: 360px;   /* chart control */
  max-height: 360px;
}
