@font-face {
  font-family: "TAM003";
  src: url("./FamilyCardIDGenerator_V15_9_FIXED/fonts/TAM003.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
}

@font-face {
  font-family: "NotoSansTamilCard";
  src: url("./FamilyCardIDGenerator_V15_9_FIXED/fonts/NotoSansTamil-SemiCondensedBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "NotoSansTamilJathagam";
  src: url("./RAGAI_Tamil_Jathagam_V25_OFFLINE_LATHA_FIXED/RAGAI_Tamil_Jathagam_V25_OFFLINE_LATHA/assets/NotoSansTamil-Regular.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
}

:root {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --emerald: #059669;
  --emerald-hover: #047857;
  --amber: #d97706;
  --purple: #7c3aed;
  --rose: #e11d48;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --border: #cbd5e1;
  --shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg-main);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOP NAVIGATION BAR */
.portal-header {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.35);
}

.brand-title h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-title p {
  font-size: 12px;
  color: #94a3b8;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* PLAIN NUMBER WALLET PILL */
.wallet-pill {
  background: rgba(16, 185, 129, 0.16);
  border: 2px solid #10b981;
  color: #ecfdf5;
  padding: 6px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
}

.wallet-pill .wallet-number {
  font-size: 18px;
  color: #34d399;
  font-weight: 900;
}

.wallet-pill.free-unlimited {
  background: rgba(245, 158, 11, 0.2);
  border-color: #fbbf24;
  color: #fef3c7;
}

.role-badge {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-distributor {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #c4b5fd;
}

.role-retailer {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.role-admin {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.role-free {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

/* BUTTONS */
.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-success {
  background: var(--emerald);
  color: #ffffff;
}
.btn-success:hover {
  background: var(--emerald-hover);
}

.btn-amber {
  background: var(--amber);
  color: #ffffff;
}
.btn-amber:hover {
  background: #b45309;
}

.btn-purple {
  background: var(--purple);
  color: #ffffff;
}
.btn-purple:hover {
  background: #6d28d9;
}

.btn-danger {
  background: var(--rose);
  color: #ffffff;
}
.btn-danger:hover {
  background: #be123c;
}

.btn-outline {
  background: #ffffff;
  color: var(--text-dark);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn-lg {
  padding: 13px 22px;
  font-size: 15.5px;
  border-radius: 12px;
}

/* AUTHENTICATION / LANDING SCREEN */
.auth-wrapper {
  max-width: 1060px;
  margin: 28px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
  }
}

.hero-card {
  background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 10px;
}

.hero-card p.lead {
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.hero-app-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

@media (max-width: 600px) {
  .hero-app-list {
    grid-template-columns: 1fr;
  }
}

.hero-app-item {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hero-app-item:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(147, 197, 253, 0.45);
}

.hero-app-item .icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.hero-app-item h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 2px;
}

.hero-app-item span {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* AUTH FORM CARD */
.auth-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 11px 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-muted);
  border-radius: 9px;
  cursor: pointer;
}

.auth-tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-dark);
  font-family: inherit;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ROLE SELECTOR CARDS */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.role-option {
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  background: #f8fafc;
  text-align: center;
  transition: all 0.15s ease;
}

.role-option.selected {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.role-option .r-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.role-option .r-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.role-option .r-fee {
  margin-top: 6px;
  display: inline-block;
  background: #1e40af;
  color: #ffffff;
  font-weight: 800;
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: 999px;
}

/* UPI QR BOX */
.upi-payment-box {
  background: #f8fafc;
  border: 2px dashed #3b82f6;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  margin-bottom: 14px;
}

.upi-payment-box h4 {
  font-size: 14px;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 4px;
}

.upi-payment-box p {
  font-size: 12px;
  color: #475569;
  margin-bottom: 8px;
}

.qr-canvas-holder {
  background: #ffffff;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  display: inline-block;
  margin: 4px auto 8px;
}

/* MAIN DASHBOARD GRID */
.dashboard-container {
  max-width: 1260px;
  margin: 22px auto;
  padding: 0 18px 40px;
  width: 100%;
}

.welcome-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: 18px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.welcome-banner h2 {
  font-size: 21px;
  font-weight: 800;
}

.welcome-banner p {
  font-size: 13.5px;
  color: #cbd5e1;
  margin-top: 3px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

/* COMMON-LOOK FILTER & SEARCH BAR ON DASHBOARD */
.portal-filter-bar {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow);
}

.cat-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-filter-pill {
  background: #f1f5f9;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-filter-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.cat-filter-pill.active {
  background: #1e293b;
  color: #fde047;
  border-color: #0f172a;
}

.portal-search-box {
  position: relative;
  min-width: 260px;
  flex: 1;
  max-width: 340px;
}

.portal-search-box input {
  width: 100%;
  padding: 8px 14px 8px 34px;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
}

.portal-search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.portal-search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
}

.app-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1.5px solid #cbd5e1;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  min-height: 285px;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: #2563eb;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.16);
}

.app-card-visual-banner {
  position: relative;
  height: 136px;
  width: 100%;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.app-card-visual-banner svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.25s ease;
}

.app-card:hover .app-card-visual-banner svg {
  transform: scale(1.04);
}

.app-banner-overlay-tags {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  z-index: 5;
}

.app-card-body {
  padding: 14px 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.app-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.app-num-tag {
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(4px);
  color: #fde047;
  font-size: 10.5px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.app-cat-tag {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.65);
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}

.app-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.hero-app-thumb {
  width: 56px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-app-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.app-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.app-card h3 {
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.app-card p.desc {
  font-size: 13px;
  color: #475569;
  margin-top: 5px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* WORKSPACE QUICK-SWITCH APP STRIP */
.workspace-app-strip {
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  padding: 7px 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
}

.ws-app-pill {
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
}

.ws-app-pill:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

.ws-app-pill.active {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1e40af;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.click-cost-badge {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
}

.click-cost-badge.free {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

/* BUILT-IN APP WORKSPACE */
.app-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.app-subbar {
  background: #ffffff;
  border-bottom: 1.5px solid #cbd5e1;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.workspace-split {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 18px;
  padding: 18px;
  max-width: 1560px;
  margin: 0 auto;
  width: 100%;
}

.workspace-three-col {
  display: grid;
  grid-template-columns: 1fr 440px 1fr;
  gap: 16px;
  padding: 16px;
  max-width: 1680px;
  margin: 0 auto;
  width: 100%;
  align-items: start;
}

@media (max-width: 1100px) {
  .workspace-split, .workspace-three-col {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-card h3 {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.panel-card p.sub {
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 14px;
}

.preview-dark-stage {
  background: #0f172a;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  overflow: auto;
}

.preview-dark-stage canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  background: #ffffff;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 250;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 540px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.modal-box.wide {
  max-width: 1180px;
}

.role-badge,
.click-cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  line-height: 1.25;
}

.adm-user-table td {
  vertical-align: middle;
  padding: 12px 12px;
}

.adm-action-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adm-action-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.adm-action-lbl {
  font-size: 10px;
  font-weight: 900;
  color: #64748b;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  min-width: 58px;
}

.adm-plan-box {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.adm-plan-box.unlimited {
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  color: #065f46;
}

.adm-plan-box.payperuse {
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  color: #1e40af;
}

.adm-plan-box small {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
  font-size: 19px;
  font-weight: 800;
}

/* TABLES */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th, .data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.data-table th {
  background: #f8fafc;
  font-weight: 800;
  color: #334155;
  font-size: 12px;
  text-transform: uppercase;
}

/* TOAST */
.toast-msg {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #0f172a;
  color: #ffffff;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  border-left: 5px solid #10b981;
  display: none;
  z-index: 400;
}


/* ========================================================================= */
/* SMART RATION CARD — IDEA 3: EASY DIRECT CARD ADJUSTER + QUICK BUTTONS     */
/* ========================================================================= */
.easy-unlock-banner {
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.easy-unlock-banner.unlocked {
  background: #fef3c7;
  border-color: #f59e0b;
}

.easy-adjust-bar {
  background: #1e293b;
  color: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1.5px solid #38bdf8;
  display: none;
  flex-direction: column;
  gap: 8px;
}

.easy-adjust-bar.active {
  display: flex;
}

.easy-adjust-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.easy-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0f172a;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid #334155;
}

.easy-pill-group span.grp-lbl {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin-right: 3px;
}

.easy-mini-btn {
  background: #334155;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s ease;
}

.easy-mini-btn:hover {
  background: #2563eb;
  border-color: #60a5fa;
  color: #ffffff;
}

.easy-mini-btn.green {
  background: #059669;
  border-color: #10b981;
}

.easy-mini-btn.amber {
  background: #d97706;
  border-color: #f59e0b;
}

/* Quick [A-] [A+] & [Line Gap] Toolbar Right Next to Form Inputs */
.field-header-with-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
}

.field-header-with-tools label {
  margin-bottom: 0 !important;
}

.quick-field-tools {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

.q-btn {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.3;
  transition: all 0.12s ease;
}

.q-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

.q-btn.size-btn {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.q-btn.size-btn:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.q-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: #0f172a;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 5px;
}

.preview-dark-stage canvas.unlocked-canvas {
  cursor: grab;
  outline: 2px dashed #38bdf8;
  outline-offset: 3px;
}

.preview-dark-stage canvas.unlocked-canvas:active {
  cursor: grabbing;
}

/* ========================================================================= */
/* TAMIL JATHAGAM: BIRTH PLACE AUTOCOMPLETE DROPDOWN                         */
/* ========================================================================= */
.place-autocomplete-wrap {
  position: relative;
  width: 100%;
}

.place-input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.place-input-row .form-input {
  padding-right: 34px;
}

.place-dropdown-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
}

.place-dropdown-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.place-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 340px;
  max-height: 345px;
  background: #ffffff;
  border: 2px solid #f59e0b;
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
  z-index: 1200;
  overflow: hidden;
  flex-direction: column;
}

.place-dropdown-menu.open {
  display: flex;
}

.place-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  font-size: 11px;
  font-weight: 800;
  color: #92400e;
}

.place-region-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.place-region-tab {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s ease;
}

.place-region-tab:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.place-region-tab.active {
  background: #1e293b;
  color: #fde047;
  border-color: #0f172a;
}

.place-lang-pills {
  display: inline-flex;
  gap: 4px;
}

.place-lang-pill {
  background: #ffffff;
  color: #78350f;
  border: 1px solid #fcd34d;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}

.place-lang-pill.active {
  background: #d97706;
  color: #ffffff;
  border-color: #b45309;
}

.place-dropdown-list {
  overflow-y: auto;
  max-height: 245px;
  divide-y: 1px solid #f1f5f9;
}

.place-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s ease;
}

.place-dropdown-item:hover,
.place-dropdown-item.active {
  background: #fef3c7;
}

.place-item-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.place-item-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
}

.place-item-title .ta-name {
  color: #881337;
}

.place-item-sub {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.place-item-coords {
  font-size: 10.5px;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.place-dropdown-empty {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

/* ===================================================================== */
/* DIRECT NATIVE 1:1 PRINT ENGINE (Passport Photo, Smart Card, Jathagam) */
/* ===================================================================== */
#portalPrintSheetContainer {
  display: none;
}

@media print {
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body > *:not(#portalPrintSheetContainer) {
    display: none !important;
  }

  #portalPrintSheetContainer {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  #portalPrintSheetContainer .portal-print-page {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    page-break-after: always;
    break-after: page;
    page-break-inside: avoid;
    break-inside: avoid;
    overflow: hidden;
  }

  #portalPrintSheetContainer .portal-print-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  /* HARD PRINT BLOCK IN DEMO PREVIEW MODE */
  body.demo-preview-mode > * {
    display: none !important;
  }

  body.demo-preview-mode::after {
    content: "DEMO PREVIEW MODE — PRINTING IS LOCKED. PLEASE REGISTER YOUR ACCOUNT AT RAGAI PORTAL TO UNLOCK FULL HD PRINT & DOWNLOAD.";
    display: block !important;
    padding: 40mm 16mm;
    text-align: center;
    font-size: 20pt;
    font-weight: 800;
    color: #991b1b;
    font-family: Inter, Arial, sans-serif;
  }
}

/* ===================================================================== */
/* FREE LIVE DEMO PREVIEW MODE (OPTION 1A + CHOICE 2 WATERMARK ENGINE)   */
/* ===================================================================== */
.role-badge.role-demo {
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #38bdf8;
}

#demoPreviewStickyBar {
  display: none;
  background: linear-gradient(90deg, #0c4a6e, #0369a1, #1d4ed8);
  color: #ffffff;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 2px solid #38bdf8;
  position: sticky;
  top: 0;
  z-index: 140;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

body.demo-preview-mode #demoPreviewStickyBar {
  display: flex;
}

body.demo-preview-mode .preview-dark-stage,
body.demo-preview-mode .pan-demo-wm-wrap,
body.demo-preview-mode #iframeAppContainer {
  position: relative !important;
}

body.demo-preview-mode .preview-dark-stage::after,
body.demo-preview-mode .pan-demo-wm-wrap::after,
body.demo-preview-mode #iframeAppContainer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 45;
  border-radius: inherit;
  background-repeat: repeat;
  background-size: 300px 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='180' viewBox='0 0 300 180'%3E%3Cg transform='rotate(-26 150 90)'%3E%3Ctext x='150' y='72' text-anchor='middle' font-family='Arial,sans-serif' font-weight='900' font-size='22' fill='rgba(220,38,38,0.34)' stroke='rgba(255,255,255,0.45)' stroke-width='0.8'%3EDEMO PREVIEW%3C/text%3E%3Ctext x='150' y='98' text-anchor='middle' font-family='Arial,sans-serif' font-weight='800' font-size='13' fill='rgba(15,23,42,0.34)' stroke='rgba(255,255,255,0.45)' stroke-width='0.5'%3ERAGAI PORTAL • NOT FOR PRINT%3C/text%3E%3C/g%3E%3C/svg%3E");
}

body.demo-preview-mode .preview-dark-stage canvas,
body.demo-preview-mode .pan-demo-wm-wrap canvas {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}



