/* ==========================================================================
   STC BANK MANAGEMENT SYSTEM - LUXURY BLACK & GOLD THEME
   Tông màu chủ đạo: Nền Đen Huyền Bí (#070709, #0c0d12) & Vàng Gold Hoàng Gia (#d4af37, #ffd700)
   ========================================================================== */

:root {
  --bg-primary: #070709;
  --bg-secondary: #0c0d12;
  --bg-card: #12141c;
  --bg-card-hover: #191c28;
  --bg-input: #08090e;
  --border-color: #26241e;
  --border-light: #3a3424;

  --accent-gold: #d4af37;
  --accent-gold-hover: #ffd700;
  --accent-gold-bg: rgba(212, 175, 55, 0.14);
  --accent-gold-glow: rgba(212, 175, 55, 0.35);

  --accent-green: #d4af37;
  --accent-green-hover: #ffd700;
  --accent-green-bg: rgba(212, 175, 55, 0.14);
  --accent-green-glow: rgba(212, 175, 55, 0.35);

  --text-main: #f5f5f7;
  --text-muted: #9aa1b2;
  --text-dim: #60677a;

  --status-sent: #d4af37;
  --status-pending: #f59e0b;
  --status-cancelled: #f43f5e;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-width: 250px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 13.5px;
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-green);
}

/* App Layout */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s ease;
  z-index: 50;
}

.brand-section {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.stc-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.stc-logo-badge {
  width: 36px;
  height: 36px;
  background: radial-gradient(circle at 30% 30%, rgba(0, 255, 170, 0.2), rgba(0, 214, 143, 0.05) 70%, transparent);
  border: 1px solid rgba(0, 255, 170, 0.35);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0, 229, 153, 0.2), inset 0 0 8px rgba(0, 255, 170, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stc-logo-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 0 22px rgba(0, 255, 170, 0.35);
}

.stc-brand-info {
  display: flex;
  flex-direction: column;
}

.stc-brand-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1.1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.stc-dot {
  color: #00d68f;
  text-shadow: 0 0 10px #00ffaa;
}

.stc-brand-subtitle {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #00d68f;
  text-transform: uppercase;
  margin-top: 2px;
}

.brand-logo-badge {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #00e599 0%, #059669 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: #051a11;
  box-shadow: 0 0 14px var(--accent-green-glow);
  letter-spacing: 0.5px;
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-name span {
  color: var(--accent-green);
}

.brand-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* Nav Menu */
.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
}

.menu-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 10px 14px 6px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 3px;
  border: 1px solid transparent;
}

.nav-item:hover {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.nav-item.active {
  background-color: var(--accent-green-bg);
  color: var(--accent-green);
  border-color: rgba(0, 229, 153, 0.35);
  font-weight: 600;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(10, 13, 20, 0.7);
}

.user-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1a2333;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(0, 229, 153, 0.3);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.badge-admin {
  background: rgba(0, 229, 153, 0.2);
  color: var(--accent-green);
}

.badge-customer {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.logout-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.logout-btn:hover {
  color: var(--status-cancelled);
}

/* Main Area */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

/* Topbar */
.topbar {
  height: 60px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.api-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 229, 153, 0.08);
  color: var(--accent-green);
  border: 1px solid rgba(0, 229, 153, 0.25);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #ffd700 0%, #d4af37 55%, #b8860b 100%);
  color: #070709;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ffe033 0%, #e5c158 55%, #c99710 100%);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-green);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--status-cancelled);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: var(--status-cancelled);
  color: #fff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Content Container */
.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* NezenX Dashboard Grid (1:1 with Screenshot 1) */
.nezenx-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.nezenx-dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.nezenx-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.nezenx-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.nezenx-toggle-group {
  display: inline-flex;
  background: #090c13;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.nezenx-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

.nezenx-toggle-btn.active {
  background: #1a2232;
  color: #fff;
}

.nezenx-big-balance {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  margin: 12px 0 20px;
}

/* NezenX Transaction Feed List (Screenshot 1 & 3) */
.nezenx-tx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 380px;
}

.nezenx-tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #0d111a;
  border: 1px solid rgba(30, 38, 56, 0.6);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.nezenx-tx-row:hover {
  background: #141a27;
  border-color: rgba(0, 229, 153, 0.3);
}

.nezenx-tx-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nezenx-tx-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.circle-transfer {
  background: #19465a;
  color: #38bdf8;
}

.circle-incoming {
  background: #134e48;
  color: #34d399;
}

.circle-pending {
  background: #451a03;
  color: #fbbf24;
}

.nezenx-tx-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.nezenx-tx-sub {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.nezenx-tx-right {
  text-align: right;
}

.nezenx-tx-amount {
  font-size: 14px;
  font-weight: 700;
}

.nezenx-tx-banktag {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
}

/* NezenX Tags */
.nezenx-checking-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 229, 153, 0.08);
  color: var(--accent-green);
  border: 1px solid rgba(0, 229, 153, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.nezenx-active-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 229, 153, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(0, 229, 153, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.nezenx-active-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-green);
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.input-control, .select-control {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-control:focus, .select-control:focus {
  border-color: var(--accent-green);
}

.search-input-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-input-wrap input {
  width: 100%;
  padding-left: 32px;
}

.search-input-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 15px;
  height: 15px;
}

/* Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.custom-table th {
  background: #0c0f16;
  padding: 11px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(30, 38, 56, 0.4);
  font-size: 13px;
  vertical-align: middle;
}

.custom-table tbody tr:hover {
  background-color: var(--bg-card-hover);
}

/* Amount Highlighting */
.amount-pos {
  color: var(--accent-green);
  font-weight: 700;
}

.amount-neg {
  color: var(--status-cancelled);
  font-weight: 700;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 580px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
}

.modal-body {
  padding: 20px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-secondary);
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
}

.form-help {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent-green);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

.toast-error {
  border-left-color: var(--status-cancelled);
}

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

/* Auth */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 25%, #241f12 0%, #070709 75%);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 26px;
}

.custom-checkbox {
  accent-color: var(--accent-green);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.spin-animation {
  animation: spin 0.8s linear infinite !important;
}
