/* =========================================================
   📦 Universal Card Grid System (v1.1)
   Used for Offers, Leads, Users, etc.
   ========================================================= */

.am-subtitle {
  margin-top: 0.35rem;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.65);
}


.am-ico-good, .am-ico-bad{
    background: #e0e0e0;
    border-radius: 12px;
    box-shadow:
        6px 6px 12px rgba(0,0,0,0.1),
        -6px -6px 12px rgba(255,255,255,0.7);
}
.am-ico-good{color:green;font-size: 1.2em;}
.am-ico-bad{color:red;font-size: 1.2em;}

/* =========================
   🧱 Layout & Grid
   ========================= */
.am-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* =========================
   🎴 Universal Card Wrapper
   ========================= */
.am-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--am-card-background, #fff);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
}

.am-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  border-color: var(--am-primary);
}

.am-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}

.am-card h3 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--am-primary);
}

/* =========================
   🔸 Variants
   ========================= */
.am-card.priority {
  border: 2px solid var(--am-primary);
  box-shadow: 0 0 10px rgba(0,165,255,0.25);
}

/* =========================
   🏷️ Badge
   ========================= */
.am-badge {
  background: var(--am-primary);
  color: #fff;
  padding: .2rem .6rem;
  border-radius: 1rem;
  font-size: .75rem;
  font-weight: 500;
}

/* =========================
   💰 Price Tag
   ========================= */
