/* =====================================================
   E-Kendra — Main Stylesheet (Fixed)
   ===================================================== */

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: #4f46e5; text-decoration: none; }
a:hover { color: #4338ca; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* =====================================================
   HEADER (Frontend)
   ===================================================== */
.site-header {
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  color: #4f46e5;
}
.logo i { font-size: 26px; color: #4f46e5; }
.logo-icon { font-size: 26px; }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 8px 14px;
  color: #334155;
  font-weight: 500;
  border-radius: 6px;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.site-nav a:hover { background: #eef2ff; color: #4f46e5; }
.site-nav a i { font-size: 15px; }

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid #e2e8f0;
  font-size: 22px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #4f46e5;
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.site-main { flex: 1; padding: 30px 0; }

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 70px 0;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,.1) 0%, transparent 50%);
  pointer-events: none;
}
.hero h1 {
  font-size: 42px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero h1 i { font-size: 46px; }
.hero p { font-size: 18px; opacity: .92; margin-bottom: 28px; }
.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn-primary,
.btn-secondary {
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: .2s;
  font-size: 15px;
  font-family: inherit;
  text-decoration: none;
}
.btn-primary {
  background: #4f46e5;
  color: #fff !important;
}
.btn-primary:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79,70,229,.3);
}
.btn-secondary {
  background: #fff;
  color: #4f46e5 !important;
  border: 2px solid #4f46e5;
}
.btn-secondary:hover {
  background: #4f46e5;
  color: #fff !important;
  transform: translateY(-2px);
}
.btn-primary i, .btn-secondary i { font-size: 16px; }

/* =====================================================
   SECTIONS
   ===================================================== */
.section { padding: 40px 0; }
.section-title {
  font-size: 28px;
  margin-bottom: 26px;
  color: #1e293b;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.section-title i { color: #4f46e5; font-size: 30px; }
.section-cta { text-align: center; margin-top: 30px; }

h1 i, h2 i, h3 i { color: #4f46e5; margin-right: 6px; }

/* =====================================================
   TOOLS GRID
   ===================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.tool-card {
  background: #fff;
  padding: 26px 22px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: .25s;
  color: #1e293b;
  display: block;
  border: 2px solid transparent;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(79,70,229,.15);
  border-color: #e0e7ff;
  color: #1e293b;
}
.tool-icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: #4f46e5;
}
.tool-icon i {
  font-size: 40px;
  color: #4f46e5;
  display: block;
  transition: .25s;
}
.tool-card:hover .tool-icon i {
  transform: scale(1.1);
  color: #4338ca;
}
.tool-card h3 { font-size: 17px; margin-bottom: 6px; color: #1e293b; }
.tool-card p { color: #64748b; font-size: 14px; }

/* =====================================================
   POSTS GRID
   ===================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: .25s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,.1);
}
.post-image {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f1f5f9;
}
.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .3s;
}
.post-card:hover .post-image img { transform: scale(1.05); }
.post-body { padding: 20px; flex: 1; }
.post-body h3 { font-size: 18px; margin-bottom: 10px; line-height: 1.4; }
.post-body h3 a { color: #1e293b; }
.post-body h3 a:hover { color: #4f46e5; }
.post-body small {
  color: #64748b;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.post-body small i { font-size: 13px; }

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 12px;
  color: #64748b;
  font-size: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.empty-state i {
  font-size: 56px;
  color: #cbd5e1;
  display: block;
  margin-bottom: 12px;
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 50px 0 20px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}
.footer-grid h3 {
  color: #fff;
  margin-bottom: 14px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-grid h4 {
  color: #fff;
  margin-bottom: 14px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-grid h3 i,
.footer-grid h4 i { color: #818cf8; }
.footer-grid p { font-size: 14px; color: #94a3b8; line-height: 1.7; }
.footer-grid a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
  padding: 5px 0;
  font-size: 14px;
  transition: .2s;
}
.footer-grid a:hover { color: #fff; padding-left: 4px; }
.footer-grid a i { color: #94a3b8; font-size: 14px; }
.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
}
.footer-bottom i { color: #818cf8; }

/* =====================================================
   AD BOX
   ===================================================== */
.ad-box {
  margin: 20px auto;
  text-align: center;
  min-height: 60px;
  max-width: 1100px;
  padding: 0 20px;
}

/* =====================================================
   FORMS (Frontend + Admin)
   ===================================================== */
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  margin: 8px 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: #1e293b;
  transition: .2s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
textarea { resize: vertical; min-height: 100px; }
label { display: block; font-weight: 500; margin-top: 12px; color: #475569; font-size: 14px; }

/* =====================================================
   ALERTS
   ===================================================== */
.alert-error {
  background: #fee;
  color: #c00;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 4px solid #c00;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-ok {
  background: #d1fae5;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 4px solid #059669;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-body {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}
.login-box {
  background: #fff;
  padding: 40px 35px;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%;
  max-width: 400px;
}
.login-box h2 {
  text-align: center;
  margin-bottom: 24px;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.login-box h2 i { color: #4f46e5; font-size: 28px; }

/* =====================================================
   ADMIN PANEL
   ===================================================== */
.admin-wrap {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.admin-side {
  width: 250px;
  background: #1e293b;
  color: #cbd5e1;
  padding: 20px 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-side h2 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 20px;
  padding: 0 20px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #334155;
}
.admin-side h2 i { color: #818cf8; font-size: 22px; }
.admin-side nav { padding: 10px 10px 0; }
.admin-side nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 3px;
  font-size: 15px;
  text-decoration: none;
  transition: .2s;
  font-weight: 500;
}
.admin-side nav a:hover {
  background: #334155;
  color: #fff;
}
.admin-side nav a i {
  font-size: 17px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.admin-side nav a.logout-link {
  color: #f87171 !important;
  margin-top: 20px;
  border-top: 1px solid #334155;
  padding-top: 15px;
}
.admin-side nav a.logout-link:hover {
  background: #7f1d1d;
  color: #fff !important;
}

.admin-main {
  flex: 1;
  padding: 30px;
  background: #f1f5f9;
  overflow-x: auto;
  min-width: 0;
}
.admin-main h1 {
  margin-bottom: 20px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
}
.admin-main h1 i { color: #4f46e5; font-size: 30px; }
.admin-main h2 {
  margin: 28px 0 15px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
}
.admin-main h2 i { color: #4f46e5; }
.admin-main h3 {
  margin: 20px 0 12px;
  color: #1e293b;
}

/* =====================================================
   STAT CARDS
   ===================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 20px 0 30px;
}
.stat-card {
  background: #fff;
  padding: 26px 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: .25s;
  border: 2px solid transparent;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(79,70,229,.12);
  border-color: #e0e7ff;
}
.stat-card i {
  font-size: 38px;
  color: #4f46e5;
  display: block;
  margin-bottom: 10px;
  transition: .25s;
}
.stat-card:hover i {
  transform: scale(1.12);
  color: #4338ca;
}
.stat-card h3 {
  font-size: 32px;
  color: #1e293b;
  margin: 6px 0 4px;
  font-weight: 700;
  line-height: 1;
}
.stat-card p {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0;
}

/* =====================================================
   ADMIN TABLE
   ===================================================== */
.admin-table {
  width: 100%;
  background: #fff;
  border-collapse: collapse;
  margin-top: 15px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.admin-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #334155;
}
.admin-table tr:hover { background: #f8fafc; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table td i {
  color: #94a3b8;
  font-size: 14px;
  margin-right: 3px;
}
.admin-table a { color: #4f46e5; font-weight: 500; }

/* =====================================================
   STATUS BADGES
   ===================================================== */
.badge-published,
.badge-draft {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-published {
  background: #dcfce7;
  color: #166534;
}
.badge-draft {
  background: #fef3c7;
  color: #92400e;
}

/* =====================================================
   ADMIN FORM
   ===================================================== */
.admin-form {
  background: #fff;
  padding: 26px;
  border-radius: 12px;
  max-width: 800px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  margin-bottom: 20px;
}
.admin-form h3 {
  margin-bottom: 15px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-form button { margin-top: 16px; }

/* =====================================================
   TOOL PAGE
   ===================================================== */
.tool-page {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.tool-page h1 { margin-bottom: 20px; color: #1e293b; }
.tool-page textarea {
  min-height: 200px;
  font-family: ui-monospace, 'Cascadia Code', monospace;
}
.tool-result {
  background: #eef2ff;
  padding: 16px 20px;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 14px;
  color: #4338ca;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tool-result i { font-size: 18px; }

/* =====================================================
   SINGLE POST
   ===================================================== */
.single-post {
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  max-width: 800px;
  margin: 0 auto;
}
.single-post h1 {
  font-size: 32px;
  margin-bottom: 14px;
  color: #1e293b;
  line-height: 1.3;
}
.single-post small {
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  flex-wrap: wrap;
}
.single-post small i { font-size: 14px; }
.post-content { line-height: 1.8; color: #334155; }
.post-content img { border-radius: 8px; margin: 20px 0; }
.post-content h2, .post-content h3 {
  margin: 24px 0 12px;
  color: #1e293b;
}
.post-content p { margin-bottom: 14px; }
.post-content ul, .post-content ol {
  margin: 12px 0 12px 24px;
}

/* =====================================================
   POPUP
   ===================================================== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.popup-box {
  background: #fff;
  padding: 32px;
  border-radius: 14px;
  max-width: 500px;
  width: 100%;
  position: relative;
  animation: pop .3s;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
  background: none;
  border: none;
  transition: .2s;
}
.popup-close:hover { color: #1e293b; transform: rotate(90deg); }
@keyframes pop {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 768px) {
  .mobile-menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 10px 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
    gap: 4px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { margin: 0; }

  .hero { padding: 50px 0; }
  .hero h1 { font-size: 28px; flex-direction: column; gap: 8px; }
  .hero h1 i { font-size: 32px; }
  .hero p { font-size: 16px; }

  .footer-grid { grid-template-columns: 1fr; gap: 25px; }
  .posts-grid, .tools-grid { grid-template-columns: 1fr; }
  .single-post { padding: 22px; }
  .single-post h1 { font-size: 24px; }
  .section-title { font-size: 22px; }

  /* Admin mobile */
  .admin-wrap { flex-direction: column; }
  .admin-side {
    width: 100%;
    height: auto;
    position: static;
    padding: 15px 0;
  }
  .admin-side nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px;
  }
  .admin-side nav a {
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
  }
  .admin-side nav a.logout-link { margin-top: 0; }
  .admin-main { padding: 20px 15px; }
  .stat-card { padding: 20px 15px; }
  .stat-card i { font-size: 32px; }
  .stat-card h3 { font-size: 26px; }
}

@media (max-width: 480px) {
  .container { padding: 0 15px; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-secondary { justify-content: center; }
  .admin-table th, .admin-table td { padding: 10px; font-size: 13px; }
}

/* =====================================================
   UTILITIES
   ===================================================== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.text-muted { color: #64748b; }


/* =====================================================
   HERO BADGE + SEARCH
   ===================================================== */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
}
.hero-badge i { color: #fbbf24; }

.hero-search {
  position: relative;
  max-width: 550px;
  margin: 30px auto 0;
}
.hero-search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 18px;
  pointer-events: none;
}
.hero-search input {
  width: 100%;
  padding: 15px 20px 15px 52px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  margin: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  background: #fff;
}
.hero-search input:focus {
  box-shadow: 0 10px 40px rgba(0,0,0,.2), 0 0 0 3px rgba(255,255,255,.3);
}

/* =====================================================
   STATS COUNTER
   ===================================================== */
.stats-section {
  background: #fff;
  padding: 40px 0;
  margin-top: -40px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 20px rgba(0,0,0,.04);
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 12px;
  transition: .25s;
}
.stat-item:hover { background: #f8fafc; }
.stat-item > i {
  font-size: 36px;
  color: #4f46e5;
  flex-shrink: 0;
}
.stat-item h3 {
  font-size: 24px;
  color: #1e293b;
  margin: 0;
  font-weight: 700;
}
.stat-item p {
  color: #64748b;
  font-size: 13px;
  margin: 2px 0 0;
  font-weight: 500;
}

/* =====================================================
   SECTION HEAD (title + link)
   ===================================================== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  flex-wrap: wrap;
  gap: 10px;
}
.section-head .section-title { margin: 0; text-align: left; }

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4f46e5;
  font-weight: 600;
  font-size: 14px;
  transition: .2s;
}
.view-all-link:hover { gap: 10px; }

.section-alt {
  background: #fff;
  margin: 0;
  padding: 50px 0;
}

/* =====================================================
   TOOL BADGE
   ===================================================== */
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  transition: .2s;
}
.tool-card:hover .tool-badge { gap: 9px; }

/* =====================================================
   FEATURES GRID
   ===================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.feature-card {
  background: #fff;
  padding: 30px 24px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  text-align: center;
  transition: .25s;
  border: 2px solid transparent;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(79,70,229,.12);
  border-color: #e0e7ff;
}
.feature-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: .25s;
}
.feature-icon i {
  font-size: 34px;
  color: #4f46e5;
}
.feature-card:hover .feature-icon {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  transform: scale(1.1);
}
.feature-card:hover .feature-icon i { color: #fff; }
.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #1e293b;
}
.feature-card p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

/* =====================================================
   POST PLACEHOLDER IMAGE
   ===================================================== */
.post-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}
.post-image-placeholder i {
  font-size: 60px;
  color: #a5b4fc;
}

.post-body small .dot { color: #cbd5e1; margin: 0 3px; }

/* =====================================================
   CTA SECTION
   ===================================================== */
.cta-section {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 60px 0;
  text-align: center;
  margin-top: 60px;
}
.cta-section h2 {
  font-size: 32px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-section h2 i { color: #fbbf24; font-size: 34px; }
.cta-section p {
  opacity: .92;
  margin-bottom: 24px;
  font-size: 16px;
}
.cta-form {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.cta-form input {
  flex: 1;
  min-width: 220px;
  margin: 0;
  padding: 14px 18px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  background: rgba(255,255,255,.95);
}
.cta-form input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.4);
}
.cta-form .btn-primary {
  background: #1e293b;
  color: #fff !important;
}
.cta-form .btn-primary:hover {
  background: #0f172a;
  transform: translateY(-2px);
}

/* =====================================================
   RESPONSIVE (new sections)
   ===================================================== */
@media (max-width: 768px) {
  .hero-badge { font-size: 12px; padding: 6px 12px; }
  .hero-search { margin-top: 22px; }
  .hero-search input { padding: 13px 16px 13px 46px; font-size: 14px; }
  .hero-search i { left: 15px; font-size: 16px; }

  .stats-section { margin-top: -25px; padding: 25px 0; }
  .stat-item { padding: 12px 14px; gap: 10px; }
  .stat-item > i { font-size: 28px; }
  .stat-item h3 { font-size: 20px; }
  .stat-item p { font-size: 12px; }

  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head .section-title { font-size: 20px; }
  .section-alt { padding: 35px 0; }

  .feature-card { padding: 24px 20px; }
  .feature-icon { width: 60px; height: 60px; }
  .feature-icon i { font-size: 28px; }

  .cta-section { padding: 45px 0; }
  .cta-section h2 { font-size: 24px; }
  .cta-section h2 i { font-size: 26px; }
  .cta-form { flex-direction: column; }
  .cta-form input, .cta-form button { width: 100%; }
}


/* =====================================================
   PAGE HERO (Tools, Blog, etc.)
   ===================================================== */
.page-hero {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 55px 0 45px;
  text-align: center;
  margin-bottom: 30px;
}
.page-hero h1 {
  font-size: 38px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-hero h1 i { font-size: 42px; color: #fbbf24; }
.page-hero p { font-size: 16px; opacity: .92; margin-bottom: 0; }

/* =====================================================
   TOOLS SEARCH BAR
   ===================================================== */
.tools-search {
  position: relative;
  max-width: 520px;
  margin: 26px auto 0;
}
.tools-search > i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 18px;
  pointer-events: none;
}
.tools-search input {
  width: 100%;
  padding: 14px 50px 14px 52px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  margin: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  background: #fff;
}
.tools-search input:focus {
  outline: none;
  box-shadow: 0 10px 40px rgba(0,0,0,.2), 0 0 0 3px rgba(255,255,255,.3);
}
.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
  font-size: 12px;
}
.clear-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* =====================================================
   RESPONSIVE — Page Hero
   ===================================================== */
@media (max-width: 768px) {
  .page-hero { padding: 40px 0 32px; }
  .page-hero h1 { font-size: 26px; }
  .page-hero h1 i { font-size: 30px; }
  .page-hero p { font-size: 14px; }
  .tools-search { margin-top: 20px; }
  .tools-search input { padding: 12px 46px 12px 46px; font-size: 14px; }
}

/* =====================================================
   BLOG LAYOUT (Main + Sidebar)
   ===================================================== */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 35px;
  align-items: start;
}
.blog-main { min-width: 0; }
.blog-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* =====================================================
   FEATURED POST
   ===================================================== */
.post-featured {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 30px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  transition: .25s;
}
.post-featured:hover {
  box-shadow: 0 12px 35px rgba(79,70,229,.12);
}
.post-featured-image {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f1f5f9;
}
.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .35s;
}
.post-featured:hover .post-featured-image img { transform: scale(1.06); }

.post-featured-body {
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
  width: fit-content;
  align-self: flex-start;
}
.post-featured-body h2 {
  font-size: 26px;
  line-height: 1.3;
  margin: 10px 0 14px;
}
.post-featured-body h2 a { color: #1e293b; }
.post-featured-body h2 a:hover { color: #4f46e5; }
.post-excerpt {
  color: #64748b;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.post-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 20px;
}
.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* =====================================================
   CATEGORY TAG
   ===================================================== */
.category-tag {
  display: inline-block;
  background: #eef2ff;
  color: #4f46e5;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  transition: .2s;
  width: fit-content;
}
.category-tag:hover {
  background: #4f46e5;
  color: #fff;
}
.category-tag.small {
  font-size: 11px;
  padding: 3px 10px;
  margin-bottom: 10px;
}

/* =====================================================
   CATEGORY CHIPS (Filter)
   ===================================================== */
.category-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #475569;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  transition: .2s;
}
.chip:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  transform: translateY(-1px);
}
.chip.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}
.chip-count {
  background: rgba(0,0,0,.08);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.chip.active .chip-count {
  background: rgba(255,255,255,.25);
}

/* =====================================================
   POST EXCERPT (small)
   ===================================================== */
.post-excerpt-sm {
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0 12px;
}

/* =====================================================
   SIDEBAR WIDGETS
   ===================================================== */
.sidebar-widget {
  background: #fff;
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.sidebar-widget h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
}
.sidebar-widget h3 i { color: #4f46e5; font-size: 18px; }

/* Sidebar Search */
.sidebar-search input {
  margin-bottom: 10px;
}
.sidebar-search button {
  padding: 11px 20px;
  font-size: 14px;
}

/* Popular List */
.popular-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.popular-list li {
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.popular-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.popular-num {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.popular-list a {
  color: #1e293b;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: block;
}
.popular-list a:hover { color: #4f46e5; }
.popular-list small {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 400;
  margin-top: 4px;
}

/* Category List */
.category-list {
  list-style: none;
}
.category-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  color: #475569;
  font-size: 14px;
  transition: .2s;
}
.category-list li a:hover {
  background: #eef2ff;
  color: #4f46e5;
}
.category-list .count {
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.category-list li a:hover .count {
  background: #4f46e5;
  color: #fff;
}

/* Newsletter widget */
.sidebar-newsletter {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
}
.sidebar-newsletter h3 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.2);
}
.sidebar-newsletter h3 i { color: #fbbf24; }
.sidebar-newsletter p {
  font-size: 13px;
  opacity: .9;
  margin-bottom: 12px;
}
.sidebar-newsletter input {
  background: rgba(255,255,255,.95);
  border: none;
  margin-bottom: 0;
}
.sidebar-newsletter .btn-primary {
  background: #1e293b;
  color: #fff !important;
}
.sidebar-newsletter .btn-primary:hover {
  background: #0f172a;
}

/* Sidebar Ad */
.sidebar-ad {
  padding: 10px;
  min-height: 0;
}
.sidebar-ad .ad-box {
  margin: 0;
  padding: 0;
  min-height: 0;
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 15px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: .2s;
  min-width: 40px;
  justify-content: center;
}
.page-btn:hover {
  border-color: #4f46e5;
  color: #4f46e5;
}
.page-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

/* =====================================================
   RESPONSIVE — Blog
   ===================================================== */
@media (max-width: 992px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    position: static;
  }
  .post-featured {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .post-featured-body { padding: 22px 20px; }
  .post-featured-body h2 { font-size: 20px; }
  .post-excerpt { font-size: 14px; }
  .post-meta { gap: 12px; font-size: 12px; }
  .category-chips { gap: 6px; }
  .chip { padding: 6px 12px; font-size: 13px; }
  .sidebar-widget { padding: 18px; }
  .pagination { gap: 4px; }
  .page-btn { padding: 7px 12px; font-size: 13px; }
}

/* =====================================================
   CONTACT PAGE
   ===================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  align-items: start;
}
.contact-info h2,
.contact-form-wrap h2 {
  font-size: 24px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e293b;
}
.contact-info h2 i,
.contact-form-wrap h2 i { color: #4f46e5; font-size: 26px; }

.contact-intro {
  color: #64748b;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 24px;
}
.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: .25s;
}
.contact-card:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(79,70,229,.1);
}
.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon i { font-size: 22px; color: #4f46e5; }
.contact-card h4 {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}
.contact-card a,
.contact-card span {
  color: #1e293b;
  font-size: 15px;
  font-weight: 500;
  word-break: break-word;
}
.contact-card a:hover { color: #4f46e5; }

.contact-social h4 {
  font-size: 13px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
}
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 18px;
  transition: .25s;
}
.social-links a:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(79,70,229,.3);
}

.contact-form-wrap {
  background: #fff;
  padding: 32px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.contact-form { margin-top: 12px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #334155;
  font-size: 14px;
  margin: 0 0 6px;
}
.form-group label i { color: #4f46e5; font-size: 14px; }
.form-group input,
.form-group textarea {
  margin: 0;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 10px;
}
.form-group textarea {
  resize: vertical;
  min-height: 140px;
  font-family: inherit;
}
.char-count {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
  transition: color .2s;
}
.form-note {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.form-note i { color: #10b981; font-size: 14px; }

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.faq-card {
  background: #fff;
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: .25s;
  border-left: 4px solid #4f46e5;
}
.faq-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(79,70,229,.12);
}
.faq-card h4 {
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.faq-card h4 i { color: #4f46e5; font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.faq-card p { color: #64748b; font-size: 14px; line-height: 1.6; }

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form-wrap { padding: 22px 18px; }
  .contact-info h2, .contact-form-wrap h2 { font-size: 20px; }
  .contact-icon { width: 42px; height: 42px; }
  .contact-icon i { font-size: 20px; }
}


/* =====================================================
   TOOL CONTAINER (Shared by all tools)
   ===================================================== */
.tool-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* ===== Tool Stats Grid ===== */
.tool-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.tool-stat {
  background: #fff;
  padding: 20px 14px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  border: 2px solid transparent;
  transition: .25s;
}
.tool-stat:hover {
  transform: translateY(-3px);
  border-color: #e0e7ff;
  box-shadow: 0 8px 20px rgba(79,70,229,.1);
}
.tool-stat i {
  font-size: 26px;
  color: #4f46e5;
  display: block;
  margin-bottom: 8px;
  transition: .25s;
}
.tool-stat:hover i {
  transform: scale(1.15);
  color: #4338ca;
}
.tool-stat h3 {
  font-size: 24px;
  color: #1e293b;
  margin: 4px 0;
  font-weight: 700;
  line-height: 1;
  word-break: break-word;
}
.tool-stat p {
  color: #64748b;
  font-size: 12px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}

/* ===== Tool Editor ===== */
.tool-editor {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.tool-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 10px;
}
.toolbar-label {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toolbar-label i { color: #4f46e5; }
.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tool-btn {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}
.tool-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}
.tool-btn-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}
.tool-btn i { font-size: 14px; }

.tool-editor textarea {
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 22px;
  font-size: 15px;
  line-height: 1.7;
  resize: vertical;
  min-height: 320px;
  font-family: inherit;
  background: #fff;
}
.tool-editor textarea:focus {
  outline: none;
  box-shadow: none;
  border: none;
}

/* ===== Tool Info Row ===== */
.tool-info {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
}
.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
}
.info-item i { color: #4f46e5; font-size: 14px; }
.info-item b { color: #1e293b; font-weight: 600; }

/* ===== Keyword Cloud ===== */
.tool-details {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.tool-details h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-details h3 i { color: #4f46e5; }
.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.keyword {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4338ca;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
  transition: .2s;
  cursor: default;
}
.keyword:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  transform: translateY(-2px);
}
.keyword b {
  background: rgba(255,255,255,.6);
  color: #1e293b;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.keyword small {
  opacity: .7;
  font-size: 11px;
}

/* ===== Tool About ===== */
.tool-about {
  background: #fff;
  padding: 28px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.tool-about h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-about h3 i { color: #4f46e5; }
.tool-about p {
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 18px;
}
.tool-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tool-features span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #166534;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}
.tool-features span i {
  color: #10b981;
  font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .tool-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-stat { padding: 16px 10px; }
  .tool-stat i { font-size: 22px; }
  .tool-stat h3 { font-size: 20px; }
  .tool-stat p { font-size: 11px; }

  .tool-toolbar { padding: 12px 15px; }
  .toolbar-label { font-size: 13px; }
  .toolbar-actions { width: 100%; }
  .tool-btn { flex: 1; justify-content: center; padding: 8px 10px; font-size: 12px; }
  .tool-btn span { display: none; }
  .tool-btn { min-width: 40px; }

  .tool-editor textarea {
    padding: 16px;
    min-height: 240px;
    font-size: 14px;
  }
  .tool-info { gap: 12px; padding: 12px 15px; font-size: 12px; }
  .info-item { font-size: 12px; }

  .tool-details, .tool-about { padding: 20px 16px; }
  .tool-about h3 { font-size: 16px; }
  .tool-features span { font-size: 12px; padding: 5px 12px; }
}

@media (max-width: 480px) {
  .tool-stats { grid-template-columns: 1fr 1fr; }
  .tool-stat h3 { font-size: 18px; }
}

/* =====================================================
   QR GENERATOR TOOL
   ===================================================== */
.qr-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 26px;
  align-items: start;
  margin-bottom: 30px;
}

/* ===== Left Panel: Form ===== */
.qr-form-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
}

/* ===== Tabs ===== */
.qr-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.qr-tab {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}
.qr-tab:hover {
  border-color: #cbd5e1;
  color: #334155;
}
.qr-tab.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
}
.qr-tab i { font-size: 14px; }

/* ===== Fields ===== */
.qr-fields {
  padding: 24px;
}
.qr-field-group { display: none; }
.qr-field-group.active { display: block; }
.qr-field-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #334155;
  font-size: 14px;
  margin-bottom: 6px;
  margin-top: 0;
}
.qr-field-group label i { color: #4f46e5; font-size: 14px; }
.qr-field-group input,
.qr-field-group textarea,
.qr-field-group select {
  margin: 0 0 4px;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  width: 100%;
}
.qr-field-group textarea {
  resize: vertical;
  font-family: inherit;
  min-height: 80px;
}
.qr-field-group input[type="color"] {
  padding: 4px;
  height: 42px;
  cursor: pointer;
}

/* ===== Options ===== */
.qr-options {
  padding: 20px 24px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.qr-options h4 {
  font-size: 14px;
  margin-bottom: 14px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}
.qr-options h4 i { color: #4f46e5; font-size: 16px; }
.qr-option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.qr-option label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.qr-option select,
.qr-option input[type="color"] {
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 8px;
  width: 100%;
}
.qr-option input[type="color"] {
  padding: 4px;
  height: 38px;
  cursor: pointer;
}

/* ===== Preview Panel ===== */
.qr-preview-panel {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.qr-preview-box {
  background: #fff;
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  border: 2px dashed #e2e8f0;
  transition: .25s;
}
.qr-preview-box:has(img[style*="block"]) {
  border-style: solid;
  border-color: #e0e7ff;
}
.qr-preview-box img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  image-rendering: pixelated;
}
.qr-placeholder {
  text-align: center;
  color: #94a3b8;
}
.qr-placeholder i {
  font-size: 64px;
  color: #cbd5e1;
  display: block;
  margin-bottom: 12px;
}
.qr-placeholder p {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 4px;
  font-weight: 500;
}
.qr-placeholder small {
  font-size: 12px;
  color: #94a3b8;
}

/* ===== Preview Actions ===== */
.qr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.qr-actions .tool-btn {
  flex: 1;
  justify-content: center;
  min-width: 80px;
}

/* ===== Preview Info ===== */
.qr-info {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  justify-content: space-around;
}
.qr-info .info-item {
  font-size: 12px;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}
.qr-info .info-item i { font-size: 16px; }
.qr-info .info-item b { font-size: 14px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .qr-layout {
    grid-template-columns: 1fr;
  }
  .qr-preview-panel {
    position: static;
  }
  .qr-preview-box {
    min-height: 280px;
  }
}

@media (max-width: 600px) {
  .qr-tabs {
    padding: 10px 12px;
    gap: 4px;
  }
  .qr-tab {
    padding: 6px 10px;
    font-size: 12px;
  }
  .qr-tab span { display: none; }
  .qr-tab i { font-size: 14px; }

  .qr-fields { padding: 18px; }
  .qr-options { padding: 16px 18px 18px; }
  .qr-option-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  .qr-preview-box { padding: 20px; min-height: 240px; }
  .qr-placeholder i { font-size: 48px; }

  .qr-actions .tool-btn { font-size: 12px; padding: 8px; }
}


/* =====================================================
   CHARACTER COUNTER — Breakdown Grid
   ===================================================== */
.char-breakdown {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.char-breakdown h3 {
  font-size: 16px;
  margin-bottom: 18px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.char-breakdown h3 i { color: #4f46e5; }

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  transition: .2s;
  border-left: 4px solid;
}
.breakdown-item:hover { transform: translateX(4px); }

.breakdown-item.letters  { background: #eef2ff; border-color: #4f46e5; }
.breakdown-item.digits   { background: #fef3c7; border-color: #f59e0b; }
.breakdown-item.spaces   { background: #dbeafe; border-color: #3b82f6; }
.breakdown-item.symbols  { background: #fee2e2; border-color: #ef4444; }
.breakdown-item.lines    { background: #d1fae5; border-color: #10b981; }
.breakdown-item.unicode  { background: #f3e8ff; border-color: #a855f7; }

.breakdown-item i {
  font-size: 22px;
  flex-shrink: 0;
}
.breakdown-item.letters  i { color: #4f46e5; }
.breakdown-item.digits   i { color: #d97706; }
.breakdown-item.spaces   i { color: #2563eb; }
.breakdown-item.symbols  i { color: #dc2626; }
.breakdown-item.lines    i { color: #059669; }
.breakdown-item.unicode  i { color: #9333ea; }

.breakdown-item h4 {
  font-size: 20px;
  margin: 0;
  color: #1e293b;
  font-weight: 700;
  line-height: 1;
}
.breakdown-item p {
  color: #64748b;
  font-size: 12px;
  margin: 2px 0 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* =====================================================
   CHARACTER LIMITS (Progress Bars)
   ===================================================== */
.char-limits {
  padding: 18px 22px 22px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.char-limit { width: 100%; }
.limit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #475569;
  margin-bottom: 6px;
  font-weight: 500;
}
.limit-header span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.limit-header i { color: #4f46e5; font-size: 14px; }
.limit-header b {
  color: #1e293b;
  font-weight: 700;
}
.limit-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}
.limit-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 6px;
  transition: width .3s, background .3s;
}

/* =====================================================
   CASE STATS (Letters analysis)
   ===================================================== */
.case-stats {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.case-stats h3 {
  font-size: 16px;
  margin-bottom: 18px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.case-stats h3 i { color: #4f46e5; }

.case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.case-item {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  padding: 16px 12px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: .2s;
}
.case-item:hover {
  border-color: #4f46e5;
  transform: translateY(-2px);
}
.case-item h4 {
  font-size: 22px;
  margin: 0;
  color: #4f46e5;
  font-weight: 700;
}
.case-item p {
  color: #64748b;
  font-size: 11px;
  margin: 4px 0 0;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
}

/* =====================================================
   RESPONSIVE — Character Counter
   ===================================================== */
@media (max-width: 768px) {
  .breakdown-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .breakdown-item {
    padding: 12px;
    gap: 10px;
  }
  .breakdown-item i { font-size: 18px; }
  .breakdown-item h4 { font-size: 18px; }
  .breakdown-item p { font-size: 10px; }

  .char-limits { padding: 14px 16px 16px; gap: 12px; }
  .limit-header { font-size: 12px; }

  .case-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .case-item h4 { font-size: 20px; }
  .case-item p { font-size: 10px; }
}

@media (max-width: 480px) {
  .breakdown-grid { grid-template-columns: 1fr 1fr; }
  .case-grid { grid-template-columns: 1fr 1fr; }
}

/* =====================================================
   CASE CONVERTER TOOL
   ===================================================== */
.case-actions-panel {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.case-actions-panel h3 {
  font-size: 16px;
  margin-bottom: 18px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.case-actions-panel h3 i { color: #4f46e5; }

.case-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.case-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 2px solid #e2e8f0;
  padding: 14px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.case-btn:hover {
  border-color: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79,70,229,.12);
}
.case-btn.active {
  border-color: #4f46e5;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  box-shadow: 0 6px 18px rgba(79,70,229,.2);
}
.case-btn > i {
  font-size: 22px;
  color: #4f46e5;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  transition: .25s;
}
.case-btn:hover > i,
.case-btn.active > i {
  transform: scale(1.15);
}
.case-btn > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.case-btn strong {
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}
.case-btn small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
}

/* ===== Result Badge ===== */
.toolbar-badge {
  display: inline-block;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: .3px;
  vertical-align: middle;
}

/* ===== Output textarea (readonly) ===== */
#outputText {
  background: #f8fafc;
  cursor: text;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .case-buttons-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }
  .case-btn {
    padding: 12px;
    gap: 10px;
  }
  .case-btn > i { font-size: 18px; width: 22px; }
  .case-btn strong { font-size: 13px; }
  .case-btn small { font-size: 10px; }
}

@media (max-width: 480px) {
  .case-buttons-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .case-btn {
    padding: 10px;
    gap: 8px;
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .case-btn > i { font-size: 20px; width: auto; }
  .case-btn strong { font-size: 12px; }
  .case-btn small { display: none; }
}


/* =====================================================
   IMAGE COMPRESSOR
   ===================================================== */

/* ===== Upload Zone ===== */
.upload-zone {
  background: #fff;
  border: 3px dashed #cbd5e1;
  border-radius: 16px;
  padding: 60px 30px;
  text-align: center;
  cursor: pointer;
  transition: .25s;
  margin-bottom: 24px;
}
.upload-zone:hover,
.upload-zone.dragging {
  border-color: #4f46e5;
  background: #f8faff;
  transform: scale(1.005);
}
.upload-zone.dragging {
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(79,70,229,.15);
}
.upload-icon {
  font-size: 64px;
  color: #4f46e5;
  margin-bottom: 14px;
  display: block;
  transition: .25s;
}
.upload-zone:hover .upload-icon,
.upload-zone.dragging .upload-icon {
  transform: translateY(-6px) scale(1.05);
}
.upload-zone h3 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 8px;
}
.upload-zone p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 20px;
}

/* ===== Settings Panel ===== */
.comp-settings {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.comp-settings h3 {
  font-size: 16px;
  margin-bottom: 20px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.comp-settings h3 i { color: #4f46e5; }

.setting-row { margin-bottom: 22px; }
.setting-row:last-of-type { margin-bottom: 20px; }

.setting-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #334155;
  font-size: 14px;
  margin-bottom: 10px;
}
.setting-label i { color: #4f46e5; font-size: 15px; }
.setting-label b {
  margin-left: auto;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

/* Range slider */
input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background: linear-gradient(to right, #ef4444, #f59e0b, #10b981);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  padding: 0;
  margin: 0;
  border: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #4f46e5;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79,70,229,.3);
  transition: .2s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #4f46e5;
  cursor: pointer;
}

.range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
}

/* Setting options (radio buttons) */
.setting-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.setting-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  transition: .2s;
  margin: 0;
}
.setting-options label:hover {
  border-color: #cbd5e1;
}
.setting-options input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
  cursor: pointer;
}
.setting-options label:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600;
}

.setting-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}
.setting-actions .btn-primary,
.setting-actions .btn-secondary,
.setting-actions .tool-btn {
  padding: 11px 20px;
  font-size: 14px;
}

/* ===== Global Stats ===== */
.comp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.comp-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  border-left: 4px solid #4f46e5;
  transition: .25s;
}
.comp-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79,70,229,.1);
}
.comp-stat.success { border-color: #10b981; }
.comp-stat > i {
  font-size: 30px;
  color: #4f46e5;
  flex-shrink: 0;
}
.comp-stat.success > i { color: #10b981; }
.comp-stat h4 {
  font-size: 20px;
  margin: 0;
  color: #1e293b;
  font-weight: 700;
  line-height: 1;
}
.comp-stat p {
  color: #64748b;
  font-size: 11px;
  margin: 3px 0 0;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
}

/* ===== Image List ===== */
.comp-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.image-card {
  display: flex;
  gap: 16px;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  border: 2px solid transparent;
  transition: .25s;
  animation: slideIn .3s ease-out;
}
.image-card.compressed { border-color: #d1fae5; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.image-preview {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.image-info h4 {
  font-size: 15px;
  color: #1e293b;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-sizes {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
}
.size-original,
.size-compressed {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.size-original i { color: #94a3b8; }
.size-compressed i { color: #10b981; }
.size-compressed b { color: #059669; }
.size-arrow {
  color: #cbd5e1;
  font-weight: 700;
}
.saved-percent {
  background: #d1fae5;
  color: #065f46;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  margin-left: 4px;
}
.saved-percent.negative {
  background: #fee2e2;
  color: #991b1b;
}

.image-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .upload-zone { padding: 40px 20px; }
  .upload-icon { font-size: 48px; }
  .upload-zone h3 { font-size: 16px; }
  .upload-zone p { font-size: 13px; }

  .comp-settings { padding: 18px; }
  .setting-options label { padding: 6px 12px; font-size: 12px; }
  .setting-actions { gap: 8px; }
  .setting-actions .btn-primary,
  .setting-actions .btn-secondary,
  .setting-actions .tool-btn {
    flex: 1;
    justify-content: center;
    min-width: 120px;
    padding: 10px 14px;
    font-size: 13px;
  }

  .comp-stat { padding: 12px 14px; gap: 10px; }
  .comp-stat > i { font-size: 24px; }
  .comp-stat h4 { font-size: 16px; }
  .comp-stat p { font-size: 10px; }

  .image-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px;
  }
  .image-preview {
    width: 100%;
    height: 180px;
  }
  .image-info {
    width: 100%;
    align-items: center;
  }
  .image-info h4 {
    white-space: normal;
    word-break: break-word;
  }
  .image-actions {
    justify-content: center;
    width: 100%;
  }
  .image-actions .tool-btn {
    flex: 1;
    justify-content: center;
    font-size: 12px;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .comp-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .upload-zone { padding: 30px 16px; }
  .upload-icon { font-size: 40px; }
}

/* =====================================================
   AGE CALCULATOR
   ===================================================== */

/* ===== Form ===== */
.age-form {
  background: #fff;
  padding: 26px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.age-form h3 {
  font-size: 16px;
  margin-bottom: 20px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.age-form h3 i { color: #4f46e5; }

.age-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.age-input-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #334155;
  font-size: 14px;
  margin-bottom: 6px;
  margin-top: 0;
}
.age-input-group label i { color: #4f46e5; font-size: 14px; }
.age-input-group input {
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  width: 100%;
}

.age-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Hero Age Display ===== */
.age-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 32px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(79,70,229,.25);
  position: relative;
  overflow: hidden;
}
.age-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.15) 0%, transparent 60%);
  pointer-events: none;
}
.age-hero-icon {
  width: 90px;
  height: 90px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.age-hero-icon i {
  font-size: 48px;
  color: #fff;
}
.age-hero-content { flex: 1; }
.age-label {
  font-size: 14px;
  opacity: .9;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.age-main {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}
.age-main-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.age-number {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.age-unit-label {
  font-size: 13px;
  opacity: .9;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}

/* ===== Next Birthday ===== */
.next-birthday {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border: 2px solid #fde68a;
  padding: 22px;
  border-radius: 14px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(251,191,36,.1);
}
.next-bd-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.next-bd-icon i {
  font-size: 32px;
  color: #d97706;
}
.next-bd-content { flex: 1; }
.next-bd-content h3 {
  font-size: 15px;
  color: #92400e;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
}
.next-bd-content p {
  color: #475569;
  font-size: 15px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.next-bd-content p b { color: #1e293b; }
.next-bd-countdown {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bd-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}
.bd-badge.muted {
  background: #f1f5f9;
  color: #475569;
}
.bd-badge.success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
}

/* ===== Stats Grid ===== */
.age-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.age-stat-card {
  background: #fff;
  padding: 20px 16px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: .25s;
  border: 2px solid transparent;
}
.age-stat-card:hover {
  transform: translateY(-4px);
  border-color: #e0e7ff;
  box-shadow: 0 10px 24px rgba(79,70,229,.12);
}
.age-stat-card i {
  font-size: 28px;
  color: #4f46e5;
  display: block;
  margin-bottom: 8px;
}
.age-stat-card h4 {
  font-size: 20px;
  color: #1e293b;
  margin: 4px 0 6px;
  font-weight: 700;
  word-break: break-word;
  line-height: 1.1;
}
.age-stat-card p {
  color: #64748b;
  font-size: 12px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
}

/* ===== Details Cards ===== */
.age-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.detail-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: .25s;
}
.detail-card:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(79,70,229,.1);
}
.detail-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #eef2ff;
}
.detail-icon i {
  font-size: 22px;
  color: #4f46e5;
}

/* =====================================================
   PASSWORD GENERATOR
   ===================================================== */

.pwd-display {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.pwd-display-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  font-weight: 600;
}
.pwd-display-header span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pwd-display-header i { color: #818cf8; font-size: 15px; }
.pwd-badges { display: flex; gap: 6px; }
.pwd-length-badge {
  background: rgba(255,255,255,.1);
  color: #e2e8f0;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.pwd-value-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,.25);
  padding: 8px 8px 8px 18px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,.08);
}
.pwd-value {
  flex: 1;
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
  font-size: 22px;
  font-weight: 600;
  padding: 10px 0;
  margin: 0;
  letter-spacing: 1px;
  word-break: break-all;
  outline: none;
  box-shadow: none !important;
}
.pwd-value:focus { outline: none; box-shadow: none !important; }

.pwd-value-actions { display: flex; gap: 4px; }
.pwd-icon-btn {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.08);
  border: none;
  color: #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding: 0;
}
.pwd-icon-btn:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
  transform: scale(1.05);
}

.pwd-strength {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.strength-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}
.strength-header b { font-size: 13px; font-weight: 700; }
.strength-bar {
  height: 8px;
  background: rgba(255,255,255,.1);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}
.strength-fill {
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: #10b981;
  transition: width .4s, background .4s;
}
.strength-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #94a3b8;
}
.strength-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.strength-meta i { color: #818cf8; }
.strength-meta b { color: #e2e8f0; font-weight: 700; }

.pwd-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  background: #fff;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.pwd-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.pwd-tab:hover { background: #f1f5f9; color: #1e293b; }
.pwd-tab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
}
.pwd-tab i { font-size: 15px; }

.pwd-settings {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.pwd-mode { display: none !important; }
.pwd-mode.active { display: block !important; }

.pwd-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.pwd-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #334155;
  transition: .2s;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box;
}
.pwd-option:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.pwd-option:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600;
}
.pwd-option input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
  flex-shrink: 0;
}
.pwd-option span { flex: 1; }

.pwd-generate-wrap { margin-bottom: 24px; }
.pwd-generate-btn {
  width: 100% !important;
  padding: 18px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  justify-content: center !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pwd-generate-btn i { font-size: 22px; }

.pwd-bulk {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.bulk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
}
.bulk-header h3 {
  font-size: 15px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.bulk-header h3 i { color: #4f46e5; }
.bulk-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.bulk-actions input[type="number"] {
  margin: 0;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 8px;
  width: 70px !important;
  text-align: center;
}
.bulk-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 6px;
}
.bulk-empty {
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
  padding: 30px 20px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bulk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 3px solid #4f46e5;
  transition: .2s;
}
.bulk-item:hover {
  background: #f1f5f9;
  transform: translateX(2px);
}
.bulk-num {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.bulk-item code {
  flex: 1;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 14px;
  color: #1e293b;
  word-break: break-all;
  background: transparent;
  padding: 0;
}
.bulk-copy-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  padding: 0;
}
.bulk-copy-btn:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

@media (max-width: 768px) {
  .pwd-display { padding: 18px; }
  .pwd-value { font-size: 18px; letter-spacing: .5px; }
  .pwd-icon-btn { width: 36px; height: 36px; font-size: 16px; }
  .pwd-length-badge { font-size: 10px; }
  .pwd-tab { padding: 10px; font-size: 13px; }
  .pwd-settings { padding: 18px; }
  .pwd-options { grid-template-columns: 1fr; }
  .pwd-option { padding: 10px 12px; font-size: 13px; }
  .pwd-generate-btn { padding: 14px !important; font-size: 15px !important; }
  .bulk-header { flex-direction: column; align-items: flex-start; }
  .bulk-actions { width: 100%; }
  .bulk-actions input[type="number"] { flex: 1; }
  .bulk-item code { font-size: 12px; }
  .bulk-item { padding: 8px 10px; gap: 8px; }
}
@media (max-width: 480px) {
  .strength-meta { flex-direction: column; gap: 6px; }
  .pwd-value { font-size: 16px; }
}

/* =====================================================
   BASE64 ENCODER / DECODER
   ===================================================== */

/* ===== Mode Tabs ===== */
.b64-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  background: #fff;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.b64-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.b64-tab:hover { background: #f1f5f9; color: #1e293b; }
.b64-tab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
}
.b64-tab i { font-size: 15px; }

/* ===== Mode panels ===== */
.b64-mode { display: none; }
.b64-mode.active { display: block; }

/* ===== Actions Bar ===== */
.b64-actions-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  background: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.b64-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.b64-action-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.b64-action-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
}

.b64-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  font-weight: 600;
  transition: .2s;
  margin: 0;
}
.b64-switch:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
}
.b64-switch input {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
  cursor: pointer;
  transform: scale(1.15);
}

.b64-swap-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.b64-swap-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: scale(1.03);
}

/* ===== Panels ===== */
.b64-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 18px;
  overflow: hidden;
}
.b64-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.b64-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}
.b64-panel-title i { color: #4f46e5; font-size: 16px; }
.b64-badge {
  display: inline-block;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.b64-panel-actions { display: flex; gap: 4px; }
.b64-tool-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  padding: 0;
}
.b64-tool-btn:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

.b64-panel textarea {
  width: 100%;
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 20px;
  font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  min-height: 180px;
  background: #fff;
  color: #1e293b;
  word-break: break-all;
}
.b64-panel textarea:focus {
  outline: none;
  box-shadow: none;
  border: none;
}
.b64-panel textarea.b64-error {
  background: #fef2f2;
  color: #dc2626;
  font-weight: 600;
}
.b64-output textarea {
  background: #f8fafc;
  color: #334155;
}

.b64-panel-footer {
  display: flex;
  gap: 20px;
  padding: 10px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
}
.b64-panel-footer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.b64-panel-footer i { color: #4f46e5; font-size: 13px; }
.b64-panel-footer b { color: #1e293b; font-weight: 700; }

/* ===== File mode ===== */
.b64-file-info { margin-bottom: 18px; }
.b64-file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,.05);
  margin-bottom: 14px;
}
.b64-file-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.b64-file-icon i { font-size: 28px; color: #4f46e5; }
.b64-file-details { flex: 1; min-width: 0; }
.b64-file-details h4 {
  font-size: 15px;
  color: #1e293b;
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b64-file-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
}
.b64-file-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.b64-file-meta i { color: #94a3b8; font-size: 13px; }
.b64-file-meta b { color: #334155; font-weight: 600; }
.b64-remove-file {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fef2f2;
  border: none;
  color: #dc2626;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.b64-remove-file:hover {
  background: #dc2626;
  color: #fff;
}

.b64-image-preview {
  display: block;
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,.08);
  margin: 0 auto;
  background: #f8fafc;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .b64-tab { padding: 10px; font-size: 13px; }
  .b64-actions-bar { padding: 10px 12px; gap: 6px; }
  .b64-action-btn { padding: 8px 12px; font-size: 13px; }
  .b64-swap-btn { margin-left: 0; }
  .b64-switch { font-size: 12px; padding: 6px 10px; }
  .b64-panel textarea { padding: 16px; font-size: 13px; min-height: 140px; }
  .b64-panel-header { padding: 12px 14px; }
  .b64-panel-footer { padding: 8px 14px; gap: 12px; font-size: 11px; }
  .b64-file-card { padding: 14px; gap: 12px; }
  .b64-file-icon { width: 48px; height: 48px; }
  .b64-file-icon i { font-size: 24px; }
  .b64-file-details h4 { font-size: 14px; }
  .b64-file-meta { font-size: 12px; gap: 10px; }
}


/* =====================================================
   HEADER UPGRADE
   ===================================================== */

/* Logo with icon background */
.logo-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
  transition: .3s;
}
.logo-icon-wrap i {
  font-size: 20px;
  color: #fff !important;
}
.logo:hover .logo-icon-wrap {
  transform: scale(1.08) rotate(-5deg);
  box-shadow: 0 6px 18px rgba(79,70,229,.4);
}
.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header scrolled state */
.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-toggle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f1f5f9;
  border: none;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: .2s;
  padding: 0;
}
.search-toggle:hover {
  background: #eef2ff;
  color: #4f46e5;
  transform: scale(1.05);
}

/* Header search dropdown */
.header-search {
  max-height: 0;
  overflow: hidden;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  transition: max-height .3s ease;
}
.header-search.open {
  max-height: 120px;
}
.header-search-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
}
.header-search-form > i {
  position: absolute;
  left: 18px;
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
}
.header-search-form input {
  flex: 1;
  margin: 0;
  padding: 12px 16px 12px 48px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  transition: .2s;
}
.header-search-form input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79,70,229,.1);
}
.header-search-form .btn-sm {
  padding: 10px 20px;
  font-size: 14px;
  white-space: nowrap;
}

/* Nav link enhancements */
.site-nav a i {
  font-size: 14px;
  transition: transform .2s;
}
.site-nav a:hover i {
  transform: scale(1.15);
}

/* Mobile menu toggle icon animation */
.mobile-menu-toggle {
  width: 42px;
  height: 42px;
  padding: 0 !important;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: .2s;
}
.mobile-menu-toggle:hover {
  background: #eef2ff;
  border-color: #4f46e5;
}
.mobile-menu-toggle i {
  transition: transform .3s;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
  .logo-text { font-size: 18px; }
  .site-nav a { padding: 8px 10px; font-size: 14px; }
  .site-nav a span { font-size: 14px; }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 12px 16px !important;
  }
  .mobile-menu-toggle {
    display: flex !important;
  }
  .search-toggle {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 10px 15px;
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
    gap: 4px;
    border-top: 1px solid #f1f5f9;
    animation: slideDown .25s ease;
  }
  .site-nav.open {
    display: flex;
  }
  .site-nav a {
    margin: 0;
    padding: 12px 14px;
    width: 100%;
    border-radius: 10px;
    font-size: 15px;
  }
  .site-nav a:hover {
    background: #eef2ff;
  }
  .logo-icon-wrap {
    width: 34px;
    height: 34px;
  }
  .logo-icon-wrap i { font-size: 18px; }
  .logo-text { font-size: 17px; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .logo-text { font-size: 16px; }
  .header-actions { gap: 6px; }
  .search-toggle,
  .mobile-menu-toggle {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }
  .header-search-form {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0;
  }
  .header-search-form .btn-sm {
    width: 100%;
    justify-content: center;
  }
  .header-search.open {
    max-height: 180px;
  }
}


/* =====================================================
   FIX: Header → Hero/Content gap
   ===================================================== */

/* Remove main top padding when hero is first child */
.site-main > .hero:first-child,
.site-main > .page-hero:first-child {
  margin-top: -30px; /* cancels .site-main padding */
}

/* Ensure ad-box collapses when empty */
.ad-box:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

/* Remove gap between header and first section */
.site-header + .ad-box:empty + .site-main,
.site-header + .site-main {
  padding-top: 0;
}

/* Hero first child - no top margin */
.site-main > .hero:first-child {
  margin-top: 0;
  padding-top: 70px;
}

/* Page hero first child */
.site-main > .page-hero:first-child {
  margin-top: 0;
}

/* Reduce main padding when content starts with hero */
.site-main:has(> .hero:first-child),
.site-main:has(> .page-hero:first-child) {
  padding-top: 0;
}


/* =====================================================
   IMAGE TO PDF
   ===================================================== */

.itp-workspace { margin-top: 24px; }

/* ===== Stats ===== */
.itp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.itp-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  border-left: 4px solid #4f46e5;
  transition: .25s;
}
.itp-stat.success { border-color: #10b981; }
.itp-stat:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(79,70,229,.1); }
.itp-stat > i { font-size: 26px; color: #4f46e5; flex-shrink: 0; }
.itp-stat.success > i { color: #10b981; }
.itp-stat h4 { font-size: 18px; margin: 0; color: #1e293b; font-weight: 700; line-height: 1.1; }
.itp-stat p { color: #64748b; font-size: 11px; margin: 2px 0 0; text-transform: uppercase; letter-spacing: .3px; font-weight: 600; }

/* ===== Settings ===== */
.itp-settings {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.itp-settings h3 {
  font-size: 16px;
  margin-bottom: 20px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.itp-settings h3 i { color: #4f46e5; }

.itp-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.itp-settings-grid:last-child { margin-bottom: 0; }

.itp-setting label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #334155;
  font-size: 13px;
  margin-bottom: 10px;
  margin-top: 0;
}
.itp-setting label i { color: #4f46e5; font-size: 14px; }
.itp-setting label b {
  margin-left: auto;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.itp-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.itp-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  cursor: pointer;
  transition: .2s;
  margin: 0;
}
.itp-options label:hover { border-color: #cbd5e1; }
.itp-options input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
  cursor: pointer;
  transform: scale(1.1);
}
.itp-options label:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600;
}

.itp-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.itp-input-group input {
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 8px;
}

/* ===== List header ===== */
.itp-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 4px;
}
.itp-list-header h3 {
  font-size: 16px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.itp-list-header h3 i { color: #4f46e5; }
.itp-count-badge {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.itp-list-actions { display: flex; gap: 8px; }
.itp-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.itp-tool-btn:hover { background: #f1f5f9; border-color: #cbd5e1; color: #1e293b; }
.itp-tool-btn-danger:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }

/* ===== Image list ===== */
.itp-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.itp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  border: 2px solid transparent;
  transition: .25s;
  cursor: grab;
  animation: itpSlideIn .3s ease-out;
}
.itp-item:hover { border-color: #e0e7ff; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(79,70,229,.12); }
.itp-item.itp-dragging { opacity: .4; cursor: grabbing; }
.itp-item.itp-drag-over { border-color: #4f46e5; border-style: dashed; }

@keyframes itpSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.itp-drag-handle {
  color: #cbd5e1;
  cursor: grab;
  font-size: 18px;
  flex-shrink: 0;
  padding: 4px;
  transition: color .2s;
}
.itp-item:hover .itp-drag-handle { color: #94a3b8; }

.itp-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.itp-thumb img { width: 100%; height: 100%; object-fit: cover; }

.itp-item-info { flex: 1; min-width: 0; }
.itp-item-info h4 {
  font-size: 13px;
  color: #1e293b;
  margin: 0 0 4px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.itp-item-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #64748b;
  flex-wrap: wrap;
}
.itp-item-meta span { display: inline-flex; align-items: center; gap: 3px; }
.itp-item-meta i { color: #94a3b8; font-size: 11px; }

.itp-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.itp-item-btn {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 0;
}
.itp-item-btn:hover { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.itp-remove:hover { background: #dc2626; border-color: #dc2626; }

/* ===== Generate button ===== */
.itp-generate-wrap { text-align: center; margin-bottom: 24px; }
.itp-generate-btn {
  padding: 18px 48px;
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  justify-content: center;
}
.itp-generate-btn i { font-size: 22px; }
.itp-generate-btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.itp-generate-hint {
  margin-top: 14px;
  font-size: 12px;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.itp-generate-hint i { color: #10b981; font-size: 14px; }

/* ===== Progress bar ===== */
.itp-progress {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.itp-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #334155;
  font-weight: 500;
}
.itp-progress-header span { display: flex; align-items: center; gap: 6px; }
.itp-progress-header i { color: #4f46e5; }
.itp-progress-header b { color: #4f46e5; font-weight: 700; font-size: 16px; }
.itp-progress-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}
.itp-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 6px;
  transition: width .3s;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .itp-settings { padding: 18px; }
  .itp-settings-grid { grid-template-columns: 1fr; gap: 18px; }
  .itp-options label { font-size: 12px; padding: 6px 10px; }
  .itp-stat { padding: 12px; gap: 10px; }
  .itp-stat > i { font-size: 22px; }
  .itp-stat h4 { font-size: 16px; }
  .itp-list { grid-template-columns: 1fr; }
  .itp-item { padding: 10px; gap: 10px; }
  .itp-thumb { width: 48px; height: 48px; }
  .itp-item-info h4 { font-size: 12px; }
  .itp-generate-btn { padding: 14px 28px; font-size: 15px; }
  .itp-list-header { flex-direction: column; align-items: flex-start; }
  .itp-list-actions { width: 100%; }
  .itp-tool-btn { flex: 1; justify-content: center; }
}
@media (max-width: 480px) {
  .itp-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .itp-stat p { font-size: 10px; }
  .itp-stat h4 { font-size: 14px; }
}

/* =====================================================
   PDF LOCK / UNLOCK
   ===================================================== */

/* ===== Mode Tabs ===== */
.pdf-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.pdf-tab {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
}
.pdf-tab > i {
  font-size: 28px;
  color: #64748b;
  transition: .25s;
  flex-shrink: 0;
}
.pdf-tab > small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  margin-top: 2px;
}
.pdf-tab:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.pdf-tab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(79,70,229,.28);
}
.pdf-tab.active > i,
.pdf-tab.active > small {
  color: #fff;
}
.pdf-tab.active > small { opacity: .85; }

/* ===== Mode Panels ===== */
.pdf-mode { display: none; }
.pdf-mode.active { display: block; }

/* ===== Info Banner ===== */
.pdf-mode-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.pdf-mode-info i {
  color: #2563eb;
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}
.pdf-mode-info p {
  color: #1e40af;
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}
.pdf-mode-info.info-green {
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-left-color: #10b981;
}
.pdf-mode-info.info-green i { color: #059669; }
.pdf-mode-info.info-green p { color: #065f46; }

/* ===== Settings ===== */
.pdf-settings {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}

/* ===== File Card ===== */
.pdf-file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  padding: 18px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  margin-bottom: 22px;
}
.pdf-file-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pdf-file-icon i {
  font-size: 28px;
  color: #dc2626;
}
.pdf-file-icon.icon-warn {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}
.pdf-file-icon.icon-warn i { color: #d97706; }

.pdf-file-info { flex: 1; min-width: 0; }
.pdf-file-info h4 {
  font-size: 15px;
  color: #1e293b;
  margin: 0 0 6px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdf-file-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #64748b;
}
.pdf-file-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pdf-file-meta i { color: #94a3b8; }
.pdf-file-meta b { color: #334155; font-weight: 600; }

.pdf-remove-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fee2e2;
  border: none;
  color: #dc2626;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.pdf-remove-btn:hover {
  background: #dc2626;
  color: #fff;
}

/* ===== Inputs ===== */
.pdf-inputs {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}
.pdf-input-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #334155;
  font-size: 14px;
  margin-bottom: 8px;
  margin-top: 0;
}
.pdf-input-group label i { color: #4f46e5; font-size: 14px; }

.pdf-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pdf-input-wrap input {
  width: 100%;
  margin: 0;
  padding: 12px 48px 12px 16px;
  font-size: 15px;
  border-radius: 10px;
  font-family: inherit;
}
.pdf-eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 8px;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.pdf-eye-btn:hover {
  background: #f1f5f9;
  color: #4f46e5;
}

.pdf-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
}

/* ===== Password Strength ===== */
.pdf-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.pdf-strength-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.pdf-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: #ef4444;
  transition: width .3s, background .3s;
}
.pdf-strength-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  min-width: 90px;
  text-align: right;
}

/* ===== Permissions ===== */
.pdf-permissions {
  margin-bottom: 22px;
}
.pdf-permissions > label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #334155;
  font-size: 14px;
  margin-bottom: 12px;
}
.pdf-permissions > label i { color: #4f46e5; }

.pdf-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.pdf-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #334155;
  transition: .2s;
  margin: 0;
}
.pdf-checkbox:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.pdf-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600;
}
.pdf-checkbox input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== Action Button ===== */
.pdf-action-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pdf-action-btn i { font-size: 20px; }
.pdf-action-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== Progress ===== */
.pdf-progress {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.pdf-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #334155;
  font-weight: 500;
}
.pdf-progress-header span { display: flex; align-items: center; gap: 6px; }
.pdf-progress-header i { color: #4f46e5; }
.pdf-progress-header b { color: #4f46e5; font-size: 16px; font-weight: 700; }
.pdf-progress-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}
.pdf-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 6px;
  transition: width .3s;
}

/* ===== Result ===== */
.pdf-result {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: 14px;
  padding: 30px 24px;
  text-align: center;
  margin-bottom: 24px;
  animation: pdfPop .3s ease-out;
}
@keyframes pdfPop {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}
.pdf-result-icon {
  width: 70px;
  height: 70px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 6px 20px rgba(16,185,129,.3);
}
.pdf-result-icon i {
  font-size: 40px;
  color: #fff;
}
.pdf-result h3 {
  font-size: 20px;
  color: #065f46;
  margin-bottom: 8px;
  font-weight: 700;
}
.pdf-result p {
  color: #047857;
  font-size: 14px;
  margin-bottom: 20px;
}
.pdf-result .btn-primary {
  background: #10b981;
}
.pdf-result .btn-primary:hover {
  background: #059669;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .pdf-tabs { grid-template-columns: 1fr; gap: 8px; }
  .pdf-tab { padding: 14px 16px; font-size: 14px; }
  .pdf-tab > i { font-size: 24px; }

  .pdf-settings { padding: 18px; }
  .pdf-file-card { padding: 14px; gap: 12px; }
  .pdf-file-icon { width: 48px; height: 48px; }
  .pdf-file-icon i { font-size: 24px; }
  .pdf-file-info h4 { font-size: 14px; }
  .pdf-file-meta { font-size: 12px; gap: 10px; }

  .pdf-input-wrap input { padding: 11px 44px 11px 14px; font-size: 14px; }
  .pdf-perm-grid { grid-template-columns: 1fr 1fr; }
  .pdf-checkbox { padding: 9px 12px; font-size: 13px; }

  .pdf-action-btn { padding: 14px; font-size: 15px; }

  .pdf-result { padding: 24px 18px; }
  .pdf-result-icon { width: 60px; height: 60px; }
  .pdf-result-icon i { font-size: 32px; }
  .pdf-result h3 { font-size: 18px; }
}

@media (max-width: 480px) {
  .pdf-perm-grid { grid-template-columns: 1fr; }
  .pdf-mode-info { padding: 12px 14px; }
  .pdf-mode-info p { font-size: 13px; }
}


/* =====================================================
   PDF TO IMAGE (JPG / PNG)
   ===================================================== */

.pti-workspace { margin-top: 24px; }

/* ===== File Card ===== */
.pti-file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.pti-file-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pti-file-icon i { font-size: 28px; color: #dc2626; }
.pti-file-info { flex: 1; min-width: 0; }
.pti-file-info h4 {
  font-size: 15px;
  color: #1e293b;
  margin: 0 0 6px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pti-file-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #64748b;
}
.pti-file-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pti-file-meta i { color: #94a3b8; }
.pti-file-meta b { color: #334155; font-weight: 600; }

.pti-remove-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fee2e2;
  border: none;
  color: #dc2626;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.pti-remove-btn:hover {
  background: #dc2626;
  color: #fff;
}

/* ===== Settings ===== */
.pti-settings {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.pti-settings h3 {
  font-size: 16px;
  margin-bottom: 20px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pti-settings h3 i { color: #4f46e5; }

.pti-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.pti-settings-grid:last-child { margin-bottom: 0; }

.pti-setting label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #334155;
  font-size: 13px;
  margin-bottom: 10px;
  margin-top: 0;
}
.pti-setting label i { color: #4f46e5; font-size: 14px; }
.pti-setting label b {
  margin-left: auto;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.pti-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pti-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  cursor: pointer;
  transition: .2s;
  margin: 0;
}
.pti-options label:hover { border-color: #cbd5e1; }
.pti-options input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
  cursor: pointer;
  transform: scale(1.1);
}
.pti-options label:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600;
}

.pti-page-input {
  margin-top: 10px;
}
.pti-page-input input {
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
}
.pti-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
}

/* ===== Preview Grid ===== */
.pti-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 4px;
}
.pti-preview-header h3 {
  font-size: 16px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.pti-preview-header h3 i { color: #4f46e5; }
.pti-count-badge {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.pti-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  min-height: 100px;
}

.pti-preview-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: .25s;
  animation: ptiFadeIn .3s ease-out;
}
.pti-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(79,70,229,.15);
}
@keyframes ptiFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pti-preview-img {
  background: #f1f5f9;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pti-preview-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pti-preview-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.pti-preview-num {
  font-weight: 600;
  color: #4f46e5;
}
.pti-preview-size {
  color: #64748b;
}

/* ===== Action Buttons ===== */
.pti-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}
.pti-convert-btn {
  padding: 16px 36px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
}
.pti-convert-btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ===== Progress ===== */
.pti-progress {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.pti-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #334155;
  font-weight: 500;
}
.pti-progress-header span { display: flex; align-items: center; gap: 6px; }
.pti-progress-header i { color: #4f46e5; }
.pti-progress-header b { color: #4f46e5; font-weight: 700; font-size: 16px; }
.pti-progress-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}
.pti-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 6px;
  transition: width .3s;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .pti-file-card { padding: 14px; gap: 12px; }
  .pti-file-icon { width: 48px; height: 48px; }
  .pti-file-icon i { font-size: 24px; }
  .pti-file-info h4 { font-size: 14px; }
  .pti-file-meta { font-size: 12px; gap: 10px; }

  .pti-settings { padding: 18px; }
  .pti-settings-grid { grid-template-columns: 1fr; gap: 18px; }
  .pti-options label { font-size: 12px; padding: 6px 10px; }

  .pti-preview-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }

  .pti-actions { flex-direction: column; }
  .pti-convert-btn { width: 100%; padding: 14px 20px; font-size: 14px; }
}

@media (max-width: 480px) {
  .pti-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .pti-preview-header { flex-direction: column; align-items: flex-start; }
}


/* =====================================================
   WHATSAPP DIRECT MESSAGE
   ===================================================== */

/* ===== Tabs ===== */
.wa-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.wa-tab {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wa-tab i { font-size: 18px; color: #64748b; transition: .25s; }
.wa-tab:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.wa-tab.active {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(37,211,102,.28);
}
.wa-tab.active i { color: #fff; }

/* ===== Mode Panels ===== */
.wa-mode { display: none; }
.wa-mode.active { display: block; }

/* ===== Form Card ===== */
.wa-form-card {
  background: #fff;
  padding: 26px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}

/* ===== Fields ===== */
.wa-field { margin-bottom: 22px; }
.wa-field:last-of-type { margin-bottom: 0; }
.wa-field > label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #334155;
  font-size: 14px;
  margin-bottom: 8px;
  margin-top: 0;
}
.wa-field > label i { color: #25d366; font-size: 15px; }

/* Phone input */
.wa-phone-input {
  display: flex;
  gap: 8px;
}
.wa-country-select {
  flex-shrink: 0;
  width: 165px;
}
.wa-country-select select {
  margin: 0;
  padding: 12px 10px;
  font-size: 14px;
  border-radius: 10px;
  width: 100%;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.wa-phone-input input {
  flex: 1;
  margin: 0;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 10px;
  font-family: ui-monospace, monospace;
  letter-spacing: .5px;
}

.wa-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
}
.wa-hint code {
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  color: #4f46e5;
  font-size: 11px;
  font-family: ui-monospace, monospace;
}

/* Message textarea */
.wa-field textarea {
  margin: 0;
  padding: 14px;
  font-size: 15px;
  border-radius: 10px;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  line-height: 1.6;
}

.wa-message-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 10px;
}
.wa-url-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  margin: 0;
  font-weight: 500;
}
.wa-url-toggle input {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: #25d366;
  cursor: pointer;
  transform: scale(1.1);
}

/* Templates */
.wa-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wa-template-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.wa-template-btn:hover {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-color: #25d366;
  color: #065f46;
  transform: translateY(-1px);
}

/* ===== Generate Button ===== */
.wa-generate-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
  background: linear-gradient(135deg, #25d366, #128c7e);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 24px;
}
.wa-generate-btn:hover {
  background: linear-gradient(135deg, #128c7e, #075e54);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,211,102,.35);
}
.wa-generate-btn i { font-size: 20px; }

/* ===== Result Box ===== */
.wa-result {
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: 14px;
  padding: 20px;
  margin-top: 24px;
  animation: waSlideIn .3s ease-out;
}
@keyframes waSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wa-result > label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #065f46;
  font-size: 14px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.wa-result > label i { color: #10b981; }

.wa-result-link {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.wa-result-link input {
  flex: 1;
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  border-radius: 8px;
  background: #fff;
  font-family: ui-monospace, monospace;
  color: #065f46;
  font-weight: 500;
  border: 1px solid #a7f3d0;
}
.wa-icon-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: #25d366;
  color: #fff;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.wa-icon-btn:hover {
  background: #128c7e;
  transform: scale(1.05);
}

/* Preview (chat bubble) */
.wa-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px dashed #a7f3d0;
}
.wa-preview-phone {
  max-width: 340px;
  width: 100%;
  background: #ece5dd;
  border-radius: 12px;
  padding: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath fill='%23d4cdc4' fill-opacity='0.3' d='M0 20h20v20H0zM20 0h20v20H20z'/%3E%3C/svg%3E");
}
.wa-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #075e54;
  color: #fff;
  border-radius: 8px 8px 0 0;
  margin: -12px -12px 12px -12px;
  font-weight: 600;
  font-size: 14px;
}
.wa-preview-header i { color: #25d366; font-size: 18px; }
.wa-preview-bubble {
  background: #dcf8c6;
  color: #1e293b;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
  position: relative;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.5;
}
.wa-preview-bubble small {
  display: block;
  text-align: right;
  color: #667781;
  font-size: 11px;
  margin-top: 4px;
}

/* Result actions */
.wa-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.wa-open-btn {
  background: linear-gradient(135deg, #25d366, #128c7e);
  flex: 1;
  justify-content: center;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
}
.wa-open-btn:hover {
  background: linear-gradient(135deg, #128c7e, #075e54);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,211,102,.3);
}
.wa-open-btn i { font-size: 18px; }

/* ===== Info Banner ===== */
.wa-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 22px;
}
.wa-info i { color: #2563eb; font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.wa-info p { color: #1e40af; font-size: 13px; margin: 0; line-height: 1.5; }

/* ===== Bulk Results ===== */
.wa-bulk-results {
  background: #fff;
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-top: 24px;
}
.wa-bulk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid #f1f5f9;
}
.wa-bulk-header h3 {
  font-size: 16px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.wa-bulk-header h3 i { color: #25d366; }
.wa-count-badge {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.wa-bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.wa-bulk-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 16px;
}

.wa-bulk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 4px solid #25d366;
  transition: .2s;
  animation: waSlideIn .3s ease-out;
}
.wa-bulk-item:hover { background: #f1f5f9; }

.wa-bulk-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.wa-bulk-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wa-bulk-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  font-family: ui-monospace, monospace;
}
.wa-bulk-phone i { color: #25d366; font-size: 13px; }
.wa-bulk-original {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-bulk-actions { display: flex; gap: 6px; flex-shrink: 0; }
.wa-bulk-action {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
  padding: 0;
}
.wa-bulk-action:hover {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.wa-bulk-info {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 13px;
}
.wa-bulk-info i { color: #d97706; font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.wa-bulk-info p { margin: 0; color: #78350f; }

/* ===== QR Modal ===== */
.wa-qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.wa-qr-box {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  max-width: 380px;
  width: 100%;
  position: relative;
  text-align: center;
  animation: waSlideIn .3s ease-out;
}
.wa-qr-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
  transition: .2s;
}
.wa-qr-close:hover { color: #dc2626; transform: rotate(90deg); }
.wa-qr-box h3 {
  font-size: 17px;
  color: #1e293b;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wa-qr-box h3 i { color: #25d366; }
.wa-qr-hint {
  color: #64748b;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .wa-tabs { gap: 8px; }
  .wa-tab { padding: 12px 14px; font-size: 13px; }
  .wa-tab i { font-size: 16px; }

  .wa-form-card { padding: 18px; }

  .wa-country-select { width: 130px; }
  .wa-country-select select { font-size: 13px; padding: 10px 6px; }
  .wa-phone-input input { padding: 11px 14px; font-size: 14px; }

  .wa-templates { gap: 6px; }
  .wa-template-btn { padding: 6px 12px; font-size: 12px; }

  .wa-generate-btn { padding: 14px; font-size: 14px; }

  .wa-result { padding: 16px; }
  .wa-result-actions { flex-direction: column; }
  .wa-result-actions > * { width: 100%; justify-content: center; }

  .wa-preview { padding: 12px; }

  .wa-bulk-header { flex-direction: column; align-items: flex-start; }
  .wa-bulk-actions { width: 100%; }
  .wa-bulk-actions .itp-tool-btn { flex: 1; justify-content: center; font-size: 12px; }

  .wa-bulk-item { padding: 10px 12px; gap: 10px; }
  .wa-bulk-num { width: 24px; height: 24px; font-size: 11px; }
  .wa-bulk-phone { font-size: 13px; }
  .wa-bulk-original { font-size: 11px; }
  .wa-bulk-action { width: 32px; height: 32px; font-size: 14px; }
}

@media (max-width: 480px) {
  .wa-tabs { grid-template-columns: 1fr; }
  .wa-country-select { width: 120px; }
  .wa-phone-input { flex-direction: column; }
  .wa-country-select { width: 100%; }
}


/* =====================================================
   WATERMARK REMOVER
   ===================================================== */

/* Warning banner */
.wm-warning {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fef3c7;
  border: 2px solid #fbbf24;
  border-left: 6px solid #dc2626;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.wm-warning > i {
  color: #dc2626;
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.wm-warning > div {
  color: #78350f;
  font-size: 14px;
  line-height: 1.6;
}
.wm-warning strong { color: #dc2626; }

/* Info banner (blue) */
.wm-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #eff6ff;
  border: 2px solid #93c5fd;
  border-left: 6px solid #3b82f6;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.wm-info-banner > i {
  color: #2563eb;
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.wm-info-banner > div {
  color: #1e40af;
  font-size: 14px;
  line-height: 1.6;
}
.wm-info-banner small { color: #64748b; font-size: 12px; }

/* Mode tabs */
.wm-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.wm-tab {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wm-tab i { font-size: 18px; color: #64748b; }
.wm-tab:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.wm-tab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(79,70,229,.28);
}
.wm-tab.active i { color: #fff; }

.wm-mode { display: none; }
.wm-mode.active { display: block; }

/* ===== Toolbar ===== */
.wm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  background: #fff;
  padding: 14px 18px;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  border-bottom: 1px solid #e2e8f0;
}
.wm-tool-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wm-tool-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.wm-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.wm-tool-btn:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #1e293b;
}
.wm-tool-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
}
.wm-tool-btn i { font-size: 14px; }

.wm-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.wm-action-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}
.wm-action-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Slider */
.wm-slider-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0;
  white-space: nowrap;
}
.wm-slider-label i { color: #4f46e5; }
.wm-slider-label b {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  min-width: 34px;
  text-align: center;
}
.wm-slider {
  width: 140px;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
}

/* ===== Canvas ===== */
.wm-canvas-wrap {
  background: #1e293b;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  overflow: auto;
}
.wm-canvas-container {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.wm-canvas-container canvas {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  cursor: crosshair;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  background: #fff;
  border-radius: 4px;
}
.wm-cursor-ring {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 10;
  box-shadow: 0 0 0 1px rgba(0,0,0,.5), inset 0 0 0 1px rgba(0,0,0,.5);
  mix-blend-mode: difference;
}

/* ===== Hints ===== */
.wm-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: #64748b;
}
.wm-hints span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wm-hints i { color: #4f46e5; font-size: 14px; }
.wm-hints b { color: #1e293b; background: #e2e8f0; padding: 1px 6px; border-radius: 4px; font-size: 12px; }

/* ===== Download bar ===== */
.wm-download-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  background: #fff;
  padding: 16px 18px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.wm-format-group {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
}
.wm-format-label {
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: 11px;
  margin: 0;
}
.wm-format-group label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  margin: 0;
  font-size: 13px;
}
.wm-format-group input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
  cursor: pointer;
}

/* PDF nav */
.wm-pdf-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.wm-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #4f46e5;
  border: none;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.wm-nav-btn:hover:not(:disabled) { background: #4338ca; }
.wm-nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.wm-page-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #334155;
  font-weight: 600;
  margin: 0 10px;
}
.wm-page-info input {
  width: 60px !important;
  padding: 6px 8px;
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
}

/* Page status */
.wm-page-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .wm-tabs { gap: 8px; }
  .wm-tab { padding: 12px; font-size: 13px; }

  .wm-toolbar { padding: 10px 12px; gap: 8px; }
  .wm-tool-group { gap: 6px; }
  .wm-tool-label { display: none; }
  .wm-tool-btn { padding: 6px 10px; font-size: 12px; }
  .wm-tool-btn > span { display: none; }
  .wm-action-btn { padding: 6px 10px; font-size: 12px; }
  .wm-slider { width: 90px; }

  .wm-canvas-wrap { padding: 10px; min-height: 300px; }
  .wm-canvas-container canvas { max-height: 55vh; }

  .wm-hints { font-size: 12px; gap: 10px; padding: 10px 14px; }

  .wm-download-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .wm-download-bar > * { width: 100%; justify-content: center; }
  .wm-format-group { justify-content: center; }

  .wm-pdf-nav { flex-direction: column; align-items: stretch; gap: 8px; }
  .wm-pdf-nav > * { width: 100%; justify-content: center; }
}


/* =====================================================
   ADD WATERMARK
   ===================================================== */

/* Tabs */
.awl-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.awl-tab {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.awl-tab i { font-size: 18px; color: #64748b; }
.awl-tab:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.awl-tab.active {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(14,165,233,.28);
}
.awl-tab.active i { color: #fff; }

.awl-mode { display: none; }
.awl-mode.active { display: block; }

.awl-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #eff6ff;
  border: 2px solid #93c5fd;
  border-left: 6px solid #3b82f6;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.awl-info-banner > i {
  color: #2563eb;
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.awl-info-banner > div {
  color: #1e40af;
  font-size: 14px;
  line-height: 1.6;
}

/* Editor layout */
.awl-editor { margin-top: 24px; }

.awl-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 22px;
  align-items: start;
}

/* Canvas panel */
.awl-canvas-panel {
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.awl-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 400px;
  max-height: 70vh;
  overflow: auto;
}
.awl-canvas-wrap canvas {
  max-width: 100%;
  max-height: 65vh;
  display: block;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  border-radius: 4px;
  background: #fff;
}
.awl-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  background: #0f172a;
  border-top: 1px solid #334155;
  justify-content: flex-end;
}
.awl-page-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
}
.awl-page-nav b { color: #fff; }

/* Settings panel */
.awl-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.awl-section {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.awl-section h4 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  font-weight: 700;
}
.awl-section h4 i { color: #0ea5e9; font-size: 15px; }

/* Type tabs */
.awl-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.awl-type-btn {
  padding: 10px 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.awl-type-btn:hover { border-color: #cbd5e1; }
.awl-type-btn.active {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(14,165,233,.25);
}
.awl-type-btn i { font-size: 14px; }

/* Fields */
.awl-field { margin-bottom: 14px; }
.awl-field:last-child { margin-bottom: 0; }
.awl-field > label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.awl-field > label i { color: #0ea5e9; font-size: 13px; }
.awl-field > label b {
  margin-left: auto;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #0369a1;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

.awl-field input[type="text"],
.awl-field select {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  width: 100%;
  font-family: inherit;
}
.awl-color-input {
  width: 100% !important;
  height: 42px;
  padding: 4px !important;
  cursor: pointer;
  border-radius: 8px;
}

.awl-slider {
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #0ea5e9;
}

/* Toggle buttons */
.awl-toggle-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.awl-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  margin: 0;
}
.awl-toggle-btn:has(input:checked) {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border-color: #0ea5e9;
  color: #0369a1;
}
.awl-toggle-btn input {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: #0ea5e9;
  cursor: pointer;
}

/* Upload mini */
.awl-upload-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  justify-content: center;
}
.awl-upload-mini:hover {
  border-color: #0ea5e9;
  background: #f0f9ff;
  color: #0369a1;
}
.awl-upload-mini i { font-size: 20px; color: #0ea5e9; }

/* Position grid */
.awl-position-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.awl-pos-btn {
  aspect-ratio: 1;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  font-weight: 700;
}
.awl-pos-btn:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #1e293b;
}
.awl-pos-btn.active {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(14,165,233,.25);
}

/* Checkbox */
.awl-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  transition: .2s;
  margin: 0;
  font-weight: 500;
}
.awl-checkbox:hover { border-color: #cbd5e1; }
.awl-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border-color: #0ea5e9;
  color: #0369a1;
}
.awl-checkbox input {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: #0ea5e9;
  cursor: pointer;
}
.awl-checkbox i { color: #0ea5e9; }

/* Presets */
.awl-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.awl-preset-btn {
  padding: 8px 14px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #fbbf24;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #78350f;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.awl-preset-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(251,191,36,.3);
}

/* Responsive */
@media (max-width: 992px) {
  .awl-layout { grid-template-columns: 1fr; }
  .awl-canvas-wrap { min-height: 300px; padding: 12px; }
  .awl-canvas-wrap canvas { max-height: 50vh; }
}
@media (max-width: 768px) {
  .awl-tabs { gap: 8px; }
  .awl-tab { padding: 12px; font-size: 13px; }
  .awl-section { padding: 14px; }
  .awl-section h4 { font-size: 13px; }
  .awl-field input[type="text"] { font-size: 13px; padding: 9px 10px; }
  .awl-pos-btn { font-size: 16px; }
  .awl-preview-actions { padding: 12px; }
}


/* =====================================================
   PASSPORT PHOTO MAKER
   ===================================================== */

/* Step Tabs */
.pp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.pp-step {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pp-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: .2s;
}
.pp-step.active {
  border-color: #4f46e5;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
}
.pp-step.active .pp-step-num {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
}

/* Layout */
.pp-editor { margin-top: 24px; }
.pp-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 22px;
  align-items: start;
}

/* Canvas panel */
.pp-canvas-panel {
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.pp-canvas-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  min-height: 450px;
  background: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%) 50% / 24px 24px;
}
.pp-canvas-wrap canvas {
  max-width: 100%;
  max-height: 65vh;
  display: block;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  border-radius: 4px;
  background: #fff;
}

/* Controls bar */
.pp-controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 20px;
  background: #0f172a;
  border-top: 1px solid #334155;
}
.pp-slider-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
}
.pp-slider-group label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.pp-slider-group label i { color: #818cf8; }
.pp-slider-group b {
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  min-width: 42px;
  text-align: right;
}
.pp-slider {
  flex: 1;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
}

.pp-canvas-hint {
  padding: 10px 20px;
  background: #334155;
  color: #cbd5e1;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pp-canvas-hint i { color: #818cf8; }

/* Settings panel */
.pp-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pp-panel { display: none; }
.pp-panel.active { display: flex; flex-direction: column; gap: 14px; }

.pp-section {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.pp-section h4 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  font-weight: 700;
}
.pp-section h4 i { color: #4f46e5; font-size: 15px; }

/* Quick action buttons */
.pp-quick-actions,
.pp-crop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pp-action-btn {
  padding: 12px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border: 2px solid #c7d2fe;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #4338ca;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.pp-action-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(79,70,229,.25);
}
.pp-action-btn i { font-size: 15px; }

/* Background colors */
.pp-bg-colors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pp-bg-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  font-size: 11px;
  color: #475569;
  font-weight: 600;
}
.pp-bg-btn:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
}
.pp-bg-btn.active {
  border-color: #4f46e5;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79,70,229,.15);
}
.pp-bg-preview {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
}

/* Select */
.pp-select {
  width: 100%;
  margin: 0 0 10px;
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 10px;
  font-family: inherit;
  cursor: pointer;
  background: #fff;
  border: 2px solid #e2e8f0;
}
.pp-select:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

/* Custom size */
.pp-custom-size {
  margin-top: 10px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 10px;
}
.pp-custom-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pp-custom-row input {
  flex: 1;
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}
.pp-custom-row span {
  color: #94a3b8;
  font-weight: 700;
}

.pp-size-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  border-radius: 6px;
  font-size: 12px;
  color: #1e40af;
  font-weight: 500;
}
.pp-size-info i { color: #2563eb; font-size: 14px; }

/* Border options */
.pp-border-options,
.pp-download-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pp-radio-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: .2s;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  margin: 0;
}
.pp-radio-line:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.pp-radio-line:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600;
}
.pp-radio-line input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
  cursor: pointer;
  transform: scale(1.15);
}

.pp-hint-text {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
  line-height: 1.5;
}
.pp-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

/* Download group */
.pp-download-main {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
  padding: 14px 20px;
  font-size: 14px;
}

/* Tips */
.pp-tips {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pp-tips li {
  padding: 6px 0;
  font-size: 13px;
  color: #475569;
  border-bottom: 1px dashed #f1f5f9;
}
.pp-tips li:last-child { border-bottom: none; }

/* Bottom actions */
.pp-bottom-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

/* Responsive */
@media (max-width: 992px) {
  .pp-layout { grid-template-columns: 1fr; }
  .pp-canvas-wrap { min-height: 340px; padding: 16px; }
  .pp-canvas-wrap canvas { max-height: 50vh; }
}
@media (max-width: 768px) {
  .pp-step { padding: 10px 8px; font-size: 12px; }
  .pp-step-num { width: 20px; height: 20px; font-size: 11px; }
  .pp-section { padding: 14px; }
  .pp-section h4 { font-size: 13px; }
  .pp-slider-group { min-width: 100%; flex-direction: column; align-items: stretch; }
  .pp-slider-group label { justify-content: space-between; }
  .pp-bg-colors { grid-template-columns: repeat(3, 1fr); }
  .pp-quick-actions, .pp-crop-actions { grid-template-columns: 1fr; }
  .pp-action-btn { padding: 10px; font-size: 12px; }
}


/* =====================================================
   BACKGROUND CHANGER / REMOVER
   ===================================================== */

/* Loading state */
.bg-loading {
  background: #fff;
  padding: 60px 30px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin: 24px 0;
}
.bg-loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #e2e8f0;
  border-top-color: #4f46e5;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: bgSpin 1s linear infinite;
}
@keyframes bgSpin { to { transform: rotate(360deg); } }
.bg-loading h3 {
  font-size: 18px;
  color: #1e293b;
  margin-bottom: 8px;
  font-weight: 700;
}
.bg-loading p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 20px;
}
.bg-loading-bar {
  max-width: 400px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin: 0 auto;
}
.bg-loading-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 6px;
  transition: width .3s;
}

/* Layout */
.bg-editor { margin-top: 24px; }
.bg-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 22px;
  align-items: start;
}

/* Canvas panel */
.bg-canvas-panel {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.bg-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 450px;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #ffffff 0% 50%) 50% / 24px 24px;
}
.bg-canvas-wrap canvas {
  max-width: 100%;
  max-height: 65vh;
  display: block;
  box-shadow: 0 10px 40px rgba(0,0,0,.12);
  border-radius: 4px;
  background: transparent;
}
.bg-canvas-hint {
  padding: 10px 20px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid #e2e8f0;
}
.bg-canvas-hint i { color: #4f46e5; }

.bg-canvas-actions {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  background: #f8fafc;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Settings panel */
.bg-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bg-section {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.bg-section h4 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  font-weight: 700;
}
.bg-section h4 i { color: #4f46e5; font-size: 15px; }

/* Type tabs */
.bg-type-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 6px;
}
.bg-type-btn {
  padding: 10px 6px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  line-height: 1.2;
}
.bg-type-btn i { font-size: 16px; }
.bg-type-btn:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.bg-type-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
}

/* Panels */
.bg-panel { display: none; }
.bg-panel.active { display: block; }

/* Info box */
.bg-info-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 12px 14px;
  border-radius: 8px;
}
.bg-info-box i {
  color: #2563eb;
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.bg-info-box b {
  display: block;
  color: #1e40af;
  font-size: 13px;
  margin-bottom: 4px;
}
.bg-info-box p {
  color: #64748b;
  font-size: 12px;
  margin: 0;
  line-height: 1.5;
}

/* Solid colors grid */
.bg-color-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.bg-color-btn {
  aspect-ratio: 1;
  border: 3px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  padding: 0;
}
.bg-color-btn:hover {
  transform: scale(1.08);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.15);
}
.bg-color-btn.active {
  border-color: #4f46e5;
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(79,70,229,.2);
}

/* Gradient grid */
.bg-gradient-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.bg-gradient-btn {
  aspect-ratio: 1;
  border: 3px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  padding: 0;
}
.bg-gradient-btn:hover {
  transform: scale(1.08);
}
.bg-gradient-btn.active {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,.2);
}
.bg-gradient-btn:nth-child(1) { background: linear-gradient(135deg,#4f46e5,#7c3aed); }
.bg-gradient-btn:nth-child(2) { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.bg-gradient-btn:nth-child(3) { background: linear-gradient(135deg,#10b981,#06b6d4); }
.bg-gradient-btn:nth-child(4) { background: linear-gradient(135deg,#ec4899,#8b5cf6); }
.bg-gradient-btn:nth-child(5) { background: linear-gradient(135deg,#f97316,#fbbf24); }
.bg-gradient-btn:nth-child(6) { background: linear-gradient(135deg,#06b6d4,#3b82f6); }
.bg-gradient-btn:nth-child(7) { background: linear-gradient(135deg,#1e293b,#334155); }
.bg-gradient-btn:nth-child(8) { background: linear-gradient(135deg,#fbcfe8,#e0f2fe); }
.bg-gradient-btn:nth-child(9) { background: linear-gradient(135deg,#fef3c7,#fde68a); }
.bg-gradient-btn:nth-child(10) { background: linear-gradient(135deg,#d1fae5,#a7f3d0); }
.bg-gradient-btn:nth-child(11) { background: linear-gradient(135deg,#000000,#4f46e5); }
.bg-gradient-btn:nth-child(12) { background: linear-gradient(135deg,#ffffff,#e2e8f0); }

/* Custom color picker */
.bg-custom-color {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin: 0;
}
.bg-custom-color span { flex-shrink: 0; }
.bg-custom-color input[type="color"] {
  flex: 1;
  width: auto !important;
  height: 36px;
  padding: 2px !important;
  margin: 0 !important;
  border-radius: 6px;
  cursor: pointer;
}

/* Pattern grid */
.bg-pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.bg-pattern-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  font-size: 11px;
  color: #475569;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.bg-pattern-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.bg-pattern-btn.active {
  border-color: #4f46e5;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79,70,229,.15);
}
.bg-pattern-preview {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

/* Image upload mini */
.bg-upload-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  justify-content: center;
}
.bg-upload-mini:hover {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #4f46e5;
}
.bg-upload-mini i { font-size: 20px; color: #4f46e5; }

.bg-fit-options { margin-top: 12px; }
.bg-fit-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .3px;
  display: block;
  margin-bottom: 8px;
}
.bg-fit-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.bg-fit-btn {
  padding: 8px 4px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.bg-fit-btn:hover { border-color: #cbd5e1; }
.bg-fit-btn.active {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
}

/* Preset image grid */
.bg-presets-imgs { margin-top: 16px; }
.bg-preset-imgs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.bg-preset-img-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  font-size: 11px;
  color: #475569;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.bg-preset-img-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.bg-preset-img-btn.active {
  border-color: #4f46e5;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
}
.bg-preset-img-preview {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

/* Advanced fields */
.bg-field { margin-bottom: 14px; }
.bg-field:last-child { margin-bottom: 0; }
.bg-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.bg-field label i { color: #4f46e5; font-size: 13px; }
.bg-field label b {
  margin-left: auto;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}
.bg-slider {
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
}

/* Responsive */
@media (max-width: 992px) {
  .bg-layout { grid-template-columns: 1fr; }
  .bg-canvas-wrap { min-height: 340px; padding: 16px; }
  .bg-canvas-wrap canvas { max-height: 50vh; }
}
@media (max-width: 768px) {
  .bg-section { padding: 14px; }
  .bg-section h4 { font-size: 13px; }
  .bg-type-tabs { grid-template-columns: repeat(3, 1fr); }
  .bg-color-grid { grid-template-columns: repeat(6, 1fr); }
  .bg-gradient-grid { grid-template-columns: repeat(4, 1fr); }
  .bg-pattern-grid { grid-template-columns: repeat(2, 1fr); }
  .bg-preset-imgs-grid { grid-template-columns: repeat(2, 1fr); }
  .bg-fit-btns { grid-template-columns: repeat(2, 1fr); }
  .bg-loading { padding: 40px 20px; }
  .bg-loading h3 { font-size: 15px; }
  .bg-canvas-actions { flex-direction: column; }
  .bg-canvas-actions > * { width: 100%; justify-content: center; }
}


/* =====================================================
   PAN CARD PHOTO MAKER
   ===================================================== */

/* Spec Reference */
.pan-specs {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.pan-specs h3 {
  font-size: 15px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
  font-weight: 700;
}
.pan-specs h3 i { color: #4f46e5; }

.pan-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pan-spec-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
  border: 2px solid #e2e8f0;
}
.pan-spec-logo {
  display: inline-block;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.pan-spec-card h4 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 8px;
  font-weight: 700;
}
.pan-spec-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pan-spec-card li {
  font-size: 12px;
  color: #475569;
  padding: 3px 0;
  line-height: 1.5;
}
.pan-spec-card li b { color: #4f46e5; }

/* Tabs */
.pan-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.pan-tab {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 10px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pan-tab i { font-size: 15px; color: #64748b; }
.pan-tab:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.pan-tab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(79,70,229,.25);
}
.pan-tab.active i { color: #fff; }

/* Spec bar */
.pan-spec-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-left: 4px solid #10b981;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #065f46;
  font-weight: 500;
}
.pan-spec-bar i { color: #10b981; font-size: 18px; }

/* Editor */
.pan-editor { margin-top: 20px; }
.pan-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* Canvas */
.pan-canvas-panel {
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.pan-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  min-height: 450px;
  background: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%) 50% / 20px 20px;
  position: relative;
}
.pan-canvas-wrap canvas {
  max-width: 100%;
  max-height: 60vh;
  display: block;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  border-radius: 4px;
  background: #fff;
  cursor: grab;
}
.pan-size-label {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: ui-monospace, monospace;
  font-weight: 600;
}

.pan-canvas-hint {
  padding: 10px 20px;
  background: #334155;
  color: #cbd5e1;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pan-canvas-hint i { color: #818cf8; }

.pan-canvas-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  background: #0f172a;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Settings */
.pan-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Status card */
.pan-status-card {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.pan-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.pan-status-row:last-child { border-bottom: none; padding-bottom: 0; }
.pan-status-row:first-child { padding-top: 0; }
.pan-status-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
}
.pan-status-row span i { color: #818cf8; font-size: 13px; }
.pan-status-row b {
  color: #fff;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}

/* Section */
.pan-section {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.pan-section h4 {
  font-size: 13px;
  color: #1e293b;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.pan-section h4 i { color: #4f46e5; font-size: 14px; }

/* Fields */
.pan-field { margin-bottom: 12px; }
.pan-field:last-child { margin-bottom: 0; }
.pan-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.pan-field label i { color: #4f46e5; font-size: 12px; }
.pan-field label b {
  margin-left: auto;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}
.pan-slider {
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
}

.pan-info-small {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  color: #1e40af;
  margin-top: 10px;
}
.pan-info-small i { color: #2563eb; font-size: 13px; }

/* Quick actions */
.pan-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pan-action-btn {
  padding: 10px 8px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: inherit;
}
.pan-action-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(79,70,229,.25);
}
.pan-action-btn i { font-size: 13px; }

/* Tips */
.pan-tips {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pan-tips li {
  padding: 5px 0;
  font-size: 12px;
  color: #475569;
  border-bottom: 1px dashed #f1f5f9;
  line-height: 1.5;
}
.pan-tips li:last-child { border-bottom: none; }

/* Responsive */
@media (max-width: 992px) {
  .pan-layout { grid-template-columns: 1fr; }
  .pan-canvas-wrap { min-height: 340px; padding: 20px; }
  .pan-canvas-wrap canvas { max-height: 50vh; }
}
@media (max-width: 768px) {
  .pan-tabs { grid-template-columns: repeat(2, 1fr); }
  .pan-tab { padding: 10px 8px; font-size: 12px; }
  .pan-specs-grid { grid-template-columns: 1fr; }
  .pan-section { padding: 12px; }
  .pan-status-card { padding: 14px; }
  .pan-status-row { font-size: 12px; }
  .pan-canvas-actions { flex-direction: column; }
  .pan-canvas-actions > * { width: 100%; justify-content: center; }
}

/* =====================================================
   PDF SIZE REDUCER
   ===================================================== */

.psr-editor { margin-top: 24px; }

/* File card */
.psr-file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.psr-file-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.psr-file-icon i { font-size: 28px; color: #dc2626; }
.psr-file-info { flex: 1; min-width: 0; }
.psr-file-info h4 {
  font-size: 15px;
  color: #1e293b;
  margin: 0 0 6px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.psr-file-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #64748b;
}
.psr-file-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.psr-file-meta i { color: #94a3b8; }
.psr-file-meta b { color: #334155; font-weight: 600; }

.psr-remove-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fee2e2;
  border: none;
  color: #dc2626;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.psr-remove-btn:hover {
  background: #dc2626;
  color: #fff;
}

/* Target section */
.psr-target-section {
  background: #fff;
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.psr-target-section h3 {
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.psr-target-section h3 i { color: #4f46e5; font-size: 16px; }

.psr-target-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.psr-target-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 8px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.psr-target-btn > i {
  font-size: 20px;
  color: #64748b;
  transition: .2s;
}
.psr-target-btn > b {
  font-size: 14px;
  color: #1e293b;
  font-weight: 700;
  transition: .2s;
}
.psr-target-btn > small {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
  transition: .2s;
}
.psr-target-btn:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.psr-target-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(79,70,229,.25);
}
.psr-target-btn.active > i,
.psr-target-btn.active > b,
.psr-target-btn.active > small {
  color: #fff;
}
.psr-target-btn.active > small { opacity: .85; }

/* Custom target */
.psr-custom-target {
  background: #f8fafc;
  padding: 14px;
  border-radius: 10px;
  margin-top: 12px;
}
.psr-custom-target label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  margin-top: 0;
}
.psr-custom-input {
  display: flex;
  gap: 8px;
}
.psr-custom-input input {
  flex: 1;
  margin: 0;
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 8px;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}
.psr-custom-input select {
  width: 90px;
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

/* Settings */
.psr-settings {
  background: #fff;
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.psr-setting { min-width: 0; }
.psr-setting label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.psr-setting label i { color: #4f46e5; font-size: 13px; }
.psr-setting label b {
  margin-left: auto;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}
.psr-slider {
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
}
.psr-range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
}
.psr-select {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
}
.psr-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: .2s;
}
.psr-checkbox:hover { border-color: #cbd5e1; }
.psr-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600 !important;
}
.psr-checkbox input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
  flex-shrink: 0;
  transform: scale(1.1);
}
.psr-checkbox i { color: #4f46e5; }

/* Compress button */
.psr-action-wrap { margin-bottom: 20px; }
.psr-compress-btn {
  width: 100%;
  padding: 18px;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.psr-compress-btn i { font-size: 20px; }
.psr-compress-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Progress */
.psr-progress {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.psr-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #334155;
  font-weight: 500;
}
.psr-progress-header span { display: flex; align-items: center; gap: 6px; }
.psr-progress-header i { color: #4f46e5; }
.psr-progress-header b { color: #4f46e5; font-size: 16px; font-weight: 700; }
.psr-progress-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}
.psr-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 6px;
  transition: width .3s;
}
.psr-progress-info {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  font-family: ui-monospace, monospace;
}

/* Result */
.psr-result {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: 16px;
  padding: 26px;
  margin-bottom: 24px;
  animation: psrPop .4s ease-out;
}
@keyframes psrPop {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1); }
}
.psr-result-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.psr-result-icon {
  width: 60px;
  height: 60px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(16,185,129,.3);
}
.psr-result-icon i { font-size: 32px; color: #fff; }
.psr-result-header h3 {
  font-size: 18px;
  color: #065f46;
  margin-bottom: 4px;
  font-weight: 700;
}
.psr-result-header p {
  color: #047857;
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

.psr-result-stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr;
  gap: 12px;
  background: rgba(255,255,255,.6);
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 20px;
  align-items: center;
}
.psr-result-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.psr-result-stat i {
  font-size: 20px;
  color: #64748b;
}
.psr-result-stat b {
  font-size: 16px;
  color: #1e293b;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  line-height: 1;
}
.psr-result-stat small {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
}
.psr-result-stat.success i { color: #10b981; }
.psr-result-stat.success b { color: #065f46; }

.psr-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
  .psr-file-card { padding: 14px; gap: 12px; }
  .psr-file-icon { width: 48px; height: 48px; }
  .psr-file-icon i { font-size: 24px; }
  .psr-file-info h4 { font-size: 14px; }
  .psr-file-meta { font-size: 12px; gap: 10px; }

  .psr-target-section { padding: 16px; }
  .psr-target-presets { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .psr-target-btn { padding: 10px 6px; }
  .psr-target-btn > i { font-size: 16px; }
  .psr-target-btn > b { font-size: 13px; }
  .psr-target-btn > small { font-size: 9px; }

  .psr-settings { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .psr-compress-btn { padding: 14px; font-size: 14px; }

  .psr-result { padding: 20px 16px; }
  .psr-result-icon { width: 48px; height: 48px; }
  .psr-result-icon i { font-size: 24px; }
  .psr-result-header h3 { font-size: 16px; }
  .psr-result-stats { grid-template-columns: 1fr; gap: 8px; }
  .psr-result-stat { flex-direction: row; justify-content: space-between; padding: 6px 10px; }
  .psr-result-stat i { font-size: 18px; }
  .psr-result-stat:nth-child(2) { display: none; }
}

/* =====================================================
   PDF SIZE REDUCER — Live Size + Preview
   ===================================================== */

/* ===== Live size comparison ===== */
.psr-size-compare {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.psr-size-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.psr-size-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}
.psr-size-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.psr-size-label i { color: #4f46e5; font-size: 12px; }
.psr-size-value {
  font-size: 20px;
  color: #1e293b;
  font-weight: 800;
  font-family: ui-monospace, monospace;
  line-height: 1.1;
}
.psr-target-value { color: #4f46e5; }
.psr-saved-value { color: #10b981; }
.psr-size-arrow {
  color: #cbd5e1;
  font-size: 20px;
}

/* Visual bar */
.psr-visual-bar {
  position: relative;
  height: 14px;
  background: #e2e8f0;
  border-radius: 8px;
  overflow: visible;
  margin-bottom: 8px;
}
.psr-visual-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 8px;
  transition: width .5s;
  position: relative;
}
.psr-visual-bar-target {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  background: #10b981;
  border-radius: 2px;
  transition: left .5s;
  box-shadow: 0 0 0 3px rgba(16,185,129,.2);
}
.psr-visual-bar-target::before {
  content: '▼';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  color: #10b981;
  font-size: 12px;
}
.psr-visual-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}

/* ===== Preview section ===== */
.psr-preview-section {
  background: #fff;
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
  position: relative;
}
.psr-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 10px;
}
.psr-preview-header h3 {
  font-size: 15px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 700;
}
.psr-preview-header h3 i { color: #4f46e5; }
.psr-preview-info {
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
}
.psr-preview-info b { color: #4f46e5; }

.psr-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  min-height: 80px;
}
.psr-preview-card {
  background: #f8fafc;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  border: 1px solid #e2e8f0;
  transition: .2s;
  animation: psrFadeIn .3s ease-out;
}
.psr-preview-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79,70,229,.15);
  border-color: #c7d2fe;
}
@keyframes psrFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.psr-preview-img {
  aspect-ratio: 3/4;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #e2e8f0;
}
.psr-preview-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.psr-preview-label {
  padding: 6px 10px;
  font-size: 11px;
  color: #64748b;
  text-align: center;
  font-weight: 600;
  background: #f8fafc;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.psr-preview-more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  aspect-ratio: 3/4;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 10px;
}
.psr-preview-more i { font-size: 24px; }

.psr-preview-loading {
  text-align: center;
  padding: 30px;
  color: #64748b;
  font-size: 13px;
}
.psr-preview-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #4f46e5;
  border-radius: 50%;
  margin: 0 auto 10px;
  animation: psrSpin 1s linear infinite;
}
@keyframes psrSpin { to { transform: rotate(360deg); } }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .psr-size-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .psr-size-arrow {
    transform: rotate(90deg);
    justify-self: center;
    font-size: 16px;
  }
  .psr-size-item {
    flex-direction: row;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
  }
  .psr-size-value { font-size: 16px; }
  .psr-size-label { font-size: 11px; justify-content: flex-start; }

  .psr-preview-section { padding: 16px; }
  .psr-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
  }
  .psr-preview-label { font-size: 10px; padding: 4px 6px; }
  .psr-preview-header h3 { font-size: 13px; }
}


/* =====================================================
   INVOICE MAKER
   ===================================================== */

.inv-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

/* ===== Form panel ===== */
.inv-form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Topbar */
.inv-topbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.inv-topbar-btn {
  flex: 1;
  padding: 10px 14px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.inv-topbar-btn:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(79,70,229,.25);
}

/* Card */
.inv-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.inv-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.inv-card h3 i { color: #4f46e5; font-size: 15px; }

/* Fields */
.inv-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.inv-field {
  margin-bottom: 10px;
}
.inv-field:last-child { margin-bottom: 0; }
.inv-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
}
.inv-field input,
.inv-field textarea,
.inv-field select {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  width: 100%;
}
.inv-field textarea {
  resize: vertical;
  min-height: 50px;
  font-family: inherit;
}

/* Logo upload */
.inv-logo-upload {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
}
.inv-logo-preview {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  background: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 11px;
  gap: 2px;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}
.inv-logo-preview i { font-size: 22px; }
.inv-logo-preview.has-logo { background: #fff; border: 1px solid #e2e8f0; }
.inv-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.inv-logo-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inv-mini-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: .2s;
  font-family: inherit;
}
.inv-mini-btn:hover { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.inv-mini-danger:hover { background: #dc2626; border-color: #dc2626; }

/* Items */
.inv-items-head {
  display: grid;
  grid-template-columns: 2fr 60px 90px 100px 32px;
  gap: 6px;
  padding: 6px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 4px;
}
.inv-item-row {
  display: grid;
  grid-template-columns: 2fr 60px 90px 100px 32px;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.inv-item-row input {
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 6px;
  width: 100%;
}
.inv-item-row input[type="number"] {
  text-align: right;
  font-family: ui-monospace, monospace;
}
.inv-item-amount {
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  text-align: right;
  font-family: ui-monospace, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-item-remove {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #fef2f2;
  border: none;
  color: #dc2626;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: .2s;
}
.inv-item-remove:hover { background: #dc2626; color: #fff; }

.inv-add-item-btn {
  width: 100%;
  padding: 10px;
  background: #eef2ff;
  border: 2px dashed #c7d2fe;
  border-radius: 8px;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.inv-add-item-btn:hover {
  background: #4f46e5;
  color: #fff;
  border-style: solid;
  border-color: #4f46e5;
}

/* Color row */
.inv-color-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.inv-color-row input[type="color"] {
  width: 48px;
  height: 40px;
  padding: 4px;
  cursor: pointer;
  border-radius: 8px;
  margin: 0;
  flex-shrink: 0;
}
.inv-color-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.inv-color-presets button {
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: .2s;
  box-shadow: 0 0 0 1px #e2e8f0;
  padding: 0;
}
.inv-color-presets button:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #4f46e5;
}

/* Template row */
.inv-template-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.inv-template-btn {
  padding: 10px 8px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.inv-template-btn i { font-size: 18px; }
.inv-template-btn:hover { border-color: #cbd5e1; }
.inv-template-btn.active {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
}

/* ===== Preview panel ===== */
.inv-preview-panel {
  position: sticky;
  top: 90px;
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.inv-preview-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
}
.inv-ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: .2s;
  padding: 0;
  flex-shrink: 0;
}
.inv-ctrl-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.inv-ctrl-btn.active { background: #4f46e5; color: #fff; }
.inv-zoom-level {
  font-size: 12px;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
  margin-left: 4px;
  min-width: 45px;
}
.inv-preview-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.inv-preview-scroll {
  padding: 20px;
  min-height: 500px;
  max-height: 80vh;
  overflow: auto;
  background: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%) 50% / 20px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.inv-preview-doc {
  transform-origin: top center;
  transition: transform .2s;
  width: 100%;
  max-width: 800px;
}

/* ===== The invoice document ===== */
.inv-doc {
  background: #fff;
  padding: 32px;
  border-radius: 4px;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
  min-height: 800px;
}
.inv-doc-header {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 22px;
  border-bottom: 3px solid var(--accent, #4f46e5);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.inv-doc-header-left {
  display: flex;
  gap: 16px;
  flex: 1;
  min-width: 200px;
}
.inv-doc-logo {
  max-width: 90px;
  max-height: 90px;
  object-fit: contain;
  flex-shrink: 0;
}
.inv-doc-biz h1 {
  font-size: 22px;
  color: var(--accent, #4f46e5);
  margin-bottom: 8px;
  line-height: 1.2;
}
.inv-doc-biz p {
  font-size: 12px;
  color: #475569;
  line-height: 1.6;
}
.inv-doc-header-right {
  text-align: right;
}
.inv-doc-title h2 {
  font-size: 30px;
  color: var(--accent, #4f46e5);
  letter-spacing: 2px;
  margin-bottom: 4px;
  line-height: 1;
}
.inv-doc-num {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 12px;
  font-family: ui-monospace, monospace;
}
.inv-doc-meta {
  font-size: 12px;
  color: #475569;
  line-height: 1.9;
}
.inv-doc-meta b { color: #1e293b; }

.inv-doc-parties {
  margin-bottom: 22px;
}
.inv-doc-party-label {
  font-size: 10px;
  color: var(--accent, #4f46e5);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.inv-doc-party-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.inv-doc-party p {
  font-size: 12px;
  color: #475569;
  line-height: 1.6;
}

.inv-doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 22px;
}
.inv-doc-table th {
  background: var(--accent, #4f46e5);
  color: #fff;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: left;
  font-weight: 600;
}
.inv-doc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  color: #334155;
}
.inv-td-idx { width: 40px; text-align: center; }
.inv-td-num { text-align: right; width: 100px; font-family: ui-monospace, monospace; }
.inv-td-total { font-weight: 700; color: #1e293b; }
.inv-td-empty { text-align: center; color: #94a3b8; padding: 24px; font-style: italic; }

.inv-doc-summary {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 22px;
  margin-bottom: 22px;
}
.inv-doc-note-block {
  font-size: 12px;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 12px;
}
.inv-doc-note-block b {
  color: #1e293b;
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.inv-doc-totals {
  background: #f8fafc;
  padding: 16px 18px;
  border-radius: 10px;
}
.inv-doc-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
  color: #475569;
}
.inv-doc-totals-row b {
  color: #1e293b;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}
.inv-doc-grand {
  border-top: 2px solid var(--accent, #4f46e5);
  margin-top: 6px;
  padding-top: 12px;
  font-size: 15px;
}
.inv-doc-grand span, .inv-doc-grand b {
  font-weight: 800;
  color: var(--accent, #4f46e5);
}

.inv-doc-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 16px;
}
.inv-doc-sign-line {
  width: 180px;
  height: 1px;
  background: #1e293b;
  margin-bottom: 6px;
}
.inv-doc-sign-label {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.inv-doc-thanks {
  font-size: 12px;
  color: #64748b;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== Templates ===== */
.inv-doc-classic .inv-doc-header { border-bottom-color: #1e293b; }
.inv-doc-classic .inv-doc-biz h1,
.inv-doc-classic .inv-doc-title h2 { color: #1e293b; }
.inv-doc-classic .inv-doc-table th { background: #1e293b; }
.inv-doc-classic .inv-doc-totals {
  background: #fff;
  border: 2px solid #1e293b;
}
.inv-doc-classic .inv-doc-grand { border-color: #1e293b; }
.inv-doc-classic .inv-doc-grand span,
.inv-doc-classic .inv-doc-grand b { color: #1e293b; }

.inv-doc-minimal .inv-doc-header { border-bottom: 1px solid #e2e8f0; }
.inv-doc-minimal .inv-doc-table th {
  background: #fff;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
}
.inv-doc-minimal .inv-doc-totals {
  background: #fff;
  border: 1px solid #e2e8f0;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .inv-layout { grid-template-columns: 1fr; }
  .inv-preview-panel { position: static; }
  .inv-preview-scroll { max-height: 500px; }
}
@media (max-width: 640px) {
  .inv-grid-2 { grid-template-columns: 1fr; }
  .inv-template-row { grid-template-columns: 1fr 1fr; }
  .inv-items-head,
  .inv-item-row {
    grid-template-columns: 1fr 60px 80px 32px;
  }
  .inv-items-head > div:nth-child(4),
  .inv-item-row > .inv-item-amount { display: none; }
  .inv-doc { padding: 20px 16px; }
  .inv-doc-header { gap: 16px; }
  .inv-doc-title h2 { font-size: 22px; }
  .inv-doc-biz h1 { font-size: 18px; }
  .inv-doc-summary { grid-template-columns: 1fr; }
  .inv-doc-table { font-size: 11px; }
  .inv-doc-table th, .inv-doc-table td { padding: 8px 6px; }
  .inv-td-num { width: 70px; }
}

/* =====================================================
   ID CARD MAKER
   ===================================================== */

.idc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

/* Form panel */
.idc-form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.idc-topbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.idc-topbar-btn {
  flex: 1;
  padding: 10px 14px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.idc-topbar-btn:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(79,70,229,.25);
}

/* Cards */
.idc-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.idc-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.idc-card h3 i { color: #4f46e5; font-size: 15px; }

/* Type grid */
.idc-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.idc-type-btn {
  padding: 12px 6px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}
.idc-type-btn i { font-size: 20px; color: #64748b; transition: .2s; }
.idc-type-btn:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
}
.idc-type-btn.active {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
}
.idc-type-btn.active i { color: #4f46e5; }

/* Fields */
.idc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.idc-field { margin-bottom: 10px; }
.idc-field:last-child { margin-bottom: 0; }
.idc-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
}
.idc-field input,
.idc-field textarea {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  width: 100%;
}
.idc-field textarea {
  resize: vertical;
  min-height: 50px;
  font-family: inherit;
}

/* Logo/photo upload */
.idc-logo-upload,
.idc-photo-upload {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
}
.idc-logo-preview {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 10px;
  gap: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.idc-logo-preview i { font-size: 20px; }
.idc-logo-preview.has-image { background: #fff; border: 1px solid #e2e8f0; }
.idc-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.idc-photo-preview {
  width: 60px;
  height: 75px;
  border-radius: 8px;
  background: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 10px;
  gap: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.idc-photo-preview i { font-size: 24px; }
.idc-photo-preview.has-image { background: #fff; border: 1px solid #e2e8f0; }
.idc-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.idc-logo-actions,
.idc-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.idc-mini-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: .2s;
  font-family: inherit;
}
.idc-mini-btn:hover { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.idc-mini-danger:hover { background: #dc2626; border-color: #dc2626; }

/* Checkbox */
.idc-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: .2s;
}
.idc-checkbox:hover { border-color: #cbd5e1; }
.idc-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600 !important;
}
.idc-checkbox input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
}
.idc-checkbox i { color: #4f46e5; }

/* Theme grid */
.idc-theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.idc-theme-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 4px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.idc-theme-btn small {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
}
.idc-theme-preview {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  transition: .2s;
}
.idc-theme-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.idc-theme-btn.active {
  border-color: #4f46e5;
  background: #eef2ff;
}
.idc-theme-btn.active small { color: #4f46e5; }
.idc-theme-btn.active .idc-theme-preview { transform: scale(1.15); }

/* Color row */
.idc-color-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.idc-color-row input[type="color"] {
  width: 50px;
  height: 40px;
  padding: 4px;
  cursor: pointer;
  border-radius: 8px;
  margin: 0;
}
.idc-color-hint {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
}

/* Preview panel */
.idc-preview-panel {
  position: sticky;
  top: 90px;
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.idc-preview-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
}
.idc-ctrl-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: .2s;
  font-family: inherit;
}
.idc-ctrl-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.idc-ctrl-btn.active { background: #4f46e5; color: #fff; }
.idc-preview-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.idc-preview-actions .idc-ctrl-btn {
  width: 34px;
  padding: 0;
}

.idc-preview-scroll {
  padding: 30px 20px;
  min-height: 480px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%) 50% / 20px 20px;
}
.idc-preview-doc {
  width: 100%;
  max-width: 337px;
}

.idc-preview-hint {
  padding: 10px 16px;
  background: #334155;
  color: #cbd5e1;
  font-size: 11px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.idc-preview-hint i { color: #818cf8; }

/* ===== The ID card itself ===== */
.idc-doc {
  width: 337px;
  height: 212px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  color: #1e293b;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  margin: 0 auto;
}

/* Front */
.idc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
}
.idc-header-logo {
  width: 38px;
  height: 38px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.idc-header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.idc-logo-placeholder {
  color: var(--accent);
  font-size: 20px;
}
.idc-header-text { flex: 1; min-width: 0; }
.idc-header-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.idc-header-tagline {
  font-size: 9px;
  opacity: .9;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.idc-header-strip {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.idc-body {
  flex: 1;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  align-items: flex-start;
}
.idc-photo-box {
  width: 68px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.idc-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.idc-photo-placeholder {
  color: #cbd5e1;
  font-size: 34px;
}

.idc-info {
  flex: 1;
  min-width: 0;
}
.idc-info-name {
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.15;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.idc-info-role {
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 6px;
}
.idc-info-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.idc-info-grid > div {
  font-size: 9.5px;
  color: #475569;
  display: flex;
  gap: 4px;
  line-height: 1.3;
}
.idc-info-grid > div > span {
  color: #94a3b8;
  flex-shrink: 0;
  min-width: 34px;
}
.idc-info-grid > div > b {
  color: #1e293b;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idc-qr-box {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  align-self: flex-end;
}
.idc-qr {
  width: 100%;
  height: 100%;
  display: block;
}

.idc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 9px;
}
.idc-footer-dates {
  display: flex;
  gap: 10px;
}
.idc-footer-dates b { font-weight: 700; }
.idc-footer-type {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-size: 9.5px;
}

/* Back */
.idc-doc-back {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.idc-back-header {
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.idc-back-body {
  flex: 1;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.idc-back-label {
  font-size: 9px;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.idc-back-section p {
  font-size: 9.5px;
  color: #334155;
  line-height: 1.4;
}
.idc-back-terms {
  font-size: 8.5px !important;
  line-height: 1.35 !important;
}
.idc-back-signature {
  margin-top: auto;
  text-align: right;
}
.idc-back-sign-line {
  width: 90px;
  height: 1px;
  background: #1e293b;
  margin-left: auto;
  margin-bottom: 3px;
}
.idc-back-sign-label {
  font-size: 8px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.idc-back-footer {
  padding: 5px 14px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 8.5px;
  text-align: center;
  font-style: italic;
  border-top: 1px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 992px) {
  .idc-layout { grid-template-columns: 1fr; }
  .idc-preview-panel { position: static; }
}
@media (max-width: 640px) {
  .idc-grid-2 { grid-template-columns: 1fr; }
  .idc-type-grid { grid-template-columns: repeat(2, 1fr); }
  .idc-theme-grid { grid-template-columns: repeat(4, 1fr); }
  .idc-preview-scroll { padding: 20px 10px; }
  .idc-preview-doc { transform: scale(0.92); transform-origin: top center; }
  .idc-ctrl-btn { font-size: 12px; padding: 0 8px; }
}

/* =====================================================
   SITEMAP PAGE
   ===================================================== */

/* Stats */
.sm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}
.sm-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  padding: 18px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  border-left: 4px solid #4f46e5;
  transition: .25s;
}
.sm-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79,70,229,.12);
}
.sm-stat > i {
  font-size: 30px;
  color: #4f46e5;
  flex-shrink: 0;
}
.sm-stat h3 {
  font-size: 22px;
  color: #1e293b;
  margin: 0;
  font-weight: 700;
  line-height: 1;
}
.sm-stat p {
  font-size: 12px;
  color: #64748b;
  margin: 4px 0 0;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
}

/* Sections */
.sm-section {
  margin-bottom: 40px;
}
.sm-section h2 {
  font-size: 22px;
  color: #1e293b;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  font-weight: 700;
}
.sm-section h2 i { color: #4f46e5; font-size: 22px; }

/* Main pages grid */
.sm-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.sm-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  color: #1e293b;
  font-weight: 600;
  font-size: 14px;
  transition: .2s;
  text-decoration: none;
}
.sm-link-card:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79,70,229,.12);
}
.sm-link-card i {
  font-size: 22px;
  color: #4f46e5;
  flex-shrink: 0;
  transition: .2s;
}
.sm-link-card:hover i {
  transform: scale(1.15);
}

/* Category pills */
.sm-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sm-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4338ca;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: .2s;
  border: 1px solid transparent;
}
.sm-cat-pill:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(79,70,229,.25);
}
.sm-cat-pill i { font-size: 12px; }
.sm-cat-count {
  background: rgba(79,70,229,.15);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.sm-cat-pill:hover .sm-cat-count {
  background: rgba(255,255,255,.25);
}

/* Tools grid */
.sm-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.sm-tool-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: #1e293b;
  transition: .2s;
}
.sm-tool-card:hover {
  border-color: #4f46e5;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79,70,229,.12);
}
.sm-tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: .2s;
}
.sm-tool-card:hover .sm-tool-icon {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}
.sm-tool-icon i {
  font-size: 22px;
  color: #4f46e5;
  transition: .2s;
}
.sm-tool-card:hover .sm-tool-icon i { color: #fff; }
.sm-tool-info { flex: 1; min-width: 0; }
.sm-tool-info h4 {
  font-size: 14px;
  margin: 0 0 4px;
  color: #1e293b;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sm-tool-info p {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Posts list */
.sm-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.sm-posts-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: #1e293b;
  transition: .2s;
  flex-wrap: wrap;
}
.sm-posts-list li a:hover {
  border-color: #4f46e5;
  background: #f8faff;
  padding-left: 20px;
}
.sm-posts-list li a i {
  color: #4f46e5;
  font-size: 16px;
  flex-shrink: 0;
}
.sm-post-title {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sm-posts-list li a:hover .sm-post-title { color: #4f46e5; }
.sm-posts-list small {
  color: #94a3b8;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.sm-posts-list small i { color: #94a3b8 !important; font-size: 12px; }
.sm-dot { color: #cbd5e1; }

/* Info box */
.sm-info-box {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: #eff6ff;
  border: 2px solid #bfdbfe;
  border-left: 6px solid #3b82f6;
  border-radius: 12px;
}
.sm-info-box > i {
  color: #2563eb;
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.sm-info-box b {
  display: block;
  color: #1e40af;
  font-size: 15px;
  margin-bottom: 8px;
}
.sm-info-box p {
  color: #1e40af;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 6px;
}
.sm-info-box p:last-child { margin-bottom: 0; }
.sm-info-box a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: underline;
  word-break: break-all;
}

/* Responsive */
@media (max-width: 768px) {
  .sm-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sm-stat { padding: 14px; gap: 10px; }
  .sm-stat > i { font-size: 24px; }
  .sm-stat h3 { font-size: 18px; }
  .sm-stat p { font-size: 10px; }

  .sm-section h2 { font-size: 18px; }
  .sm-links-grid { grid-template-columns: 1fr 1fr; }
  .sm-link-card { padding: 12px; font-size: 13px; gap: 10px; }
  .sm-link-card i { font-size: 18px; }

  .sm-tools-grid { grid-template-columns: 1fr; }
  .sm-posts-list small { display: none; }
  .sm-post-title { white-space: normal; }
  .sm-info-box { padding: 16px; gap: 10px; }
  .sm-info-box > i { font-size: 20px; }
}

/* =====================================================
   PRIVACY POLICY PAGE
   ===================================================== */

/* Last updated banner */
.pp-updated-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #93c5fd;
  border-left: 6px solid #2563eb;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 30px;
}
.pp-updated-banner > i {
  color: #2563eb;
  font-size: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}
.pp-updated-banner b {
  display: block;
  color: #1e40af;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.pp-updated-banner p {
  color: #1e40af;
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

/* Layout: TOC + Content */
.pp-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

/* Table of Contents */
.pp-toc {
  position: sticky;
  top: 90px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.pp-toc h4 {
  font-size: 13px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.pp-toc h4 i { color: #4f46e5; }
.pp-toc nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pp-toc nav a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: #64748b;
  border-radius: 6px;
  transition: .2s;
  border-left: 2px solid transparent;
  font-weight: 500;
}
.pp-toc nav a:hover {
  background: #eef2ff;
  color: #4f46e5;
  border-left-color: #4f46e5;
}

/* Content */
.pp-content {
  background: #fff;
  padding: 32px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  min-width: 0;
}
.pp-content > .pp-section:first-child h2 { margin-top: 0; }

.pp-section {
  margin-bottom: 34px;
  scroll-margin-top: 100px;
}
.pp-section:last-child { margin-bottom: 0; }

.pp-section h2 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  font-weight: 700;
  line-height: 1.3;
}
.pp-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.pp-section h3 {
  font-size: 15px;
  color: #334155;
  margin: 20px 0 10px;
  font-weight: 700;
}

.pp-section p {
  color: #475569;
  font-size: 14.5px;
  line-height: 1.75;
  margin-bottom: 12px;
}

.pp-section ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px;
}
.pp-section ul li {
  position: relative;
  padding: 6px 0 6px 28px;
  font-size: 14px;
  color: #475569;
  line-height: 1.65;
}
.pp-section ul li::before {
  content: '\F26A';
  font-family: 'bootstrap-icons';
  position: absolute;
  left: 4px;
  top: 6px;
  color: #4f46e5;
  font-size: 14px;
}
.pp-section ul li b { color: #1e293b; }

.pp-section a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-word;
}
.pp-section a:hover { color: #4338ca; }

/* Info box */
.pp-info-box {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-left: 6px solid #10b981;
  padding: 16px 20px;
  border-radius: 10px;
  margin: 16px 0;
}
.pp-info-box > i {
  color: #10b981;
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}
.pp-info-box > div {
  color: #065f46;
  font-size: 13.5px;
  line-height: 1.65;
}
.pp-info-box b { color: #047857; }

/* Cookie table */
.pp-cookie-table {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.pp-cookie-table table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}
.pp-cookie-table th {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.pp-cookie-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.pp-cookie-table tr:last-child td { border-bottom: none; }
.pp-cookie-table tr:hover { background: #f8fafc; }
.pp-cookie-table td b { color: #1e293b; }

/* Service list */
.pp-service-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}
.pp-service {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: .2s;
}
.pp-service:hover {
  background: #f1f5f9;
  transform: translateX(3px);
  border-color: #c7d2fe;
}
.pp-service-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 20px;
}
.pp-service h4 {
  font-size: 14px;
  color: #1e293b;
  margin: 0 0 4px;
  font-weight: 700;
}
.pp-service p {
  font-size: 12.5px;
  color: #64748b;
  margin: 0 0 6px;
  line-height: 1.5;
}
.pp-service a {
  font-size: 12px;
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pp-service a:hover { text-decoration: underline; }
.pp-service a i { font-size: 11px; }

/* Tools grid */
.pp-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.pp-tools-grid span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f0fdf4;
  border-radius: 8px;
  font-size: 13px;
  color: #166534;
  font-weight: 500;
}
.pp-tools-grid span i {
  color: #10b981;
  font-size: 14px;
}

/* Rights grid */
.pp-rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.pp-right {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  padding: 18px 16px;
  border-radius: 12px;
  text-align: center;
  transition: .25s;
  border: 2px solid transparent;
}
.pp-right:hover {
  transform: translateY(-4px);
  border-color: #4f46e5;
  box-shadow: 0 8px 20px rgba(79,70,229,.15);
}
.pp-right i {
  font-size: 28px;
  color: #4f46e5;
  display: block;
  margin-bottom: 10px;
}
.pp-right h4 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 6px;
  font-weight: 700;
}
.pp-right p {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* Contact box */
.pp-contact-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.pp-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: .2s;
}
.pp-contact-item:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}
.pp-contact-item i {
  font-size: 24px;
  color: #4f46e5;
  flex-shrink: 0;
}
.pp-contact-item b {
  display: block;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 3px;
  font-weight: 700;
}
.pp-contact-item a,
.pp-contact-item span {
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}
.pp-contact-item a:hover { color: #4f46e5; }

/* Agreement box */
.pp-agreement {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #fbbf24;
  border-left: 6px solid #d97706;
  padding: 20px;
  border-radius: 12px;
  margin-top: 34px;
}
.pp-agreement > i {
  color: #d97706;
  font-size: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}
.pp-agreement b {
  display: block;
  color: #92400e;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.pp-agreement p {
  color: #78350f;
  font-size: 13.5px;
  margin: 0;
  line-height: 1.65;
}

/* Responsive */
@media (max-width: 992px) {
  .pp-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .pp-toc {
    position: static;
    max-height: none;
  }
  .pp-toc nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .pp-toc nav a {
    font-size: 12px;
    padding: 6px 10px;
    border-left: none;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
  }
  .pp-toc nav a:hover {
    border-color: #4f46e5;
    background: #eef2ff;
  }
}

@media (max-width: 640px) {
  .pp-content { padding: 20px 18px; }
  .pp-section h2 { font-size: 17px; gap: 8px; }
  .pp-num { width: 26px; height: 26px; font-size: 12px; }
  .pp-section p { font-size: 14px; }
  .pp-section ul li { font-size: 13.5px; padding-left: 24px; }
  .pp-rights-grid { grid-template-columns: 1fr 1fr; }
  .pp-tools-grid { grid-template-columns: 1fr; }
  .pp-service { padding: 12px; gap: 10px; }
  .pp-service-logo { width: 38px; height: 38px; font-size: 18px; }
  .pp-service h4 { font-size: 13px; }
  .pp-updated-banner { padding: 14px 16px; gap: 10px; }
  .pp-updated-banner > i { font-size: 22px; }
  .pp-agreement { padding: 16px; gap: 10px; }
  .pp-agreement > i { font-size: 22px; }
  .pp-cookie-table th,
  .pp-cookie-table td { padding: 10px 12px; font-size: 12px; }
}

/* =====================================================
   TERMS OF SERVICE PAGE
   ===================================================== */

/* Last updated banner */
.tm-updated-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #93c5fd;
  border-left: 6px solid #2563eb;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.tm-updated-banner > i {
  color: #2563eb;
  font-size: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}
.tm-updated-banner b {
  display: block;
  color: #1e40af;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.tm-updated-banner p {
  color: #1e40af;
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

/* Alert box */
.tm-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 2px solid #fca5a5;
  border-left: 6px solid #dc2626;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 30px;
}
.tm-alert > i {
  color: #dc2626;
  font-size: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}
.tm-alert b {
  display: block;
  color: #991b1b;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: .5px;
}
.tm-alert p {
  color: #991b1b;
  font-size: 13px;
  margin: 0;
  line-height: 1.6;
}

/* Layout */
.tm-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

/* TOC */
.tm-toc {
  position: sticky;
  top: 90px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.tm-toc h4 {
  font-size: 13px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.tm-toc h4 i { color: #4f46e5; }
.tm-toc nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tm-toc nav a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: #64748b;
  border-radius: 6px;
  transition: .2s;
  border-left: 2px solid transparent;
  font-weight: 500;
}
.tm-toc nav a:hover {
  background: #eef2ff;
  color: #4f46e5;
  border-left-color: #4f46e5;
}

/* Content */
.tm-content {
  background: #fff;
  padding: 32px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  min-width: 0;
}
.tm-content > .tm-section:first-child h2 { margin-top: 0; }

.tm-section {
  margin-bottom: 34px;
  scroll-margin-top: 100px;
}
.tm-section:last-child { margin-bottom: 0; }

.tm-section h2 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  font-weight: 700;
  line-height: 1.3;
}
.tm-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.tm-section h3 {
  font-size: 15px;
  color: #334155;
  margin: 20px 0 10px;
  font-weight: 700;
}
.tm-section h3:first-child { margin-top: 0; }

.tm-section p {
  color: #475569;
  font-size: 14.5px;
  line-height: 1.75;
  margin-bottom: 12px;
}

.tm-section ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px;
}
.tm-section ul li {
  position: relative;
  padding: 6px 0 6px 28px;
  font-size: 14px;
  color: #475569;
  line-height: 1.65;
}
.tm-section ul li::before {
  content: '\F26A';
  font-family: 'bootstrap-icons';
  position: absolute;
  left: 4px;
  top: 6px;
  color: #4f46e5;
  font-size: 14px;
}
.tm-section ul li b { color: #1e293b; }

.tm-section a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-word;
}
.tm-section a:hover { color: #4338ca; }

/* Service grid */
.tm-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.tm-service-grid span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f0fdf4;
  border-radius: 8px;
  font-size: 13px;
  color: #166534;
  font-weight: 500;
}
.tm-service-grid span i {
  color: #10b981;
  font-size: 14px;
}

/* Prohibited grid */
.tm-prohibited-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.tm-prohibited {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  padding: 18px 16px;
  border-radius: 12px;
  border: 2px solid #fecaca;
  transition: .25s;
}
.tm-prohibited:hover {
  transform: translateY(-4px);
  border-color: #dc2626;
  box-shadow: 0 8px 20px rgba(220,38,38,.15);
}
.tm-prohibited i {
  font-size: 28px;
  color: #dc2626;
  display: block;
  margin-bottom: 10px;
}
.tm-prohibited h4 {
  font-size: 14px;
  color: #991b1b;
  margin-bottom: 6px;
  font-weight: 700;
}
.tm-prohibited p {
  font-size: 12.5px;
  color: #7f1d1d;
  margin: 0;
  line-height: 1.5;
}

/* Warning box */
.tm-warning-box {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 2px solid #fca5a5;
  border-left: 6px solid #dc2626;
  padding: 18px 22px;
  border-radius: 10px;
  margin: 20px 0;
}
.tm-warning-box > i {
  color: #dc2626;
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.tm-warning-box > div {
  color: #991b1b;
  font-size: 13.5px;
  line-height: 1.65;
}
.tm-warning-box b { color: #7f1d1d; }

/* Info box */
.tm-info-box {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #93c5fd;
  border-left: 6px solid #2563eb;
  padding: 18px 22px;
  border-radius: 10px;
  margin: 16px 0;
}
.tm-info-box > i {
  color: #2563eb;
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.tm-info-box > div {
  color: #1e40af;
  font-size: 13.5px;
  line-height: 1.65;
}
.tm-info-box b { color: #1e3a8a; }

/* Disclaimer text */
.tm-disclaimer-text {
  background: #f8fafc;
  border-left: 4px solid #64748b;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 13px !important;
  line-height: 1.7 !important;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #334155 !important;
  font-weight: 500;
}
.tm-disclaimer-text b {
  color: #0f172a;
  font-weight: 800;
}

/* Contact box */
.tm-contact-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.tm-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: .2s;
}
.tm-contact-item:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}
.tm-contact-item i {
  font-size: 24px;
  color: #4f46e5;
  flex-shrink: 0;
}
.tm-contact-item b {
  display: block;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 3px;
  font-weight: 700;
}
.tm-contact-item a,
.tm-contact-item span {
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}
.tm-contact-item a:hover { color: #4f46e5; }

/* Agreement */
.tm-agreement {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-left: 6px solid #10b981;
  padding: 20px;
  border-radius: 12px;
  margin-top: 34px;
}
.tm-agreement > i {
  color: #10b981;
  font-size: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}
.tm-agreement b {
  display: block;
  color: #065f46;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.tm-agreement p {
  color: #047857;
  font-size: 13.5px;
  margin: 0;
  line-height: 1.65;
}
.tm-agreement a {
  color: #047857;
  font-weight: 700;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
  .tm-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .tm-toc {
    position: static;
    max-height: none;
  }
  .tm-toc nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .tm-toc nav a {
    font-size: 12px;
    padding: 6px 10px;
    border-left: none;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
  }
  .tm-toc nav a:hover {
    border-color: #4f46e5;
    background: #eef2ff;
  }
}

@media (max-width: 640px) {
  .tm-content { padding: 20px 18px; }
  .tm-section h2 { font-size: 17px; gap: 8px; }
  .tm-num { width: 26px; height: 26px; font-size: 12px; }
  .tm-section p { font-size: 14px; }
  .tm-section ul li { font-size: 13.5px; padding-left: 24px; }
  .tm-service-grid { grid-template-columns: 1fr; }
  .tm-prohibited-grid { grid-template-columns: 1fr; }
  .tm-contact-box { grid-template-columns: 1fr; }
  .tm-updated-banner,
  .tm-alert,
  .tm-warning-box,
  .tm-info-box { padding: 14px 16px; gap: 10px; }
  .tm-updated-banner > i,
  .tm-alert > i,
  .tm-warning-box > i,
  .tm-info-box > i { font-size: 20px; }
  .tm-agreement { padding: 16px; gap: 10px; }
  .tm-agreement > i { font-size: 22px; }
  .tm-disclaimer-text { font-size: 12px !important; padding: 12px 14px; }
}

/* =====================================================
   ABOUT US PAGE
   ===================================================== */

/* ===== Story section ===== */
.ab-story {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 30px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}
.ab-story-icon {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 48px;
  box-shadow: 0 12px 32px rgba(79,70,229,.3);
  flex-shrink: 0;
}
.ab-story-content { min-width: 0; }

.ab-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 16px;
}
.ab-badge i { color: #dc2626; }

.ab-story-content h2 {
  font-size: 28px;
  color: #1e293b;
  margin-bottom: 18px;
  line-height: 1.35;
  font-weight: 800;
}
.ab-highlight {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.ab-story-content p {
  color: #475569;
  font-size: 15.5px;
  line-height: 1.75;
  margin-bottom: 14px;
}

.ab-story-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.ab-story-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4338ca;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.ab-story-badges i { color: #4f46e5; }

/* ===== Stats section ===== */
.section-title-wrap {
  text-align: center;
  margin-bottom: 40px;
}
.section-title-wrap .section-title {
  margin-bottom: 10px;
}
.section-title-wrap > p {
  color: #64748b;
  font-size: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.ab-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.ab-stat {
  background: #fff;
  padding: 32px 20px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  transition: .25s;
  border: 2px solid transparent;
}
.ab-stat:hover {
  transform: translateY(-6px);
  border-color: #e0e7ff;
  box-shadow: 0 12px 30px rgba(79,70,229,.15);
}
.ab-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #fff;
  font-size: 26px;
  box-shadow: 0 6px 20px rgba(79,70,229,.3);
}
.ab-stat h3 {
  font-size: 36px;
  color: #1e293b;
  margin: 0 0 6px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ab-stat p {
  color: #64748b;
  font-size: 13px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}

/* ===== Values ===== */
.ab-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.ab-value {
  background: #fff;
  padding: 30px 24px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  transition: .25s;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}
.ab-value::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.ab-value:hover::before { transform: scaleX(1); }
.ab-value:hover {
  transform: translateY(-4px);
  border-color: #e0e7ff;
  box-shadow: 0 12px 30px rgba(79,70,229,.12);
}
.ab-value-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: .25s;
}
.ab-value:hover .ab-value-icon {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  transform: scale(1.05);
}
.ab-value-icon i {
  font-size: 26px;
  color: #4f46e5;
  transition: .25s;
}
.ab-value:hover .ab-value-icon i { color: #fff; }
.ab-value h3 {
  font-size: 17px;
  color: #1e293b;
  margin-bottom: 8px;
  font-weight: 700;
}
.ab-value p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* ===== Offer grid ===== */
.ab-offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.ab-offer-card {
  background: #fff;
  padding: 26px 22px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  transition: .25s;
  border: 2px solid transparent;
}
.ab-offer-card:hover {
  transform: translateY(-4px);
  border-color: #e0e7ff;
  box-shadow: 0 12px 30px rgba(79,70,229,.12);
}
.ab-offer-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.ab-offer-icon i { font-size: 26px; }
.ab-offer-card h4 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 8px;
  font-weight: 700;
}
.ab-offer-card p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* ===== Why grid ===== */
.ab-why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.ab-why-item {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  transition: .25s;
}
.ab-why-item:hover {
  border-color: #a7f3d0;
  background: #f0fdf4;
  transform: translateX(4px);
}
.ab-why-item > i {
  font-size: 24px;
  color: #10b981;
  flex-shrink: 0;
  margin-top: 1px;
}
.ab-why-item b {
  display: block;
  font-size: 14.5px;
  color: #1e293b;
  margin-bottom: 4px;
  font-weight: 700;
}
.ab-why-item p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.55;
}

/* ===== Steps ===== */
.ab-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}
.ab-step {
  background: #fff;
  padding: 30px 22px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  position: relative;
  transition: .25s;
}
.ab-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(79,70,229,.12);
}
.ab-step-num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}
.ab-step-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 16px;
}
.ab-step-icon i {
  font-size: 26px;
  color: #4f46e5;
}
.ab-step h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 8px;
  font-weight: 700;
}
.ab-step p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.55;
}
.ab-step-arrow {
  color: #cbd5e1;
  font-size: 28px;
}

/* ===== Tech grid ===== */
.ab-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
}
.ab-tech {
  background: #fff;
  padding: 22px 14px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  transition: .25s;
  border: 2px solid transparent;
}
.ab-tech:hover {
  transform: translateY(-4px);
  border-color: #e0e7ff;
}
.ab-tech i {
  font-size: 32px;
  color: #4f46e5;
  display: block;
  margin-bottom: 10px;
  transition: .25s;
}
.ab-tech:hover i {
  transform: scale(1.15);
  color: #4338ca;
}
.ab-tech b {
  display: block;
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 2px;
  font-weight: 700;
}
.ab-tech small {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}

/* ===== FAQ ===== */
.ab-faq {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ab-faq-item {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: .25s;
}
.ab-faq-item[open] {
  border-color: #4f46e5;
  box-shadow: 0 6px 20px rgba(79,70,229,.1);
}
.ab-faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  list-style: none;
  transition: .2s;
}
.ab-faq-item summary::-webkit-details-marker { display: none; }
.ab-faq-item summary:hover { color: #4f46e5; }
.ab-faq-item[open] summary { color: #4f46e5; }
.ab-faq-item summary i {
  font-size: 18px;
  color: #4f46e5;
  transition: transform .3s;
  flex-shrink: 0;
}
.ab-faq-item[open] summary i { transform: rotate(180deg); }
.ab-faq-item p {
  padding: 0 22px 20px;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}
.ab-faq-item p a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== CTA ===== */
.ab-cta {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 60px 0;
  text-align: center;
  margin-top: 40px;
}
.ab-cta h2 {
  font-size: 30px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ab-cta h2 i { color: #fbbf24; font-size: 34px; }
.ab-cta p {
  font-size: 16px;
  opacity: .92;
  margin-bottom: 28px;
}
.ab-cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.ab-cta .btn-primary {
  background: #fff;
  color: #4f46e5 !important;
}
.ab-cta .btn-primary:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,.2);
}
.ab-cta .btn-secondary {
  background: transparent;
  color: #fff !important;
  border: 2px solid rgba(255,255,255,.5);
}
.ab-cta .btn-secondary:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .ab-story {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .ab-story-icon {
    margin: 0 auto;
    width: 80px;
    height: 80px;
    font-size: 38px;
  }
  .ab-story-badges { justify-content: center; }

  .ab-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .ab-step-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .ab-story-content h2 { font-size: 22px; }
  .ab-story-content p { font-size: 14.5px; }

  .ab-stat { padding: 24px 16px; }
  .ab-stat-icon { width: 50px; height: 50px; font-size: 22px; }
  .ab-stat h3 { font-size: 28px; }

  .ab-value, .ab-offer-card { padding: 22px 18px; }
  .ab-value-icon, .ab-offer-icon { width: 48px; height: 48px; border-radius: 12px; }
  .ab-value-icon i, .ab-offer-icon i { font-size: 22px; }

  .ab-tech-grid { grid-template-columns: repeat(2, 1fr); }
  .ab-tech { padding: 18px 10px; }
  .ab-tech i { font-size: 26px; }

  .ab-faq-item summary { padding: 14px 16px; font-size: 14px; }
  .ab-faq-item p { padding: 0 16px 16px; font-size: 13.5px; }

  .ab-cta { padding: 45px 0; }
  .ab-cta h2 { font-size: 22px; }
  .ab-cta h2 i { font-size: 26px; }
  .ab-cta p { font-size: 14px; }

  .ab-cta-buttons { flex-direction: column; align-items: stretch; padding: 0 20px; }
  .ab-cta-buttons > a { justify-content: center; }
}

/* =====================================================
   SITE FOOTER (Modern)
   ===================================================== */

.site-footer {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #cbd5e1;
  padding: 60px 0 24px;
  margin-top: 60px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #ec4899, #4f46e5);
  background-size: 200% 100%;
  animation: footerGradient 8s linear infinite;
}
@keyframes footerGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ===== Footer Grid ===== */
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-col { min-width: 0; }

/* Brand column */
.footer-col-brand { }

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  text-decoration: none;
  transition: .2s;
}
.footer-logo:hover {
  color: #a5b4fc;
  transform: translateX(3px);
}
.footer-logo i {
  font-size: 26px;
  color: #818cf8;
}

.footer-desc {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #94a3b8;
}
.footer-contact-item i {
  color: #818cf8;
  font-size: 15px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.footer-contact-item a {
  color: #cbd5e1;
  transition: .2s;
  word-break: break-all;
}
.footer-contact-item a:hover {
  color: #818cf8;
  text-decoration: underline;
}

/* Headings */
.footer-col h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: .8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-col h4 i {
  color: #818cf8;
  font-size: 16px;
}

/* Links list */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links li { margin: 0; }
.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 14px;
  text-decoration: none;
  transition: .2s;
  padding: 2px 0;
}
.footer-links a i {
  font-size: 13px;
  color: #64748b;
  transition: .2s;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}
.footer-links a:hover {
  color: #fff;
  transform: translateX(4px);
}
.footer-links a:hover i {
  color: #818cf8;
}

/* Newsletter */
.footer-newsletter-text {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 12px;
  line-height: 1.5;
}

.footer-newsletter-form {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.footer-newsletter-form input {
  flex: 1;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  transition: .2s;
  min-width: 0;
}
.footer-newsletter-form input::placeholder {
  color: #64748b;
}
.footer-newsletter-form input:focus {
  outline: none;
  border-color: #818cf8;
  background: rgba(255,255,255,.08);
  box-shadow: 0 0 0 3px rgba(129,140,248,.15);
}
.footer-newsletter-form button {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: .2s;
  flex-shrink: 0;
  padding: 0;
}
.footer-newsletter-form button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(79,70,229,.4);
}

/* Social */
.footer-social-title {
  margin-top: 4px;
  margin-bottom: 12px !important;
}
.footer-social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: .25s;
  text-decoration: none;
}
.footer-social a:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: transparent;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79,70,229,.35);
}

/* ===== Footer Stats Strip ===== */
.footer-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 30px;
  padding: 20px 0;
  margin-bottom: 24px;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
  transition: .2s;
}
.footer-stat-item:hover {
  color: #fff;
}
.footer-stat-item i {
  color: #818cf8;
  font-size: 16px;
}

/* ===== Footer Bottom ===== */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
  font-size: 13px;
  color: #64748b;
}
.footer-bottom p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.footer-bottom i {
  font-size: 14px;
}
.footer-bottom b {
  color: #cbd5e1;
  font-weight: 600;
}
.footer-made-with {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: .3s;
  box-shadow: 0 8px 24px rgba(79,70,229,.4);
  z-index: 999;
  padding: 0;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(79,70,229,.55);
}

/* ===== Popup (upgraded) ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.popup-box {
  background: #fff;
  padding: 32px 28px 28px;
  border-radius: 16px;
  max-width: 460px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,.35);
  animation: popupIn .35s cubic-bezier(.18,.89,.32,1.28);
}
@keyframes popupIn {
  from { transform: scale(.85) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.popup-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: #fff;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(79,70,229,.35);
}
.popup-box h3 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.popup-content {
  color: #475569;
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0;
}
.popup-content a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: underline;
}
.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
  padding: 0;
}
.popup-close:hover {
  background: #dc2626;
  color: #fff;
  transform: rotate(90deg);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .site-footer { padding: 40px 0 20px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-bottom: 24px;
  }

  .footer-col h4 { font-size: 13px; margin-bottom: 14px; }
  .footer-links a { font-size: 13.5px; }
  .footer-desc { font-size: 13.5px; }

  .footer-newsletter-form input { font-size: 12px; padding: 9px 12px; }
  .footer-newsletter-form button { width: 38px; height: 38px; font-size: 14px; }

  .footer-social a { width: 34px; height: 34px; font-size: 14px; }

  .footer-stats {
    gap: 10px 18px;
    padding: 16px 0;
  }
  .footer-stat-item { font-size: 12px; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    font-size: 12px;
  }

  .back-to-top {
    width: 42px;
    height: 42px;
    right: 14px;
    bottom: 14px;
    font-size: 18px;
    border-radius: 10px;
  }

  .popup-box { padding: 26px 22px 22px; }
  .popup-icon { width: 56px; height: 56px; font-size: 24px; }
  .popup-box h3 { font-size: 17px; }
  .popup-content { font-size: 13.5px; }
}

/* =====================================================
   FOOTER (Clean)
   ===================================================== */

.site-footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 40px 0 20px;
  margin-top: 60px;
}
.site-footer .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 30px;
}

/* Brand column */
.footer-brand {
  font-size: 20px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-brand i { color: #818cf8; font-size: 24px; }

.footer-desc {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
  max-width: 300px;
}

/* Headings */
.site-footer h4 {
  font-size: 13px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Links */
.site-footer > .container .footer-grid > div > a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 13.5px;
  text-decoration: none;
  padding: 4px 0;
  transition: .2s;
}
.site-footer > .container .footer-grid > div > a i {
  font-size: 13px;
  color: #64748b;
  width: 16px;
  text-align: center;
  transition: .2s;
}
.site-footer > .container .footer-grid > div > a:hover {
  color: #fff;
}
.site-footer > .container .footer-grid > div > a:hover i {
  color: #818cf8;
}

/* Social icons */
.footer-social {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  transition: .2s;
}
.footer-social a:hover {
  background: #4f46e5;
  color: #fff;
  transform: translateY(-2px);
}

/* Email */
.footer-email {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #818cf8 !important;
  text-decoration: none;
  word-break: break-all;
}
.footer-email:hover { color: #a5b4fc !important; }
.footer-email i { font-size: 13px !important; color: #818cf8 !important; }

/* Bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
  color: #94a3b8;
}
.footer-bottom p {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.footer-bottom i {
  color: #ef4444;
  font-size: 12px;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #4f46e5;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: .3s;
  box-shadow: 0 6px 18px rgba(79,70,229,.4);
  z-index: 999;
  padding: 0;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #4338ca;
  transform: translateY(-3px);
}

/* Popup */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.popup-box {
  background: #fff;
  padding: 30px 26px 26px;
  border-radius: 14px;
  max-width: 440px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
  animation: popupIn .3s ease-out;
}
@keyframes popupIn {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.popup-box h3 {
  font-size: 18px;
  color: #1e293b;
  margin-bottom: 10px;
  font-weight: 700;
}
.popup-box > div {
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}
.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
  padding: 0;
}
.popup-close:hover {
  background: #dc2626;
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .site-footer { padding: 30px 0 16px; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
  }
  .footer-brand { font-size: 18px; }
  .footer-desc { font-size: 13px; max-width: none; }
  .site-footer h4 { font-size: 12px; margin-bottom: 10px; }
  .site-footer > .container .footer-grid > div > a { font-size: 13px; padding: 3px 0; }
  .footer-social a { width: 32px; height: 32px; font-size: 14px; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    font-size: 12px;
    gap: 6px;
  }
  .back-to-top { width: 38px; height: 38px; font-size: 16px; right: 14px; bottom: 14px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* =====================================================
   PVC CARD MAKER
   ===================================================== */

.pvcm-privacy {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-left: 6px solid #10b981;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.pvcm-privacy > i { color: #10b981; font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.pvcm-privacy b { display: block; color: #065f46; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.pvcm-privacy p { color: #047857; font-size: 13px; margin: 0; line-height: 1.5; }

.pvcm-panel { display: none; }
.pvcm-panel.active { display: block; }

/* Upload */
.pvcm-upload-zone {
  background: #fff;
  border: 3px dashed #cbd5e1;
  border-radius: 16px;
  padding: 60px 30px;
  text-align: center;
  cursor: pointer;
  transition: .25s;
}
.pvcm-upload-zone:hover, .pvcm-upload-zone.dragging {
  border-color: #4f46e5;
  background: #f8faff;
}
.pvcm-upload-zone.dragging { border-style: solid; box-shadow: 0 0 0 4px rgba(79,70,229,.15); }
.pvcm-upload-icon { font-size: 72px; color: #4f46e5; margin-bottom: 16px; display: block; transition: .25s; }
.pvcm-upload-zone:hover .pvcm-upload-icon { transform: translateY(-6px) scale(1.05); }
.pvcm-upload-zone h3 { font-size: 20px; color: #1e293b; margin-bottom: 8px; font-weight: 700; }
.pvcm-upload-zone p { color: #64748b; font-size: 14px; margin-bottom: 22px; }
.pvcm-supported { display: flex; gap: 20px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pvcm-supported span { display: inline-flex; align-items: center; gap: 6px; color: #64748b; font-size: 13px; font-weight: 500; }
.pvcm-supported i { color: #10b981; }

/* Loading */
.pvcm-loading { text-align: center; padding: 60px 30px; background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.pvcm-loading-spinner { width: 60px; height: 60px; border: 5px solid #e2e8f0; border-top-color: #4f46e5; border-radius: 50%; margin: 0 auto 20px; animation: pvcmSpin 1s linear infinite; }
@keyframes pvcmSpin { to { transform: rotate(360deg); } }
.pvcm-loading h3 { font-size: 18px; color: #1e293b; margin-bottom: 8px; font-weight: 700; }
.pvcm-loading p { color: #64748b; font-size: 14px; margin: 0; }

/* Password */
.pvcm-password-box {
  background: #fff;
  border: 2px solid #fbbf24;
  border-left: 6px solid #f59e0b;
  border-radius: 14px;
  padding: 30px 26px;
  box-shadow: 0 4px 20px rgba(245,158,11,.1);
  text-align: center;
  margin-top: 20px;
}
.pvcm-password-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: #d97706; font-size: 32px;
}
.pvcm-password-box h3 { font-size: 20px; color: #1e293b; margin-bottom: 8px; font-weight: 700; }
.pvcm-password-box > p { color: #64748b; font-size: 14px; margin-bottom: 20px; }
.pvcm-password-input { position: relative; max-width: 400px; margin: 0 auto 12px; }
.pvcm-password-input input {
  width: 100%; margin: 0; padding: 14px 50px 14px 16px;
  font-size: 15px; border-radius: 10px;
  border: 2px solid #e2e8f0; font-family: inherit;
}
.pvcm-password-input input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.pvcm-password-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; background: transparent;
  color: #94a3b8; cursor: pointer; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: .2s;
}
.pvcm-password-eye:hover { background: #f1f5f9; color: #4f46e5; }
.pvcm-password-hint {
  display: inline-flex; align-items: flex-start; gap: 6px;
  padding: 10px 14px; background: #eff6ff;
  border-radius: 8px; font-size: 12.5px; color: #1e40af;
  max-width: 480px; margin: 0 auto 20px; text-align: left; line-height: 1.5;
}
.pvcm-password-hint i { color: #2563eb; margin-top: 2px; flex-shrink: 0; }
.pvcm-password-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Template banner */
.pvcm-template-banner {
  display: flex; gap: 14px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border: 2px solid #c7d2fe; border-left: 6px solid #4f46e5;
  padding: 16px 20px; border-radius: 12px; margin-bottom: 20px;
}
.pvcm-template-banner > i { color: #4f46e5; font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.pvcm-template-banner b { display: block; color: #312e81; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.pvcm-template-banner p { color: #4338ca; font-size: 13px; margin: 0; }

/* Layout selector */
.pvcm-layout-selector { background: #fff; padding: 18px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.05); margin-bottom: 18px; }
.pvcm-layout-selector h3 { font-size: 14px; color: #1e293b; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.pvcm-layout-selector h3 i { color: #4f46e5; }
.pvcm-layout-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.pvcm-layout-btn {
  background: #f8fafc; border: 2px solid #e2e8f0;
  border-radius: 10px; padding: 12px 8px;
  cursor: pointer; transition: .2s; font-family: inherit;
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  color: #64748b; font-size: 12px; font-weight: 600; text-align: center;
}
.pvcm-layout-btn i { font-size: 22px; color: #64748b; }
.pvcm-layout-btn b { font-size: 13px; color: #1e293b; }
.pvcm-layout-btn small { font-size: 10.5px; color: #94a3b8; font-weight: 500; }
.pvcm-layout-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.pvcm-layout-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(79,70,229,.25);
}
.pvcm-layout-btn.active i, .pvcm-layout-btn.active b, .pvcm-layout-btn.active small { color: #fff; }
.pvcm-layout-btn.active small { opacity: .9; }

/* Page selector */
.pvcm-page-selector { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pvcm-page-selector label { font-size: 13px; font-weight: 600; color: #475569; display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.pvcm-page-selector label i { color: #4f46e5; }
.pvcm-page-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.pvcm-page-btn {
  padding: 7px 14px; border-radius: 8px;
  border: 2px solid #e2e8f0; background: #fff;
  color: #475569; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: .2s; font-family: inherit;
}
.pvcm-page-btn:hover { border-color: #cbd5e1; }
.pvcm-page-btn.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }

/* Canvas */
.pvcm-canvas-panel {
  background: #1e293b; border-radius: 14px;
  padding: 20px; margin-bottom: 18px;
  overflow: auto; display: flex;
  justify-content: center; align-items: flex-start;
  min-height: 400px;
}
.pvcm-canvas-wrap { position: relative; display: inline-block; line-height: 0; max-width: 100%; }
#pvcmMainCanvas { max-width: 100%; display: block; border-radius: 4px; box-shadow: 0 4px 20px rgba(0,0,0,.4); background: #fff; }
.pvcm-crop-overlay-layer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }
.pvcm-crop-box {
  position: absolute; border: 3px dashed #4f46e5;
  background: rgba(79,70,229,.12); cursor: move;
  pointer-events: auto; box-shadow: 0 0 0 9999px rgba(0,0,0,.35);
}
.pvcm-crop-box.active { border-color: #f59e0b; border-style: solid; background: rgba(245,158,11,.15); z-index: 10; }
.pvcm-crop-label {
  position: absolute; top: -28px; left: 0;
  background: #4f46e5; color: #fff;
  padding: 3px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 800; letter-spacing: 1px; line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.pvcm-crop-box.active .pvcm-crop-label { background: #f59e0b; }
.pvcm-crop-handle {
  position: absolute; width: 16px; height: 16px;
  background: #4f46e5; border: 3px solid #fff;
  border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.4);
  pointer-events: auto; z-index: 2;
}
.pvcm-crop-box.active .pvcm-crop-handle { background: #f59e0b; }
.pvcm-crop-tl { top: -8px; left: -8px; cursor: nwse-resize; }
.pvcm-crop-tr { top: -8px; right: -8px; cursor: nesw-resize; }
.pvcm-crop-bl { bottom: -8px; left: -8px; cursor: nesw-resize; }
.pvcm-crop-br { bottom: -8px; right: -8px; cursor: nwse-resize; }

/* Crop controls */
.pvcm-crop-controls-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 14px 18px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  flex-wrap: wrap; margin-bottom: 20px;
}
.pvcm-crop-hint { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #475569; font-weight: 500; }
.pvcm-crop-hint i { color: #4f46e5; font-size: 15px; }
.pvcm-crop-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.pvcm-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; background: #f8fafc;
  border: 2px solid #e2e8f0; border-radius: 8px;
  color: #475569; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: .2s; font-family: inherit;
}
.pvcm-btn:hover { background: #eef2ff; border-color: #c7d2fe; color: #4f46e5; }

/* Success */
.pvcm-success-banner {
  display: flex; gap: 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac; border-left: 6px solid #10b981;
  padding: 18px 22px; border-radius: 12px; margin-bottom: 24px;
}
.pvcm-success-banner > i { color: #10b981; font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.pvcm-success-banner b { display: block; color: #065f46; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.pvcm-success-banner p { color: #047857; font-size: 13px; margin: 0; }

/* Preview */
.pvcm-preview-layout { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.pvcm-side-tabs {
  display: flex; gap: 8px; margin-bottom: 18px;
  background: #fff; padding: 6px; border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.pvcm-side-tab {
  flex: 1; padding: 12px 14px; border-radius: 8px;
  border: none; background: transparent;
  font-size: 14px; font-weight: 600; color: #64748b;
  cursor: pointer; transition: .2s;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; font-family: inherit;
}
.pvcm-side-tab:hover { background: #f1f5f9; color: #1e293b; }
.pvcm-side-tab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; box-shadow: 0 4px 12px rgba(79,70,229,.25);
}
.pvcm-preview-wrap {
  background: #1e293b; padding: 40px 20px; border-radius: 14px;
  display: flex; justify-content: center; align-items: center;
  min-height: 340px; margin-bottom: 18px;
  background-image: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%);
  background-size: 20px 20px;
}
.pvcm-preview-card {
  max-width: 100%; border-radius: 8px; overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.6); background: #fff;
}
.pvcm-preview-card img {
  display: block; max-width: 100%; height: auto;
  aspect-ratio: 1011 / 638; width: 500px; max-height: 300px;
}
.pvcm-preview-info {
  display: flex; gap: 20px; flex-wrap: wrap;
  background: #fff; padding: 14px 18px; border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  justify-content: space-around;
}
.pvcm-info-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #64748b; }
.pvcm-info-item i { color: #4f46e5; font-size: 16px; }
.pvcm-info-item b { color: #1e293b; font-weight: 700; }

/* Actions */
.pvcm-actions-panel { display: flex; flex-direction: column; gap: 14px; }
.pvcm-actions-card { background: #fff; padding: 18px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.pvcm-actions-card h3 {
  font-size: 14px; color: #1e293b; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 2px solid #f1f5f9;
  display: flex; align-items: center; gap: 6px; font-weight: 700;
}
.pvcm-actions-card h3 i { color: #4f46e5; }
.pvcm-download-btn { width: 100%; justify-content: center; margin-bottom: 10px; padding: 12px; font-size: 13.5px; }
.pvcm-download-btn:last-child { margin-bottom: 0; }
.pvcm-btn-outline {
  width: 100%; padding: 11px;
  background: #f8fafc; border: 2px solid #e2e8f0;
  border-radius: 8px; color: #475569;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: .2s;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; margin-bottom: 8px; font-family: inherit;
}
.pvcm-btn-outline:last-child { margin-bottom: 0; }
.pvcm-btn-outline:hover { background: #4f46e5; border-color: #4f46e5; color: #fff; transform: translateY(-2px); }

.pvcm-how-steps { list-style: decimal; padding-left: 22px; margin: 0; }
.pvcm-how-steps li { padding: 4px 0; font-size: 14px; color: #475569; line-height: 1.6; }
.pvcm-how-steps b { color: #1e293b; }

@media (max-width: 992px) {
  .pvcm-preview-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pvcm-upload-zone { padding: 40px 20px; }
  .pvcm-upload-icon { font-size: 52px; }
  .pvcm-layout-options { grid-template-columns: 1fr 1fr; }
  .pvcm-layout-btn small { display: none; }
  .pvcm-preview-wrap { padding: 20px 10px; min-height: 220px; }
  .pvcm-preview-card img { width: 100%; max-height: 200px; }
  .pvcm-preview-info { flex-direction: column; gap: 8px; }
  .pvcm-crop-buttons { width: 100%; }
  .pvcm-crop-buttons button { flex: 1; font-size: 12px; padding: 9px 10px; }
  .pvcm-password-box { padding: 24px 18px; }
}

/* =====================================================
   YOUTUBE THUMBNAIL MAKER
   ===================================================== */

.ytm-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.ytm-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.ytm-info-item i { color: #dc2626; font-size: 16px; }

/* Layout */
.ytm-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

/* Form panel */
.ytm-form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ytm-topbar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.ytm-topbar-btn {
  padding: 10px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.ytm-topbar-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(220,38,38,.25);
}

/* Cards */
.ytm-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.ytm-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.ytm-card h3 i { color: #dc2626; }

.ytm-field { margin-bottom: 12px; }
.ytm-field:last-child { margin-bottom: 0; }
.ytm-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
}
.ytm-field label i { color: #dc2626; font-size: 13px; }
.ytm-field label b {
  margin-left: auto;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #b91c1c;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}
.ytm-field input[type="text"],
.ytm-field textarea,
.ytm-field select {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  width: 100%;
}
.ytm-field textarea {
  resize: vertical;
  font-family: inherit;
  font-weight: 700;
}
.ytm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ytm-slider {
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #dc2626;
}

/* Tabs */
.ytm-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.ytm-tab {
  padding: 10px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.ytm-tab i { font-size: 16px; }
.ytm-tab:hover { border-color: #cbd5e1; }
.ytm-tab.active {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(220,38,38,.25);
}

/* Background panels */
.ytm-bg-panel { display: none; margin-top: 12px; }
.ytm-bg-panel.active { display: block; }

/* Color grid */
.ytm-color-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.ytm-color-btn {
  aspect-ratio: 1;
  border: 3px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: .2s;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}
.ytm-color-btn:hover { transform: scale(1.1); }
.ytm-color-btn.active { border-color: #dc2626; transform: scale(1.08); }

.ytm-custom-color {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin: 0;
}
.ytm-custom-color span { flex-shrink: 0; }
.ytm-custom-color input[type="color"] {
  flex: 1;
  width: auto !important;
  height: 36px;
  padding: 2px !important;
  margin: 0 !important;
  border-radius: 6px;
  cursor: pointer;
}

/* Gradient grid */
.ytm-gradient-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.ytm-gradient-btn {
  aspect-ratio: 1.5;
  border: 3px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: .2s;
  padding: 0;
}
.ytm-gradient-btn:nth-child(1) { background: linear-gradient(135deg,#4f46e5,#7c3aed); }
.ytm-gradient-btn:nth-child(2) { background: linear-gradient(135deg,#dc2626,#f59e0b); }
.ytm-gradient-btn:nth-child(3) { background: linear-gradient(135deg,#10b981,#06b6d4); }
.ytm-gradient-btn:nth-child(4) { background: linear-gradient(135deg,#ec4899,#8b5cf6); }
.ytm-gradient-btn:nth-child(5) { background: linear-gradient(135deg,#f97316,#fbbf24); }
.ytm-gradient-btn:nth-child(6) { background: linear-gradient(135deg,#0ea5e9,#3b82f6); }
.ytm-gradient-btn:nth-child(7) { background: linear-gradient(135deg,#1e293b,#0f172a); }
.ytm-gradient-btn:nth-child(8) { background: linear-gradient(135deg,#7f1d1d,#dc2626); }
.ytm-gradient-btn:hover { transform: scale(1.05); }
.ytm-gradient-btn.active { border-color: #dc2626; transform: scale(1.05); }

/* Upload row */
.ytm-upload-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ytm-upload-btn {
  flex: 1;
  padding: 12px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  min-width: 160px;
}
.ytm-upload-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(220,38,38,.25);
}
.ytm-mini-btn {
  padding: 8px 14px;
  border: 2px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.ytm-mini-btn:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.ytm-mini-danger:hover { background: #dc2626; border-color: #dc2626; }

.ytm-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #eff6ff;
  border-radius: 6px;
  font-size: 12px;
  color: #1e40af;
  margin-top: 10px;
}
.ytm-hint i { color: #2563eb; }

/* Align buttons */
.ytm-align-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.ytm-align-btn {
  padding: 10px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: .2s;
  font-size: 16px;
  color: #64748b;
  font-family: inherit;
}
.ytm-align-btn:hover { border-color: #cbd5e1; }
.ytm-align-btn.active {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border-color: transparent;
}

/* Toggle group */
.ytm-toggle-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ytm-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  margin: 0;
}
.ytm-toggle-btn:has(input:checked) {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-color: #dc2626;
  color: #b91c1c;
}
.ytm-toggle-btn input {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #dc2626;
  cursor: pointer;
  display: none;
}

/* Shape grid */
.ytm-shape-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.ytm-shape-btn {
  padding: 10px 6px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: inherit;
}
.ytm-shape-btn i { font-size: 18px; }
.ytm-shape-btn:hover { border-color: #cbd5e1; }
.ytm-shape-btn.active {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-color: #dc2626;
  color: #b91c1c;
}

/* Emoji grid */
.ytm-emoji-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.ytm-emoji-btn {
  padding: 10px 4px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  line-height: 1;
}
.ytm-emoji-btn:hover { border-color: #cbd5e1; transform: scale(1.05); }
.ytm-emoji-btn.active {
  border-color: #dc2626;
  background: #fee2e2;
  transform: scale(1.08);
}

/* Presets */
.ytm-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ytm-preset-btn {
  padding: 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  text-align: center;
}
.ytm-preset-btn:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(220,38,38,.25);
}

/* Preview panel */
.ytm-preview-panel {
  position: sticky;
  top: 90px;
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.ytm-preview-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
}
.ytm-preview-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}
.ytm-preview-label i { color: #f87171; }
.ytm-ctrl-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.ytm-ctrl-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(220,38,38,.4);
}
.ytm-preview-scroll {
  padding: 20px;
  background: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%) 50% / 20px 20px;
}
.ytm-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
#ytmCanvas {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  background: #fff;
  aspect-ratio: 16 / 9;
}
.ytm-preview-hint {
  padding: 10px 16px;
  background: #0f172a;
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid #334155;
}
.ytm-preview-hint i { color: #f87171; }

/* Responsive */
@media (max-width: 992px) {
  .ytm-layout { grid-template-columns: 1fr; }
  .ytm-preview-panel { position: static; }
}
@media (max-width: 640px) {
  .ytm-topbar { grid-template-columns: 1fr 1fr; }
  .ytm-grid-2 { grid-template-columns: 1fr; }
  .ytm-color-grid { grid-template-columns: repeat(5, 1fr); }
  .ytm-gradient-grid { grid-template-columns: repeat(3, 1fr); }
  .ytm-emoji-grid { grid-template-columns: repeat(5, 1fr); }
  .ytm-presets { grid-template-columns: 1fr; }
  .ytm-info-bar { grid-template-columns: 1fr 1fr; }
  .ytm-card { padding: 14px; }
  .ytm-preview-scroll { padding: 10px; }
}

/* =====================================================
   BIO DATA MAKER
   ===================================================== */

/* Type selector */
.bd-type-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.bd-type-btn {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 16px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.bd-type-btn > i { font-size: 28px; color: #64748b; transition: .25s; }
.bd-type-btn > b { font-size: 15px; color: #1e293b; font-weight: 700; }
.bd-type-btn > small { font-size: 12px; color: #94a3b8; }
.bd-type-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.bd-type-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(79,70,229,.28);
}
.bd-type-btn.active > i,
.bd-type-btn.active > b,
.bd-type-btn.active > small { color: #fff; }
.bd-type-btn.active > small { opacity: .9; }

/* Layout */
.bd-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.bd-form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Topbar */
.bd-topbar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.bd-topbar-btn {
  padding: 10px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.bd-topbar-btn:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  transform: translateY(-2px);
}

/* Cards */
.bd-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.bd-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.bd-card h3 i { color: #4f46e5; }

.bd-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bd-field { margin-bottom: 10px; }
.bd-field:last-child { margin-bottom: 0; }
.bd-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
}
.bd-field input,
.bd-field textarea,
.bd-field select {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  width: 100%;
}
.bd-field textarea {
  resize: vertical;
  font-family: inherit;
}

/* Photo */
.bd-photo-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
}
.bd-photo-preview {
  width: 70px;
  height: 90px;
  border-radius: 8px;
  background: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  gap: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.bd-photo-preview i { font-size: 26px; }
.bd-photo-preview small { font-size: 10px; }
.bd-photo-preview.has-image { background: #fff; border: 1px solid #e2e8f0; }
.bd-photo-preview img { width: 100%; height: 100%; object-fit: cover; }

.bd-photo-actions { display: flex; flex-direction: column; gap: 6px; }
.bd-mini-btn {
  padding: 8px 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: .2s;
  font-family: inherit;
}
.bd-mini-btn:hover { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.bd-mini-danger:hover { background: #dc2626; border-color: #dc2626; }

/* Color row */
.bd-color-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.bd-color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: .2s;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}
.bd-color-btn:hover { transform: scale(1.12); }
.bd-color-btn.active { border-color: #1e293b; transform: scale(1.1); }
.bd-color-row input[type="color"] {
  width: 42px;
  height: 34px;
  padding: 3px;
  cursor: pointer;
  border-radius: 6px;
  margin: 0;
}

/* Template grid */
.bd-template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.bd-template-btn {
  padding: 12px 8px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.bd-template-btn i { font-size: 18px; }
.bd-template-btn:hover { border-color: #cbd5e1; }
.bd-template-btn.active {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
}

/* Preview panel */
.bd-preview-panel {
  position: sticky;
  top: 90px;
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.bd-preview-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
  flex-wrap: wrap;
  gap: 8px;
}
.bd-preview-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}
.bd-preview-label i { color: #818cf8; }
.bd-preview-actions { display: flex; gap: 6px; }
.bd-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: .2s;
  padding: 0;
}
.bd-ctrl-btn:hover { background: #4f46e5; color: #fff; transform: scale(1.05); }

.bd-preview-scroll {
  padding: 20px;
  max-height: 85vh;
  overflow-y: auto;
  background: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%) 50% / 20px 20px;
  display: flex;
  justify-content: center;
}

/* The bio data document */
.bd-doc {
  width: 100%;
  max-width: 780px;
  background: #fff;
  padding: 32px;
  color: #1e293b;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.bd-doc-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--accent, #4f46e5);
  margin-bottom: 20px;
}
.bd-doc-photo {
  width: 100px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  border: 2px solid var(--accent, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bd-doc-photo img { width: 100%; height: 100%; object-fit: cover; }
.bd-doc-photo-placeholder { color: #cbd5e1; font-size: 48px; }
.bd-doc-title { flex: 1; min-width: 0; }
.bd-doc-title h1 {
  font-size: 24px;
  color: #1e293b;
  margin-bottom: 6px;
  font-weight: 800;
  line-height: 1.2;
  word-break: break-word;
}
.bd-doc-subtitle {
  font-size: 13px;
  color: var(--accent, #4f46e5);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bd-doc-section { margin-bottom: 18px; }
.bd-doc-section h2 {
  font-size: 13px;
  color: var(--accent, #4f46e5);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.bd-doc-grid { display: flex; flex-direction: column; gap: 4px; }
.bd-doc-row {
  display: flex;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px dashed #f1f5f9;
  font-size: 12px;
}
.bd-doc-row:last-child { border-bottom: none; }
.bd-doc-row > span {
  color: #64748b;
  min-width: 130px;
  flex-shrink: 0;
  font-weight: 600;
}
.bd-doc-row > b { color: #1e293b; font-weight: 700; flex: 1; word-break: break-word; }

.bd-doc-about { font-size: 12px; color: #334155; line-height: 1.7; }

.bd-doc-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 2px solid #f1f5f9;
}
.bd-doc-signature { text-align: center; }
.bd-doc-sign-line {
  width: 150px;
  height: 1px;
  background: #1e293b;
  margin-bottom: 5px;
}
.bd-doc-sign-label {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.bd-doc-date { font-size: 11px; color: #64748b; }

/* Templates */
.bd-doc-classic .bd-doc-header { border-bottom-color: #1e293b; }
.bd-doc-classic .bd-doc-subtitle { color: #1e293b; }
.bd-doc-classic .bd-doc-section h2 { color: #1e293b; border-bottom-color: #1e293b; }

.bd-doc-minimal .bd-doc-header { border-bottom: 1px solid #e2e8f0; }
.bd-doc-minimal .bd-doc-subtitle { color: #64748b; letter-spacing: 2px; }
.bd-doc-minimal .bd-doc-section h2 {
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
}

.bd-preview-hint {
  padding: 10px 16px;
  background: #0f172a;
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid #334155;
}
.bd-preview-hint i { color: #818cf8; }

/* Responsive */
@media (max-width: 992px) {
  .bd-layout { grid-template-columns: 1fr; }
  .bd-preview-panel { position: static; }
  .bd-preview-scroll { max-height: none; padding: 12px; }
  .bd-doc { padding: 20px 16px; }
  .bd-doc-title h1 { font-size: 20px; }
  .bd-doc-photo { width: 80px; height: 100px; }
}
@media (max-width: 640px) {
  .bd-grid-2 { grid-template-columns: 1fr; }
  .bd-topbar { grid-template-columns: 1fr 1fr; }
  .bd-doc-row { flex-direction: column; gap: 2px; }
  .bd-doc-row > span { min-width: 0; }
  .bd-doc-footer { flex-direction: column; align-items: stretch; gap: 20px; }
  .bd-doc-signature { text-align: left; }
}

/* =====================================================
   BANK LETTER WRITER
   ===================================================== */

.blw-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.blw-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.blw-info-item i { color: #10b981; font-size: 16px; }

/* Layout */
.blw-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.blw-form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Topbar */
.blw-topbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.blw-topbar-btn {
  padding: 10px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.blw-topbar-btn:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  transform: translateY(-2px);
}

/* Cards */
.blw-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.blw-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.blw-card h3 i { color: #4f46e5; }

.blw-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.blw-field { margin-bottom: 10px; }
.blw-field:last-child { margin-bottom: 0; }
.blw-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
}
.blw-field input,
.blw-field textarea,
.blw-field select {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  width: 100%;
  font-family: inherit;
}
.blw-field textarea {
  resize: vertical;
  font-family: inherit;
}
.blw-select-lg {
  padding: 12px 14px !important;
  font-size: 14px !important;
  font-weight: 600;
}

/* Radio group */
.blw-radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px;
}
.blw-radio {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: .2s;
}
.blw-radio:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600 !important;
}
.blw-radio input {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
}

/* Checkbox */
.blw-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: .2s;
}
.blw-checkbox:hover { border-color: #cbd5e1; }
.blw-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600 !important;
}
.blw-checkbox input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
  flex-shrink: 0;
}
.blw-checkbox i { color: #4f46e5; }

.blw-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Color row */
.blw-color-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.blw-color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: .2s;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}
.blw-color-btn:hover { transform: scale(1.12); }
.blw-color-btn.active { border-color: #1e293b; transform: scale(1.1); }
.blw-color-row input[type="color"] {
  width: 42px;
  height: 34px;
  padding: 3px;
  cursor: pointer;
  border-radius: 6px;
  margin: 0;
}

/* Specific blocks */
.blw-specific { display: none; }

/* Preview panel */
.blw-preview-panel {
  position: sticky;
  top: 90px;
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.blw-preview-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
  flex-wrap: wrap;
  gap: 8px;
}
.blw-preview-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}
.blw-preview-label i { color: #818cf8; }
.blw-preview-actions { display: flex; gap: 6px; }
.blw-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: .2s;
  padding: 0;
}
.blw-ctrl-btn:hover { background: #4f46e5; color: #fff; transform: scale(1.05); }

.blw-preview-scroll {
  padding: 20px;
  max-height: 85vh;
  overflow-y: auto;
  background: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%) 50% / 20px 20px;
  display: flex;
  justify-content: center;
}

/* Letter document */
.blw-doc {
  width: 100%;
  max-width: 780px;
  background: #fff;
  padding: 32px;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.7;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}

.blw-doc-letterhead {
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--accent, #4f46e5);
}
.blw-doc-bank-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent, #4f46e5);
  margin-bottom: 4px;
  letter-spacing: .3px;
}
.blw-doc-branch {
  font-size: 12px;
  color: #64748b;
}

.blw-doc-date-place {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: #475569;
  flex-wrap: wrap;
  gap: 10px;
}

.blw-doc-to {
  margin-bottom: 18px;
  line-height: 1.5;
  font-size: 13px;
}
.blw-doc-to > div:first-child { margin-bottom: 3px; }

.blw-doc-subject {
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 14px;
  background: #f8fafc;
  border-left: 4px solid var(--accent, #4f46e5);
}

.blw-doc-salutation {
  margin-bottom: 14px;
  font-weight: 500;
}

.blw-doc-body p {
  margin-bottom: 12px;
  text-align: justify;
  font-size: 13px;
}
.blw-doc-body ul.blw-list {
  margin: 8px 0 12px 24px;
}
.blw-doc-body ul.blw-list li {
  margin-bottom: 4px;
  font-size: 13px;
}

.blw-table {
  margin: 14px 0;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 6px;
}
.blw-table-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 12.5px;
  gap: 12px;
}
.blw-table-row:last-child { border-bottom: none; }
.blw-table-row > span { color: #64748b; flex-shrink: 0; }
.blw-table-row > b { color: #1e293b; text-align: right; word-break: break-word; }

.blw-doc-details {
  margin: 20px 0;
  padding: 14px 18px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid var(--accent, #4f46e5);
}
.blw-doc-details > div {
  padding: 3px 0;
  font-size: 12.5px;
}

.blw-doc-closing {
  margin-top: 28px;
  text-align: right;
}
.blw-doc-closing p { margin-bottom: 6px; }
.blw-doc-sign-space { height: 40px; }
.blw-doc-sign-name { font-weight: 700; font-size: 13.5px; }
.blw-doc-sign-mobile { font-size: 11.5px; color: #64748b; margin-top: 3px; }

.blw-doc-enclosures {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px dashed #cbd5e1;
  font-size: 12px;
}
.blw-doc-enclosures b { display: block; margin-bottom: 6px; }
.blw-doc-enclosures ul { list-style: disc; padding-left: 24px; }
.blw-doc-enclosures li { padding: 2px 0; }

.blw-doc-empty {
  text-align: center;
  padding: 60px 30px;
  color: #94a3b8;
}
.blw-empty-icon {
  font-size: 60px;
  color: #cbd5e1;
  margin-bottom: 16px;
}
.blw-doc-empty h3 {
  font-size: 18px;
  color: #64748b;
  margin-bottom: 8px;
}
.blw-doc-empty p { font-size: 13px; }

.blw-preview-hint {
  padding: 10px 16px;
  background: #0f172a;
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid #334155;
}
.blw-preview-hint i { color: #818cf8; }

/* Responsive */
@media (max-width: 992px) {
  .blw-layout { grid-template-columns: 1fr; }
  .blw-preview-panel { position: static; }
  .blw-preview-scroll { max-height: none; padding: 12px; }
  .blw-doc { padding: 20px 16px; }
  .blw-doc-bank-name { font-size: 16px; }
}
@media (max-width: 640px) {
  .blw-grid-2 { grid-template-columns: 1fr; }
  .blw-radio-group { grid-template-columns: 1fr 1fr; }
  .blw-topbar { grid-template-columns: 1fr 1fr; }
  .blw-table-row {
    flex-direction: column;
    gap: 2px;
  }
  .blw-table-row > b { text-align: left; }
  .blw-doc-date-place { flex-direction: column; gap: 4px; }
  .blw-doc-closing { text-align: left; }
  .blw-doc-closing p { text-align: left; }
}

/* =====================================================
   PDF EDITOR
   ===================================================== */

.pe-privacy {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-left: 6px solid #10b981;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.pe-privacy > i { color: #10b981; font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.pe-privacy b { display: block; color: #065f46; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.pe-privacy p { color: #047857; font-size: 13px; margin: 0; line-height: 1.5; }

.pe-panel { display: none; }
.pe-panel.active { display: block; }

/* Upload */
.pe-upload-zone {
  background: #fff;
  border: 3px dashed #cbd5e1;
  border-radius: 16px;
  padding: 60px 30px;
  text-align: center;
  cursor: pointer;
  transition: .25s;
}
.pe-upload-zone:hover, .pe-upload-zone.dragging {
  border-color: #dc2626;
  background: #fef2f2;
}
.pe-upload-zone.dragging { border-style: solid; box-shadow: 0 0 0 4px rgba(220,38,38,.15); }
.pe-upload-icon { font-size: 72px; color: #dc2626; margin-bottom: 16px; display: block; transition: .25s; }
.pe-upload-zone:hover .pe-upload-icon { transform: translateY(-6px) scale(1.05); }
.pe-upload-zone h3 { font-size: 20px; color: #1e293b; margin-bottom: 8px; font-weight: 700; }
.pe-upload-zone p { color: #64748b; font-size: 14px; margin-bottom: 22px; }

/* Loading */
.pe-loading { text-align: center; padding: 60px 30px; background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.pe-loading-spinner {
  width: 60px; height: 60px;
  border: 5px solid #e2e8f0;
  border-top-color: #dc2626;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: peSpin 1s linear infinite;
}
@keyframes peSpin { to { transform: rotate(360deg); } }
.pe-loading h3 { font-size: 18px; color: #1e293b; margin-bottom: 8px; font-weight: 700; }
.pe-loading p { color: #64748b; font-size: 14px; margin: 0; }

/* Password */
.pe-password-box {
  background: #fff;
  border: 2px solid #fbbf24;
  border-left: 6px solid #f59e0b;
  border-radius: 14px;
  padding: 30px 26px;
  box-shadow: 0 4px 20px rgba(245,158,11,.1);
  text-align: center;
  margin-top: 20px;
}
.pe-password-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: #d97706; font-size: 32px;
}
.pe-password-box h3 { font-size: 20px; color: #1e293b; margin-bottom: 8px; font-weight: 700; }
.pe-password-box > p { color: #64748b; font-size: 14px; margin-bottom: 20px; }
.pe-password-input { position: relative; max-width: 400px; margin: 0 auto 12px; }
.pe-password-input input {
  width: 100%; margin: 0; padding: 14px 50px 14px 16px;
  font-size: 15px; border-radius: 10px;
  border: 2px solid #e2e8f0; font-family: inherit;
}
.pe-password-input input:focus { outline: none; border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.pe-password-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; background: transparent;
  color: #94a3b8; cursor: pointer; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: .2s;
}
.pe-password-eye:hover { background: #f1f5f9; color: #dc2626; }
.pe-password-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.pe-btn-outline {
  padding: 10px 20px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.pe-btn-outline:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

/* Editor Layout */
.pe-editor-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: start;
}

/* Toolbar */
.pe-toolbar {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.pe-tool-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pe-tool-label {
  grid-column: 1 / -1;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 4px;
}
.pe-tool-btn {
  padding: 10px 4px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: inherit;
}
.pe-tool-btn i { font-size: 16px; }
.pe-tool-btn:hover { border-color: #cbd5e1; background: #f1f5f9; }
.pe-tool-btn.active {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(220,38,38,.25);
}
.pe-tool-btn.pe-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

.pe-style-row {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pe-style-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
}
.pe-style-label i { color: #dc2626; }
.pe-style-label b {
  background: #fef2f2;
  color: #b91c1c;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 11px;
}
.pe-slider { width: 100%; height: 5px; margin: 0; padding: 0; accent-color: #dc2626; }
.pe-style-row input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 3px;
  cursor: pointer;
  border-radius: 8px;
  margin: 0;
}
.pe-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  margin: 0;
  transition: .2s;
}
.pe-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-color: #dc2626;
  color: #b91c1c;
}
.pe-checkbox input {
  display: none;
}
.pe-select {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 8px;
  width: 100%;
}

/* Canvas area */
.pe-canvas-area {
  background: #1e293b;
  border-radius: 14px;
  padding: 16px;
  overflow: hidden;
}
.pe-page-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #0f172a;
  border-radius: 10px;
}
.pe-page-btn {
  padding: 7px 14px;
  background: rgba(255,255,255,.08);
  border: none;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.pe-page-btn:hover:not(:disabled) { background: #4f46e5; color: #fff; }
.pe-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.pe-page-btn.pe-danger { margin-left: auto; }
.pe-page-btn.pe-danger:hover { background: #dc2626; color: #fff; }

.pe-page-info {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.pe-page-info input {
  width: 50px !important;
  padding: 5px 8px !important;
  margin: 0 !important;
  text-align: center;
  background: rgba(255,255,255,.08);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  font-size: 13px;
}

.pe-canvas-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 400px;
  padding: 10px;
  background: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%) 50% / 20px 20px;
  border-radius: 8px;
}
#peCanvas {
  display: block;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  border-radius: 2px;
  max-width: 100%;
}
.pe-overlay {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  cursor: crosshair;
}
.pe-overlay:has(.pe-edit-node) { cursor: default; }

.pe-canvas-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 14px;
  background: #0f172a;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 12px;
}
.pe-canvas-hint i { color: #818cf8; }

/* Edit nodes */
.pe-edit-node {
  position: absolute;
  cursor: move;
  user-select: none;
  min-width: 20px;
  min-height: 20px;
  display: flex;
  align-items: center;
  padding: 4px;
  box-sizing: border-box;
}
.pe-edit-node.active {
  outline: 2px dashed #facc15;
  outline-offset: 2px;
}
.pe-edit-node:hover .pe-edit-delete { opacity: 1; }
.pe-edit-node:hover .pe-edit-resize { opacity: 1; }

.pe-edit-text {
  color: #dc2626;
  font-size: 16px;
  font-family: Helvetica, Arial, sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
}

.pe-edit-image {
  padding: 0;
}
.pe-edit-image img {
  pointer-events: none;
}

.pe-edit-highlight {
  background: rgba(250,204,21,.5);
  border-radius: 2px;
  padding: 0;
}
.pe-edit-rectangle {
  border: 2px solid #dc2626;
  background: transparent;
  padding: 0;
}
.pe-edit-circle {
  border: 2px solid #dc2626;
  border-radius: 50%;
  background: transparent;
  padding: 0;
}
.pe-edit-line {
  border-top: 2px solid #dc2626;
  background: transparent;
  padding: 0;
  height: 0 !important;
  overflow: visible;
}

.pe-edit-delete {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dc2626;
  border: 2px solid #fff;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: .2s;
  padding: 0;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.pe-edit-delete:hover { background: #991b1b; transform: scale(1.1); }

.pe-edit-resize {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 14px;
  height: 14px;
  background: #4f46e5;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: nwse-resize;
  opacity: 0;
  transition: .2s;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.pe-edit-node.active .pe-edit-resize { opacity: 1; }
.pe-edit-node.active .pe-edit-delete { opacity: 1; }

/* Bottom bar */
.pe-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin-top: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  flex-wrap: wrap;
}
.pe-bottom-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}
.pe-bottom-info i { color: #dc2626; font-size: 16px; }
.pe-bottom-info b { color: #1e293b; font-weight: 700; }
.pe-bottom-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pe-save-btn {
  padding: 12px 26px;
  font-size: 14px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}
.pe-save-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  box-shadow: 0 8px 20px rgba(220,38,38,.3);
}

/* Signature modal */
.pe-signature-modal {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.7);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}
.pe-signature-box {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.pe-signature-box h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.pe-signature-box h3 i { color: #4f46e5; }
.pe-signature-canvas-wrap {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}
#peSignatureCanvas {
  background: #fff;
  border-radius: 6px;
  cursor: crosshair;
  max-width: 100%;
  touch-action: none;
}
.pe-signature-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pe-sig-controls {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.pe-sig-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
  font-weight: 600;
  margin: 0;
}
.pe-sig-controls input[type="color"] {
  width: 40px;
  height: 32px;
  padding: 3px;
  cursor: pointer;
  border-radius: 6px;
  margin: 0;
}
.pe-sig-controls input[type="range"] {
  width: 100px;
  height: 5px;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
}
.pe-sig-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 992px) {
  .pe-editor-layout { grid-template-columns: 1fr; }
  .pe-toolbar { position: static; max-height: none; }
  .pe-tool-group { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .pe-tool-group { grid-template-columns: repeat(3, 1fr); }
  .pe-upload-zone { padding: 40px 20px; }
  .pe-upload-icon { font-size: 52px; }
  .pe-canvas-wrap { min-height: 250px; padding: 6px; }
  .pe-bottom-bar { flex-direction: column; align-items: stretch; }
  .pe-bottom-actions { flex-direction: column; }
  .pe-bottom-actions button { width: 100%; justify-content: center; }
  .pe-signature-box { padding: 16px; }
  .pe-signature-actions { flex-direction: column; align-items: stretch; }
  .pe-sig-buttons { justify-content: stretch; }
  .pe-sig-buttons button { flex: 1; }
}

/* =====================================================
   PHOTO ENHANCER
   ===================================================== */

.phe-privacy {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-left: 6px solid #10b981;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.phe-privacy > i { color: #10b981; font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.phe-privacy b { display: block; color: #065f46; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.phe-privacy p { color: #047857; font-size: 13px; margin: 0; line-height: 1.5; }

.phe-panel { display: none; }
.phe-panel.active { display: block; }

/* Upload */
.phe-upload-zone {
  background: #fff;
  border: 3px dashed #cbd5e1;
  border-radius: 16px;
  padding: 60px 30px;
  text-align: center;
  cursor: pointer;
  transition: .25s;
}
.phe-upload-zone:hover, .phe-upload-zone.dragging {
  border-color: #8b5cf6;
  background: #faf5ff;
}
.phe-upload-zone.dragging { border-style: solid; box-shadow: 0 0 0 4px rgba(139,92,246,.15); }
.phe-upload-icon { font-size: 72px; color: #8b5cf6; margin-bottom: 16px; display: block; transition: .25s; }
.phe-upload-zone:hover .phe-upload-icon { transform: translateY(-6px) scale(1.05); }
.phe-upload-zone h3 { font-size: 20px; color: #1e293b; margin-bottom: 8px; font-weight: 700; }
.phe-upload-zone p { color: #64748b; font-size: 14px; margin-bottom: 22px; }
.phe-supported { display: flex; gap: 20px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.phe-supported span { display: inline-flex; align-items: center; gap: 6px; color: #64748b; font-size: 13px; font-weight: 500; }
.phe-supported i { color: #10b981; }

/* Topbar */
.phe-topbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}
.phe-topbar-btn {
  padding: 12px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.phe-topbar-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139,92,246,.35);
}
.phe-topbar-btn.phe-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}
.phe-topbar-btn.phe-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  box-shadow: 0 8px 20px rgba(220,38,38,.35);
}

/* Layout */
.phe-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

/* Canvas area */
.phe-canvas-area {
  background: #0f172a;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.phe-canvas-wrap {
  position: relative;
  background: repeating-conic-gradient(#1e293b 0% 25%, #0f172a 0% 50%) 50% / 20px 20px;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  max-height: 70vh;
  overflow: auto;
}
#pheCanvas {
  max-width: 100%;
  max-height: 65vh;
  display: block;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
  background: #fff;
}
.phe-canvas-info {
  position: absolute;
  top: 26px;
  right: 26px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: ui-monospace, monospace;
}
.phe-canvas-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  margin-top: 10px;
  background: rgba(255,255,255,.05);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 12px;
  flex-wrap: wrap;
}
.phe-canvas-hint i { color: #a78bfa; }
.phe-compare-btn {
  margin-left: auto;
  padding: 6px 12px;
  background: rgba(139,92,246,.15);
  border: 1px solid #8b5cf6;
  border-radius: 8px;
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.phe-compare-btn:hover { background: #8b5cf6; color: #fff; }

/* Settings panel */
.phe-settings-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  overflow: hidden;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
}

/* Tabs */
.phe-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}
.phe-tab {
  flex: 1;
  padding: 14px 8px;
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: inherit;
  border-bottom: 3px solid transparent;
}
.phe-tab i { font-size: 16px; }
.phe-tab:hover { background: #f1f5f9; color: #1e293b; }
.phe-tab.active {
  color: #8b5cf6;
  border-bottom-color: #8b5cf6;
  background: #fff;
}

/* Tab panels */
.phe-tab-panel { display: none; padding: 16px; overflow-y: auto; flex: 1; }
.phe-tab-panel.active { display: block; }

/* Slider */
.phe-slider-item {
  position: relative;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.phe-slider-item:last-child { border-bottom: none; }
.phe-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12px;
}
.phe-slider-head label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-weight: 600;
  margin: 0;
}
.phe-slider-head label i { color: #8b5cf6; font-size: 13px; }
.phe-slider-head b {
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
  color: #7c3aed;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  min-width: 42px;
  text-align: center;
}
.phe-slider {
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #8b5cf6;
  cursor: pointer;
}
.phe-slider-reset {
  position: absolute;
  right: 0;
  top: 0;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: .2s;
  padding: 0;
  opacity: 0;
}
.phe-slider-item:hover .phe-slider-reset { opacity: 1; }
.phe-slider-reset:hover { background: #8b5cf6; border-color: #8b5cf6; color: #fff; }

/* Filters grid */
.phe-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.phe-filter-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.phe-filter-preview {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}
.phe-filter-btn span {
  font-size: 9.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.phe-filter-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.phe-filter-btn.active {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
}
.phe-filter-btn.active span { color: #7c3aed; }

.phe-filter-intensity {
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.phe-filter-intensity label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
  margin-bottom: 6px;
}
.phe-filter-intensity label i { color: #8b5cf6; }
.phe-filter-intensity b {
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
  color: #7c3aed;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

/* Effect sections */
.phe-effect-section {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.phe-effect-section:last-child { border-bottom: none; }
.phe-section-title {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* Bottom bar */
.phe-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  flex-wrap: wrap;
}
.phe-bottom-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
}
.phe-bottom-info i { color: #8b5cf6; font-size: 16px; }
.phe-bottom-info b { color: #1e293b; font-weight: 700; font-family: ui-monospace, monospace; }
.phe-bottom-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.phe-btn-outline {
  padding: 11px 20px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.phe-btn-outline:hover {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #fff;
  transform: translateY(-2px);
}
.phe-save-btn {
  padding: 12px 26px;
  font-size: 14px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.phe-save-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 8px 20px rgba(139,92,246,.35);
}

/* Responsive */
@media (max-width: 992px) {
  .phe-layout { grid-template-columns: 1fr; }
  .phe-settings-panel { position: static; max-height: none; }
  .phe-canvas-wrap { min-height: 300px; padding: 12px; }
  #pheCanvas { max-height: 50vh; }
}
@media (max-width: 640px) {
  .phe-upload-zone { padding: 40px 20px; }
  .phe-upload-icon { font-size: 52px; }
  .phe-upload-zone h3 { font-size: 17px; }
  .phe-supported { gap: 10px; }
  .phe-topbar { grid-template-columns: 1fr 1fr; }
  .phe-filters-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .phe-filter-btn span { font-size: 9px; }
  .phe-bottom-bar { flex-direction: column; align-items: stretch; }
  .phe-bottom-actions { flex-direction: column; }
  .phe-bottom-actions button { width: 100%; justify-content: center; }
  .phe-compare-btn { margin-left: 0; width: 100%; justify-content: center; }
}

/* =====================================================
   QR CODE READER
   ===================================================== */

.qrr-privacy {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-left: 6px solid #10b981;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.qrr-privacy > i { color: #10b981; font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.qrr-privacy b { display: block; color: #065f46; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.qrr-privacy p { color: #047857; font-size: 13px; margin: 0; line-height: 1.5; }

/* Tabs */
.qrr-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.qrr-tab {
  padding: 16px 12px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.qrr-tab > i { font-size: 26px; color: #64748b; transition: .25s; }
.qrr-tab > b { font-size: 13px; color: #1e293b; font-weight: 700; }
.qrr-tab > small { font-size: 10.5px; color: #94a3b8; font-weight: 500; }
.qrr-tab:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.qrr-tab.active {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(8,145,178,.25);
}
.qrr-tab.active > i,
.qrr-tab.active > b,
.qrr-tab.active > small { color: #fff; }
.qrr-tab.active > small { opacity: .9; }

/* Panels */
.qrr-panel { display: none; }
.qrr-panel.active { display: block; }

/* Camera */
.qrr-camera-container {
  background: #0f172a;
  border-radius: 16px;
  padding: 20px;
}
.qrr-camera-view {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
#qrrVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.qrr-scan-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.qrr-scan-frame {
  position: relative;
  width: 60%;
  max-width: 400px;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
}
.qrr-scan-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 4px solid #06b6d4;
}
.qrr-scan-corner.qrr-tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 20px 0 0 0; }
.qrr-scan-corner.qrr-tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 20px 0 0; }
.qrr-scan-corner.qrr-bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 20px; }
.qrr-scan-corner.qrr-br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 20px 0; }
.qrr-scan-line {
  position: absolute;
  left: 5%;
  right: 5%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #06b6d4, transparent);
  box-shadow: 0 0 20px #06b6d4;
  animation: qrrScanLine 2s ease-in-out infinite;
}
@keyframes qrrScanLine {
  0%   { top: 5%; }
  50%  { top: 95%; }
  100% { top: 5%; }
}
.qrr-scan-hint {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  margin-top: 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
  background: rgba(0,0,0,.5);
  padding: 6px 16px;
  border-radius: 20px;
}

.qrr-camera-status {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  background: rgba(0,0,0,.6);
  color: #cbd5e1;
}
.qrr-camera-status.qrr-status-scanning {
  color: #a5f3fc;
  background: rgba(8,145,178,.4);
}
.qrr-camera-status.qrr-status-scanning i {
  animation: qrrPulse 1.5s ease-in-out infinite;
}
.qrr-camera-status.qrr-status-error {
  color: #fecaca;
  background: rgba(220,38,38,.4);
}
.qrr-camera-status.qrr-status-loading i {
  animation: qrrSpin 1s linear infinite;
}
@keyframes qrrPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(1.15); }
}
@keyframes qrrSpin { to { transform: rotate(360deg); } }

.qrr-camera-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.qrr-cam-btn {
  padding: 14px 30px;
  font-size: 15px;
  background: linear-gradient(135deg, #0891b2, #06b6d4);
}
.qrr-cam-btn:hover {
  background: linear-gradient(135deg, #0e7490, #0891b2);
  box-shadow: 0 8px 20px rgba(8,145,178,.35);
}
.qrr-btn-outline {
  padding: 12px 22px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.qrr-btn-outline:hover {
  background: #06b6d4;
  border-color: #06b6d4;
  color: #fff;
}
.qrr-btn-outline.active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

/* Upload */
.qrr-upload-zone {
  background: #fff;
  border: 3px dashed #cbd5e1;
  border-radius: 16px;
  padding: 60px 30px;
  text-align: center;
  cursor: pointer;
  transition: .25s;
}
.qrr-upload-zone:hover,
.qrr-upload-zone.dragging {
  border-color: #06b6d4;
  background: #f0fdfa;
}
.qrr-upload-zone.dragging {
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(6,182,212,.15);
}
.qrr-upload-icon {
  font-size: 72px;
  color: #06b6d4;
  margin-bottom: 16px;
  display: block;
  transition: .25s;
}
.qrr-upload-zone:hover .qrr-upload-icon {
  transform: translateY(-6px) scale(1.05);
}
.qrr-upload-zone h3 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 8px;
  font-weight: 700;
}
.qrr-upload-zone p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 22px;
}

/* Paste */
.qrr-paste-zone {
  background: #fff;
  border: 3px dashed #cbd5e1;
  border-radius: 16px;
  padding: 60px 30px;
  text-align: center;
  cursor: pointer;
  transition: .25s;
}
.qrr-paste-zone:hover {
  border-color: #06b6d4;
  background: #f0fdfa;
}
.qrr-paste-icon {
  font-size: 72px;
  color: #06b6d4;
  margin-bottom: 16px;
}
.qrr-paste-zone h3 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 8px;
  font-weight: 700;
}
.qrr-paste-zone p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 16px;
}
.qrr-paste-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 12.5px;
  color: #1e40af;
}
.qrr-paste-hint i { color: #2563eb; }

/* Result */
.qrr-result-section {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  padding: 24px;
  margin-top: 20px;
  border-top: 4px solid #06b6d4;
  animation: qrrSlideIn .35s ease-out;
}
@keyframes qrrSlideIn {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}
.qrr-result-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid #f1f5f9;
}
.qrr-result-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 6px 18px rgba(16,185,129,.3);
}
.qrr-result-title { flex: 1; min-width: 0; }
.qrr-result-title h3 {
  font-size: 16px;
  color: #1e293b;
  margin: 0 0 2px;
  font-weight: 700;
}
.qrr-result-title p { font-size: 12.5px; color: #64748b; margin: 0; }
.qrr-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
  flex-shrink: 0;
  padding: 0;
}
.qrr-close-btn:hover { background: #dc2626; color: #fff; }

.qrr-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #cffafe, #a5f3fc);
  color: #0e7490;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
}
.qrr-type-badge i { font-size: 14px; }

.qrr-content-box { margin-bottom: 14px; }
.qrr-content-box > label {
  display: block;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.qrr-content {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 13.5px;
  color: #1e293b;
  word-break: break-all;
  line-height: 1.6;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.qrr-parsed {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.qrr-parsed-row {
  font-size: 13px;
  color: #1e293b;
  padding: 4px 0;
  border-bottom: 1px dashed #ccfbf1;
  word-break: break-all;
}
.qrr-parsed-row:last-child { border-bottom: none; }
.qrr-parsed-row b {
  color: #0e7490;
  margin-right: 6px;
  font-weight: 700;
}

.qrr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.qrr-open-btn {
  padding: 12px 24px;
  font-size: 13.5px;
  background: linear-gradient(135deg, #0891b2, #06b6d4);
}
.qrr-open-btn:hover {
  background: linear-gradient(135deg, #0e7490, #0891b2);
  box-shadow: 0 8px 20px rgba(8,145,178,.35);
}

/* History */
.qrr-history-section {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  padding: 20px;
  margin-top: 20px;
}
.qrr-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  flex-wrap: wrap;
}
.qrr-history-header h3 {
  font-size: 15px;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.qrr-history-header h3 i { color: #06b6d4; }
.qrr-history-actions { display: flex; gap: 6px; }
.qrr-mini-btn {
  padding: 7px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.qrr-mini-btn:hover { background: #06b6d4; color: #fff; border-color: #06b6d4; }
.qrr-mini-danger:hover { background: #dc2626; border-color: #dc2626; }

.qrr-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}
.qrr-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 4px solid #06b6d4;
  cursor: pointer;
  transition: .2s;
}
.qrr-history-item:hover {
  background: #f1f5f9;
  transform: translateX(4px);
}
.qrr-history-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #cffafe, #a5f3fc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0e7490;
  font-size: 18px;
  flex-shrink: 0;
}
.qrr-history-content { flex: 1; min-width: 0; }
.qrr-history-type {
  font-size: 11px;
  color: #0e7490;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
  margin-bottom: 2px;
}
.qrr-history-text {
  font-size: 13px;
  color: #1e293b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.qrr-history-meta {
  display: flex;
  gap: 12px;
  font-size: 10.5px;
  color: #94a3b8;
}
.qrr-history-meta i { font-size: 10px; }
.qrr-history-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.qrr-hist-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: .2s;
  padding: 0;
}
.qrr-hist-btn:hover { background: #06b6d4; color: #fff; border-color: #06b6d4; }
.qrr-hist-danger:hover { background: #dc2626; border-color: #dc2626; }

/* Responsive */
@media (max-width: 640px) {
  .qrr-tabs { gap: 6px; }
  .qrr-tab { padding: 12px 8px; }
  .qrr-tab > i { font-size: 22px; }
  .qrr-tab > b { font-size: 11.5px; }
  .qrr-tab > small { display: none; }

  .qrr-camera-container { padding: 12px; }
  .qrr-scan-frame { width: 70%; }
  .qrr-cam-btn { padding: 12px 20px; font-size: 14px; }

  .qrr-upload-zone, .qrr-paste-zone { padding: 40px 18px; }
  .qrr-upload-icon, .qrr-paste-icon { font-size: 52px; }
  .qrr-upload-zone h3, .qrr-paste-zone h3 { font-size: 17px; }

  .qrr-result-section { padding: 18px; }
  .qrr-actions { flex-direction: column; }
  .qrr-actions > button { width: 100%; justify-content: center; }

  .qrr-history-item { padding: 10px; gap: 10px; }
  .qrr-history-icon { width: 32px; height: 32px; font-size: 15px; }
  .qrr-history-text { font-size: 12px; }
  .qrr-history-meta { font-size: 10px; }
}

/* =====================================================
   UPI QR GENERATOR
   ===================================================== */

/* Legal notice */
.upiqr-legal-notice {
  display: flex;
  gap: 14px;
  background: #fffbeb;
  border: 2px solid #fcd34d;
  border-left: 6px solid #f59e0b;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.upiqr-legal-notice > i {
  color: #d97706;
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.upiqr-legal-notice b {
  display: block;
  color: #78350f;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.upiqr-legal-notice p {
  color: #78350f;
  font-size: 13px;
  margin: 0;
  line-height: 1.6;
}

/* Privacy */
.upiqr-privacy {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-left: 6px solid #10b981;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.upiqr-privacy > i { color: #10b981; font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.upiqr-privacy b { display: block; color: #065f46; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.upiqr-privacy p { color: #047857; font-size: 13px; margin: 0; line-height: 1.5; }

/* Layout */
.upiqr-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}
.upiqr-form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Tabs */
.upiqr-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.upiqr-tab {
  padding: 14px 12px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.upiqr-tab > i { font-size: 24px; color: #64748b; transition: .25s; }
.upiqr-tab > b { font-size: 13px; color: #1e293b; font-weight: 700; }
.upiqr-tab > small { font-size: 10.5px; color: #94a3b8; font-weight: 500; }
.upiqr-tab:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.upiqr-tab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(79,70,229,.25);
}
.upiqr-tab.active > i,
.upiqr-tab.active > b,
.upiqr-tab.active > small { color: #fff; }
.upiqr-tab.active > small { opacity: .9; }

/* Mode panels */
.upiqr-mode-panel { display: none; }
.upiqr-mode-panel.active { display: block; }

/* Card */
.upiqr-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.upiqr-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.upiqr-card h3 i { color: #4f46e5; }

/* Grid */
.upiqr-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.upiqr-field { margin-bottom: 10px; }
.upiqr-field:last-child { margin-bottom: 0; }
.upiqr-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
}
.upiqr-req { color: #dc2626; }
.upiqr-optional {
  color: #94a3b8;
  font-weight: 500;
  font-size: 11px;
}
.upiqr-field input,
.upiqr-field textarea,
.upiqr-field select {
  margin: 0;
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 8px;
  width: 100%;
  font-family: inherit;
}
.upiqr-field input[type="color"] {
  padding: 3px;
  height: 42px;
  cursor: pointer;
}
.upiqr-hint {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
}
.upiqr-hint i { color: #f59e0b; margin-right: 2px; }

/* Warning */
.upiqr-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
}
.upiqr-warning i { color: #d97706; font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.upiqr-warning span { color: #78350f; font-size: 12.5px; line-height: 1.5; }
.upiqr-warning b { color: #92400e; }

/* Checkbox */
.upiqr-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: .2s;
}
.upiqr-checkbox:hover { border-color: #cbd5e1; }
.upiqr-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600 !important;
}
.upiqr-checkbox input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
  flex-shrink: 0;
}
.upiqr-checkbox i { color: #4f46e5; }

/* Preview panel */
.upiqr-preview-panel {
  position: sticky;
  top: 90px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
}
.upiqr-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  gap: 10px;
  flex-wrap: wrap;
}
.upiqr-preview-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.upiqr-preview-label i { color: #818cf8; }
.upiqr-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16,185,129,.2);
  color: #10b981;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(16,185,129,.3);
}
.upiqr-preview-badge i { font-size: 12px; }

.upiqr-preview-wrap {
  padding: 30px 20px;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 20px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 340px;
}
.upiqr-preview-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  max-width: 100%;
  text-align: center;
}
.upiqr-placeholder {
  padding: 40px 20px;
  color: #94a3b8;
  text-align: center;
}
.upiqr-placeholder i {
  font-size: 64px;
  color: #cbd5e1;
  display: block;
  margin-bottom: 12px;
}
.upiqr-placeholder p {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 4px;
  font-weight: 500;
}
.upiqr-placeholder small { font-size: 12px; color: #94a3b8; }

.upiqr-qr-result { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.upiqr-qr-result img {
  max-width: 100%;
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.upiqr-qr-info {
  width: 100%;
  text-align: left;
  font-size: 12.5px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.upiqr-info-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  color: #64748b;
}
.upiqr-info-row b { color: #1e293b; font-weight: 700; word-break: break-all; text-align: right; }

/* Link box */
.upiqr-link-box {
  padding: 16px 18px;
  border-top: 1px solid #f1f5f9;
}
.upiqr-link-box > label {
  display: block;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
  margin-bottom: 8px;
}
.upiqr-link-box > label i { color: #4f46e5; margin-right: 4px; }
.upiqr-link-row {
  display: flex;
  gap: 6px;
}
.upiqr-link-row input {
  flex: 1;
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
  min-width: 0;
}
.upiqr-icon-btn {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: .2s;
  padding: 0;
}
.upiqr-icon-btn:hover { transform: scale(1.05); box-shadow: 0 6px 15px rgba(79,70,229,.35); }

/* Actions */
.upiqr-actions {
  display: flex;
  gap: 8px;
  padding: 16px 18px;
  flex-wrap: wrap;
  border-top: 1px solid #f1f5f9;
}
.upiqr-action-btn {
  flex: 1;
  min-width: 130px;
  justify-content: center;
  padding: 12px 18px;
  font-size: 13px;
}
.upiqr-btn-outline {
  padding: 12px 16px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  flex: 1;
  min-width: 110px;
}
.upiqr-btn-outline:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  transform: translateY(-2px);
}

/* Apps */
.upiqr-apps {
  padding: 14px 18px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}
.upiqr-apps-title {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
  margin: 0 0 10px;
}
.upiqr-apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.upiqr-apps-grid span {
  padding: 6px 4px;
  background: #fff;
  border-radius: 6px;
  font-size: 10.5px;
  color: #475569;
  text-align: center;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

/* Safety */
.upiqr-safety {
  display: flex;
  gap: 16px;
  background: #eff6ff;
  border: 2px solid #bfdbfe;
  border-left: 6px solid #3b82f6;
  padding: 20px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.upiqr-safety > i {
  color: #2563eb;
  font-size: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}
.upiqr-safety b {
  display: block;
  color: #1e40af;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}
.upiqr-safety ul {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}
.upiqr-safety li {
  font-size: 13px;
  color: #1e40af;
  line-height: 1.6;
  padding: 3px 0;
}
.upiqr-safety a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: underline;
}

/* FAQ */
.upiqr-faq {
  margin-bottom: 30px;
}
.upiqr-faq h3 {
  font-size: 18px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.upiqr-faq h3 i { color: #4f46e5; }
.upiqr-faq-item {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: .2s;
}
.upiqr-faq-item[open] {
  border-color: #4f46e5;
  box-shadow: 0 4px 15px rgba(79,70,229,.1);
}
.upiqr-faq-item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: .2s;
}
.upiqr-faq-item summary::-webkit-details-marker { display: none; }
.upiqr-faq-item summary::after {
  content: '+';
  color: #4f46e5;
  font-size: 20px;
  font-weight: 700;
  transition: .25s;
  line-height: 1;
}
.upiqr-faq-item[open] summary::after { transform: rotate(45deg); }
.upiqr-faq-item summary:hover { color: #4f46e5; }
.upiqr-faq-item p {
  padding: 0 18px 16px;
  font-size: 13.5px;
  color: #475569;
  line-height: 1.7;
  margin: 0;
}
.upiqr-faq-item code {
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
  color: #4f46e5;
}

/* Responsive */
@media (max-width: 992px) {
  .upiqr-layout { grid-template-columns: 1fr; }
  .upiqr-preview-panel { position: static; }
}
@media (max-width: 640px) {
  .upiqr-grid-2 { grid-template-columns: 1fr; }
  .upiqr-tabs { gap: 6px; }
  .upiqr-tab { padding: 12px 8px; }
  .upiqr-tab > i { font-size: 20px; }
  .upiqr-tab > b { font-size: 12px; }
  .upiqr-tab > small { display: none; }

  .upiqr-actions { flex-direction: column; }
  .upiqr-action-btn { width: 100%; }
  .upiqr-btn-outline { width: 100%; }
  .upiqr-apps-grid { grid-template-columns: repeat(3, 1fr); }
  .upiqr-safety { padding: 16px; gap: 12px; }
  .upiqr-safety > i { font-size: 22px; }
  .upiqr-qr-result img { max-width: 260px; }
}

/* =====================================================
   TYPING TEST
   ===================================================== */

/* Language section */
.tt-lang-section {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 18px;
}
.tt-lang-section h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.tt-lang-section h3 i { color: #4f46e5; }

.tt-lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.tt-lang-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 8px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.tt-lang-flag { font-size: 22px; line-height: 1; }
.tt-lang-btn > b { font-size: 14px; color: #1e293b; font-weight: 700; line-height: 1.2; }
.tt-lang-btn > small { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: .3px; font-weight: 600; }
.tt-lang-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,.06); }
.tt-lang-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(79,70,229,.25);
}
.tt-lang-btn.active > b,
.tt-lang-btn.active > small { color: #fff; }
.tt-lang-btn.active > small { opacity: .85; }

/* Mode section */
.tt-mode-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.tt-mode-group {
  background: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.tt-mode-group > label {
  display: block;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
  margin-bottom: 8px;
}
.tt-mode-group > label i { color: #4f46e5; margin-right: 4px; }
.tt-mode-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.tt-mode-btn {
  padding: 8px 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  flex: 1;
  min-width: 60px;
}
.tt-mode-btn:hover { border-color: #cbd5e1; background: #f1f5f9; }
.tt-mode-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
}

/* Stats bar */
.tt-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.tt-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  border-left: 4px solid #4f46e5;
  transition: .2s;
}
.tt-stat:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(79,70,229,.1); }
.tt-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tt-stat-icon i { font-size: 18px; color: #4f46e5; }
.tt-stat h4 {
  font-size: 20px;
  color: #1e293b;
  margin: 0;
  font-weight: 800;
  line-height: 1;
  font-family: ui-monospace, monospace;
}
.tt-stat p {
  font-size: 10.5px;
  color: #64748b;
  margin: 2px 0 0;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
}

/* Typing area */
.tt-typing-area {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
  margin-bottom: 18px;
  cursor: text;
}
.tt-progress {
  height: 5px;
  background: #f1f5f9;
  overflow: hidden;
}
.tt-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #ec4899);
  transition: width .15s linear;
  border-radius: 0 5px 5px 0;
}
.tt-text-display {
  padding: 32px 30px;
  font-size: 24px;
  line-height: 1.8;
  font-family: 'Noto Sans', 'Noto Sans Bengali', 'Noto Sans Devanagari', ui-monospace, monospace;
  letter-spacing: .3px;
  color: #334155;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
  user-select: none;
  cursor: text;
}
.tt-placeholder {
  color: #94a3b8;
  font-style: italic;
  font-size: 18px;
}
.tt-char {
  transition: background .1s, color .1s;
  position: relative;
}
.tt-char.tt-current {
  background: #c7d2fe;
  border-radius: 3px;
  animation: ttBlink 1s ease-in-out infinite;
}
@keyframes ttBlink {
  0%, 100% { background: #c7d2fe; }
  50%      { background: #a5b4fc; }
}
.tt-char.tt-correct { color: #10b981; }
.tt-char.tt-wrong {
  color: #dc2626;
  background: #fee2e2;
  border-radius: 3px;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: #dc2626;
}

/* Hidden input */
.tt-hidden-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  left: -9999px;
  top: 0;
  padding: 0;
  margin: 0;
  border: 0;
  resize: none;
}

/* Overlay */
.tt-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 5;
  padding: 20px;
  text-align: center;
}
.tt-start-btn {
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(79,70,229,.35);
}
.tt-start-btn i { font-size: 22px; }
.tt-hint {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  max-width: 300px;
  line-height: 1.5;
}

/* Actions */
.tt-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tt-btn-outline {
  padding: 12px 22px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  flex: 1;
  justify-content: center;
  min-width: 120px;
}
.tt-btn-outline:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79,70,229,.25);
}

/* Result modal */
.tt-result-modal {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.75);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
}
.tt-result-box {
  background: #fff;
  padding: 36px 32px 28px;
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: ttPopIn .4s cubic-bezier(.18,.89,.32,1.28);
  margin: auto;
}
@keyframes ttPopIn {
  from { transform: scale(.9) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.tt-result-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #fff;
  font-size: 44px;
  box-shadow: 0 15px 40px rgba(245,158,11,.35);
  transition: .3s;
}
.tt-result-box h2 {
  font-size: 26px;
  color: #1e293b;
  margin-bottom: 6px;
  font-weight: 800;
}
.tt-result-box > p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 26px;
}

.tt-result-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.tt-result-big {
  padding: 20px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-radius: 14px;
  border: 2px solid #c7d2fe;
}
.tt-result-big h3 {
  font-size: 42px;
  color: #4f46e5;
  margin: 0;
  font-weight: 800;
  line-height: 1;
  font-family: ui-monospace, monospace;
}
.tt-result-big p {
  font-size: 11px;
  color: #4338ca;
  margin: 6px 0 0;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
}

.tt-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.tt-result-stat {
  padding: 12px 8px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.tt-result-stat i {
  font-size: 18px;
  color: #64748b;
}
.tt-result-stat b {
  font-size: 16px;
  color: #1e293b;
  font-weight: 800;
  font-family: ui-monospace, monospace;
}
.tt-result-stat span {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
}

.tt-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .tt-lang-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .tt-lang-btn { padding: 10px 4px; }
  .tt-lang-flag { font-size: 18px; }
  .tt-lang-btn > b { font-size: 12px; }
  .tt-lang-btn > small { font-size: 9px; }

  .tt-mode-group { padding: 12px; }
  .tt-mode-btn { padding: 7px 10px; font-size: 11.5px; }

  .tt-stats-bar { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .tt-stat { padding: 10px 8px; gap: 8px; }
  .tt-stat-icon { width: 32px; height: 32px; }
  .tt-stat-icon i { font-size: 15px; }
  .tt-stat h4 { font-size: 16px; }
  .tt-stat p { font-size: 9px; }

  .tt-text-display {
    padding: 24px 20px;
    font-size: 20px;
    line-height: 1.7;
    min-height: 180px;
  }
  .tt-placeholder { font-size: 15px; }

  .tt-result-box { padding: 28px 20px 22px; }
  .tt-result-icon { width: 72px; height: 72px; font-size: 34px; }
  .tt-result-box h2 { font-size: 22px; }
  .tt-result-big h3 { font-size: 34px; }
  .tt-result-grid { grid-template-columns: repeat(2, 1fr); }
  .tt-result-actions { grid-template-columns: 1fr; }
  .tt-result-actions > button { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .tt-lang-grid { grid-template-columns: repeat(2, 1fr); }
  .tt-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .tt-stat h4 { font-size: 15px; }
  .tt-stat p { font-size: 8.5px; }
  .tt-text-display { font-size: 18px; padding: 20px 16px; }
  .tt-actions { flex-direction: column; }
  .tt-btn-outline { width: 100%; }
}

/* =====================================================
   BENGALI KEYBOARD
   ===================================================== */

.bnkb-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.bnkb-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.bnkb-info-item i { color: #4f46e5; font-size: 16px; }

/* Textarea section */
.bnkb-textarea-section {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
  margin-bottom: 20px;
}
.bnkb-textarea-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 12px;
  flex-wrap: wrap;
}
.bnkb-textarea-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}
.bnkb-textarea-label i { color: #4f46e5; }
.bnkb-textarea-actions {
  display: flex;
  gap: 6px;
}
.bnkb-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: .2s;
  padding: 0;
}
.bnkb-icon-btn:hover { background: #4f46e5; color: #fff; border-color: #4f46e5; transform: translateY(-1px); }
.bnkb-icon-danger:hover { background: #dc2626; border-color: #dc2626; }

#bnkbTextarea {
  width: 100%;
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 24px;
  font-size: 20px;
  line-height: 1.7;
  font-family: 'Noto Sans Bengali', 'Kalpurush', system-ui, sans-serif;
  resize: vertical;
  min-height: 160px;
  background: #fff;
  color: #1e293b;
}
#bnkbTextarea:focus { outline: none; box-shadow: none; border: none; }
#bnkbTextarea::placeholder { color: #94a3b8; }

.bnkb-textarea-footer {
  display: flex;
  gap: 20px;
  padding: 10px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
}
.bnkb-textarea-footer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bnkb-textarea-footer i { color: #4f46e5; }
.bnkb-textarea-footer b { color: #1e293b; font-weight: 700; }

/* Keyboard section */
.bnkb-keyboard-section {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  padding: 18px;
  margin-bottom: 20px;
}

/* Quick bar */
.bnkb-quickbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
}
.bnkb-quickbar-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-right: 4px;
}
.bnkb-quickbar-label i { color: #f59e0b; }
.bnkb-quick-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff;
  border: 2px solid #e2e8f0;
  color: #1e293b;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
  font-family: 'Noto Sans Bengali', system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.bnkb-quick-btn:hover {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(79,70,229,.25);
}

/* Layout tabs */
.bnkb-layout-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.bnkb-layout-tab {
  padding: 12px 8px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.bnkb-layout-tab i { font-size: 15px; }
.bnkb-layout-tab:hover { border-color: #cbd5e1; background: #f1f5f9; }
.bnkb-layout-tab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(79,70,229,.25);
}

/* Keyboard container */
.bnkb-keyboard-container {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  padding: 20px 15px;
  border: 2px solid #e2e8f0;
  margin-bottom: 14px;
}

/* Layouts */
.bnkb-layout { display: none; }
.bnkb-layout.active { display: block; }

.bnkb-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.bnkb-row:last-child { margin-bottom: 0; }

/* Keys */
.bnkb-key {
  min-width: 52px;
  height: 52px;
  padding: 0 10px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 2px solid #cbd5e1;
  border-bottom-width: 4px;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: .1s;
  font-family: 'Noto Sans Bengali', 'Kalpurush', system-ui, sans-serif;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.bnkb-key:hover {
  background: linear-gradient(180deg, #eef2ff, #e0e7ff);
  border-color: #a5b4fc;
  color: #4338ca;
  transform: translateY(-1px);
}
.bnkb-key:active,
.bnkb-key.active {
  background: linear-gradient(180deg, #4f46e5, #4338ca);
  color: #fff;
  border-color: #3730a3;
  border-bottom-width: 2px;
  transform: translateY(2px);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.2);
}
.bnkb-key::after {
  content: attr(data-hint);
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 8px;
  color: #94a3b8;
  font-weight: 600;
  font-family: ui-monospace, monospace;
  text-transform: lowercase;
}
.bnkb-key:active::after,
.bnkb-key.active::after {
  color: rgba(255,255,255,.7);
}

/* Controls */
.bnkb-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.bnkb-ctrl-btn {
  padding: 12px 16px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.bnkb-ctrl-btn:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(79,70,229,.25);
}
.bnkb-ctrl-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Guide */
.bnkb-guide {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.bnkb-guide h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.bnkb-guide h3 i { color: #4f46e5; }
.bnkb-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.bnkb-guide-card {
  padding: 18px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  position: relative;
}
.bnkb-guide-num {
  position: absolute;
  top: -10px;
  left: 16px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(79,70,229,.3);
}
.bnkb-guide-card h4 {
  font-size: 14px;
  color: #1e293b;
  margin: 8px 0 6px;
  font-weight: 700;
}
.bnkb-guide-card p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Notes */
.bnkb-notes {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.bnkb-notes h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.bnkb-notes h3 i { color: #f59e0b; }
.bnkb-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.bnkb-note {
  padding: 12px 14px;
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
}
.bnkb-note b {
  display: block;
  font-size: 14px;
  color: #78350f;
  margin-bottom: 4px;
  font-weight: 700;
  font-family: 'Noto Sans Bengali', system-ui, sans-serif;
}
.bnkb-note p {
  font-size: 12px;
  color: #92400e;
  margin: 0;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
  .bnkb-info { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px; }
  .bnkb-info-item { font-size: 11.5px; }

  #bnkbTextarea { padding: 16px; font-size: 17px; min-height: 120px; }

  .bnkb-layout-tabs { grid-template-columns: 1fr 1fr; gap: 6px; }
  .bnkb-layout-tab { padding: 9px 6px; font-size: 11px; }
  .bnkb-layout-tab i { font-size: 13px; }

  .bnkb-keyboard-container { padding: 12px 6px; }
  .bnkb-key {
    min-width: 40px;
    height: 42px;
    font-size: 18px;
    padding: 0 6px;
  }
  .bnkb-key::after { font-size: 7px; top: 1px; right: 3px; }
  .bnkb-row { gap: 4px; margin-bottom: 6px; }

  .bnkb-quick-btn { width: 30px; height: 30px; font-size: 14px; }

  .bnkb-controls { grid-template-columns: repeat(2, 1fr); }
  .bnkb-ctrl-btn { padding: 10px 12px; font-size: 12px; }
}

@media (max-width: 480px) {
  .bnkb-key {
    min-width: 34px;
    height: 38px;
    font-size: 16px;
    padding: 0 4px;
  }
  .bnkb-key::after { font-size: 6px; }
  .bnkb-row { gap: 3px; margin-bottom: 5px; }
  .bnkb-keyboard-container { padding: 10px 4px; }
  .bnkb-quick-btn { width: 28px; height: 28px; font-size: 13px; }
  #bnkbTextarea { font-size: 15px; }
}

/* =====================================================
   LETTER MAKER
   ===================================================== */

/* Language tabs */
.lm-lang-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.lm-lang-btn {
  padding: 14px 12px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.lm-lang-flag { font-size: 22px; line-height: 1; }
.lm-lang-btn > b { font-size: 15px; color: #1e293b; font-weight: 700; line-height: 1.2; }
.lm-lang-btn > small { font-size: 10.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: .3px; font-weight: 600; }
.lm-lang-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,.06); }
.lm-lang-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(79,70,229,.25);
}
.lm-lang-btn.active > b,
.lm-lang-btn.active > small { color: #fff; }
.lm-lang-btn.active > small { opacity: .85; }

/* Layout */
.lm-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}
.lm-form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Topbar */
.lm-topbar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.lm-topbar-btn {
  padding: 10px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.lm-topbar-btn:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  transform: translateY(-2px);
}

/* Card */
.lm-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.lm-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.lm-card h3 i { color: #4f46e5; }

.lm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lm-field { margin-bottom: 10px; }
.lm-field:last-child { margin-bottom: 0; }
.lm-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
}
.lm-field input,
.lm-field textarea,
.lm-field select {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  width: 100%;
  font-family: inherit;
}
.lm-field textarea {
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}
.lm-select-lg {
  padding: 12px 14px !important;
  font-size: 14px !important;
  font-weight: 600;
}

/* Checkbox */
.lm-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: .2s;
}
.lm-checkbox:hover { border-color: #cbd5e1; }
.lm-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600 !important;
}
.lm-checkbox input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
  flex-shrink: 0;
}
.lm-checkbox i { color: #4f46e5; }

/* Preview panel */
.lm-preview-panel {
  position: sticky;
  top: 90px;
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.lm-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
  gap: 10px;
  flex-wrap: wrap;
}
.lm-preview-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}
.lm-preview-label i { color: #818cf8; }
.lm-preview-actions { display: flex; gap: 6px; }
.lm-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: .2s;
  padding: 0;
}
.lm-ctrl-btn:hover { background: #4f46e5; color: #fff; transform: scale(1.05); }

.lm-preview-scroll {
  padding: 20px;
  max-height: 85vh;
  overflow-y: auto;
  background: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%) 50% / 20px 20px;
  display: flex;
  justify-content: center;
}

.lm-empty {
  text-align: center;
  padding: 80px 30px;
  color: #94a3b8;
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
}
.lm-empty i { font-size: 60px; color: #cbd5e1; display: block; margin-bottom: 16px; }
.lm-empty h3 { font-size: 18px; color: #64748b; margin-bottom: 8px; }
.lm-empty p { font-size: 13px; }

/* Letter document */
.lm-doc {
  width: 100%;
  max-width: 780px;
  background: #fff;
  padding: 32px;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.7;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  position: relative;
}
.lm-doc-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 90px;
  font-weight: 900;
  color: rgba(0,0,0,.04);
  transform: rotate(-45deg);
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 6px;
  z-index: 0;
}
.lm-doc-letterhead {
  text-align: center;
  padding-bottom: 12px;
  position: relative;
  z-index: 1;
}
.lm-doc-from-name { font-size: 18px; font-weight: 800; color: #1e293b; margin-bottom: 2px; }
.lm-doc-from-desig { font-size: 12px; color: #4f46e5; font-weight: 600; margin-bottom: 3px; }
.lm-doc-from-org { font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 4px; }
.lm-doc-from-addr { font-size: 11.5px; color: #64748b; line-height: 1.5; }
.lm-doc-from-contact {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  flex-wrap: wrap;
}
.lm-doc-letterhead-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, #4f46e5, transparent);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.lm-doc-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 20px;
  font-size: 12.5px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.lm-doc-refno { color: #64748b; }
.lm-doc-date-place {
  text-align: right;
  color: #334155;
  line-height: 1.8;
  margin-left: auto;
}

.lm-doc-to {
  margin-bottom: 18px;
  line-height: 1.6;
  font-size: 13px;
  position: relative;
  z-index: 1;
}
.lm-doc-to > div:first-child { margin-bottom: 3px; color: #64748b; }
.lm-doc-to-name { font-weight: 700; color: #1e293b; }

.lm-doc-subject {
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 14px;
  background: #f8fafc;
  border-left: 4px solid #4f46e5;
  position: relative;
  z-index: 1;
}

.lm-doc-body {
  text-align: justify;
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.85;
  white-space: pre-wrap;
  position: relative;
  z-index: 1;
}

.lm-doc-closing {
  text-align: right;
  margin-top: 28px;
  font-size: 13px;
  position: relative;
  z-index: 1;
}
.lm-doc-closing p { margin-bottom: 6px; }
.lm-doc-sign-space { height: 40px; }
.lm-doc-sign-name { font-weight: 700; font-size: 13.5px; color: #1e293b; }
.lm-doc-sign-desig { font-size: 11.5px; color: #64748b; margin-top: 2px; }
.lm-doc-sign-contact { font-size: 11px; color: #64748b; margin-top: 2px; }

.lm-doc-enclosures {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px dashed #cbd5e1;
  font-size: 12px;
  position: relative;
  z-index: 1;
}
.lm-doc-enclosures b { display: block; margin-bottom: 6px; color: #1e293b; }
.lm-doc-enclosures ul { list-style: decimal; padding-left: 24px; }
.lm-doc-enclosures li { padding: 2px 0; }

.lm-preview-hint {
  padding: 10px 16px;
  background: #0f172a;
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid #334155;
}
.lm-preview-hint i { color: #818cf8; }

/* Responsive */
@media (max-width: 992px) {
  .lm-layout { grid-template-columns: 1fr; }
  .lm-preview-panel { position: static; }
  .lm-preview-scroll { max-height: none; padding: 12px; }
  .lm-doc { padding: 24px 20px; }
  .lm-doc-from-name { font-size: 16px; }
}
@media (max-width: 640px) {
  .lm-grid-2 { grid-template-columns: 1fr; }
  .lm-topbar { grid-template-columns: 1fr 1fr; }
  .lm-topbar-btn:last-child { grid-column: 1 / -1; }
  .lm-lang-tabs { gap: 6px; }
  .lm-lang-btn { padding: 10px 6px; }
  .lm-lang-flag { font-size: 18px; }
  .lm-lang-btn > b { font-size: 13px; }
  .lm-lang-btn > small { display: none; }
  .lm-doc { padding: 20px 16px; font-size: 12.5px; }
  .lm-doc-meta { flex-direction: column; gap: 6px; }
  .lm-doc-date-place { text-align: left; margin-left: 0; }
  .lm-doc-closing { text-align: left; }
  .lm-doc-watermark { font-size: 60px; }
}

/* =====================================================
   GST CALCULATOR
   ===================================================== */

.gst-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.gst-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.gst-info-item i { color: #10b981; font-size: 16px; }

/* Layout */
.gst-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}
.gst-input-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Tabs */
.gst-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gst-tab {
  padding: 16px 12px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.gst-tab > i { font-size: 24px; color: #64748b; transition: .25s; }
.gst-tab > b { font-size: 14px; color: #1e293b; font-weight: 700; }
.gst-tab > small { font-size: 10.5px; color: #94a3b8; font-weight: 500; }
.gst-tab:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.gst-tab.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(16,185,129,.25);
}
.gst-tab.active > i,
.gst-tab.active > b,
.gst-tab.active > small { color: #fff; }
.gst-tab.active > small { opacity: .9; }

/* Card */
.gst-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.gst-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.gst-card h3 i { color: #10b981; }

.gst-field { margin-bottom: 12px; }
.gst-field:last-child { margin-bottom: 0; }
.gst-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
}
.gst-field label i { color: #10b981; font-size: 14px; }

.gst-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.gst-currency {
  position: absolute;
  left: 16px;
  font-size: 18px;
  color: #10b981;
  font-weight: 700;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
}
.gst-input-wrap input {
  padding: 14px 14px 14px 42px !important;
  font-size: 18px !important;
  font-weight: 700;
  color: #1e293b;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  width: 100%;
  margin: 0;
  font-family: ui-monospace, monospace;
}
.gst-input-wrap input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.1);
}

.gst-hint {
  display: block;
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 5px;
}

/* Rate grid */
.gst-rate-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.gst-rate-btn {
  padding: 12px 6px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.gst-rate-btn > b { font-size: 15px; color: #1e293b; font-weight: 800; font-family: ui-monospace, monospace; }
.gst-rate-btn > small { font-size: 9px; color: #94a3b8; text-transform: uppercase; letter-spacing: .3px; font-weight: 600; }
.gst-rate-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.gst-rate-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(16,185,129,.25);
}
.gst-rate-btn.active > b,
.gst-rate-btn.active > small { color: #fff; }
.gst-rate-btn.active > small { opacity: .85; }
.gst-rate-custom > b { font-size: 12px; }

.gst-rate-display {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  padding: 12px 16px;
  border-radius: 10px;
  text-align: center;
}
.gst-rate-value {
  font-size: 26px;
  font-weight: 800;
  color: #059669;
  font-family: ui-monospace, monospace;
}

/* Tax type */
.gst-tax-type-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gst-tax-type {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  margin: 0;
}
.gst-tax-type:hover { border-color: #cbd5e1; background: #f1f5f9; }
.gst-tax-type:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
}
.gst-tax-type input {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
  flex-shrink: 0;
}
.gst-tax-content { display: flex; flex-direction: column; gap: 2px; }
.gst-tax-content b { font-size: 13px; color: #1e293b; font-weight: 700; }
.gst-tax-content small { font-size: 10.5px; color: #64748b; line-height: 1.3; }
.gst-tax-type:has(input:checked) .gst-tax-content b { color: #4338ca; }

/* Actions */
.gst-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}
.gst-calc-btn {
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #059669);
}
.gst-calc-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 8px 20px rgba(16,185,129,.35);
}
.gst-btn-outline {
  padding: 16px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.gst-btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Result panel */
.gst-result-panel {
  position: sticky;
  top: 90px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
}
.gst-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.gst-result-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}
.gst-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: .2s;
  padding: 0;
}
.gst-icon-btn:hover { background: rgba(255,255,255,.3); transform: scale(1.05); }

.gst-result-content { padding: 22px; }

/* Main result */
.gst-result-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}
.gst-result-block {
  padding: 18px 14px;
  border-radius: 12px;
  text-align: center;
}
.gst-result-base {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #93c5fd;
}
.gst-result-total {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
}
.gst-result-lbl {
  display: block;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.gst-result-amt {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  font-family: ui-monospace, monospace;
  line-height: 1.1;
}
.gst-result-total .gst-result-amt { color: #059669; }
.gst-result-arrow {
  color: #cbd5e1;
  font-size: 22px;
}

/* Breakdown */
.gst-breakdown {
  background: #f8fafc;
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.gst-breakdown h4 {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
}
.gst-breakdown h4 i { color: #10b981; }

.gst-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13.5px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
}
.gst-breakdown-row:last-child { border-bottom: none; }
.gst-breakdown-row > span { display: flex; align-items: center; gap: 6px; }
.gst-breakdown-row > b {
  color: #1e293b;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  font-size: 14px;
  white-space: nowrap;
}
.gst-gst-row { color: #d97706; }
.gst-gst-row > b { color: #d97706; }

.gst-breakdown-total {
  border-top: 2px solid #e2e8f0 !important;
  padding-top: 12px !important;
  margin-top: 6px;
  font-weight: 700;
  color: #1e293b;
}
.gst-breakdown-total > b { color: #f59e0b; font-size: 15px; }

.gst-breakdown-grand {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  padding: 12px 14px !important;
  margin: 8px -6px -6px;
  border-radius: 10px;
  border: none !important;
  font-weight: 800;
  color: #065f46;
}
.gst-breakdown-grand > b {
  color: #059669;
  font-size: 18px;
}

/* Info */
.gst-result-info {
  display: flex;
  gap: 10px;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  color: #1e40af;
  line-height: 1.5;
  align-items: flex-start;
}
.gst-result-info i { color: #2563eb; flex-shrink: 0; margin-top: 1px; }

/* Rates reference */
.gst-rates-reference {
  padding: 18px;
  border-top: 2px solid #f1f5f9;
}
.gst-rates-reference h4 {
  font-size: 13px;
  color: #1e293b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.gst-rates-reference h4 i { color: #4f46e5; }

.gst-rates-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gst-rate-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  background: #f8fafc;
}
.gst-rate-row b {
  color: #059669;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}
.gst-rate-row span { color: #64748b; line-height: 1.4; }
.gst-rate-head {
  background: #1e293b;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-size: 10.5px;
}
.gst-rate-head span { color: #fff !important; font-weight: 700; }
.gst-rate-head b { display: none; }

/* How to */
.gst-how-to {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.gst-how-to h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.gst-how-to h3 i { color: #10b981; }
.gst-how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.gst-how-card {
  padding: 18px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  position: relative;
}
.gst-how-num {
  position: absolute;
  top: -10px;
  left: 16px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(16,185,129,.3);
}
.gst-how-card h4 {
  font-size: 14px;
  color: #1e293b;
  margin: 8px 0 6px;
  font-weight: 700;
}
.gst-how-card p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}
.gst-how-card p b { color: #10b981; font-weight: 700; }

/* Formula */
.gst-formula {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.gst-formula h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.gst-formula h3 i { color: #10b981; }
.gst-formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.gst-formula-card {
  padding: 20px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: 12px;
}
.gst-formula-card h4 {
  font-size: 14px;
  color: #065f46;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.gst-formula-card h4 i { color: #059669; }
.gst-formula-line {
  font-size: 13px;
  color: #047857;
  padding: 6px 0;
  font-family: ui-monospace, monospace;
  line-height: 1.6;
}
.gst-formula-line b { color: #065f46; font-weight: 700; }
.gst-formula-example {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #86efac;
  font-size: 12.5px;
  color: #047857;
}
.gst-formula-example b { color: #065f46; font-weight: 800; }

/* Responsive */
@media (max-width: 992px) {
  .gst-layout { grid-template-columns: 1fr; }
  .gst-result-panel { position: static; }
}
@media (max-width: 640px) {
  .gst-info-bar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px; }
  .gst-info-item { font-size: 11.5px; }

  .gst-tabs { gap: 6px; }
  .gst-tab { padding: 12px 8px; }
  .gst-tab > i { font-size: 20px; }
  .gst-tab > b { font-size: 12px; }
  .gst-tab > small { display: none; }

  .gst-rate-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .gst-rate-btn { padding: 10px 4px; }
  .gst-rate-btn > b { font-size: 13px; }
  .gst-rate-btn > small { font-size: 8px; }
  .gst-rate-custom > b { font-size: 11px; }

  .gst-tax-type-group { grid-template-columns: 1fr; }
  .gst-tax-type { padding: 12px 10px; }

  .gst-actions { grid-template-columns: 1fr; }

  .gst-result-main { grid-template-columns: 1fr; gap: 6px; }
  .gst-result-arrow { transform: rotate(90deg); justify-self: center; }
  .gst-result-content { padding: 16px; }
  .gst-result-amt { font-size: 17px; }

  .gst-breakdown { padding: 14px; }
  .gst-breakdown-row { font-size: 12.5px; }
  .gst-breakdown-row > b { font-size: 13px; }
  .gst-breakdown-grand > b { font-size: 16px; }

  .gst-how-grid, .gst-formula-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   LOAN CALCULATOR
   ===================================================== */

.lc-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.lc-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.lc-info-item i { color: #10b981; font-size: 16px; }

/* Layout */
.lc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}
.lc-input-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Card */
.lc-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.lc-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.lc-card h3 i { color: #10b981; }

/* Type grid */
.lc-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.lc-type-btn {
  padding: 12px 6px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.lc-type-btn > i { font-size: 22px; color: #64748b; transition: .2s; }
.lc-type-btn > b { font-size: 12px; color: #1e293b; font-weight: 700; }
.lc-type-btn > small { font-size: 9.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: .3px; font-weight: 600; }
.lc-type-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.lc-type-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(16,185,129,.25);
}
.lc-type-btn.active > i,
.lc-type-btn.active > b,
.lc-type-btn.active > small { color: #fff; }
.lc-type-btn.active > small { opacity: .85; }

/* Fields */
.lc-field { margin-bottom: 12px; }
.lc-field:last-child { margin-bottom: 0; }
.lc-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  margin-top: 0;
  gap: 8px;
}
.lc-field label > b {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #059669;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  font-family: ui-monospace, monospace;
  white-space: nowrap;
}

.lc-slider {
  width: 100%;
  height: 8px;
  margin: 0;
  padding: 0;
  accent-color: #10b981;
  cursor: pointer;
  border-radius: 4px;
}
.lc-range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 600;
}

.lc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.lc-currency {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: #10b981;
  font-weight: 700;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}
.lc-unit {
  position: absolute;
  right: 14px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
}
.lc-input-wrap input {
  padding: 12px 14px !important;
  font-size: 15px !important;
  font-weight: 700;
  color: #1e293b;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  width: 100%;
  margin: 0;
  font-family: ui-monospace, monospace;
  transition: .2s;
}
.lc-input-wrap input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.1);
}
.lc-input-wrap:has(.lc-currency) input { padding-left: 40px !important; }
.lc-input-wrap:has(.lc-unit) input { padding-right: 70px !important; }

/* Tenure presets */
.lc-tenure-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.lc-preset-btn {
  padding: 8px 4px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.lc-preset-btn:hover { border-color: #cbd5e1; }
.lc-preset-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 10px rgba(16,185,129,.25);
}

/* Actions */
.lc-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}
.lc-calc-btn {
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #059669);
}
.lc-calc-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 8px 20px rgba(16,185,129,.35);
}
.lc-btn-outline {
  padding: 16px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.lc-btn-outline:hover { background: #f1f5f9; border-color: #cbd5e1; }

/* Result panel */
.lc-result-panel {
  position: sticky;
  top: 90px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
}
.lc-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.lc-result-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}
.lc-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: .2s;
  padding: 0;
}
.lc-icon-btn:hover { background: rgba(255,255,255,.3); transform: scale(1.05); }

/* EMI Hero */
.lc-emi-hero {
  padding: 28px 20px;
  text-align: center;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-bottom: 2px solid #86efac;
  transition: .3s;
}
.lc-emi-label {
  font-size: 12px;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 8px;
}
.lc-emi-amount {
  font-size: 42px;
  font-weight: 900;
  color: #065f46;
  font-family: ui-monospace, monospace;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -1px;
}
.lc-emi-sub {
  font-size: 12px;
  color: #047857;
  font-style: italic;
  max-width: 90%;
  margin: 0 auto;
  line-height: 1.4;
}

/* Breakdown */
.lc-breakdown {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lc-breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 4px solid #3b82f6;
  transition: .2s;
}
.lc-breakdown-item:hover { background: #f1f5f9; transform: translateX(2px); }
.lc-breakdown-item:nth-child(2) { border-left-color: #f59e0b; }
.lc-breakdown-item:nth-child(3) { border-left-color: #10b981; }
.lc-breakdown-item:nth-child(4) { border-left-color: #8b5cf6; }

.lc-breakdown-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lc-breakdown-icon i { font-size: 18px; color: #2563eb; }
.lc-icon-warn { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.lc-icon-warn i { color: #d97706; }
.lc-icon-success { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.lc-icon-success i { color: #059669; }

.lc-breakdown-content { flex: 1; min-width: 0; }
.lc-breakdown-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
  margin-bottom: 3px;
}
.lc-breakdown-value {
  font-size: 17px;
  font-weight: 800;
  color: #1e293b;
  font-family: ui-monospace, monospace;
}

/* Chart */
.lc-chart-wrap {
  padding: 18px;
  border-top: 2px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lc-chart-wrap canvas {
  max-width: 100%;
  margin-bottom: 12px;
}
.lc-chart-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.lc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #475569;
}
.lc-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lc-legend-item b { color: #1e293b; font-weight: 700; font-family: ui-monospace, monospace; }

/* Schedule button */
.lc-schedule-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  border: none;
  border-radius: 0 0 14px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}
.lc-schedule-btn:hover {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

/* Schedule section */
.lc-schedule-section {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
  margin-bottom: 24px;
  animation: lcSlideIn .35s ease-out;
}
@keyframes lcSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.lc-schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #1e293b;
  color: #fff;
  flex-wrap: wrap;
  gap: 10px;
}
.lc-schedule-header h3 {
  font-size: 15px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.lc-schedule-header h3 i { color: #10b981; }
.lc-schedule-actions { display: flex; gap: 8px; }
.lc-mini-btn {
  padding: 8px 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}
.lc-mini-btn:hover {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.lc-mini-close:hover { background: #dc2626; border-color: #dc2626; }

.lc-schedule-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px 20px;
  background: #f0fdf4;
  border-bottom: 1px solid #d1fae5;
}
.lc-summary-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #a7f3d0;
}
.lc-summary-item span {
  font-size: 11px;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
}
.lc-summary-item b {
  font-size: 16px;
  color: #065f46;
  font-weight: 800;
  font-family: ui-monospace, monospace;
}

.lc-schedule-table-wrap {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: auto;
}
.lc-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}
.lc-schedule-table th {
  position: sticky;
  top: 0;
  background: #334155;
  color: #fff;
  padding: 12px 10px;
  text-align: right;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 1;
}
.lc-schedule-table th:first-child,
.lc-schedule-table th:last-child { text-align: left; }

.lc-schedule-table td {
  padding: 10px;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
  white-space: nowrap;
}
.lc-schedule-table td:first-child {
  text-align: left;
  color: #1e293b;
  font-weight: 700;
  font-family: inherit;
}
.lc-schedule-table td:last-child {
  text-align: left;
  color: #64748b;
}
.lc-schedule-table tr:nth-child(even) { background: #f8fafc; }
.lc-schedule-table tr:hover { background: #eef2ff; }
.lc-td-emi { color: #1e293b !important; font-weight: 700; }
.lc-td-principal { color: #2563eb !important; font-weight: 600; }
.lc-td-interest { color: #d97706 !important; font-weight: 600; }

/* How to */
.lc-how-to {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.lc-how-to h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.lc-how-to h3 i { color: #10b981; }
.lc-how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.lc-how-card {
  padding: 18px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  position: relative;
}
.lc-how-num {
  position: absolute;
  top: -10px;
  left: 16px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(16,185,129,.3);
}
.lc-how-card h4 {
  font-size: 14px;
  color: #1e293b;
  margin: 8px 0 6px;
  font-weight: 700;
}
.lc-how-card p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 992px) {
  .lc-layout { grid-template-columns: 1fr; }
  .lc-result-panel { position: static; }
}
@media (max-width: 640px) {
  .lc-info-bar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px; }
  .lc-info-item { font-size: 11.5px; }

  .lc-type-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .lc-type-btn { padding: 10px 4px; }
  .lc-type-btn > i { font-size: 18px; }
  .lc-type-btn > b { font-size: 11px; }
  .lc-type-btn > small { font-size: 8.5px; }

  .lc-tenure-presets { grid-template-columns: repeat(3, 1fr); }

  .lc-actions { grid-template-columns: 1fr; }

  .lc-emi-amount { font-size: 32px; }
  .lc-emi-hero { padding: 22px 16px; }
  .lc-breakdown { padding: 14px; }
  .lc-breakdown-value { font-size: 15px; }

  .lc-chart-wrap { padding: 14px; }

  .lc-schedule-header { flex-direction: column; align-items: stretch; padding: 14px; }
  .lc-schedule-actions { width: 100%; }
  .lc-mini-btn { flex: 1; justify-content: center; }
  .lc-summary-item { padding: 10px 12px; }
  .lc-summary-item b { font-size: 14px; }
  .lc-schedule-table { font-size: 11.5px; min-width: 640px; }
  .lc-schedule-table th, .lc-schedule-table td { padding: 8px 6px; font-size: 11px; }
}

/* =====================================================
   MUTUAL FUND CALCULATOR
   ===================================================== */

.mfc-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.mfc-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.mfc-info-item i { color: #10b981; font-size: 16px; }

/* Tabs */
.mfc-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.mfc-tab {
  padding: 14px 8px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.mfc-tab > i { font-size: 22px; color: #64748b; transition: .25s; }
.mfc-tab > b { font-size: 13px; color: #1e293b; font-weight: 700; }
.mfc-tab > small { font-size: 10px; color: #94a3b8; font-weight: 500; }
.mfc-tab:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.mfc-tab.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(16,185,129,.25);
}
.mfc-tab.active > i,
.mfc-tab.active > b,
.mfc-tab.active > small { color: #fff; }
.mfc-tab.active > small { opacity: .85; }

/* Layout */
.mfc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}
.mfc-input-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mfc-mode-panel { display: none; }
.mfc-mode-panel.active { display: block; }

/* Card */
.mfc-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.mfc-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.mfc-card h3 i { color: #10b981; }

.mfc-field { margin-bottom: 14px; }
.mfc-field:last-child { margin-bottom: 0; }
.mfc-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  margin-top: 0;
  gap: 8px;
}
.mfc-field label > b {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #059669;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  font-family: ui-monospace, monospace;
  white-space: nowrap;
}

.mfc-slider {
  width: 100%;
  height: 8px;
  margin: 0;
  padding: 0;
  accent-color: #10b981;
  cursor: pointer;
  border-radius: 4px;
}
.mfc-range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 600;
}

.mfc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.mfc-currency {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: #10b981;
  font-weight: 700;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}
.mfc-input-wrap input {
  padding: 12px 14px 12px 40px !important;
  font-size: 15px !important;
  font-weight: 700;
  color: #1e293b;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  width: 100%;
  margin: 0;
  font-family: ui-monospace, monospace;
}
.mfc-input-wrap input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.1);
}

.mfc-hint {
  display: flex;
  gap: 6px;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 8px;
  line-height: 1.4;
  background: #fffbeb;
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid #f59e0b;
}
.mfc-hint i { color: #f59e0b; flex-shrink: 0; margin-top: 1px; }

/* Actions */
.mfc-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}
.mfc-calc-btn {
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #059669);
}
.mfc-calc-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 8px 20px rgba(16,185,129,.35);
}
.mfc-btn-outline {
  padding: 16px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.mfc-btn-outline:hover { background: #f1f5f9; border-color: #cbd5e1; }

/* Result panel */
.mfc-result-panel {
  position: sticky;
  top: 90px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
}
.mfc-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.mfc-result-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}
.mfc-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: .2s;
  padding: 0;
}
.mfc-icon-btn:hover { background: rgba(255,255,255,.3); transform: scale(1.05); }

/* Hero */
.mfc-hero {
  padding: 28px 20px;
  text-align: center;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-bottom: 2px solid #86efac;
}
.mfc-hero-label {
  font-size: 12px;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 8px;
}
.mfc-hero-amount {
  font-size: 38px;
  font-weight: 900;
  color: #065f46;
  font-family: ui-monospace, monospace;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -1px;
}
.mfc-hero-sub {
  font-size: 12.5px;
  color: #047857;
  line-height: 1.4;
  max-width: 90%;
  margin: 0 auto;
}

/* Breakdown */
.mfc-breakdown {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mfc-breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 4px solid #3b82f6;
  transition: .2s;
}
.mfc-breakdown-item:hover { background: #f1f5f9; transform: translateX(2px); }
.mfc-breakdown-item:nth-child(2) { border-left-color: #10b981; }
.mfc-breakdown-item:nth-child(3) { border-left-color: #8b5cf6; }
.mfc-breakdown-item:nth-child(4) { border-left-color: #f59e0b; }

.mfc-breakdown-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mfc-breakdown-icon i { font-size: 18px; color: #2563eb; }
.mfc-icon-green { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.mfc-icon-green i { color: #059669; }
.mfc-icon-purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); }
.mfc-icon-purple i { color: #9333ea; }
.mfc-icon-orange { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.mfc-icon-orange i { color: #d97706; }

.mfc-breakdown-content { flex: 1; min-width: 0; }
.mfc-breakdown-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
  margin-bottom: 3px;
}
.mfc-breakdown-value {
  font-size: 17px;
  font-weight: 800;
  color: #1e293b;
  font-family: ui-monospace, monospace;
}

/* Chart */
.mfc-chart-wrap {
  padding: 18px;
  border-top: 2px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mfc-chart-wrap canvas {
  max-width: 100%;
  margin-bottom: 12px;
}
.mfc-chart-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.mfc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #475569;
}
.mfc-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mfc-legend-item b { color: #1e293b; font-weight: 700; font-family: ui-monospace, monospace; }

/* Schedule button */
.mfc-schedule-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  border: none;
  border-radius: 0 0 14px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}
.mfc-schedule-btn:hover { background: linear-gradient(135deg, #0f172a, #1e293b); }

/* Schedule section */
.mfc-schedule-section {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
  margin-bottom: 24px;
  animation: mfcSlideIn .35s ease-out;
}
@keyframes mfcSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.mfc-schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #1e293b;
  color: #fff;
  flex-wrap: wrap;
  gap: 10px;
}
.mfc-schedule-header h3 {
  font-size: 15px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.mfc-schedule-header h3 i { color: #10b981; }
.mfc-schedule-actions { display: flex; gap: 8px; }
.mfc-mini-btn {
  padding: 8px 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}
.mfc-mini-btn:hover { background: #10b981; border-color: #10b981; color: #fff; }
.mfc-mini-close:hover { background: #dc2626; border-color: #dc2626; }

.mfc-schedule-table-wrap {
  max-height: 500px;
  overflow-y: auto;
}
.mfc-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mfc-schedule-table th {
  position: sticky;
  top: 0;
  background: #334155;
  color: #fff;
  padding: 12px 14px;
  text-align: right;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 1;
}
.mfc-schedule-table th:first-child { text-align: left; }
.mfc-schedule-table td {
  padding: 10px 14px;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
  white-space: nowrap;
}
.mfc-schedule-table td:first-child {
  text-align: left;
  color: #1e293b;
  font-weight: 700;
  font-family: inherit;
}
.mfc-schedule-table tr:nth-child(even) { background: #f8fafc; }
.mfc-schedule-table tr:hover { background: #eef2ff; }
.mfc-td-value { color: #059669 !important; font-weight: 700; }
.mfc-td-returns { color: #10b981 !important; font-weight: 600; }

/* How to */
.mfc-how-to {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.mfc-how-to h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.mfc-how-to h3 i { color: #10b981; }
.mfc-how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.mfc-how-card {
  padding: 18px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  position: relative;
}
.mfc-how-num {
  position: absolute;
  top: -10px;
  left: 16px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(16,185,129,.3);
}
.mfc-how-card h4 { font-size: 14px; color: #1e293b; margin: 8px 0 6px; font-weight: 700; }
.mfc-how-card p { font-size: 13px; color: #64748b; margin: 0; line-height: 1.5; }

/* Reference */
.mfc-reference {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.mfc-reference h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.mfc-reference h3 i { color: #f59e0b; }
.mfc-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.mfc-ref-card {
  padding: 18px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  position: relative;
}
.mfc-ref-badge {
  display: inline-block;
  color: #fff;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}
.mfc-ref-card h4 { font-size: 15px; color: #1e293b; margin-bottom: 4px; font-weight: 700; }
.mfc-ref-card p { font-size: 12px; color: #64748b; margin-bottom: 10px; }
.mfc-ref-return {
  font-size: 18px;
  font-weight: 800;
  color: #10b981;
  font-family: ui-monospace, monospace;
}
.mfc-disclaimer {
  padding: 12px 16px;
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  font-size: 12.5px;
  color: #78350f;
  line-height: 1.5;
  display: flex;
  gap: 8px;
}
.mfc-disclaimer i { color: #f59e0b; flex-shrink: 0; margin-top: 2px; }
.mfc-disclaimer b { color: #92400e; }

/* Responsive */
@media (max-width: 992px) {
  .mfc-layout { grid-template-columns: 1fr; }
  .mfc-result-panel { position: static; }
}
@media (max-width: 640px) {
  .mfc-info-bar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px; }
  .mfc-info-item { font-size: 11.5px; }

  .mfc-tabs { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .mfc-tab { padding: 12px 8px; }
  .mfc-tab > i { font-size: 20px; }
  .mfc-tab > b { font-size: 12px; }
  .mfc-tab > small { display: none; }

  .mfc-actions { grid-template-columns: 1fr; }

  .mfc-hero-amount { font-size: 30px; }
  .mfc-hero { padding: 22px 16px; }
  .mfc-breakdown { padding: 14px; }
  .mfc-breakdown-value { font-size: 15px; }

  .mfc-chart-wrap { padding: 14px; }

  .mfc-schedule-header { flex-direction: column; align-items: stretch; padding: 14px; }
  .mfc-schedule-actions { width: 100%; }
  .mfc-mini-btn { flex: 1; justify-content: center; }
  .mfc-schedule-table th, .mfc-schedule-table td { padding: 8px 6px; font-size: 11px; }
}

/* =====================================================
   FD CALCULATOR
   ===================================================== */

.fdc-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.fdc-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.fdc-info-item i { color: #10b981; font-size: 16px; }

.fdc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}
.fdc-input-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fdc-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.fdc-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.fdc-card h3 i { color: #10b981; }

.fdc-field { margin-bottom: 12px; }
.fdc-field:last-child { margin-bottom: 0; }
.fdc-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  margin-top: 0;
  gap: 8px;
}
.fdc-field label > b {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #059669;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  font-family: ui-monospace, monospace;
  white-space: nowrap;
}
.fdc-slider {
  width: 100%;
  height: 8px;
  margin: 0;
  padding: 0;
  accent-color: #10b981;
  cursor: pointer;
  border-radius: 4px;
}
.fdc-range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 600;
}
.fdc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.fdc-currency {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: #10b981;
  font-weight: 700;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}
.fdc-input-wrap input {
  padding: 12px 14px 12px 40px !important;
  font-size: 15px !important;
  font-weight: 700;
  color: #1e293b;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  width: 100%;
  margin: 0;
  font-family: ui-monospace, monospace;
}
.fdc-input-wrap input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.1);
}
.fdc-hint {
  display: flex;
  gap: 6px;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 8px;
  line-height: 1.4;
  background: #eff6ff;
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
}
.fdc-hint i { color: #2563eb; flex-shrink: 0; margin-top: 1px; }

/* Depositor */
.fdc-depositor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fdc-depositor-btn {
  padding: 12px 8px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.fdc-depositor-btn > i { font-size: 22px; color: #64748b; transition: .2s; }
.fdc-depositor-btn > b { font-size: 12px; color: #1e293b; font-weight: 700; }
.fdc-depositor-btn > small { font-size: 9.5px; color: #94a3b8; font-weight: 600; }
.fdc-depositor-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.fdc-depositor-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(16,185,129,.25);
}
.fdc-depositor-btn.active > i,
.fdc-depositor-btn.active > b,
.fdc-depositor-btn.active > small { color: #fff; }

/* Presets */
.fdc-tenure-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.fdc-preset-btn {
  padding: 8px 4px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.fdc-preset-btn:hover { border-color: #cbd5e1; }
.fdc-preset-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 10px rgba(16,185,129,.25);
}

/* Compounding */
.fdc-compound-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.fdc-compound-btn {
  padding: 12px 8px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.fdc-compound-btn > b { font-size: 13px; color: #1e293b; font-weight: 700; }
.fdc-compound-btn > small { font-size: 10px; color: #94a3b8; font-weight: 500; }
.fdc-compound-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.fdc-compound-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(79,70,229,.25);
}
.fdc-compound-btn.active > b,
.fdc-compound-btn.active > small { color: #fff; }
.fdc-compound-btn.active > small { opacity: .85; }

/* Payout */
.fdc-payout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fdc-payout-btn {
  padding: 12px 8px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.fdc-payout-btn > i { font-size: 20px; color: #64748b; }
.fdc-payout-btn > b { font-size: 12px; color: #1e293b; font-weight: 700; }
.fdc-payout-btn > small { font-size: 9.5px; color: #94a3b8; font-weight: 500; }
.fdc-payout-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.fdc-payout-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(245,158,11,.25);
}
.fdc-payout-btn.active > i,
.fdc-payout-btn.active > b,
.fdc-payout-btn.active > small { color: #fff; }
.fdc-payout-btn.active > small { opacity: .9; }

/* Checkbox */
.fdc-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: .2s;
  justify-content: flex-start !important;
}
.fdc-checkbox:hover { border-color: #cbd5e1; }
.fdc-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600 !important;
}
.fdc-checkbox input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
  flex-shrink: 0;
}
.fdc-checkbox i { color: #4f46e5; }

/* Actions */
.fdc-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}
.fdc-calc-btn {
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #059669);
}
.fdc-calc-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 8px 20px rgba(16,185,129,.35);
}
.fdc-btn-outline {
  padding: 16px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.fdc-btn-outline:hover { background: #f1f5f9; border-color: #cbd5e1; }

/* Result panel */
.fdc-result-panel {
  position: sticky;
  top: 90px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
}
.fdc-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.fdc-result-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}
.fdc-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: .2s;
  padding: 0;
}
.fdc-icon-btn:hover { background: rgba(255,255,255,.3); transform: scale(1.05); }

/* Hero */
.fdc-hero {
  padding: 28px 20px;
  text-align: center;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-bottom: 2px solid #86efac;
}
.fdc-hero-label {
  font-size: 12px;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 8px;
}
.fdc-hero-amount {
  font-size: 38px;
  font-weight: 900;
  color: #065f46;
  font-family: ui-monospace, monospace;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -1px;
}
.fdc-hero-sub {
  font-size: 12.5px;
  color: #047857;
  line-height: 1.4;
  max-width: 90%;
  margin: 0 auto;
}

/* Breakdown */
.fdc-breakdown {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fdc-breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 4px solid #3b82f6;
  transition: .2s;
}
.fdc-breakdown-item:hover { background: #f1f5f9; transform: translateX(2px); }
.fdc-breakdown-item:nth-child(2) { border-left-color: #10b981; }
.fdc-breakdown-item:nth-child(3) { border-left-color: #ef4444; }
.fdc-breakdown-item:nth-child(4) { border-left-color: #8b5cf6; }
.fdc-breakdown-item:nth-child(5) { border-left-color: #f59e0b; }

.fdc-breakdown-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fdc-breakdown-icon i { font-size: 18px; color: #2563eb; }
.fdc-icon-green { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.fdc-icon-green i { color: #059669; }
.fdc-icon-red { background: linear-gradient(135deg, #fee2e2, #fecaca); }
.fdc-icon-red i { color: #dc2626; }
.fdc-icon-purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); }
.fdc-icon-purple i { color: #9333ea; }
.fdc-icon-orange { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.fdc-icon-orange i { color: #d97706; }

.fdc-breakdown-content { flex: 1; min-width: 0; }
.fdc-breakdown-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
  margin-bottom: 3px;
}
.fdc-breakdown-value {
  font-size: 17px;
  font-weight: 800;
  color: #1e293b;
  font-family: ui-monospace, monospace;
}

/* Payout info */
.fdc-payout-info {
  padding: 16px 18px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-top: 2px solid #fde68a;
}
.fdc-payout-info h4 {
  font-size: 12px;
  color: #92400e;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fdc-payout-info h4 i { color: #d97706; }
.fdc-payout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #fcd34d;
  font-size: 13.5px;
  color: #78350f;
}
.fdc-payout-row:last-child { border-bottom: none; }
.fdc-payout-row > b {
  color: #d97706;
  font-weight: 800;
  font-family: ui-monospace, monospace;
  font-size: 15px;
}

/* Chart */
.fdc-chart-wrap {
  padding: 18px;
  border-top: 2px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fdc-chart-wrap canvas {
  max-width: 100%;
  margin-bottom: 12px;
}
.fdc-chart-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.fdc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #475569;
}
.fdc-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.fdc-legend-item b { color: #1e293b; font-weight: 700; font-family: ui-monospace, monospace; }

/* Schedule button */
.fdc-schedule-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  border: none;
  border-radius: 0 0 14px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}
.fdc-schedule-btn:hover { background: linear-gradient(135deg, #0f172a, #1e293b); }

/* Schedule section */
.fdc-schedule-section {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
  margin-bottom: 24px;
  animation: fdcSlideIn .35s ease-out;
}
@keyframes fdcSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fdc-schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #1e293b;
  color: #fff;
  flex-wrap: wrap;
  gap: 10px;
}
.fdc-schedule-header h3 {
  font-size: 15px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.fdc-schedule-header h3 i { color: #10b981; }
.fdc-schedule-actions { display: flex; gap: 8px; }
.fdc-mini-btn {
  padding: 8px 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}
.fdc-mini-btn:hover { background: #10b981; border-color: #10b981; color: #fff; }
.fdc-mini-close:hover { background: #dc2626; border-color: #dc2626; }

.fdc-schedule-table-wrap {
  max-height: 500px;
  overflow-y: auto;
}
.fdc-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.fdc-schedule-table th {
  position: sticky;
  top: 0;
  background: #334155;
  color: #fff;
  padding: 12px 14px;
  text-align: right;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 1;
}
.fdc-schedule-table th:first-child { text-align: left; }
.fdc-schedule-table td {
  padding: 10px 14px;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
  white-space: nowrap;
}
.fdc-schedule-table td:first-child {
  text-align: left;
  color: #1e293b;
  font-weight: 700;
  font-family: inherit;
}
.fdc-schedule-table tr:nth-child(even) { background: #f8fafc; }
.fdc-schedule-table tr:hover { background: #eef2ff; }
.fdc-td-value { color: #059669 !important; font-weight: 700; }
.fdc-td-interest { color: #d97706 !important; font-weight: 600; }

/* Comparison table */
.fdc-comparison {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.fdc-comparison h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.fdc-comparison h3 i { color: #4f46e5; }
.fdc-bank-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  overflow-x: auto;
}
.fdc-bank-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  background: #f8fafc;
  align-items: center;
  min-width: 600px;
}
.fdc-bank-row b {
  color: #1e293b;
  font-weight: 700;
}
.fdc-bank-row span {
  color: #059669;
  font-weight: 600;
  font-family: ui-monospace, monospace;
  text-align: center;
}
.fdc-bank-head {
  background: #1e293b;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-size: 11px;
}
.fdc-bank-head span { color: #fff !important; font-weight: 700; }
.fdc-bank-head b { display: none; }
.fdc-bank-head span:first-child { text-align: left; }

.fdc-disclaimer {
  padding: 12px 16px;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  font-size: 12.5px;
  color: #1e40af;
  line-height: 1.5;
  display: flex;
  gap: 8px;
}
.fdc-disclaimer i { color: #2563eb; flex-shrink: 0; margin-top: 2px; }
.fdc-disclaimer b { color: #1e3a8a; }

/* How to */
.fdc-how-to {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.fdc-how-to h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.fdc-how-to h3 i { color: #10b981; }
.fdc-how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.fdc-how-card {
  padding: 18px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  position: relative;
}
.fdc-how-num {
  position: absolute;
  top: -10px;
  left: 16px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(16,185,129,.3);
}
.fdc-how-card h4 { font-size: 14px; color: #1e293b; margin: 8px 0 6px; font-weight: 700; }
.fdc-how-card p { font-size: 13px; color: #64748b; margin: 0; line-height: 1.5; }

/* Responsive */
@media (max-width: 992px) {
  .fdc-layout { grid-template-columns: 1fr; }
  .fdc-result-panel { position: static; }
}
@media (max-width: 640px) {
  .fdc-info-bar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px; }
  .fdc-info-item { font-size: 11.5px; }

  .fdc-depositor-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .fdc-depositor-btn { padding: 10px 4px; }
  .fdc-depositor-btn > i { font-size: 18px; }
  .fdc-depositor-btn > b { font-size: 10.5px; }
  .fdc-depositor-btn > small { font-size: 8.5px; }

  .fdc-tenure-presets { grid-template-columns: repeat(3, 1fr); }
  .fdc-compound-grid { grid-template-columns: 1fr 1fr; }
  .fdc-payout-grid { grid-template-columns: 1fr 1fr 1fr; }
  .fdc-payout-btn { padding: 10px 4px; }
  .fdc-payout-btn > i { font-size: 16px; }
  .fdc-payout-btn > b { font-size: 11px; }
  .fdc-payout-btn > small { display: none; }

  .fdc-actions { grid-template-columns: 1fr; }

  .fdc-hero-amount { font-size: 30px; }
  .fdc-hero { padding: 22px 16px; }
  .fdc-breakdown { padding: 14px; }
  .fdc-breakdown-value { font-size: 15px; }

  .fdc-chart-wrap { padding: 14px; }

  .fdc-schedule-header { flex-direction: column; align-items: stretch; padding: 14px; }
  .fdc-schedule-actions { width: 100%; }
  .fdc-mini-btn { flex: 1; justify-content: center; }
  .fdc-schedule-table th, .fdc-schedule-table td { padding: 8px 6px; font-size: 11px; }

  .fdc-bank-row { font-size: 11.5px; padding: 8px 10px; gap: 6px; }
  .fdc-how-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   YOUTUBE SEO MAKER
   ===================================================== */

.ysm-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.ysm-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.ysm-info-item i { color: #dc2626; font-size: 16px; }

.ysm-input-section { margin-bottom: 20px; }
.ysm-input-card {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.ysm-input-card h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.ysm-input-card h3 i { color: #dc2626; }

.ysm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ysm-field { margin-bottom: 14px; }
.ysm-field:last-of-type { margin-bottom: 18px; }
.ysm-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 0;
}
.ysm-req { color: #dc2626; }
.ysm-field input,
.ysm-field select,
.ysm-field textarea {
  margin: 0;
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 8px;
  width: 100%;
  font-family: inherit;
}
.ysm-field textarea { resize: vertical; }

.ysm-generate-btn {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  margin-top: 8px;
}
.ysm-generate-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  box-shadow: 0 8px 20px rgba(220,38,38,.35);
}
.ysm-generate-btn i { font-size: 18px; }

/* Loading */
.ysm-loading {
  text-align: center;
  padding: 50px 30px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.ysm-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-top-color: #dc2626;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: ysmSpin 1s linear infinite;
}
@keyframes ysmSpin { to { transform: rotate(360deg); } }
.ysm-loading p {
  color: #475569;
  font-size: 15px;
  font-weight: 500;
  margin: 0;
}

/* Results */
.ysm-results { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.ysm-result-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
  animation: ysmSlideIn .35s ease-out;
}
@keyframes ysmSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.ysm-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 10px;
}
.ysm-result-header h3 {
  font-size: 15px;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.ysm-result-header h3 i { color: #dc2626; }
.ysm-result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ysm-copy-all-btn {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}
.ysm-copy-all-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

/* Titles */
.ysm-title-list { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.ysm-title-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 4px solid #dc2626;
  transition: .2s;
}
.ysm-title-item:hover { background: #f1f5f9; transform: translateX(2px); }
.ysm-title-text {
  font-size: 14.5px;
  color: #1e293b;
  font-weight: 600;
  flex: 1;
  line-height: 1.4;
}
.ysm-title-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.ysm-char-badge {
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}
.ysm-char-badge.good { background: #d1fae5; color: #059669; }
.ysm-char-badge.warn { background: #fef3c7; color: #d97706; }
.ysm-copy-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: .2s;
  padding: 0;
}
.ysm-copy-btn:hover { background: #10b981; border-color: #10b981; color: #fff; }

.ysm-tips {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  background: #fffbeb;
  border-top: 1px solid #fde68a;
  font-size: 12.5px;
  color: #78350f;
  align-items: center;
}
.ysm-tips i { color: #f59e0b; flex-shrink: 0; }
.ysm-tips b { color: #92400e; }

/* Description */
.ysm-description {
  padding: 20px;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.8;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 500px;
  overflow-y: auto;
  background: #fff;
  font-family: inherit;
}
.ysm-desc-stats {
  display: flex;
  gap: 20px;
  padding: 10px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
}
.ysm-desc-stats i { color: #dc2626; }
.ysm-desc-stats b { color: #1e293b; font-weight: 700; }

/* Tags */
.ysm-tags {
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ysm-tag {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #b91c1c;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid #fecaca;
  transition: .2s;
}
.ysm-tag:hover { background: #dc2626; color: #fff; transform: translateY(-1px); }
.ysm-tags-stats {
  display: flex;
  gap: 20px;
  padding: 10px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
}
.ysm-tags-stats i { color: #dc2626; }
.ysm-tags-stats b { color: #1e293b; font-weight: 700; }

/* Hashtags */
.ysm-hashtags {
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ysm-hashtag {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  transition: .2s;
}
.ysm-hashtag:hover { background: #1d4ed8; color: #fff; transform: translateY(-1px); }

/* SEO Score */
.ysm-score-card { padding: 24px; }
.ysm-score-card h3 {
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.ysm-score-card h3 i { color: #dc2626; }
.ysm-score-display {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.ysm-score-circle {
  width: 120px;
  height: 120px;
  border: 8px solid #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  transition: .4s;
  flex-shrink: 0;
}
.ysm-score-value {
  font-size: 36px;
  font-weight: 900;
  font-family: ui-monospace, monospace;
  line-height: 1;
}
.ysm-score-text { flex: 1; min-width: 200px; }
.ysm-score-text h4 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 6px;
  font-weight: 700;
}
.ysm-score-text p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* How to */
.ysm-how-to {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.ysm-how-to h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.ysm-how-to h3 i { color: #dc2626; }
.ysm-steps {
  list-style: decimal;
  padding-left: 24px;
  margin: 0;
}
.ysm-steps li {
  padding: 6px 0;
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
}
.ysm-steps b { color: #1e293b; }

/* Responsive */
@media (max-width: 640px) {
  .ysm-info-bar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px; }
  .ysm-info-item { font-size: 11.5px; }
  .ysm-input-card { padding: 18px; }
  .ysm-grid-2 { grid-template-columns: 1fr; }
  .ysm-title-item { flex-direction: column; align-items: flex-start; }
  .ysm-title-meta { align-self: flex-end; }
  .ysm-score-circle { width: 100px; height: 100px; }
  .ysm-score-value { font-size: 28px; }
  .ysm-score-display { gap: 16px; }
}

/* =====================================================
   EXAM PHOTO & SIGNATURE RESIZER
   ===================================================== */

.epsr-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.epsr-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.epsr-info-item i { color: #4f46e5; font-size: 16px; }

/* Mode Tabs */
.epsr-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.epsr-tab {
  padding: 16px 14px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.epsr-tab > i { font-size: 26px; color: #64748b; transition: .25s; }
.epsr-tab > b { font-size: 14px; color: #1e293b; font-weight: 700; }
.epsr-tab > small { font-size: 11px; color: #94a3b8; font-weight: 500; }
.epsr-tab:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.epsr-tab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(79,70,229,.25);
}
.epsr-tab.active > i,
.epsr-tab.active > b,
.epsr-tab.active > small { color: #fff; }
.epsr-tab.active > small { opacity: .9; }

/* Layout */
.epsr-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}
.epsr-form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Card */
.epsr-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.epsr-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.epsr-card h3 i { color: #4f46e5; }

.epsr-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.epsr-field { margin-bottom: 12px; }
.epsr-field:last-child { margin-bottom: 0; }
.epsr-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  margin-top: 0;
}
.epsr-field label b {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}
.epsr-field input[type="number"],
.epsr-select-lg {
  margin: 0;
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 8px;
  width: 100%;
  border: 2px solid #e2e8f0;
  font-family: inherit;
}
.epsr-field input[type="number"]:focus,
.epsr-select-lg:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.epsr-select-lg {
  font-weight: 600;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 14px;
}

.epsr-slider {
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
  cursor: pointer;
}

.epsr-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: .2s;
  justify-content: flex-start !important;
}
.epsr-checkbox:hover { border-color: #cbd5e1; }
.epsr-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600 !important;
}
.epsr-checkbox input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
}
.epsr-checkbox i { color: #4f46e5; }

/* Spec box */
.epsr-spec-box {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 12px;
}
.epsr-spec-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: #047857;
  border-bottom: 1px dashed #86efac;
}
.epsr-spec-row:last-child { border-bottom: none; }
.epsr-spec-row i { color: #10b981; font-size: 14px; width: 18px; text-align: center; }
.epsr-spec-row > span { color: #065f46; font-weight: 500; }
.epsr-spec-row > b { color: #047857; font-weight: 800; margin-left: auto; font-family: ui-monospace, monospace; }

/* Upload zone */
.epsr-upload-zone {
  background: #f8fafc;
  border: 3px dashed #cbd5e1;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: .25s;
}
.epsr-upload-zone:hover,
.epsr-upload-zone.dragging {
  border-color: #4f46e5;
  background: #f8faff;
}
.epsr-upload-zone.dragging {
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(79,70,229,.15);
}
.epsr-upload-icon {
  font-size: 48px;
  color: #4f46e5;
  margin-bottom: 10px;
  transition: .25s;
}
.epsr-upload-zone:hover .epsr-upload-icon {
  transform: translateY(-4px) scale(1.05);
}
.epsr-upload-zone h4 {
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 4px;
  font-weight: 700;
}
.epsr-upload-zone p {
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 16px;
}

/* Actions */
.epsr-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.epsr-process-btn {
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.epsr-process-btn:disabled { opacity: .6; cursor: not-allowed; }
.epsr-btn-outline {
  padding: 14px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.epsr-btn-outline:hover { background: #f1f5f9; border-color: #cbd5e1; }

/* Preview panel */
.epsr-preview-panel {
  position: sticky;
  top: 90px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
}
.epsr-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
}
.epsr-preview-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.epsr-preview-label i { color: #818cf8; }
.epsr-preview-badge {
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}
.epsr-preview-wrap {
  padding: 24px 16px;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 20px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}
.epsr-canvas-container {
  position: relative;
  display: inline-block;
  line-height: 0;
  max-width: 100%;
}
#epsrCanvas {
  max-width: 100%;
  max-height: 400px;
  display: block;
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
  border-radius: 4px;
  background: #fff;
}
.epsr-preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: 4px;
  pointer-events: none;
}
.epsr-preview-placeholder i {
  font-size: 48px;
  color: #cbd5e1;
}
.epsr-preview-placeholder p {
  font-size: 13px;
  margin: 0;
  font-weight: 500;
}
.epsr-preview-info {
  padding: 14px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: #475569;
}
.epsr-preview-info b { color: #1e293b; font-weight: 700; }
.epsr-preview-info span { font-family: ui-monospace, monospace; color: #4f46e5; font-weight: 600; }

/* Tips */
.epsr-tips {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.epsr-tips h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.epsr-tips h3 i { color: #f59e0b; }
.epsr-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.epsr-tip {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 4px solid #e2e8f0;
}
.epsr-tip > i {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.epsr-tip b {
  display: block;
  font-size: 13.5px;
  color: #1e293b;
  font-weight: 700;
  margin-bottom: 4px;
}
.epsr-tip p {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 992px) {
  .epsr-layout { grid-template-columns: 1fr; }
  .epsr-preview-panel { position: static; }
}
@media (max-width: 640px) {
  .epsr-info-bar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px; }
  .epsr-info-item { font-size: 11.5px; }
  
  .epsr-tab { padding: 12px 8px; }
  .epsr-tab > i { font-size: 20px; }
  .epsr-tab > b { font-size: 12px; }
  .epsr-tab > small { display: none; }
  
  .epsr-grid-2 { grid-template-columns: 1fr; }
  .epsr-actions { grid-template-columns: 1fr; }
  
  .epsr-upload-zone { padding: 24px 16px; }
  .epsr-upload-icon { font-size: 38px; }
  
  .epsr-preview-wrap { padding: 16px 12px; min-height: 220px; }
  #epsrCanvas { max-height: 300px; }
  
  .epsr-tips { padding: 18px; }
}

/* =====================================================
   EXAM PHOTO & SIGNATURE RESIZER
   ===================================================== */

.epsr-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.epsr-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.epsr-info-item i { color: #4f46e5; font-size: 16px; }

/* Mode Tabs */
.epsr-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.epsr-tab {
  padding: 16px 14px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.epsr-tab > i { font-size: 26px; color: #64748b; transition: .25s; }
.epsr-tab > b { font-size: 14px; color: #1e293b; font-weight: 700; }
.epsr-tab > small { font-size: 11px; color: #94a3b8; font-weight: 500; }
.epsr-tab:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.epsr-tab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(79,70,229,.25);
}
.epsr-tab.active > i,
.epsr-tab.active > b,
.epsr-tab.active > small { color: #fff; }
.epsr-tab.active > small { opacity: .9; }

/* Layout */
.epsr-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}
.epsr-form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Card */
.epsr-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.epsr-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.epsr-card h3 i { color: #4f46e5; }

.epsr-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.epsr-field { margin-bottom: 12px; }
.epsr-field:last-child { margin-bottom: 0; }
.epsr-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  margin-top: 0;
}
.epsr-field label b {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}
.epsr-field input[type="number"],
.epsr-select-lg {
  margin: 0;
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 8px;
  width: 100%;
  border: 2px solid #e2e8f0;
  font-family: inherit;
}
.epsr-field input[type="number"]:focus,
.epsr-select-lg:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.epsr-select-lg {
  font-weight: 600;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 14px;
}

.epsr-slider {
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
  cursor: pointer;
}

.epsr-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: .2s;
  justify-content: flex-start !important;
}
.epsr-checkbox:hover { border-color: #cbd5e1; }
.epsr-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600 !important;
}
.epsr-checkbox input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #4f46e5;
  cursor: pointer;
}
.epsr-checkbox i { color: #4f46e5; }

/* Spec box */
.epsr-spec-box {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 12px;
}
.epsr-spec-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: #047857;
  border-bottom: 1px dashed #86efac;
}
.epsr-spec-row:last-child { border-bottom: none; }
.epsr-spec-row i { color: #10b981; font-size: 14px; width: 18px; text-align: center; }
.epsr-spec-row > span { color: #065f46; font-weight: 500; }
.epsr-spec-row > b { color: #047857; font-weight: 800; margin-left: auto; font-family: ui-monospace, monospace; }

/* Upload zone */
.epsr-upload-zone {
  background: #f8fafc;
  border: 3px dashed #cbd5e1;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: .25s;
}
.epsr-upload-zone:hover,
.epsr-upload-zone.dragging {
  border-color: #4f46e5;
  background: #f8faff;
}
.epsr-upload-zone.dragging {
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(79,70,229,.15);
}
.epsr-upload-icon {
  font-size: 48px;
  color: #4f46e5;
  margin-bottom: 10px;
  transition: .25s;
}
.epsr-upload-zone:hover .epsr-upload-icon {
  transform: translateY(-4px) scale(1.05);
}
.epsr-upload-zone h4 {
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 4px;
  font-weight: 700;
}
.epsr-upload-zone p {
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 16px;
}

/* Actions */
.epsr-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.epsr-process-btn {
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.epsr-process-btn:disabled { opacity: .6; cursor: not-allowed; }
.epsr-btn-outline {
  padding: 14px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.epsr-btn-outline:hover { background: #f1f5f9; border-color: #cbd5e1; }

/* Preview panel */
.epsr-preview-panel {
  position: sticky;
  top: 90px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
}
.epsr-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
}
.epsr-preview-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.epsr-preview-label i { color: #818cf8; }
.epsr-preview-badge {
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}
.epsr-preview-wrap {
  padding: 24px 16px;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 20px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}
.epsr-canvas-container {
  position: relative;
  display: inline-block;
  line-height: 0;
  max-width: 100%;
}
#epsrCanvas {
  max-width: 100%;
  max-height: 400px;
  display: block;
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
  border-radius: 4px;
  background: #fff;
}
.epsr-preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: 4px;
  pointer-events: none;
}
.epsr-preview-placeholder i {
  font-size: 48px;
  color: #cbd5e1;
}
.epsr-preview-placeholder p {
  font-size: 13px;
  margin: 0;
  font-weight: 500;
}
.epsr-preview-info {
  padding: 14px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: #475569;
}
.epsr-preview-info b { color: #1e293b; font-weight: 700; }
.epsr-preview-info span { font-family: ui-monospace, monospace; color: #4f46e5; font-weight: 600; }

/* Tips */
.epsr-tips {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.epsr-tips h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.epsr-tips h3 i { color: #f59e0b; }
.epsr-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.epsr-tip {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 4px solid #e2e8f0;
}
.epsr-tip > i {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.epsr-tip b {
  display: block;
  font-size: 13.5px;
  color: #1e293b;
  font-weight: 700;
  margin-bottom: 4px;
}
.epsr-tip p {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 992px) {
  .epsr-layout { grid-template-columns: 1fr; }
  .epsr-preview-panel { position: static; }
}
@media (max-width: 640px) {
  .epsr-info-bar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px; }
  .epsr-info-item { font-size: 11.5px; }
  
  .epsr-tab { padding: 12px 8px; }
  .epsr-tab > i { font-size: 20px; }
  .epsr-tab > b { font-size: 12px; }
  .epsr-tab > small { display: none; }
  
  .epsr-grid-2 { grid-template-columns: 1fr; }
  .epsr-actions { grid-template-columns: 1fr; }
  
  .epsr-upload-zone { padding: 24px 16px; }
  .epsr-upload-icon { font-size: 38px; }
  
  .epsr-preview-wrap { padding: 16px 12px; min-height: 220px; }
  #epsrCanvas { max-height: 300px; }
  
  .epsr-tips { padding: 18px; }
}

/* =====================================================
   PDF MERGE + COMPRESS
   ===================================================== */

.pm-privacy {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-left: 6px solid #10b981;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.pm-privacy > i { color: #10b981; font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.pm-privacy b { display: block; color: #065f46; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.pm-privacy p { color: #047857; font-size: 13px; margin: 0; line-height: 1.5; }

.pm-panel { display: none; }
.pm-panel.active { display: block; }

/* Upload */
.pm-upload-zone {
  background: #fff;
  border: 3px dashed #cbd5e1;
  border-radius: 16px;
  padding: 60px 30px;
  text-align: center;
  cursor: pointer;
  transition: .25s;
}
.pm-upload-zone:hover,
.pm-upload-zone.dragging {
  border-color: #dc2626;
  background: #fef2f2;
}
.pm-upload-zone.dragging {
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(220,38,38,.15);
}
.pm-upload-icon {
  font-size: 72px;
  color: #dc2626;
  margin-bottom: 16px;
  transition: .25s;
}
.pm-upload-zone:hover .pm-upload-icon { transform: translateY(-6px) scale(1.05); }
.pm-upload-zone h3 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 8px;
  font-weight: 700;
}
.pm-upload-zone p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 22px;
}
.pm-supported {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 26px;
  flex-wrap: wrap;
}
.pm-supported span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}
.pm-supported i { color: #10b981; }

/* Editor Layout */
.pm-editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

/* Files Panel */
.pm-files-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  overflow: hidden;
}
.pm-files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 10px;
}
.pm-files-header h3 {
  font-size: 15px;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.pm-files-header h3 i { color: #dc2626; }
.pm-count-badge {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.pm-files-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-mini-btn {
  padding: 7px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.pm-mini-btn:hover { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.pm-mini-danger:hover { background: #dc2626; border-color: #dc2626; }
.pm-files-hint {
  padding: 8px 18px;
  background: #fffbeb;
  color: #78350f;
  font-size: 12px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #fde68a;
}
.pm-files-hint i { color: #f59e0b; }

.pm-files-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 500px;
  overflow-y: auto;
}

.pm-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  transition: .2s;
  cursor: grab;
  animation: pmFileIn .3s ease-out;
}
@keyframes pmFileIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pm-file-item:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.pm-file-item.pm-dragging { opacity: .4; cursor: grabbing; }

.pm-file-drag {
  color: #cbd5e1;
  font-size: 18px;
  flex-shrink: 0;
  cursor: grab;
}
.pm-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pm-file-icon i { font-size: 20px; color: #dc2626; }
.pm-file-info { flex: 1; min-width: 0; }
.pm-file-info h4 {
  font-size: 13.5px;
  color: #1e293b;
  margin: 0 0 3px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-file-meta {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: #64748b;
  flex-wrap: wrap;
}
.pm-file-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pm-file-meta i { color: #94a3b8; font-size: 11px; }

.pm-file-actions { display: flex; gap: 4px; flex-shrink: 0; }
.pm-file-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: .2s;
  padding: 0;
}
.pm-file-btn:hover { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.pm-del:hover { background: #dc2626; border-color: #dc2626; }

/* Summary */
.pm-summary {
  padding: 16px 18px;
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
}
.pm-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  color: #475569;
  border-bottom: 1px dashed #e2e8f0;
}
.pm-summary-row:last-child { border-bottom: none; }
.pm-summary-row span { display: inline-flex; align-items: center; gap: 6px; }
.pm-summary-row i { color: #dc2626; font-size: 14px; }
.pm-summary-row b { color: #1e293b; font-weight: 700; font-family: ui-monospace, monospace; }

/* Settings Panel */
.pm-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 90px;
}

.pm-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.pm-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.pm-card h3 i { color: #dc2626; }
.pm-hint {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 12px;
  line-height: 1.5;
}

/* Target presets */
.pm-target-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.pm-target-btn {
  padding: 12px 6px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.pm-target-btn > b { font-size: 14px; color: #1e293b; font-weight: 800; font-family: ui-monospace, monospace; }
.pm-target-btn > small { font-size: 10px; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.pm-target-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.pm-target-btn.active {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(220,38,38,.25);
}
.pm-target-btn.active > b,
.pm-target-btn.active > small { color: #fff; }
.pm-target-btn.active > small { opacity: .85; }

.pm-custom-target {
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.pm-custom-row {
  display: flex;
  gap: 8px;
}
.pm-custom-row input {
  flex: 1;
  margin: 0;
  padding: 9px 12px;
  font-size: 14px;
  border-radius: 8px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}
.pm-custom-row select {
  width: 90px;
  margin: 0;
  padding: 9px 10px;
  font-size: 13px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.pm-target-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 2px solid #fecaca;
  border-radius: 10px;
  font-size: 13.5px;
  color: #991b1b;
  margin-top: 8px;
}
.pm-target-display span { font-weight: 500; }
.pm-target-display b {
  font-family: ui-monospace, monospace;
  font-weight: 800;
  font-size: 15px;
  color: #dc2626;
}

/* Fields */
.pm-field { margin-bottom: 12px; }
.pm-field:last-child { margin-bottom: 0; }
.pm-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  margin-top: 0;
  gap: 8px;
}
.pm-field label i { color: #dc2626; }
.pm-field label b {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #b91c1c;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}
.pm-slider {
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #dc2626;
  cursor: pointer;
}
.pm-range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
}
.pm-field select {
  margin: 0;
  padding: 10px 12px;
  font-size: 13.5px;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}

.pm-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: .2s;
  justify-content: flex-start !important;
}
.pm-checkbox:hover { border-color: #cbd5e1; }
.pm-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-color: #dc2626;
  color: #b91c1c;
  font-weight: 600 !important;
}
.pm-checkbox input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #dc2626;
  cursor: pointer;
}
.pm-checkbox i { color: #dc2626; }

/* Merge button */
.pm-action-wrap { margin-bottom: 0; }
.pm-merge-btn {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}
.pm-merge-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  box-shadow: 0 8px 20px rgba(220,38,38,.35);
}
.pm-merge-btn:disabled { opacity: .6; cursor: not-allowed; }
.pm-merge-btn i { font-size: 18px; }

/* Progress */
.pm-progress {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.pm-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13.5px;
  color: #334155;
  font-weight: 500;
}
.pm-progress-header span { display: flex; align-items: center; gap: 6px; }
.pm-progress-header i { color: #dc2626; }
.pm-progress-header b { color: #dc2626; font-size: 15px; font-weight: 700; }
.pm-progress-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}
.pm-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #dc2626, #b91c1c);
  border-radius: 6px;
  transition: width .3s;
}
.pm-progress-info {
  font-size: 11.5px;
  color: #64748b;
  text-align: center;
  font-family: ui-monospace, monospace;
}

/* Result */
.pm-result-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  text-align: center;
  border-top: 4px solid #10b981;
}
.pm-result-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #fff;
  font-size: 42px;
  box-shadow: 0 10px 30px rgba(16,185,129,.35);
}
.pm-result-card h2 {
  font-size: 22px;
  color: #1e293b;
  margin-bottom: 8px;
  font-weight: 700;
}
.pm-result-card > p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 26px;
  line-height: 1.5;
}
.pm-result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.pm-result-stat {
  padding: 14px 10px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pm-result-stat i { font-size: 20px; color: #64748b; }
.pm-result-stat b {
  font-size: 17px;
  color: #1e293b;
  font-weight: 800;
  font-family: ui-monospace, monospace;
}
.pm-result-stat small {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
}
.pm-result-stat.success { border-color: #86efac; background: #f0fdf4; }
.pm-result-stat.success i { color: #10b981; }
.pm-result-stat.success b { color: #059669; }

.pm-result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* How to */
.pm-how-to {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
  margin-top: 24px;
}
.pm-how-to h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.pm-how-to h3 i { color: #dc2626; }
.pm-how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.pm-how-card {
  padding: 18px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  position: relative;
}
.pm-how-num {
  position: absolute;
  top: -10px;
  left: 16px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(220,38,38,.3);
}
.pm-how-card h4 { font-size: 14px; color: #1e293b; margin: 8px 0 6px; font-weight: 700; }
.pm-how-card p { font-size: 13px; color: #64748b; margin: 0; line-height: 1.5; }

/* Responsive */
@media (max-width: 992px) {
  .pm-editor-layout { grid-template-columns: 1fr; }
  .pm-settings-panel { position: static; }
}
@media (max-width: 640px) {
  .pm-upload-zone { padding: 40px 20px; }
  .pm-upload-icon { font-size: 52px; }
  .pm-upload-zone h3 { font-size: 16px; }
  .pm-supported { gap: 10px; }
  
  .pm-target-presets { grid-template-columns: repeat(2, 1fr); }
  .pm-target-btn { padding: 10px 8px; }
  .pm-target-btn > b { font-size: 13px; }
  .pm-target-btn > small { font-size: 9px; }
  
  .pm-file-item { padding: 10px; gap: 8px; }
  .pm-file-icon { width: 34px; height: 34px; }
  .pm-file-icon i { font-size: 16px; }
  .pm-file-info h4 { font-size: 12.5px; }
  .pm-file-meta { font-size: 10.5px; gap: 8px; }
  .pm-file-btn { width: 26px; height: 26px; font-size: 11px; }
  
  .pm-files-header { padding: 12px; }
  .pm-files-header h3 { font-size: 13.5px; }
  .pm-mini-btn { padding: 6px 10px; font-size: 11px; }
  
  .pm-result-card { padding: 28px 18px; }
  .pm-result-icon { width: 64px; height: 64px; font-size: 32px; }
  .pm-result-card h2 { font-size: 18px; }
  .pm-result-stats { grid-template-columns: repeat(2, 1fr); }
  .pm-result-actions { flex-direction: column; }
  .pm-result-actions > button { width: 100%; justify-content: center; }
}

/* =====================================================
   PDF COMPRESSOR
   ===================================================== */

.pc-privacy {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-left: 6px solid #10b981;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.pc-privacy > i { color: #10b981; font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.pc-privacy b { display: block; color: #065f46; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.pc-privacy p { color: #047857; font-size: 13px; margin: 0; line-height: 1.5; }

.pc-panel { display: none; }
.pc-panel.active { display: block; }

/* Upload */
.pc-upload-zone {
  background: #fff;
  border: 3px dashed #cbd5e1;
  border-radius: 16px;
  padding: 60px 30px;
  text-align: center;
  cursor: pointer;
  transition: .25s;
}
.pc-upload-zone:hover,
.pc-upload-zone.dragging {
  border-color: #dc2626;
  background: #fef2f2;
}
.pc-upload-zone.dragging {
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(220,38,38,.15);
}
.pc-upload-icon {
  font-size: 72px;
  color: #dc2626;
  margin-bottom: 16px;
  transition: .25s;
}
.pc-upload-zone:hover .pc-upload-icon { transform: translateY(-6px) scale(1.05); }
.pc-upload-zone h3 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 8px;
  font-weight: 700;
}
.pc-upload-zone p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 22px;
}
.pc-supported {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 26px;
  flex-wrap: wrap;
}
.pc-supported span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}
.pc-supported i { color: #10b981; }

/* Loading */
.pc-loading {
  text-align: center;
  padding: 60px 30px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.pc-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #e2e8f0;
  border-top-color: #dc2626;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: pcSpin 1s linear infinite;
}
@keyframes pcSpin { to { transform: rotate(360deg); } }
.pc-loading h3 { font-size: 18px; color: #1e293b; margin-bottom: 8px; font-weight: 700; }
.pc-loading p { color: #64748b; font-size: 14px; margin: 0; }

/* Layout */
.pc-editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

/* Preview Panel */
.pc-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 90px;
}

.pc-file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  padding: 16px 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.pc-file-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pc-file-icon i { font-size: 26px; color: #dc2626; }
.pc-file-info { flex: 1; min-width: 0; }
.pc-file-info h4 {
  font-size: 14px;
  color: #1e293b;
  margin: 0 0 6px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-file-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748b;
}
.pc-file-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pc-file-meta i { color: #94a3b8; font-size: 12px; }
.pc-file-meta b { color: #334155; font-weight: 700; }
.pc-remove-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fee2e2;
  border: none;
  color: #dc2626;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: .2s;
  padding: 0;
}
.pc-remove-btn:hover { background: #dc2626; color: #fff; }

.pc-preview-wrap {
  position: relative;
  background: #1e293b;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  max-height: 60vh;
  overflow: auto;
  background-image: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%);
  background-size: 20px 20px;
}
#pcPreviewCanvas {
  max-width: 100%;
  max-height: 55vh;
  display: block;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  border-radius: 4px;
  background: #fff;
}
.pc-preview-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pc-preview-hint i { color: #a5b4fc; }

.pc-page-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.pc-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f1f5f9;
  border: none;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
  padding: 0;
}
.pc-nav-btn:hover:not(:disabled) { background: #4f46e5; color: #fff; }
.pc-nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.pc-page-info {
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
}
.pc-page-info b { color: #1e293b; font-weight: 800; font-family: ui-monospace, monospace; }

/* Settings Panel */
.pc-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pc-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.pc-card h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.pc-card h3 i { color: #dc2626; }
.pc-hint {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 12px;
  line-height: 1.5;
}

/* Target Presets */
.pc-target-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.pc-target-btn {
  padding: 12px 6px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.pc-target-btn > b { font-size: 14px; color: #1e293b; font-weight: 800; font-family: ui-monospace, monospace; }
.pc-target-btn > small { font-size: 10px; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.pc-target-btn:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.pc-target-btn.active {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(220,38,38,.25);
}
.pc-target-btn.active > b,
.pc-target-btn.active > small { color: #fff; }
.pc-target-btn.active > small { opacity: .85; }

.pc-custom-target {
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.pc-custom-row {
  display: flex;
  gap: 8px;
}
.pc-custom-row input {
  flex: 1;
  margin: 0;
  padding: 9px 12px;
  font-size: 14px;
  border-radius: 8px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}
.pc-custom-row select {
  width: 90px;
  margin: 0;
  padding: 9px 10px;
  font-size: 13px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.pc-target-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 2px solid #fecaca;
  border-radius: 10px;
  font-size: 13.5px;
  color: #991b1b;
  margin-top: 8px;
}
.pc-target-display span { font-weight: 500; }
.pc-target-display b {
  font-family: ui-monospace, monospace;
  font-weight: 800;
  font-size: 15px;
  color: #dc2626;
}

/* Fields */
.pc-field { margin-bottom: 12px; }
.pc-field:last-child { margin-bottom: 0; }
.pc-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  margin-top: 0;
  gap: 8px;
}
.pc-field label i { color: #dc2626; }
.pc-field label b {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #b91c1c;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}
.pc-slider {
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  accent-color: #dc2626;
  cursor: pointer;
}
.pc-range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
}
.pc-field select {
  margin: 0;
  padding: 10px 12px;
  font-size: 13.5px;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}

.pc-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: .2s;
  justify-content: flex-start !important;
}
.pc-checkbox:hover { border-color: #cbd5e1; }
.pc-checkbox:has(input:checked) {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-color: #dc2626;
  color: #b91c1c;
  font-weight: 600 !important;
}
.pc-checkbox input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #dc2626;
  cursor: pointer;
}
.pc-checkbox i { color: #dc2626; }

/* Compress Button */
.pc-action-wrap { margin-bottom: 0; }
.pc-compress-btn {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}
.pc-compress-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  box-shadow: 0 8px 20px rgba(220,38,38,.35);
}
.pc-compress-btn:disabled { opacity: .6; cursor: not-allowed; }
.pc-compress-btn i { font-size: 18px; }

/* Progress */
.pc-progress {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.pc-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13.5px;
  color: #334155;
  font-weight: 500;
}
.pc-progress-header span { display: flex; align-items: center; gap: 6px; }
.pc-progress-header i { color: #dc2626; }
.pc-progress-header b { color: #dc2626; font-size: 15px; font-weight: 700; }
.pc-progress-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}
.pc-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #dc2626, #b91c1c);
  border-radius: 6px;
  transition: width .3s;
}
.pc-progress-info {
  font-size: 11.5px;
  color: #64748b;
  text-align: center;
  font-family: ui-monospace, monospace;
}

/* Result */
.pc-result-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  text-align: center;
  border-top: 4px solid #10b981;
}
.pc-result-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #fff;
  font-size: 42px;
  box-shadow: 0 10px 30px rgba(16,185,129,.35);
  transition: .3s;
}
.pc-result-card h2 {
  font-size: 22px;
  color: #1e293b;
  margin-bottom: 8px;
  font-weight: 700;
}
.pc-result-card > p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 26px;
  line-height: 1.5;
}
.pc-result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.pc-result-stat {
  padding: 14px 10px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pc-result-stat i { font-size: 20px; color: #64748b; }
.pc-result-stat b {
  font-size: 17px;
  color: #1e293b;
  font-weight: 800;
  font-family: ui-monospace, monospace;
}
.pc-result-stat small {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 600;
}
.pc-result-stat.success { border-color: #86efac; background: #f0fdf4; }
.pc-result-stat.success i { color: #10b981; }
.pc-result-stat.success b { color: #059669; }

.pc-result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* How to */
.pc-how-to {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  margin-bottom: 20px;
  margin-top: 24px;
}
.pc-how-to h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.pc-how-to h3 i { color: #dc2626; }
.pc-how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.pc-how-card {
  padding: 18px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  position: relative;
}
.pc-how-num {
  position: absolute;
  top: -10px;
  left: 16px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(220,38,38,.3);
}
.pc-how-card h4 { font-size: 14px; color: #1e293b; margin: 8px 0 6px; font-weight: 700; }
.pc-how-card p { font-size: 13px; color: #64748b; margin: 0; line-height: 1.5; }

/* Responsive */
@media (max-width: 992px) {
  .pc-editor-layout { grid-template-columns: 1fr; }
  .pc-preview-panel { position: static; }
}
@media (max-width: 640px) {
  .pc-upload-zone { padding: 40px 20px; }
  .pc-upload-icon { font-size: 52px; }
  .pc-upload-zone h3 { font-size: 16px; }
  .pc-supported { gap: 10px; }
  
  .pc-target-presets { grid-template-columns: repeat(2, 1fr); }
  .pc-target-btn { padding: 10px 8px; }
  .pc-target-btn > b { font-size: 13px; }
  .pc-target-btn > small { font-size: 9px; }
  
  .pc-preview-wrap { min-height: 280px; padding: 12px; }
  #pcPreviewCanvas { max-height: 45vh; }
  
  .pc-file-card { padding: 12px; gap: 10px; }
  .pc-file-icon { width: 42px; height: 42px; }
  .pc-file-icon i { font-size: 22px; }
  .pc-file-info h4 { font-size: 13px; }
  .pc-file-meta { font-size: 11px; gap: 8px; }
  
  .pc-result-card { padding: 28px 18px; }
  .pc-result-icon { width: 64px; height: 64px; font-size: 32px; }
  .pc-result-card h2 { font-size: 18px; }
  .pc-result-stats { grid-template-columns: repeat(2, 1fr); }
  .pc-result-actions { flex-direction: column; }
  .pc-result-actions > button { width: 100%; justify-content: center; }
}

/* =====================================================
   LANGUAGE CONVERTER
   ===================================================== */

.lc2-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.lc2-info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}
.lc2-info-item i { color: #4f46e5; font-size: 16px; }

/* Card */
.lc2-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  padding: 24px;
  margin-bottom: 24px;
}

/* Language bar */
.lc2-lang-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
}
.lc2-lang-select { min-width: 0; }
.lc2-lang-select label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.lc2-lang-select label i { color: #4f46e5; }
.lc2-lang-select select {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  font-family: inherit;
  transition: .2s;
}
.lc2-lang-select select:focus {
  outline: none;
  border-color: #4f46e5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.lc2-swap-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .3s;
  margin-bottom: 6px;
  box-shadow: 0 6px 18px rgba(79,70,229,.3);
  padding: 0;
}
.lc2-swap-btn:hover {
  transform: rotate(180deg) scale(1.1);
  box-shadow: 0 8px 24px rgba(79,70,229,.45);
}

/* Textareas */
.lc2-textareas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.lc2-textarea-panel {
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  transition: .2s;
}
.lc2-textarea-panel:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.lc2-textarea-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.lc2-textarea-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}
.lc2-textarea-label i { color: #4f46e5; font-size: 14px; }
.lc2-textarea-actions { display: flex; gap: 4px; }
.lc2-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: .2s;
  padding: 0;
}
.lc2-icon-btn:hover {
  background: #eef2ff;
  color: #4f46e5;
}

.lc2-textarea-panel textarea {
  width: 100%;
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 16px;
  font-size: 15px;
  line-height: 1.6;
  font-family: 'Noto Sans Bengali', 'Noto Sans Devanagari', system-ui, sans-serif;
  resize: vertical;
  min-height: 180px;
  background: #f8fafc;
  color: #1e293b;
  outline: none;
}
.lc2-textarea-panel textarea:focus { outline: none; box-shadow: none; }
#lc2Output { background: #f0fdf4; color: #065f46; font-weight: 500; }

.lc2-textarea-footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  font-size: 11.5px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 10px;
}
.lc2-textarea-footer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.lc2-textarea-footer i { color: #4f46e5; }
.lc2-textarea-footer b { color: #1e293b; font-weight: 700; }

/* Action bar */
.lc2-action-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  flex-wrap: wrap;
}
.lc2-convert-btn {
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.lc2-convert-btn i { font-size: 18px; }
.lc2-btn-outline {
  padding: 14px 18px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  white-space: nowrap;
}
.lc2-btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Quick phrases */
.lc2-quick {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 20px;
}
.lc2-quick h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.lc2-quick h3 i { color: #f59e0b; }
.lc2-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lc2-quick-tag {
  padding: 8px 14px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border: 1px solid #c7d2fe;
  border-radius: 20px;
  color: #4338ca;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.lc2-quick-tag:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(79,70,229,.25);
}

/* Language cards */
.lc2-lang-cards {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 24px;
}
.lc2-lang-cards h3 {
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.lc2-lang-cards h3 i { color: #4f46e5; }
.lc2-lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.lc2-lang-card {
  padding: 14px 12px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: .2s;
}
.lc2-lang-card:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 6px 15px rgba(79,70,229,.1);
}
.lc2-lang-card b {
  display: block;
  font-size: 15px;
  color: #1e293b;
  font-weight: 700;
  margin-bottom: 2px;
}
.lc2-lang-card small {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .lc2-info-bar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px; }
  .lc2-info-item { font-size: 11.5px; }

  .lc2-card { padding: 16px; }
  .lc2-lang-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .lc2-swap-btn {
    justify-self: center;
    transform: rotate(90deg);
    margin: 0;
  }
  .lc2-swap-btn:hover { transform: rotate(270deg) scale(1.1); }

  .lc2-textareas { grid-template-columns: 1fr; }
  .lc2-textarea-panel textarea { min-height: 130px; font-size: 14px; padding: 12px; }

  .lc2-action-bar {
    grid-template-columns: 1fr;
  }
  .lc2-btn-outline { justify-content: center; }

  .lc2-quick-tag { font-size: 12px; padding: 6px 12px; }
  .lc2-lang-grid { grid-template-columns: repeat(2, 1fr); }
  .lc2-lang-card { padding: 10px 8px; }
  .lc2-lang-card b { font-size: 13.5px; }
  .lc2-lang-card small { font-size: 10px; }
}

/* =====================================================
   POST PAGE STYLES — E-Kendra
   ===================================================== */

/* ===== Breadcrumb ===== */
.post-breadcrumb {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 0;
  font-size: 13px;
}
.post-breadcrumb .container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.post-breadcrumb a {
  color: #4f46e5;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.post-breadcrumb a:hover {
  color: #4338ca;
  text-decoration: underline;
}
.post-breadcrumb i {
  font-size: 11px;
  color: #94a3b8;
}
.post-breadcrumb span {
  color: #64748b;
  font-weight: 500;
}

/* ===== Layout ===== */
.post-section-main {
  padding: 32px 0 60px;
}
.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* ===== Main Article ===== */
.post-article {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Category Badge */
.post-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef2ff;
  color: #4f46e5;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 16px;
  transition: background 0.2s;
}
.post-category-badge:hover {
  background: #e0e7ff;
}
.post-category-badge i {
  font-size: 12px;
}

/* Title */
.post-title {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin: 0 0 16px;
  word-wrap: break-word;
}

/* Meta Info */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}
.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-meta i {
  color: #4f46e5;
  font-size: 14px;
}

/* Featured Image */
.post-featured-image {
  margin: 0 0 24px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
}
.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 480px;
  object-fit: cover;
}

/* ===== Post Content ===== */
.post-content {
  font-size: 16.5px;
  line-height: 1.8;
  color: #334155;
  word-wrap: break-word;
}
.post-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}
.post-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 24px 0 12px;
}
.post-content h4 {
  font-size: 17px;
  font-weight: 600;
  color: #1e293b;
  margin: 20px 0 10px;
}
.post-content p {
  margin: 0 0 16px;
}
.post-content a {
  color: #4f46e5;
  text-decoration: none;
  border-bottom: 1px solid #c7d2fe;
  transition: all 0.2s;
}
.post-content a:hover {
  color: #4338ca;
  border-bottom-color: #4338ca;
}
.post-content ul,
.post-content ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.post-content li {
  margin-bottom: 8px;
}
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
  display: block;
}
.post-content blockquote {
  border-left: 4px solid #4f46e5;
  background: #f8fafc;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
  color: #475569;
  font-style: italic;
}
.post-content code {
  background: #f1f5f9;
  color: #dc2626;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'Courier New', monospace;
}
.post-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}
.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}
.post-content th,
.post-content td {
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  text-align: left;
}
.post-content th {
  background: #f8fafc;
  font-weight: 600;
  color: #0f172a;
}
.post-content hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 32px 0;
}

/* ===== Download Box ===== */
.post-download-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border: 2px dashed #c7d2fe;
  border-radius: 12px;
  padding: 20px;
  margin: 32px 0;
  flex-wrap: wrap;
}
.post-download-icon {
  font-size: 40px;
  color: #4f46e5;
  flex-shrink: 0;
}
.post-download-content {
  flex: 1;
  min-width: 180px;
}
.post-download-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
}
.post-download-content p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}
.post-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4f46e5;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  white-space: nowrap;
}
.post-download-btn:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

/* ===== Tags ===== */
.post-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
.post-tags > i {
  color: #64748b;
  margin-right: 4px;
}
.post-tag {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}
.post-tag:hover {
  background: #4f46e5;
  color: #fff;
}

/* ===== Share Buttons ===== */
.post-share {
  margin: 24px 0;
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
}
.post-share-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}
.post-share-label i {
  color: #4f46e5;
  margin-right: 4px;
}
.post-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}
.share-whatsapp  { background: #25d366; }
.share-facebook  { background: #1877f2; }
.share-twitter   { background: #000; }
.share-telegram  { background: #0088cc; }
.share-linkedin  { background: #0a66c2; }
.share-copy      { background: #64748b; }

/* ===== Sidebar ===== */
.post-sidebar {
  position: sticky;
  top: 20px;
}
.sidebar-widget {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.sidebar-widget h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-widget h3 i {
  color: #4f46e5;
}
.sidebar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4f46e5;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 10px;
}
.sidebar-link:hover {
  text-decoration: underline;
}

/* Related Posts (Sidebar) */
.related-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.related-post {
  display: flex;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.related-post:hover {
  background: #f8fafc;
}
.related-post-image {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related-placeholder {
  color: #94a3b8;
  font-size: 24px;
}
.related-post-body {
  flex: 1;
  min-width: 0;
}
.related-post-body h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-post:hover .related-post-body h4 {
  color: #4f46e5;
}
.related-post-body small {
  font-size: 12px;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Popular Tools */
.sidebar-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.sidebar-tool:hover {
  background: #f8fafc;
  transform: translateX(4px);
}
.sidebar-tool i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

/* ===== Related Posts Bottom ===== */
.related-bottom {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid #e2e8f0;
}
.related-bottom h3 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.related-bottom h3 i {
  color: #4f46e5;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.related-card-image {
  width: 100%;
  height: 160px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.related-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.related-card:hover .related-card-image img {
  transform: scale(1.05);
}
.related-card-image.related-placeholder {
  color: #94a3b8;
  font-size: 32px;
}
.related-card-body {
  padding: 14px;
  flex: 1;
}
.related-card-body h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card:hover .related-card-body h4 {
  color: #4f46e5;
}
.related-card-body small {
  font-size: 12.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ===== 404 Page ===== */
.post-404 {
  text-align: center;
  padding: 60px 20px;
  max-width: 500px;
  margin: 0 auto;
}
.post-404 i {
  font-size: 80px;
  color: #cbd5e1;
  display: block;
  margin-bottom: 20px;
}
.post-404 h1 {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px;
}
.post-404 p {
  font-size: 15px;
  color: #64748b;
  margin: 0 0 24px;
  line-height: 1.6;
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #4f46e5;
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #4338ca;
  transform: translateY(-3px);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .post-sidebar {
    position: static;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .post-article {
    padding: 20px 16px;
    border-radius: 8px;
  }
  .post-title {
    font-size: 24px;
  }
  .post-meta {
    gap: 12px;
    font-size: 12.5px;
  }
  .post-content {
    font-size: 15.5px;
  }
  .post-content h2 { font-size: 20px; }
  .post-content h3 { font-size: 17px; }
  .post-download-box {
    flex-direction: column;
    text-align: center;
  }
  .post-download-btn {
    width: 100%;
    justify-content: center;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .share-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 17px;
    bottom: 16px;
    right: 16px;
  }
}


/* =====================================================
   BLOG PAGE STYLES — E-Kendra
   ===================================================== */

/* ===== Page Hero ===== */
.page-hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  padding: 48px 0;
  text-align: center;
  margin-bottom: 0;
}
.page-hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
}
.page-hero h1 i {
  font-size: 28px;
}
.page-hero p {
  font-size: 15px;
  opacity: 0.95;
  margin: 0;
  color: #e0e7ff;
}
.page-hero strong {
  color: #fff;
  font-weight: 700;
}

/* ===== Blog Layout ===== */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
  margin-top: 32px;
}
.blog-main {
  min-width: 0;
}

/* ===== Active Filters Bar ===== */
.active-filters {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
}
.active-filters .chip.active {
  background: #4f46e5;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}
.active-filters .chip.active:hover {
  background: #4338ca;
}
.active-filters .chip.active i {
  font-size: 14px;
}

/* ===== Featured Post ===== */
.post-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 28px;
  border: 1px solid #e2e8f0;
}
.post-featured-image {
  display: block;
  height: 100%;
  min-height: 320px;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}
.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.post-featured:hover .post-featured-image img {
  transform: scale(1.05);
}
.post-featured-image.post-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 64px;
}
.post-featured-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
}
.post-label i {
  color: #f59e0b;
}
.category-tag {
  display: inline-block;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.category-tag:hover {
  text-decoration: underline;
}
.category-tag.small {
  font-size: 11.5px;
  margin-bottom: 6px;
}
.post-featured-body h2 {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 12px;
}
.post-featured-body h2 a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s;
}
.post-featured-body h2 a:hover {
  color: #4f46e5;
}
.post-excerpt {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 16px;
}
.post-featured-body .post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 20px;
  padding: 0;
  border: none;
}
.post-featured-body .post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.post-featured-body .post-meta i {
  color: #4f46e5;
}

/* ===== Category Chips ===== */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #475569;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.chip:hover {
  background: #e2e8f0;
  color: #1e293b;
}
.chip.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}
.chip.active:hover {
  background: #4338ca;
  color: #fff;
}
.chip-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.chip.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ===== Posts Grid ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-color: #c7d2fe;
}
.post-image {
  display: block;
  width: 100%;
  height: 180px;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}
.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card:hover .post-image img {
  transform: scale(1.06);
}
.post-image.post-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 42px;
}
.post-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-body h3 {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-body h3 a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s;
}
.post-body h3 a:hover {
  color: #4f46e5;
}
.post-excerpt-sm {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.post-body small {
  font-size: 12.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.post-body small i {
  color: #4f46e5;
}
.dot {
  color: #cbd5e1;
}

/* ===== Empty State ===== */
.empty-state {
  background: #fff;
  border: 2px dashed #e2e8f0;
  border-radius: 14px;
  padding: 60px 20px;
  text-align: center;
  margin: 24px 0;
}
.empty-state i {
  font-size: 56px;
  color: #cbd5e1;
  display: block;
  margin-bottom: 16px;
}
.empty-state p {
  font-size: 16px;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}
.empty-state a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}
.empty-state a:hover {
  text-decoration: underline;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 32px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: #f8fafc;
  color: #475569;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid #e2e8f0;
}
.page-btn:hover {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
}
.page-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.page-btn.active:hover {
  background: #4338ca;
}

/* ===== Blog Sidebar ===== */
.blog-sidebar {
  position: sticky;
  top: 20px;
}
.sidebar-widget {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}
.sidebar-widget h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-widget h3 i {
  color: #4f46e5;
}

/* Sidebar Search */
.sidebar-search input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 10px;
  transition: all 0.2s;
  font-family: inherit;
}
.sidebar-search input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Popular Posts */
.popular-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.popular-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.popular-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.popular-list a {
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
}
.popular-list a:hover {
  color: #4f46e5;
}
.popular-list small {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 400;
}
.popular-list small i {
  color: #4f46e5;
  margin-right: 3px;
}

/* Category List */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}
.category-list a:hover {
  background: #f8fafc;
  color: #4f46e5;
  transform: translateX(4px);
}
.category-list a.active {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
}
.category-list .count {
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  min-width: 26px;
  text-align: center;
}
.category-list a.active .count,
.category-list a:hover .count {
  background: #e0e7ff;
  color: #4f46e5;
}

/* Newsletter */
.sidebar-newsletter p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0 0 12px;
  line-height: 1.6;
}
.sidebar-newsletter input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
  font-family: inherit;
}
.sidebar-newsletter input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4f46e5;
  color: #fff;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  font-family: inherit;
}
.btn-primary:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .blog-sidebar {
    position: static;
  }
  .post-featured {
    grid-template-columns: 1fr;
  }
  .post-featured-image {
    min-height: 220px;
  }
  .post-featured-body {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .page-hero {
    padding: 32px 16px;
  }
  .page-hero h1 {
    font-size: 24px;
  }
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .post-featured-body {
    padding: 20px;
  }
  .post-featured-body h2 {
    font-size: 20px;
  }
  .category-chips {
    padding: 12px;
    gap: 6px;
  }
  .chip {
    padding: 6px 12px;
    font-size: 12.5px;
  }
  .page-btn {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
    padding: 0 10px;
  }
}

/* ===== Featured Post Fix ===== */
.post-featured {
  display: grid !important;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 28px;
  border: 1px solid #e2e8f0;
}
.post-featured-image {
  display: block;
  height: 100%;
  min-height: 320px;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}
.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-featured-image.post-image-placeholder {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 64px;
}
.post-featured-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.post-featured-body h2 {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 12px;
  word-wrap: break-word;
}
.post-featured-body h2 a {
  color: #0f172a;
  text-decoration: none;
}

@media (max-width: 992px) {
  .post-featured {
    grid-template-columns: 1fr;
  }
  .post-featured-image {
    min-height: 220px;
  }
}

/* =====================================================
   BLOG PAGE — Complete Stylesheet
   ===================================================== */

/* ===== Page Hero ===== */
.page-hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  padding: 40px 0;
  text-align: center;
}
.page-hero h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.page-hero h1 i {
  font-size: 26px;
}
.page-hero p {
  font-size: 15px;
  margin: 0;
  color: #e0e7ff;
}
.page-hero strong {
  color: #fff;
}

/* ===== Blog Layout ===== */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}
.blog-main {
  min-width: 0;
}

/* ===== Active Filters ===== */
.active-filters {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.active-filters > span {
  font-size: 13px;
  color: #64748b;
}
.active-filters .chip.active {
  background: #4f46e5;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.active-filters .chip.active:hover {
  background: #4338ca;
}

/* ===== Featured Post ===== */
.post-featured {
  display: grid !important;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
}
.post-featured-image {
  display: block;
  height: 100%;
  min-height: 300px;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}
.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.post-featured:hover .post-featured-image img {
  transform: scale(1.05);
}
.post-featured-image.post-image-placeholder {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 64px;
}
.post-featured-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.post-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #b45309;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
}
.post-label i {
  color: #f59e0b;
}
.post-featured-body .category-tag {
  display: inline-block;
  color: #4f46e5;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.post-featured-body .category-tag:hover {
  text-decoration: underline;
}
.post-featured-body h2 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 10px;
  word-wrap: break-word;
}
.post-featured-body h2 a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s;
}
.post-featured-body h2 a:hover {
  color: #4f46e5;
}
.post-excerpt {
  font-size: 14.5px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 14px;
}
.post-featured-body .post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: #94a3b8;
  margin-bottom: 18px;
  padding: 0;
  border: none;
}
.post-featured-body .post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.post-featured-body .post-meta i {
  color: #4f46e5;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #4f46e5;
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  font-family: inherit;
  width: fit-content;
}
.btn-primary:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  color: #fff !important;
}

/* ===== Category Chips ===== */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #475569;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.chip:hover {
  background: #e2e8f0;
  color: #1e293b;
}
.chip.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}
.chip.active:hover {
  background: #4338ca;
  color: #fff;
}
.chip-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.chip.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ===== Posts Grid ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-color: #c7d2fe;
}
.post-image {
  display: block;
  width: 100%;
  height: 170px;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}
.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card:hover .post-image img {
  transform: scale(1.06);
}
.post-image.post-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 42px;
}
.post-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-body .category-tag.small {
  font-size: 11px;
  margin-bottom: 6px;
  color: #4f46e5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  text-decoration: none;
}
.post-body h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-body h3 a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s;
}
.post-body h3 a:hover {
  color: #4f46e5;
}
.post-excerpt-sm {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.post-body small {
  font-size: 12.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.post-body small i {
  color: #4f46e5;
}
.dot {
  color: #cbd5e1;
}

/* ===== Empty State ===== */
.empty-state {
  background: #fff;
  border: 2px dashed #e2e8f0;
  border-radius: 14px;
  padding: 50px 20px;
  text-align: center;
  margin: 20px 0;
}
.empty-state i {
  font-size: 52px;
  color: #cbd5e1;
  display: block;
  margin-bottom: 14px;
}
.empty-state p {
  font-size: 15px;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}
.empty-state a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}
.empty-state a:hover {
  text-decoration: underline;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 28px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  background: #f8fafc;
  color: #475569;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid #e2e8f0;
}
.page-btn:hover {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
}
.page-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* ===== Sidebar ===== */
.blog-sidebar {
  position: sticky;
  top: 20px;
}
.sidebar-widget {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}
.sidebar-widget h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-widget h3 i {
  color: #4f46e5;
}

/* Sidebar Search */
.sidebar-search input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 10px;
  transition: all 0.2s;
  font-family: inherit;
  color: #0f172a;
}
.sidebar-search input[type="text"]:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Sidebar Ad — hide if empty */
.sidebar-ad:empty,
.sidebar-ad > *:only-child:empty {
  display: none !important;
}

/* Popular Posts */
.popular-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.popular-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.popular-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
}
.popular-list a {
  color: #334155;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  flex: 1;
  min-width: 0;
}
.popular-list a:hover {
  color: #4f46e5;
}
.popular-list small {
  display: block;
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 3px;
  font-weight: 400;
}
.popular-list small i {
  color: #4f46e5;
  margin-right: 3px;
}

/* Category List */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  color: #334155;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}
.category-list a:hover {
  background: #f8fafc;
  color: #4f46e5;
}
.category-list a.active {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
}
.category-list .count {
  background: #f1f5f9;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 24px;
  text-align: center;
}
.category-list a.active .count,
.category-list a:hover .count {
  background: #e0e7ff;
  color: #4f46e5;
}

/* Newsletter */
.sidebar-newsletter p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0 0 10px;
  line-height: 1.6;
}
.sidebar-newsletter input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
  font-family: inherit;
  color: #0f172a;
}
.sidebar-newsletter input[type="email"]:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .blog-sidebar {
    position: static;
  }
  .post-featured {
    grid-template-columns: 1fr !important;
  }
  .post-featured-image {
    min-height: 220px;
  }
  .post-featured-body {
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .page-hero {
    padding: 28px 16px;
  }
  .page-hero h1 {
    font-size: 22px;
  }
  .page-hero p {
    font-size: 13.5px;
  }
  .blog-layout {
    margin-top: 20px;
  }
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .post-featured-body {
    padding: 18px;
  }
  .post-featured-body h2 {
    font-size: 18px;
  }
  .post-excerpt {
    font-size: 13.5px;
  }
  .category-chips {
    padding: 10px 12px;
    gap: 6px;
  }
  .chip {
    padding: 6px 12px;
    font-size: 12.5px;
  }
  .page-btn {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
    padding: 0 10px;
  }
  .sidebar-widget {
    padding: 14px;
  }
}



/* Email verification */
#verifyEmailBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

#verifyEmailBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#verifyStatus {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
}

#verifyStatus i {
  margin-right: 4px;
}

/* Form row responsive */
@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr !important;
  }
  #verifyEmailBtn {
    width: 100%;
    justify-content: center;
  }
}