/*
  AdaWang modern theme refresh.
  This file is intentionally an override layer so existing PHP logic stays intact.
*/
:root {
  --aw-bg: #f4f7fb;
  --aw-bg-soft: #f8fbff;
  --aw-panel: rgba(255, 255, 255, 0.96);
  --aw-panel-solid: #ffffff;
  --aw-text: #101828;
  --aw-muted: #667085;
  --aw-border: #e4eaf2;
  --aw-primary: #0b5b4a;
  --aw-primary-2: #0fa47a;
  --aw-accent: #f5b942;
  --aw-blue: #2563eb;
  --aw-danger: #dc2626;
  --aw-success: #059669;
  --aw-radius: 16px;
  --aw-radius-sm: 12px;
  --aw-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
  --aw-shadow-strong: 0 24px 70px rgba(15, 23, 42, 0.12);
  --aw-ease: cubic-bezier(.2, .8, .2, 1);
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  color: var(--aw-text) !important;
  background:
    radial-gradient(circle at 8% 4%, rgba(15, 164, 122, .09), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(245, 185, 66, .12), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, var(--aw-bg) 52%, #ffffff 100%) !important;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent 75%);
}

::selection {
  background: rgba(15, 164, 122, .18);
  color: var(--aw-primary);
}

.portal-main,
.content-wrap,
.main-content,
.dashboard-main,
.page-wrap,
.admin-content,
.container-area {
  background: transparent !important;
}

.container,
.portal-container,
.dashboard-wrap,
.support-layout,
.site-shell,
.public-container {
  max-width: 1180px !important;
}

.card,
.panel,
.panel-surface,
.overview-card,
.stat,
.stat-card,
.focus-card,
.loan-card,
.transaction-card,
.wallet-row,
.trust-check,
.meta-box,
.readonly-grid > div,
.bank-snapshot,
.support-tip,
.action-tile,
.compact-row,
.table-wrap,
.settings-panel,
.forum-card,
.install-card,
.auth-card,
.verification-card,
.payment-card,
.checkout-card,
.admin-card,
.admin-panel,
.table-responsive {
  background: var(--aw-panel) !important;
  border: 1px solid var(--aw-border) !important;
  border-radius: var(--aw-radius) !important;
  box-shadow: var(--aw-shadow) !important;
}

.card,
.panel,
.overview-card,
.action-tile,
.support-tip,
.forum-card,
.admin-card,
.table-responsive {
  transition: transform .2s var(--aw-ease), box-shadow .2s var(--aw-ease), border-color .2s var(--aw-ease);
}

.card:hover,
.panel:hover,
.overview-card:hover,
.action-tile:hover,
.support-tip:hover,
.forum-card:hover,
.admin-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--aw-shadow-strong) !important;
  border-color: rgba(15, 164, 122, .22) !important;
}

h1,
h2,
h3,
h4,
.page-title,
.section-title {
  color: var(--aw-text) !important;
  letter-spacing: 0 !important;
}

p,
.muted,
.text-muted,
.subtitle,
.section-subtitle,
.small-copy {
  color: var(--aw-muted) !important;
}

a {
  color: var(--aw-primary);
}

input,
select,
textarea,
.form-control,
.form-select {
  border: 1px solid var(--aw-border) !important;
  border-radius: var(--aw-radius-sm) !important;
  background: #ffffff !important;
  color: var(--aw-text) !important;
  box-shadow: none !important;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: rgba(15, 164, 122, .65) !important;
  box-shadow: 0 0 0 4px rgba(15, 164, 122, .12) !important;
  outline: 0 !important;
}

/* Native choice controls must not inherit text-field styling. */
input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0 !important;
  border: initial !important;
  border-radius: initial !important;
  background: initial !important;
  box-shadow: none !important;
  accent-color: var(--aw-primary-2);
  cursor: pointer !important;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: 3px solid rgba(15, 164, 122, .18) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

.btn,
button,
.nav-link,
.side-link,
.mobile-action-link,
.action-button {
  letter-spacing: 0 !important;
}

.btn,
.button,
button[type="submit"],
.btn-primary,
.btn-success,
.btn-warning,
.btn-outline,
.nav-link.primary,
.hero-cta,
.cta-button,
.mobile-action-toggle {
  border-radius: 999px !important;
  font-weight: 850 !important;
}

