/* =========================================================
   UniFlex · Custom UI (Professional Fintech)
   ========================================================= */

:root {
  --uf-radius: 12px;
  --uf-radius-sm: 8px;
  --uf-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  --uf-shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
  --uf-accent: #1e3a8a;
  --uf-accent-2: #0d9488;
  --uf-warn: #f59e0b;
  --uf-success: #10b981;
  --uf-danger: #ef4444;
  --uf-text: #0f172a;
  --uf-muted: #64748b;
  --uf-border: rgba(15, 23, 42, 0.08);
}

/* ---------- Brand / base ---------- */
.base-color {
  color: hsl(var(--main)) !important;
}

/* ---------- Copy affordance ---------- */
.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(--uf-radius-sm);
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  color: var(--uf-muted);
  background: transparent;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.copyInput:hover {
  color: var(--uf-accent);
  background: rgba(30, 58, 138, 0.06);
}
.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: #fff;
  background: linear-gradient(135deg, var(--uf-accent) 0%, var(--uf-accent-2) 100%);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.25);
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
  animation: uf-show-copied 1.4s ease forwards;
  z-index: 5;
}

@keyframes uf-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 consent card ---------- */
.cookies-card {
  width: min(520px, calc(100vw - 24px));
  padding: 22px 24px;
  color: var(--uf-text);
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999999;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .35s ease;
  background: #ffffff;
  border: 1px solid var(--uf-border);
  border-radius: 16px;
  box-shadow: var(--uf-shadow-lg);
  backdrop-filter: blur(8px);
}
.cookies-card.hide {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  bottom: 20px !important;
}
.radius--10px {
  border-radius: var(--uf-radius);
}
.cookies-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--uf-accent), var(--uf-accent-2));
  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(--uf-muted);
  font-size: 14px;
  line-height: 1.55;
}
.cookies-btn {
  color: #fff;
  text-decoration: none;
  padding: 10px 22px;
  margin: 4px 4px 0 0;
  display: inline-block;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--uf-accent), #1d4ed8);
  font-weight: 600;
  font-size: 13px;
  border: none;
  box-shadow: 0 6px 14px rgba(30, 58, 138, 0.22);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.cookies-btn:hover {
  color: #fff;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(30, 58, 138, 0.28);
}
.cookies-btn:active {
  transform: translateY(0);
}
@media (max-width: 767px) {
  .cookies-card {
    width: calc(100% - 16px);
    left: 8px;
    right: 8px;
    bottom: 8px;
    font-size: 13px;
    padding: 16px;
  }
}

/* ---------- Password / 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(--uf-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-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: var(--uf-danger);
}
.input-popup p.success::before {
  content: "\f058";
  color: var(--uf-success);
}
@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;
  background-color: hsl(var(--black) / 0.45);
  border-color: hsl(var(--black) / 0.02);
  box-shadow: none !important;
}
.h-45 {
  height: 48px;
  min-height: 48px;
}
.h-none {
  height: 40px !important;
  min-height: 40px !important;
}

/* ---------- Form / input group ---------- */
.input-group-text {
  color: var(--uf-muted);
  background-color: #f8fafc;
  border-color: var(--uf-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(--uf-border) !important;
  border-style: dashed;
  background: #fff;
}

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

/* ---------- Soft polish for cards / forms ---------- */
.card.custom--card,
.dashboard-card .card {
  border: 1px solid var(--uf-border);
  box-shadow: var(--uf-shadow);
  border-radius: 16px;
}
.form-control:focus,
.form-select:focus {
  border-color: rgba(30, 58, 138, 0.35);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}
