@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

:root {
  /* ═══ AscendCapitalBank Teal Color System ═══ */
  --primary-dark: #003b5c;
  --primary: #004f6d;
  --primary-mid: #00697e;
  --accent: #2bbcb3;
  --accent-light: #4dd9c0;
  --accent-pale: #e6f9f7;

  /* Surfaces */
  --main-color: #ffffff;
  --bg-color: #f4f7fa;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #f0f3f7;

  /* Typography */
  --font-color: #1a2b3c;
  --font-secondary: #4a6274;
  --thin-font-color: #718ebf;
  --inactive-font-color: #94a3b8;

  /* Sidebar (keep legacy alias) */
  --bg-sidecolor-2: #003b5c;

  /* Hover/Active */
  --hover-effects: #e6f9f7;
  --hover-dark: #002e47;

  /* Status */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 59, 92, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 59, 92, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 59, 92, 0.1);
  --shadow-xl: 0 16px 40px rgba(0, 59, 92, 0.12);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Font Sizes */
  --big-font-size: clamp(4rem, 6vw, 6.6rem);
  --semi-big-font-size: clamp(1.5rem, 3vw, 1.6rem);
  --paragraph-font-size: clamp(0.8rem, 1.5vw, 0.875rem);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ═══ Global Reset ═══ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══ Layout ═══ */
.wrapper {
  display: flex;
  height: 100vh;
  background-color: var(--bg-color);
}

/* ═══ Sidebar ═══ */
aside {
  width: 240px;
  background: var(--main-color);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

aside hr {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid var(--border-light);
}

aside h5 {
  font-size: var(--paragraph-font-size);
  color: var(--font-color);
  font-weight: 600;
}

aside p {
  font-size: 0.75rem;
  color: var(--inactive-font-color);
  font-weight: 500;
}

/* Logo */
aside .Logos-cont {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

aside .logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70%;
  margin-top: 0;
}

/* Profile */
aside .profile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  width: 100%;
}

aside .img-fluid,
aside .profile-pic {
  width: 60px;
  height: 60px;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  border: 2.5px solid var(--accent);
  object-fit: cover;
}

/* Navigation */
aside nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 1rem;
  font-size: var(--paragraph-font-size);
}

aside nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  color: var(--inactive-font-color);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-sm);
  height: 38px;
  transition: all 0.25s var(--ease-out);
}

aside nav a img {
  width: 20px;
  margin-right: 2px;
}

aside nav a:hover {
  color: var(--primary-dark);
  background-color: var(--hover-effects);
  transform: translateX(3px);
}

/* ═══ Sidebar Active State ═══ */
.btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background-color: transparent;
  color: var(--inactive-font-color);
  border-radius: var(--radius-sm);
  font-weight: 500;
  height: 38px;
  text-decoration: none;
  transition: all 0.25s var(--ease-out);
}

.btn:hover {
  color: var(--primary-dark);
  background-color: var(--hover-effects);
}

.dash-text {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--main-color) !important;
  box-shadow: 0 3px 10px rgba(0, 59, 92, 0.25);
  border-radius: var(--radius-sm);
  height: 38px;
}

.dash-text:hover {
  background: linear-gradient(135deg, var(--hover-dark), var(--primary-dark));
  color: var(--main-color) !important;
  transform: translateX(3px);
}

/* Logout */
.logout-cont {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  font-size: var(--paragraph-font-size);
}

.logout {
  color: var(--inactive-font-color);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.25s var(--ease-out);
}

.logout:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.06);
}

/* ═══ Main Container ═══ */
.container {
  flex: 1;
  background-color: var(--bg-color);
  overflow: auto;
  z-index: 999;
}

main header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--main-color);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 998;
}

main header h1 {
  font-size: var(--semi-big-font-size);
  color: var(--font-color);
  font-weight: 700;
}

main header .profile-conts {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

main header .profile-conts .img-fluid {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
}

/* ═══ Dashboard Content ═══ */
.dashboard-content {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  gap: 1.5rem;
}

/* ═══ Account Summary Card ═══ */
.dash-acc-wrapper {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  gap: 1.5rem;
}

.dash-acc-wrapper > .account-summary,
.dash-acc-wrapper > .quick-actions {
  width: 50%;
  box-sizing: border-box;
}

.account-summary {
  position: relative;
  background: var(--main-color);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.account-summary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-dark), var(--accent));
}