.btn.primary,
.btn-primary,
.btn-success,
button[type="submit"],
.nav-link.primary,
.hero-cta.primary,
.cta-button.primary,
.mobile-action-toggle {
  background: linear-gradient(135deg, var(--aw-primary), var(--aw-primary-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 16px 34px rgba(15, 164, 122, .24) !important;
}

.btn.primary:hover,
.btn-primary:hover,
.btn-success:hover,
button[type="submit"]:hover,
.nav-link.primary:hover,
.hero-cta.primary:hover,
.cta-button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 46px rgba(15, 164, 122, .28) !important;
}

.btn.outline,
.btn-light,
.btn-secondary,
.hero-cta.secondary,
.cta-button.secondary {
  background: #ffffff !important;
  border: 1px solid var(--aw-border) !important;
  color: var(--aw-primary) !important;
  box-shadow: var(--aw-shadow) !important;
}

.status,
.badge,
.pill,
.hero-chip,
.transaction-ref,
.support-ref,
.verified-check {
  border-radius: 999px !important;
  letter-spacing: 0 !important;
}

.site-header,
.topbar,
.admin-topbar,
.portal-topbar {
  background: rgba(255, 255, 255, .88) !important;
  border-bottom: 1px solid rgba(228, 234, 242, .9) !important;
  backdrop-filter: blur(16px);
}

.site-header .brand img,
.brand img,
.footer img,
.footer-logo img {
  object-fit: contain;
  max-width: 100%;
}

.portal-sidebar,
.sidebar,
.admin-sidebar {
  background: linear-gradient(180deg, #0b1220 0%, #0d2f2a 58%, #09211e 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, .08) !important;
  color: #e8f3ef !important;
  box-shadow: 18px 0 50px rgba(15, 23, 42, .12);
}

.portal-sidebar .brand,
.sidebar .brand,
.sidebar-profile,
.user-mini-card {
  background: rgba(255, 255, 255, .07) !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  border-radius: var(--aw-radius) !important;
}

.side-section-label,
.sidebar-heading,
.nav-section {
  color: rgba(232, 243, 239, .56) !important;
}

.side-link,
.sidebar .nav-link,
.admin-sidebar .nav-link {
  color: rgba(232, 243, 239, .84) !important;
  border-radius: 12px !important;
  background: transparent !important;
}

.side-link:hover,
.side-link.active,
.sidebar .nav-link:hover,
.sidebar .nav-link.active,
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(15, 164, 122, .18) !important;
  color: #ffffff !important;
  transform: translateX(2px);
  box-shadow: inset 3px 0 0 var(--aw-accent) !important;
}

.dashboard-command,
.p2p-wallet-hero,
.wallet-balance-card,
.hero-panel,
.public-hero,
.admin-hero,
.payment-hero,
.hero-card {
  position: relative;
  overflow: hidden;
  color: #ffffff !important;
  background: linear-gradient(135deg, #0b1220 0%, #0b5b4a 62%, #0fa47a 100%) !important;
  border: 0 !important;
  border-radius: 22px !important;
  box-shadow: 0 28px 80px rgba(11, 91, 74, .24) !important;
}

.dashboard-command::after,
.p2p-wallet-hero::after,
.wallet-balance-card::after,
.hero-panel::after,
.public-hero::after,
.admin-hero::after,
.payment-hero::after,
.hero-card::after {
  content: "";
  position: absolute;
  inset: -45% auto auto -10%;
  width: 70%;
  height: 190%;
  pointer-events: none;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .18), transparent);
  transform: rotate(18deg);
  animation: awThemeSweep 8s ease-in-out infinite;
}

.dashboard-command *,
.p2p-wallet-hero *,
.wallet-balance-card *,
.hero-panel *,
.public-hero *,
.admin-hero *,
.payment-hero *,
.hero-card * {
  position: relative;
  z-index: 1;
}

.dashboard-command p,
.p2p-wallet-hero p,
.wallet-balance-card p,
.hero-panel p,
.public-hero p,
.admin-hero p,
.payment-hero p,
.hero-card p,
.dashboard-command .muted,
.p2p-wallet-hero .muted {
  color: rgba(255, 255, 255, .78) !important;
}

