/* =========================================================
   AdaWang · Professional Fintech Custom UI
   ========================================================= */

:root {
  --aw-radius: 14px;
  --aw-radius-sm: 10px;
  --aw-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
  --aw-shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.12);
  --aw-navy: #0f172a;
  --aw-accent: #0d9488;
  --aw-gold: #f0b90b;
  --aw-muted: #64748b;
  --aw-border: rgba(15, 23, 42, 0.08);
  --aw-surface: #ffffff;
  --aw-bg: #f7f8fa;
}

/* ---------- Base readability ---------- */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.base-color {
  color: var(--aw-accent) !important;
}

/* ---------- Copy animation ---------- */
.copyInput {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: var(--aw-radius-sm);
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  color: var(--aw-muted);
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.copyInput:hover {
  color: var(--aw-accent);
  background: rgba(13, 148, 136, 0.08);
}
.copyInput:active {
  transform: translateY(-50%) scale(0.96);
}

.copied::after {
  position: absolute;
  top: -6px;
  right: 8px;
  min-width: 88px;
  display: block;
  content: "DISALIN";
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--aw-gold) 0%, #fcd34d 100%);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(240, 185, 11, 0.28);
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
  animation: aw-show-copied 1.4s ease forwards;
  z-index: 5;
}

@keyframes aw-show-copied {
  0%   { opacity: 0; transform: translateY(6px) scale(0.96); }
  20%  { opacity: 1; transform: translateY(0) scale(1); }
  80%  { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

/* ---------- Cookie card ---------- */
.cookies-card {
  width: min(520px, calc(100vw - 24px));
  padding: 22px 24px;
  color: var(--aw-navy);
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999999;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .35s ease;
  background: var(--aw-surface);
  border: 1px solid var(--aw-border);
  border-radius: 16px;
  box-shadow: var(--aw-shadow-lg);
}
.cookies-card.hide {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  bottom: 20px !important;
}
.radius--10px { border-radius: var(--aw-radius); }

.cookies-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f766e, var(--aw-accent));
  color: #fff;
  font-size: 22px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.25);
  flex-shrink: 0;
}
.cookies-card__content {
  margin-bottom: 0;
  color: var(--aw-muted);
  font-size: 14px;
  line-height: 1.55;
}
.cookies-btn {
  color: #0f172a !important;
  text-decoration: none;
  padding: 10px 22px;
  margin: 4px 4px 0 0;
  display: inline-block;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--aw-gold), #fbbf24);
  font-weight: 700;
  font-size: 13px;
  border: none;
  box-shadow: 0 6px 14px rgba(240, 185, 11, 0.28);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.cookies-btn:hover {
  color: #0f172a !important;
  filter: brightness(1.04);
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .cookies-card {
    width: calc(100% - 16px);
    left: 8px;
    right: 8px;
    bottom: 8px;
    font-size: 13px;
    padding: 16px;
  }
}

/* ---------- Input validation popup ---------- */
.hover-input-popup { position: relative; }
.input-popup { display: none; }
.hover-input-popup .input-popup {
  display: block;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  width: 280px;
  max-width: calc(100vw - 32px);
  background: #0f172a;
  color: #f8fafc;
  padding: 16px 18px;
  border-radius: 12px !important;
  box-shadow: var(--aw-shadow-lg);
  transform: translateX(-50%);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 20;
}
.input-popup::after {
  position: absolute;
  content: '';
  bottom: -8px;
  left: 50%;
  width: 14px;
  height: 14px;
  background: #0f172a;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
}
.input-popup p {
  padding-left: 22px;
  position: relative;
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #e2e8f0;
}
.input-popup p:last-child { margin-bottom: 0; }
.input-popup p::before {
  position: absolute;
  content: '';
  font-family: 'Line Awesome Free', 'Font Awesome 6 Free', sans-serif;
  font-weight: 900;
  left: 0;
  top: 2px;
  line-height: 1;
  font-size: 16px;
}
.input-popup p.error {
  text-decoration: line-through;
  opacity: 0.75;
  color: #fda4af;
}
.input-popup p.error::before { content: "\f057"; color: #ef4444; }
.input-popup p.success::before { content: "\f058"; color: #10b981; }

@media screen and (min-width: 768px) and (max-width: 1024px) {
  .hover-input-popup .input-popup { left: 70% !important; }
}

/* ---------- Responsive filter ---------- */
.show-filter { display: none; }
@media (max-width: 767px) {
  .responsive-filter-card { display: none; transition: none; }
  .show-filter { display: block; }
}

/* ---------- Buttons ---------- */
.btn.disabled,
.btn:disabled,
fieldset:disabled .btn {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none !important;
}
.h-45 { height: 48px; min-height: 48px; }
.h-none { height: 40px !important; min-height: 40px !important; }

/* ---------- Form polish ---------- */
.input-group-text {
  color: var(--aw-muted);
  background-color: #f8fafc;
  border-color: var(--aw-border);
  transition: all linear .15s;
  font-weight: 500;
}
.account-form .input-group-text {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.75);
}
.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
  border-left: 0;
}
.input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3),
.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
  border-right: 0;
}
.input-group-text.removeFile {
  border-color: var(--aw-border) !important;
  border-style: dashed;
  background: #fff;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus,
.form-control:focus,
.form-select:focus {
  border-color: rgba(13, 148, 136, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12) !important;
  outline: none;
}

/* ---------- Cards / panels ---------- */
.card,
.aw-card,
.dashboard-card,
.stat-card {
  border-radius: var(--aw-radius) !important;
}

/* Soft elevation for common white cards */
.card:not(.no-shadow),
.aw-panel {
  box-shadow: var(--aw-shadow);
  border: 1px solid var(--aw-border);
}

/* ---------- Date picker ---------- */
.daterangepicker td.active,
.daterangepicker td.active:hover,
.daterangepicker .ranges li.active {
  background-color: var(--aw-accent) !important;
  border-radius: 6px;
}

/* ---------- Primary CTA polish ---------- */
.btn-primary,
button.btn-primary,
a.btn-primary {
  border-radius: 12px;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

/* ---------- Mobile spacing ---------- */
@media (max-width: 767px) {
  .container, .aw-container {
    padding-left: 16px;
    padding-right: 16px;
  }
}
