/* ===========================================
   Auth + Dashboard + Admin styles
   =========================================== */

/* ===== LOGIN PAGE ===== */
.auth-page{
  min-height:100vh;
  background:linear-gradient(135deg,#1D4ED8 0%,#7C3AED 100%);
  display:flex;align-items:flex-start;justify-content:center;
  padding:24px 20px;position:relative;
  /* FIX: allow scroll instead of hiding overflow */
  overflow-y:auto;
  overflow-x:hidden;
}
.auth-bg{
  position:absolute;inset:0;
  background:radial-gradient(circle at 20% 30%,rgba(255,255,255,0.08),transparent 50%),
             radial-gradient(circle at 80% 70%,rgba(255,255,255,0.06),transparent 50%);
  pointer-events:none;
}
.auth-shell{
  display:grid;
  grid-template-columns:1fr 1fr;
  max-width:1100px;
  width:100%;
  background:#fff;
  border-radius:24px;
  /* FIX: allow content to grow, no overflow hidden */
  overflow:visible;
  box-shadow:0 25px 80px rgba(0,0,0,0.30);
  position:relative;
  z-index:1;
  margin:auto; /* vertical centering when content fits */
  align-self:flex-start;
}
.auth-brand{
  background:linear-gradient(135deg,#1E3A8A 0%,#5B21B6 100%);
  color:#fff;
  padding:50px 42px;
  display:flex;flex-direction:column;justify-content:center;
}
.auth-logo{font-size:64px;margin-bottom:14px}
.auth-brand h1{font-size:32px;font-weight:800;margin-bottom:10px;letter-spacing:-0.5px}
.auth-brand > p{font-size:15px;opacity:.92;margin-bottom:28px;line-height:1.6}
.auth-features{list-style:none;padding:0}
.auth-features li{font-size:14.5px;margin-bottom:10px;line-height:1.55;opacity:.95}

.auth-form-wrap{padding:50px 42px;display:flex;flex-direction:column;justify-content:center}
.auth-card{max-width:420px;margin:0 auto;width:100%}
.auth-tabs{
  display:flex;gap:0;
  background:#F1F5F9;
  border-radius:12px;
  padding:5px;
  margin-bottom:28px;
}
.auth-tab{
  flex:1;background:transparent;border:none;
  padding:11px 16px;font-size:15px;font-weight:700;
  color:#64748B;cursor:pointer;border-radius:9px;
  transition:all .2s;font-family:inherit;
}
.auth-tab.active{background:#fff;color:#1D4ED8;box-shadow:0 2px 8px rgba(0,0,0,0.06)}

.auth-form{display:flex;flex-direction:column;gap:16px}
.auth-form h2{font-size:24px;font-weight:800;color:#0F172A;margin-bottom:4px}
.auth-sub{color:#475569;font-size:14.5px;margin-bottom:14px}

.afield{display:flex;flex-direction:column;gap:7px}
.afield span{font-size:14px;font-weight:600;color:#334155}
.afield input{
  padding:13px 16px;
  border:2px solid #CBD5E1;
  border-radius:10px;
  font-size:15.5px;
  font-family:inherit;
  font-weight:500;
  transition:border-color .15s,box-shadow .15s;
  min-height:50px;
}
.afield input:focus{
  outline:none;
  border-color:#1D4ED8;
  box-shadow:0 0 0 3px rgba(29,78,216,0.12);
}

.auth-actions{display:flex;flex-direction:column;gap:12px;margin-top:8px}
.auth-btn{width:100%}
.btn-google{
  background:#fff;color:#1F2937;
  border:2px solid #CBD5E1;
  padding:13px;border-radius:10px;
  font-size:15px;font-weight:700;
  cursor:pointer;font-family:inherit;
  display:flex;align-items:center;justify-content:center;gap:10px;
  min-height:50px;
  transition:border-color .15s,background .15s;
}
.btn-google:hover{background:#F8FAFC;border-color:#94A3B8}
.forgot-link{
  text-align:center;color:#1D4ED8;
  font-size:14px;text-decoration:none;font-weight:600;
  margin-top:6px;
}
.forgot-link:hover{text-decoration:underline}
.auth-tos{font-size:12px;color:#94A3B8;text-align:center;margin-top:14px;line-height:1.5}
.auth-msg{
  margin-top:14px;padding:11px 14px;border-radius:10px;
  font-size:14px;font-weight:600;text-align:center;
  display:none;
}
.auth-msg.ok{display:block;background:#DCFCE7;color:#15803D}
.auth-msg.err{display:block;background:#FEE2E2;color:#991B1B}
.auth-back{text-align:center;margin-top:22px;font-size:13.5px}
.auth-back a{color:#64748B;text-decoration:none}
.auth-back a:hover{color:#1D4ED8}

@media (max-width:768px){
  .auth-shell{grid-template-columns:1fr}
  .auth-brand{padding:36px 28px;text-align:center}
  .auth-form-wrap{padding:32px 24px}
  .auth-features{display:none}
  .auth-logo{font-size:54px}
  .auth-brand h1{font-size:26px}
}

/* ===== DASHBOARD HEADER ===== */
.dash-header{
  display:flex;align-items:center;justify-content:space-between;
  padding-top:20px;padding-bottom:20px;
  flex-wrap:wrap;gap:16px;
}
.dash-nav{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
}
.dash-nav a{
  color:rgba(255,255,255,0.85);
  font-size:14.5px;font-weight:600;
  text-decoration:none;
  padding:8px 14px;border-radius:8px;
  transition:background .15s,color .15s;
}
.dash-nav a:hover, .dash-nav a.active{
  background:rgba(255,255,255,0.18);
  color:#fff;
}
.dash-logout{
  background:rgba(255,255,255,0.18);
  color:#fff;border:1.5px solid rgba(255,255,255,0.35);
  padding:8px 16px;font-size:14px;
}
.dash-logout:hover{background:rgba(255,255,255,0.28)}

/* ===== USER HERO ===== */
.user-hero{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:20px;
}
.user-info{display:flex;align-items:center;gap:18px}
.user-avatar{
  width:64px;height:64px;border-radius:50%;
  background:linear-gradient(135deg,#1D4ED8,#7C3AED);
  color:#fff;font-size:26px;font-weight:800;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 12px rgba(29,78,216,0.25);
}
.user-info h2{font-size:22px;font-weight:800;margin:0}
.muted-text{color:#64748B;font-size:14px}

.plan-badge{
  background:#F1F5F9;color:#64748B;
  padding:8px 16px;border-radius:24px;
  font-size:13px;font-weight:800;
  letter-spacing:0.4px;
}
.plan-badge.unlimited{background:linear-gradient(135deg,#7C3AED,#1D4ED8);color:#fff}
.plan-badge.admin{background:#DC2626;color:#fff}

/* ===== STATS GRID ===== */
.dash-stats{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;margin-bottom:24px;
}
.stat-box{
  background:#fff;border:1.5px solid #E2E8F0;
  border-radius:14px;padding:22px;text-align:center;
  transition:transform .15s,box-shadow .15s;
}
.stat-box:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,0.06)}
.stat-icon{font-size:32px;margin-bottom:8px}
.stat-num{font-size:28px;font-weight:800;color:#1D4ED8;margin-bottom:4px;line-height:1.2}
.stat-label{font-size:13px;color:#64748B;font-weight:600}

/* ===== PRICING GRID ===== */
.pricing-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:18px;margin-top:18px;
}
.price-card{
  background:#fff;border:2px solid #E2E8F0;
  border-radius:16px;padding:26px 22px;
  position:relative;display:flex;flex-direction:column;
  transition:all .2s;
}
.price-card:hover{border-color:#1D4ED8;box-shadow:0 12px 30px rgba(29,78,216,0.10);transform:translateY(-4px)}
.price-card.popular{border-color:#7C3AED;background:linear-gradient(180deg,#FAF5FF 0%,#fff 30%)}
.price-card.unlimited{border-color:#1E3A8A;background:linear-gradient(180deg,#EFF6FF 0%,#fff 30%)}
.ribbon{
  position:absolute;top:-12px;right:18px;
  background:linear-gradient(135deg,#7C3AED,#DC2626);
  color:#fff;padding:5px 14px;border-radius:18px;
  font-size:11.5px;font-weight:800;letter-spacing:0.5px;
  box-shadow:0 4px 10px rgba(124,58,237,0.30);
}
.price-tag{
  display:inline-block;font-size:11px;font-weight:800;
  padding:5px 11px;border-radius:18px;letter-spacing:0.6px;margin-bottom:10px;
}
.price-tag.basic{background:#DBEAFE;color:#1D4ED8}
.price-tag.pro{background:#EDE9FE;color:#7C3AED}
.price-tag.unl{background:#FEE2E2;color:#DC2626}
.price-card h3{font-size:18px;font-weight:800;color:#0F172A;margin-bottom:12px;line-height:1.35}
.price{font-size:34px;font-weight:800;color:#0F172A;margin-bottom:18px;letter-spacing:-0.5px}
.price span{font-size:14px;font-weight:500;color:#64748B}
.price-card ul{list-style:none;padding:0;margin-bottom:22px;flex:1}
.price-card li{font-size:14px;color:#334155;margin-bottom:10px;line-height:1.55}
.buy-btn{width:100%}

/* ===== PAYMENT TABLES ===== */
.pay-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.pay-table{
  width:100%;border-collapse:collapse;font-size:14px;
  min-width:640px;
}
.pay-table th{
  background:#F1F5F9;color:#1E40AF;
  font-weight:700;text-align:left;
  padding:11px 12px;font-size:12.5px;
  text-transform:uppercase;letter-spacing:0.5px;
  border-bottom:2px solid #E2E8F0;
}
.pay-table td{
  padding:11px 12px;border-bottom:1px solid #F1F5F9;
  color:#1E293B;
}
.pay-table tr:hover{background:#FAFCFF}
.pay-table .small{font-size:12.5px}
.pay-table .err-text{color:#DC2626}

.pill{
  display:inline-block;padding:4px 11px;border-radius:14px;
  font-size:11.5px;font-weight:700;letter-spacing:0.3px;
}
.pill-basic{background:#DBEAFE;color:#1D4ED8}
.pill-pro{background:#EDE9FE;color:#7C3AED}
.pill-unlimited{background:#FEE2E2;color:#DC2626}
.pill-free{background:#F1F5F9;color:#64748B}
.pill-admin{background:#DC2626;color:#fff}
.pill-status.pill-success{background:#DCFCE7;color:#15803D}
.pill-status.pill-failed{background:#FEE2E2;color:#991B1B}

/* ===== ADMIN ===== */
.admin-filters{
  display:flex;gap:12px;margin-bottom:18px;flex-wrap:wrap;
}
.admin-filters input,.admin-filters select{
  padding:10px 14px;border:2px solid #CBD5E1;border-radius:10px;
  font-size:14.5px;font-family:inherit;font-weight:500;
  min-height:44px;
}
.admin-filters input{flex:1;min-width:240px}
.admin-filters input:focus,.admin-filters select:focus{
  outline:none;border-color:#1D4ED8;
  box-shadow:0 0 0 3px rgba(29,78,216,0.10);
}

.btn-sm-action{
  background:#1D4ED8;color:#fff;border:none;
  padding:6px 12px;border-radius:7px;
  font-size:12.5px;font-weight:700;cursor:pointer;
  font-family:inherit;
}
.btn-sm-action:hover{background:#1E3A8A}

/* ===== MODAL ===== */
.modal-overlay{
  position:fixed;inset:0;
  background:rgba(15,23,42,0.6);
  backdrop-filter:blur(4px);
  display:flex;align-items:center;justify-content:center;
  z-index:1000;padding:20px;
}
.modal-card{
  background:#fff;border-radius:16px;
  padding:28px;max-width:520px;width:100%;
  max-height:90vh;overflow-y:auto;
  position:relative;
  box-shadow:0 25px 60px rgba(0,0,0,0.30);
}
.modal-card h2{font-size:20px;margin-bottom:14px;color:#0F172A}
.modal-close{
  position:absolute;top:14px;right:18px;
  background:transparent;border:none;
  font-size:30px;color:#64748B;cursor:pointer;
  width:36px;height:36px;border-radius:50%;
  transition:background .15s;
  font-family:inherit;
}
.modal-close:hover{background:#F1F5F9}

@media (max-width:640px){
  .dash-header{padding:14px 16px}
  .dash-nav{width:100%;justify-content:flex-start}
  .dash-nav a{font-size:13.5px;padding:7px 11px}
  .stat-num{font-size:24px}
  .price-card{padding:22px 18px}
  .price{font-size:30px}
  .pay-table{font-size:13px}
}

/* ===== HEADER (Index page when logged in) ===== */
.user-mini{
  display:flex;align-items:center;gap:10px;
  background:rgba(255,255,255,0.18);
  border:1.5px solid rgba(255,255,255,0.30);
  border-radius:24px;padding:5px 5px 5px 14px;
  color:#fff;font-size:13.5px;font-weight:600;
  cursor:pointer;text-decoration:none;
  transition:background .15s;
}
.user-mini:hover{background:rgba(255,255,255,0.28)}
.user-mini-avatar{
  width:30px;height:30px;border-radius:50%;
  background:#fff;color:#1D4ED8;
  font-weight:800;display:flex;align-items:center;justify-content:center;
  font-size:13.5px;
}
.login-btn{
  background:#fff;color:#1D4ED8;
  padding:9px 18px;border-radius:24px;
  font-size:14px;font-weight:700;
  text-decoration:none;
  border:none;cursor:pointer;font-family:inherit;
  transition:transform .15s,box-shadow .15s;
}
.login-btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,0.15)}

/* ===== LOCKED OVERLAY ===== */
.locked-banner{
  background:linear-gradient(135deg,#FEF3C7 0%,#FDE68A 100%);
  border:2px solid #F59E0B;
  border-radius:14px;
  padding:20px;
  margin:18px 0;
  display:flex;align-items:center;gap:18px;
  flex-wrap:wrap;
}
.locked-icon{font-size:42px}
.locked-info h3{font-size:18px;font-weight:800;color:#78350F;margin-bottom:4px}
.locked-info p{font-size:14.5px;color:#92400E;line-height:1.55}
.locked-action{margin-left:auto}

/* ===== HEADER FOR INDEX (with auth) ===== */
.app-header.with-auth{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:14px;
}

/* =====================================================
   SOCIAL PROOF COUNTERS (login page + dashboard)
   ===================================================== */
.social-proof{
  margin-top:22px;
  padding:18px;
  background:linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.04) 100%);
  border:1px solid rgba(255,255,255,.18);
  border-radius:14px;
  backdrop-filter: blur(6px);
}
.sp-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-bottom:12px;
}
.sp-row:last-of-type{margin-bottom:10px}
.sp-item{
  text-align:center;
  padding:10px 6px;
  background:rgba(255,255,255,.08);
  border-radius:10px;
}
.sp-num{
  font-size:24px;
  font-weight:800;
  color:#FCD34D;
  letter-spacing:.5px;
  font-variant-numeric: tabular-nums;
  text-shadow:0 1px 2px rgba(0,0,0,.25);
}
.sp-label{
  font-size:11.5px;
  color:rgba(255,255,255,.85);
  margin-top:4px;
  font-weight:600;
}
.sp-trust{
  font-size:12px;
  color:rgba(255,255,255,.92);
  text-align:center;
  margin-top:8px;
  line-height:1.5;
}

/* ===== Dashboard Social Proof variant (light bg) ===== */
.social-proof-light{
  margin:18px 0;
  padding:20px 18px;
  background:linear-gradient(135deg,#EFF6FF 0%,#FAF5FF 100%);
  border:1.5px solid #BFDBFE;
  border-radius:14px;
}
.social-proof-light .sp-num{color:#1D4ED8;text-shadow:none}
.social-proof-light .sp-label{color:#475569}
.social-proof-light .sp-item{background:#fff;border:1px solid #E2E8F0}
.social-proof-light .sp-trust{color:#475569}
.social-proof-light .sp-headline{
  font-size:16px;font-weight:800;color:#0F172A;
  text-align:center;margin-bottom:14px;
}

/* Testimonials carousel */
.testimonials-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
  margin-top:14px;
}
.testimonial-card{
  background:#fff;
  border:1.5px solid #E2E8F0;
  border-radius:12px;
  padding:16px;
  position:relative;
  transition:all .2s ease;
}
.testimonial-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(15,23,42,.08);
  border-color:#3B82F6;
}
.testimonial-card .stars{color:#F59E0B;font-size:14px;margin-bottom:6px}
.testimonial-card .quote{
  font-size:13.5px;color:#334155;line-height:1.55;
  margin-bottom:10px;font-style:italic;
}
.testimonial-card .author{
  display:flex;align-items:center;gap:10px;
  border-top:1px solid #F1F5F9;padding-top:10px;
}
.testimonial-card .avatar{
  width:36px;height:36px;border-radius:50%;
  background:linear-gradient(135deg,#3B82F6,#8B5CF6);
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-weight:700;font-size:14px;
}
.testimonial-card .meta{font-size:12px}
.testimonial-card .meta strong{display:block;color:#0F172A;font-size:13px}
.testimonial-card .meta span{color:#64748B}

/* Mobile tweaks */
@media (max-width:560px){
  .sp-num{font-size:20px}
  .sp-row{grid-template-columns:1fr 1fr}
}