.overview-card .stat-icon,
.action-tile .material-icons-outlined,
.support-tip .material-icons-outlined,
.trust-check > .material-icons-outlined {
  background: rgba(15, 164, 122, .10) !important;
  color: var(--aw-primary) !important;
}

.table,
table {
  color: var(--aw-text) !important;
}

.table thead th,
table thead th,
th {
  background: #f8fafc !important;
  color: #475467 !important;
  border-bottom: 1px solid var(--aw-border) !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

.table tbody tr,
table tbody tr {
  border-color: var(--aw-border) !important;
}

.table tbody tr:hover,
table tbody tr:hover {
  background: rgba(15, 164, 122, .05) !important;
}

.support-shell,
.support-chat-panel,
.chat-shell,
.ticket-chat,
.live-chat-card {
  border-radius: 20px !important;
  overflow: hidden;
  background: var(--aw-panel-solid) !important;
  border: 1px solid var(--aw-border) !important;
  box-shadow: var(--aw-shadow-strong) !important;
}

.support-messages,
.chat-messages,
.ticket-messages {
  background:
    radial-gradient(circle at 12% 0%, rgba(15, 164, 122, .10), transparent 32%),
    linear-gradient(180deg, #f8fbff, #eff8f4) !important;
}

.support-bubble,
.chat-bubble,
.message-bubble {
  max-width: min(640px, 82%) !important;
  border-radius: 18px !important;
  border: 1px solid var(--aw-border) !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06) !important;
}

.support-bubble.visitor,
.message-bubble.me,
.chat-bubble.me {
  background: #dcfce7 !important;
  border-color: #a7f3d0 !important;
  color: #064e3b !important;
}

.support-bubble.support,
.message-bubble.them,
.chat-bubble.them {
  background: #ffffff !important;
  border-color: #dce7f2 !important;
  color: var(--aw-text) !important;
}

.support-compose,
.chat-compose,
.ticket-compose {
  background: #ffffff !important;
  border-top: 1px solid var(--aw-border) !important;
}

.support-compose textarea,
.chat-compose textarea,
.ticket-compose textarea {
  min-height: 56px !important;
  max-height: 150px !important;
  background: #f8fafc !important;
}

.homepage-stats,
.stats-grid,
.overview-grid,
.dashboard-grid,
.quick-action-grid,
.feature-grid {
  gap: 16px !important;
}

.footer,
footer {
  background: linear-gradient(135deg, #0b1220, #10251f) !important;
  color: #edf7f2 !important;
}

.footer p,
footer p,
.footer a,
footer a {
  color: rgba(237, 247, 242, .78) !important;
}

.footer a:hover,
footer a:hover {
  color: #ffffff !important;
}

.mobile-menu-toggle,
.hamburger,
.menu-toggle {
  border-radius: 14px !important;
  background: #ffffff !important;
  border: 1px solid var(--aw-border) !important;
  box-shadow: var(--aw-shadow) !important;
}

.mobile-action-drawer,
.bottom-actions,
.mobile-bottom-nav {
  background: rgba(255, 255, 255, .94) !important;
  border: 1px solid var(--aw-border) !important;
  box-shadow: 0 -18px 54px rgba(15, 23, 42, .12) !important;
  backdrop-filter: blur(16px);
}

@keyframes awThemeSweep {
  0%, 42% { transform: translateX(-35%) rotate(18deg); opacity: 0; }
  50% { opacity: 1; }
  70%, 100% { transform: translateX(180%) rotate(18deg); opacity: 0; }
}

@media (max-width: 1024px) {
  .container,
  .portal-container,
  .dashboard-wrap,
  .support-layout,
  .site-shell,
  .public-container {
    max-width: 100% !important;
  }

  .dashboard-grid,
  .overview-grid,
  .quick-action-grid,
  .feature-grid,
  .support-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  body {
    background-size: auto !important;
  }

  body::before {
    background-size: 28px 28px;
  }

  .container,
  .portal-container,
  .dashboard-wrap,
  .support-layout,
  .site-shell,
  .public-container,
  .content-wrap,
  .main-content {
    width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .card,
  .panel,
  .overview-card,
  .stat,
  .stat-card,
  .focus-card,
  .loan-card,
  .transaction-card,
  .support-shell,
  .support-chat-panel,
  .admin-card,
  .table-responsive {
    border-radius: 14px !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06) !important;
  }

  .dashboard-command,
  .p2p-wallet-hero,
  .wallet-balance-card,
  .hero-panel,
  .public-hero,
  .admin-hero,
  .payment-hero,
  .hero-card {
    border-radius: 18px !important;
  }

  .dashboard-command,
  .p2p-wallet-hero,
  .hero-panel,
  .public-hero,
  .admin-hero {
    padding: 22px !important;
  }

  h1,
  .page-title {
    font-size: clamp(1.75rem, 8vw, 2.45rem) !important;
    line-height: 1.12 !important;
  }

  h2,
  .section-title {
    font-size: clamp(1.35rem, 6vw, 1.9rem) !important;
  }

  .btn,
  .button,
  .nav-link,
  button[type="submit"] {
    min-height: 44px;
  }

  .support-bubble,
  .chat-bubble,
  .message-bubble {
    max-width: 92% !important;
    font-size: .94rem !important;
  }

  .table-responsive,
  .loan-scroll-list,
  .admin-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 720px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
/* Global stability layer: keeps content inside its container and avoids costly motion. */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
img, picture, video, canvas, svg { max-width: 100%; height: auto; }
.portal-main,
.portal-layout,
.card,
.card-pad,
.panel-surface,
.section-head,
.form-actions,
.grid,
.wallet-row,
.activity-item,
.transaction-card,
.loan-card,
.meta-box,
.support-chat-shell,
.support-chat-card,
.support-bubble { min-width: 0; max-width: 100%; }
p, li, dd, td, th, label, small, strong, .muted, .side-link, .btn {
    overflow-wrap: anywhere;
    word-break: normal;
}
.btn, button, input, select, textarea { max-width: 100%; }
.btn { white-space: normal; text-align: center; }
.table-wrap, .table-responsive { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.card:hover,
.panel-surface:hover,
.overview-card:hover,
.action-tile:hover,
.loan-card:hover,
.transaction-card:hover { transform: none !important; }
.aw-cursor-dot,
.aw-touch-ripple { display: none !important; }

@media (max-width: 900px) {
    .portal-main { width: 100%; max-width: 100%; overflow-x: clip; }
    .grid.two, .grid.three { grid-template-columns: 1fr !important; }
    .section-head { align-items: flex-start; }
    .section-head .form-actions { width: 100%; }
}

@media (prefers-reduced-motion: reduce), (max-width: 900px) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Homepage 2026: lightweight modern motion using compositor-friendly properties. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 18%, rgba(14, 165, 233, .13), transparent 32%),
    radial-gradient(circle at 84% 15%, rgba(16, 185, 129, .13), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%) !important;
}

.hero::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: -1 !important;
  pointer-events: none !important;
  background-image:
    linear-gradient(rgba(37, 99, 235, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .045) 1px, transparent 1px) !important;
  background-size: 38px 38px !important;
  opacity: .7;
  animation: awHomeGrid 12s ease-in-out infinite alternate !important;
}

.hero-container > * {
  animation: awHomeEnter .58s var(--aw-ease) both !important;
}

.hero-container > :nth-child(2) { animation-delay: .05s !important; }
.hero-container > :nth-child(3) { animation-delay: .10s !important; }
.hero-container > :nth-child(4) { animation-delay: .15s !important; }
.hero-container > :nth-child(n+5) { animation-delay: .20s !important; }

.hero-badge,
.hero-duitnow-card,
.hero-stat,
.quick-action-card,
.feature-card,
.simulator-card,
.calc-card {
  border-color: rgba(148, 163, 184, .26) !important;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .075) !important;
}

.hero-stat,
.quick-action-card,
.feature-card {
  transition: transform .22s var(--aw-ease), box-shadow .22s var(--aw-ease), border-color .22s ease !important;
}

.hero-stat:hover,
.quick-action-card:hover,
.feature-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(37, 99, 235, .30) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .11) !important;
}

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

@keyframes awHomeGrid {
  from { opacity: .42; transform: translate3d(0, 0, 0); }
  to { opacity: .72; transform: translate3d(0, 8px, 0); }
}

@media (max-width: 900px) {
  .hero::before { animation: none !important; }
  .hero-container > * { animation-duration: .4s; }
  .hero-stat:hover,
  .quick-action-card:hover,
  .feature-card:hover { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero-container > * { animation: none !important; }
}
