/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
}

/* ===== Login Page ===== */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d6a9f 50%, #4a90c4 100%);
}

.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-card .logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-card .logo h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1e3a5f;
  letter-spacing: -0.5px;
}

.login-card .logo p {
  color: #888;
  font-size: 14px;
  margin-top: 4px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: #2d6a9f;
  box-shadow: 0 0 0 3px rgba(45, 106, 159, 0.15);
}

.btn-login {
  width: 100%;
  padding: 13px;
  background: #1e3a5f;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.btn-login:hover {
  background: #2d6a9f;
}

.login-error {
  background: #fee;
  color: #c00;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* ===== Dashboard Layout ===== */
.dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navbar */
.navbar {
  background: #1e3a5f;
  color: #fff;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 10;
}

.navbar .nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar .brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* Hamburger Button */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100vh;
  background: #fff;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
  z-index: 100;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  background: #1e3a5f;
  padding: 16px 20px;
  height: 56px;
  display: flex;
  align-items: center;
}

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

.sidebar-nav {
  list-style: none;
  padding: 12px 0;
  flex: 1;
}

.sidebar-nav li {
  margin: 2px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: #555;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: #f0f2f5;
  color: #1e3a5f;
}

.sidebar-link.active {
  background: #e8f0fe;
  color: #1e3a5f;
  font-weight: 600;
}

.sidebar-link svg {
  flex-shrink: 0;
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.navbar .nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar .user-name {
  font-size: 14px;
  opacity: 0.9;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 32px;
}

/* Table Card */
.table-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 32px;
}

.table-card .card-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-card .card-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1e3a5f;
}

.table-card .card-header .record-count {
  font-size: 13px;
  color: #888;
  background: #f0f2f5;
  padding: 4px 12px;
  border-radius: 20px;
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  text-align: left;
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #fafbfc;
  border-bottom: 2px solid #eee;
}

.data-table tbody td {
  padding: 14px 24px;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-enabled {
  background: #e6f9ee;
  color: #1a8a4a;
}

.badge-disabled {
  background: #fde8e8;
  color: #c53030;
}

.badge-success {
  background: #e6f9ee;
  color: #1a8a4a;
}

.badge-warning {
  background: #fff8e6;
  color: #b07d10;
}

.badge-error {
  background: #fde8e8;
  color: #c53030;
}

.badge-info {
  background: #e8f0fe;
  color: #2d6a9f;
}

/* Role Badges */
.badge-role-viewer {
  background: #e8f0fe;
  color: #2d6a9f;
}

.badge-role-editor {
  background: #fff8e6;
  color: #b07d10;
}

.badge-role-admin {
  background: #f3e8ff;
  color: #7c3aed;
}

/* Transaction Type Badges */
.badge-deposit {
  background: #e6f9ee;
  color: #1a8a4a;
}

.badge-withdrawal {
  background: #fde8e8;
  color: #c53030;
}

/* Transaction Status Badges */
.badge-pending {
  background: #fff8e6;
  color: #b07d10;
}

.badge-processing {
  background: #e8f0fe;
  color: #2d6a9f;
}

/* Credit & Debit Text */
.text-credit {
  color: #1a8a4a;
  font-weight: 600;
}

.text-debit {
  color: #c53030;
  font-weight: 600;
}

/* ===== Accounts Page ===== */

/* Add Account Button */
.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e3a5f;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-add:hover {
  background: #2d6a9f;
}

/* Action Buttons */
.actions-cell {
  display: flex;
  gap: 6px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  color: #555;
  transition: all 0.15s;
}

.btn-action:hover {
  background: #f0f2f5;
}

.btn-edit:hover {
  color: #2d6a9f;
  border-color: #2d6a9f;
}

.btn-delete:hover {
  color: #c53030;
  border-color: #c53030;
}

.btn-save {
  color: #1a8a4a;
}

.btn-save:hover {
  color: #1a8a4a;
  border-color: #1a8a4a;
  background: #e6f9ee;
}

.btn-cancel {
  color: #888;
}

.btn-cancel:hover {
  color: #c53030;
  border-color: #c53030;
  background: #fde8e8;
}

/* Inline Edit Inputs */
.data-table .inline-input {
  width: 100%;
  padding: 6px 10px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.data-table .inline-input:focus {
  border-color: #2d6a9f;
  box-shadow: 0 0 0 3px rgba(45, 106, 159, 0.15);
}

.data-table .inline-select {
  padding: 6px 10px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.data-table .inline-select:focus {
  border-color: #2d6a9f;
  box-shadow: 0 0 0 3px rgba(45, 106, 159, 0.15);
}

/* Editing row highlight */
tr.editing {
  background: #f8fafc;
}

/* Password mask */
.password-mask {
  letter-spacing: 2px;
  color: #888;
}

/* Confirm delete overlay */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.confirm-dialog {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.confirm-dialog h3 {
  font-size: 18px;
  color: #1e3a5f;
  margin-bottom: 8px;
}

.confirm-dialog p {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-confirm-delete {
  padding: 10px 24px;
  background: #c53030;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-confirm-delete:hover {
  background: #e53e3e;
}

.btn-confirm-cancel {
  padding: 10px 24px;
  background: #f0f2f5;
  color: #555;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-confirm-cancel:hover {
  background: #e2e5e9;
}

/* ===== Pagination Controls ===== */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
}

.btn-page {
  padding: 8px 18px;
  background: #1e3a5f;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-page:hover:not(:disabled) {
  background: #2d6a9f;
}

.btn-page:disabled {
  background: #ccc;
  color: #888;
  cursor: not-allowed;
}

.page-info {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

/* ===== Date Filter ===== */
.card-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.date-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-input {
  padding: 6px 10px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-input:focus {
  border-color: #2d6a9f;
  box-shadow: 0 0 0 3px rgba(45, 106, 159, 0.15);
}

.filter-separator {
  font-size: 13px;
  color: #888;
}

.btn-filter {
  padding: 6px 14px;
  background: #1e3a5f;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-filter:hover {
  background: #2d6a9f;
}

.btn-filter-clear {
  padding: 6px 14px;
  background: #f0f2f5;
  color: #555;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-filter-clear:hover {
  background: #e2e5e9;
}

/* ===== Toast Notification ===== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  z-index: 300;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
  opacity: 1;
}

.toast-success {
  background: #1a8a4a;
}

.toast-error {
  background: #c53030;
}

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

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