.am-price {
  display: inline-block;
  background: linear-gradient(135deg, #114da6, #4ab1f0);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  width: 70%;
  padding: 6px 14px;
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  letter-spacing: 0.3px;
  margin: 0.75rem auto;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.am-price:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.am-price small {
  display: block;
  color: #dfd;
  font-weight: 400;
  font-size: 0.7em;
}

/* =========================
   📊 Stats Row
   ========================= */
.am-stats {
  display: flex;
  justify-content: space-around;
  background: rgba(0,0,0,0.03);
  border-radius: .75rem;
  padding: .75rem;
  margin: 1rem 0;
}

.am-stats strong {
  font-size: 1.1rem;
}

.am-stats small {
  font-size: .75rem;
  color: var(--am-muted);
}

/* =========================
   🔘 Footer / Buttons
   ========================= */
.am-card footer {
  margin-top: auto;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.am-card .am-btn {
  background: #fdfdfd;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  transition: 0.2s;
}
.am-card .am-btn:hover {
  background: var(--am-primary);
  color: #fff;
}

/* =========================================================
   ⚡ Alerts
   ========================================================= */
.am-alert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 1px solid #b1dfbb;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin: 10px auto;
  max-width: 480px;
  opacity: 0;
  transform: translateY(-8px);
  animation: fadeInAlert 0.6s forwards;
}

@keyframes fadeInAlert {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.am-alert.error {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border-color: #f1b0b7;
}

.am-alert.warning {
  background: linear-gradient(135deg, #fff3cd, #ffeeba);
  color: #856404;
  border-color: #ffe8a1;
}

.am-alert.info {
  background: linear-gradient(135deg, #d1ecf1, #bee5eb);
  color: #0c5460;
  border-color: #abdde5;
}

.am-alert.muted {
  background: linear-gradient(135deg, #bac0c1, #898c8c);
  color: #121212;
  border-color: #ababab;
}

/* =========================================================
   🏷️ Labels
   ========================================================= */
.am-lbl {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

/* Label color sets */
.lbl-danger { background: linear-gradient(135deg, #e63946, #b71c1c); color: #fff; }
.lbl-success { background: linear-gradient(135deg, #00b894, #019875); color: #fff; }
.lbl-info { background: linear-gradient(135deg, #0984e3, #0747a6); color: #fff; }
.lbl-warning { background: linear-gradient(135deg, #f1c40f, #f39c12); color: #333; }
.lbl-error { background: linear-gradient(135deg, #d63031, #c0392b); color: #fff; }

.am-lbl.glow {
  box-shadow: 2px 3px 8px rgba(5,55,155,0.75);
}

@media (prefers-color-scheme: dark) {
  .am-lbl {
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  }
}

/* =========================================================
   📰 Stylish Article Tiles
   ========================================================= */
.am-list .grid {
  gap: 2rem;
  margin-top: 2rem;
  justify-items: center; 
}

.am-list article {
  display: flex;
  flex-direction: column;
  background: var(--card-bg, #fff);
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
  text-align: center;
  max-width: 360px;
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.am-list article:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.1);
}

.am-list article i {
  font-size: 2rem;
  color: var(--primary, #0d6efd);
  margin-bottom: 0.75rem;
}

.am-list article h3 {
  margin-top: 0.5rem;
  color: var(--heading-color, #222);
  font-weight: 600;
}

.am-list article p {
  color: var(--text-color, #555);
  font-size: 0.95rem;
  margin: 1rem 0 1.5rem;
  line-height: 1.5;
}

.am-list article mark {
  display: inline-block;
  background: rgba(212, 178, 40, 0.6);
  color: #333;
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
}

.am-list article footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--muted-border-color, #e0e0e0);
}

/* Buttons */
.am-btn {
  padding: 0.6rem 1.4rem;
  font-weight: 500;
}
.am-btn:hover {
  transform: scale(0.95);
}

/* Hover glow */
.am-list article::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.2), transparent 60%);
  transform: scale(0);
  transition: transform 0.4s ease;
  pointer-events: none;
}
.am-list article:hover::before {
  transform: scale(1);
}


/* Widgets */
.am-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.am-widget {
  border-radius: 1rem;
  background: #ffffff;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.am-widget:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.am-widget i {
  font-size: 2.5rem;
  color: #0e49a3;
  margin-bottom: 0.75rem;
}
.am-widget h3 {
  margin-bottom: 0.5rem;
}
.am-widget p {
  font-size: 0.9rem;
  color: var(--am-muted-color);
  margin-bottom: 1rem;
}

/* Progress bars */
progress {
    width: 100%;
    height: 16px;
}

progress.green::-webkit-progress-value { background: #4caf50; }
progress.green::-webkit-progress-bar  { background: #ddd; }
progress.green::-moz-progress-bar     { background: #4caf50; }

progress.blue::-webkit-progress-value { background: #2196f3; }
progress.blue::-webkit-progress-bar  { background: #ddd; }
progress.blue::-moz-progress-bar     { background: #2196f3; }


/* Deals Grid */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
  max-width: 900px;
  margin: 2rem auto;
}

.deal-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  font-size: 1.1rem;
  border-radius: 14px;
  min-height: 120px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 6px 18px rgba(25,25,25,0.06);
  overflow: visible;
}
.deal-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(25,25,25,0.09);
  border-left: 2px solid #0e49a3;
}

.deal-btn .label {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}
.deal-btn .title {
  font-weight: 600;
  font-size: 1.05rem;
  color: #393939;
}
.deal-btn .subtitle {
  font-size: 0.85rem;
  color: #6b7280; /* subtle text */
}

.badge-count {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%); /* violet -> teal pop */
  box-shadow: 0 6px 16px rgba(12, 18, 55, 0.12);
  transform: translateY(-2px);
  border: 1px solid rgba(255,255,255,0.08);
}

.btn-pending { background: linear-gradient(180deg, #fff 0%, #fcfaf8 100%); border: 1px solid #7d4d2f; }
.btn-active  { background: linear-gradient(180deg, #ffffff 0%, #f7fffb 100%); border: 1px solid #388c67; }
.btn-chat  { background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%); border: 1px solid #4ab1f0; }

.deal-icon {
  font-size: 2.25rem;
  opacity: 0.92;
}

@media (max-width: 640px) {
  .deals-grid { grid-template-columns: 1fr; padding: 0 1rem; }
  .badge-count { top: 10px; right: 10px; min-width:38px; height:38px; font-size:0.9rem; }
}




/* --- Form Helpers --- */
.help-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
    gap: 4px;
    line-height: 1;
}

.help-btn {
    appearance: none;
    border: none;
    background: none;
    padding: 0;
    margin: 0 0 0 0.5em;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    width: 1em;
    height: 1em;
    line-height: 1;
    vertical-align: middle;
}

.help-icon {
    font-size: 0.95em;
    color: #555;
    transition: color .2s ease, transform .2s ease;
}

.help-btn:hover .help-icon,
.help-btn:focus .help-icon {
    color: #222;
    transform: scale(1.1);
}


.help-popup {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
                 sans-serif;
    font-size: 0.9rem;
    line-height: 1.45; 
    position: absolute;
    top: 130%;
    left: 0;

    min-width: 240px;
    max-width: 290px;

    background: #fff8df;
    color: #3a2e12;
    border: 1px solid #e2d4aa;

    padding: 1rem 1.1rem;
    border-radius: 12px;

    box-shadow:
        0 4px 10px rgba(0,0,0,0.12),
        0 1px 3px rgba(0,0,0,0.08);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-8px) scale(0.96);
    transition:
        opacity .22s ease,
        transform .26s cubic-bezier(0.16, 1, 0.3, 1),
        visibility .22s;

    z-index: 100;
}

.help-popup::after {
    content: "";
    position: absolute;
    top: -7px;
    left: 18px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #fff8df;
}

.help-wrapper:hover .help-popup,
.help-btn:focus + .help-popup,
.help-btn.active + .help-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