.account-summary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.account-summary h2:first-of-type {
  font-size: 1rem;
  color: var(--font-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.account-summary h2:last-of-type {
  font-size: 1.75rem;
  color: var(--font-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.account-summary p {
  font-size: 0.95rem;
  color: var(--font-color);
  margin: 0.25rem 0;
}

.account-summary .balance {
  display: inline-block;
  font-size: 2rem;
  color: var(--primary-dark);
  font-weight: 800;
  margin-top: 0.75rem;
  background: var(--accent-pale);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

/* ═══ Quick Actions ═══ */
.quick-actions {
  position: relative;
  background: var(--main-color);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.quick-actions::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.quick-actions h2 {
  font-size: 1.4rem;
  color: var(--font-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.quick-actions .action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-actions .action-buttons a,
.quick-actions .btn1 {
  flex: 1 1 calc(50% - 10px);
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--main-color);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border: none;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}

.quick-actions .action-buttons a:hover,
.quick-actions .btn1:hover {
  background: linear-gradient(135deg, var(--hover-dark), var(--primary-dark));
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 59, 92, 0.2);
}

.quick-actions .action-buttons a:active,
.quick-actions .btn1:active {
  transform: translateY(0);
}

/* ═══ Transactions ═══ */
.transactions-container {
  background: var(--main-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.transactions-tabs {
  display: flex;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.transactions-tabs .tab {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--inactive-font-color);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color 0.25s var(--ease-out);
}

.transactions-tabs .tab:hover {
  color: var(--primary);
}

.transactions-tabs .tab.active {
  color: var(--primary-dark);
  font-weight: 600;
}

.transactions-tabs .tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-dark), var(--accent));
  border-radius: 2px 2px 0 0;
}

.transactions-table-wrapper {
  overflow-x: auto;
}

.transactions-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.transactions-table thead {
  background: var(--bg-color);
}

.transactions-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--font-secondary);
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.transactions-table tbody tr {
  transition: background 0.2s;
}

.transactions-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.transactions-table tbody tr:hover {
  background: var(--accent-pale);
}

.transactions-table tbody td {
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--font-color);
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
}

.transactions-table .icon {
  width: 32px;
  text-align: center;
}

.transactions-table .amount.positive {
  color: var(--success);
  font-weight: 600;
}

.transactions-table .amount.negative {
  color: var(--danger);
  font-weight: 600;
}

/* ═══ Download Button ═══ */
.btn-download {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary-dark);
  background: none;
  border: 1.5px solid var(--primary-dark);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}

.btn-download:hover {
  background: var(--primary-dark);
  color: var(--main-color);
}

/* ═══ Chart Cards ═══ */
.transaction-distribution-chart,
.weekly-activity-chart,
.balance-over-time-chart {
  background: var(--main-color);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

/* ═══ Hamburger ═══ */
.hamburger {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  color: var(--font-color);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.hamburger:hover {
  background: var(--bg-color);
}

/* ═══ Pagination ═══ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  gap: 5px;
}

.pagination .page-link {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 2px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--font-color);
  text-decoration: none;
  transition: all 0.25s var(--ease-out);
}

.pagination .page-link:hover {
  background-color: var(--accent-pale);
  border-color: var(--accent);
}

.pagination .page-link.active {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  color: white;
  border-color: var(--primary-dark);
}

/* ═══ Responsive ═══ */
@media screen and (max-width: 876px) {
  .dash-acc-wrapper {
    flex-direction: column;
  }
  .dash-acc-wrapper > .account-summary,
  .dash-acc-wrapper > .quick-actions {
    width: 100%;
  }
}

@media screen and (max-width: 509px) {
  .quick-actions .action-buttons {
    flex-direction: column;
  }
}

@media (max-width: 1084px) {
  aside.sidebar {
    position: fixed;
    left: -240px;
    top: 0;
    height: 100%;
    background: var(--main-color);
    transition: left 0.3s var(--ease-out);
    z-index: 9999;
    box-shadow: var(--shadow-xl);
  }
  aside.sidebar.active {
    left: 0;
  }
  .hamburger {
    display: block;
    z-index: 10000;
  }
  .wrapper {
    flex-direction: column;
  }
  .container {
    padding-left: 0;
  }
}

/* ═══ Keyframe Animations ═══ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Content Animations */
.content {
  overflow: hidden;
  animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.Summary,
.deposit-distribution-chart.content-1,
.transactions-table-wrapper.content-1,
table,
.quick-actions,
.dashboard-content,
.loan_list {
  animation: fadeInUp 0.6s var(--ease-out) 0.15s both;
  overflow: hidden;
}

/* ═══ Glassmorphism Utility ═══ */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ═══ Common Alert Styles ═══ */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  animation: fadeInUp 0.4s var(--ease-out);
}

.alert-danger {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: var(--success);
  border: 1px solid #bbf7d0;
}

.alert-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.alert-info {
  background: #eff6ff;
  color: var(--info);
  border: 1px solid #bfdbfe;
}
