/* ==========================================================================
   GAUTAM RISHI PUBLIC SCHOOL - TRANSFER CERTIFICATE PORTAL STYLES
   ========================================================================== */

/* App Container Layout */
.tc-app-container {
  padding-top: calc(var(--header-height) + 20px);
  min-height: 100vh;
  background-color: var(--bg-light);
  padding-bottom: 60px;
}

/* Page Banner */
.tc-hero-banner {
  background: linear-gradient(135deg, var(--dark-navy) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 30px 0;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.tc-hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(3, 191, 203, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.tc-hero-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.tc-hero-title h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tc-hero-title p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.tc-admin-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
}

/* Auth Modal & View */
.auth-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(1, 40, 64, 0.75);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.auth-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.auth-card {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 35px;
  text-align: center;
  position: relative;
  transform: translateY(20px);
  transition: var(--transition-normal);
}

.auth-modal-backdrop.active .auth-card {
  transform: translateY(0);
}

.auth-card .school-logo-lg {
  width: 75px;
  height: auto;
  margin-bottom: 15px;
}

.auth-card h2 {
  font-family: var(--font-heading);
  color: var(--secondary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 25px;
}

.demo-credentials-box {
  background: var(--bg-light);
  border: 1px dashed var(--primary);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-main);
  text-align: left;
  margin-bottom: 20px;
}

.demo-credentials-box code {
  background: rgba(3, 191, 203, 0.15);
  color: var(--secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Dashboard Tabs & Navigation */
.tc-dashboard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 15px;
  flex-wrap: wrap;
}

.tc-tab-group {
  display: flex;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.tc-tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.tc-tab-btn.active {
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.25);
}

.tc-tab-btn:hover:not(.active) {
  background: var(--bg-light);
  color: var(--secondary);
}

/* Dashboard Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(3, 191, 203, 0.12);
  color: var(--primary-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-icon.issued {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.stat-icon.draft {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.stat-icon.verified {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}

.stat-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  font-family: var(--font-heading);
}

.stat-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Data Table & Controls */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-toolbar {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.search-box-wrap {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-box-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(3, 191, 203, 0.15);
}

.filter-select {
  padding: 10px 14px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.tc-table-wrapper {
  overflow-x: auto;
}

.tc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.tc-table th {
  background: var(--bg-light);
  color: var(--secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.tc-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.tc-table tbody tr:hover {
  background: rgba(3, 191, 203, 0.04);
}

.badge-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-status.issued {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.badge-status.draft {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.badge-form {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(13, 71, 161, 0.1);
  color: var(--secondary);
}

.action-btn-group {
  display: flex;
  gap: 6px;
}

.action-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-light);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-icon-btn:hover {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

.action-icon-btn.danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Generator Split-Screen Layout */
.tc-generator-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  align-items: start;
}

@media (max-width: 1024px) {
  .tc-generator-split {
    grid-template-columns: 1fr;
  }
}

.form-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 25px;
}

.form-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.form-panel-header h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--secondary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.template-selector-switch {
  display: flex;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.template-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.template-btn.active {
  background: var(--primary);
  color: #fff;
}

.form-section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  margin: 20px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(3, 191, 203, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

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

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 5px;
}

.form-group label .req {
  color: #dc2626;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  background: var(--bg-body);
  box-shadow: 0 0 0 3px rgba(3, 191, 203, 0.15);
}

.form-control-sm {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.auto-words-hint {
  font-size: 0.75rem;
  color: var(--primary-hover);
  margin-top: 4px;
  font-style: italic;
}

/* Preview Panel */
.preview-panel {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  background: #334155;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  max-height: calc(100vh - 120px);
}

.preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  color: #fff;
}

.preview-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-actions {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   FORM 1: CLASSIC STATE BOARD / TRADITIONAL CERTIFICATE STYLING
   ========================================================================== */
.tc-paper-container {
  background: #fff;
  color: #1e293b;
  width: 100%;
  padding: 25px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  font-family: 'Times New Roman', Times, serif;
  position: relative;
  margin: 0 auto;
}

.form1-border-wrapper {
  border: 3px double #0d47a1;
  padding: 14px;
  box-sizing: border-box;
  position: relative;
}

.form1-inner-border {
  border: 1px solid #0d47a1;
  padding: 12px;
  box-sizing: border-box;
}

.form1-header {
  text-align: center;
  border-bottom: 2px solid #0d47a1;
  padding-bottom: 8px;
  margin-bottom: 10px;
  position: relative;
}

.header-logo-container {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
}

.form1-logo,
.form2-logo {
  height: 52px;
  width: auto;
  display: block;
  margin: 0 auto 4px auto;
}

.form1-school-name {
  font-family: 'Georgia', serif;
  font-size: 21px;
  font-weight: bold;
  color: #0d47a1;
  letter-spacing: 0.5px;
  margin: 0 0 2px 0;
  text-transform: uppercase;
  text-align: center;
}

.form1-school-sub {
  font-size: 11.5px;
  color: #475569;
  margin: 0 0 4px 0;
  text-align: center;
}

.form1-cert-title {
  display: inline-block;
  background: #0d47a1;
  color: #fff;
  font-family: 'Georgia', serif;
  font-size: 13.5px;
  font-weight: bold;
  padding: 4px 16px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
}

.form1-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: bold;
  margin-bottom: 10px;
  padding: 0 4px;
  color: #0f172a;
}

.form1-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.3;
}

.form1-table td {
  padding: 3.5px 6px;
  vertical-align: middle;
}

.form1-table tr:nth-child(even) {
  background-color: #f8fafc;
}

.form1-table .col-num {
  width: 4%;
  font-weight: bold;
  text-align: center;
  color: #0d47a1;
}

.form1-table .col-label {
  width: 56%;
  color: #334155;
}

.form1-table .col-val {
  width: 40%;
  font-weight: bold;
  color: #0f172a;
  border-bottom: 1px dotted #94a3b8;
}

.form1-signatures {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 25px;
  padding: 0 10px;
  text-align: center;
}

.form1-sig-box {
  width: 30%;
}

.form1-sig-line {
  border-top: 1px solid #334155;
  margin-top: 25px;
  padding-top: 4px;
  font-size: 11px;
  font-weight: bold;
  color: #1e293b;
}

/* ==========================================================================
   FORM 2: CBSE / CENTRAL DETAILED CERTIFICATE STYLING
   ========================================================================== */
.form2-container {
  border: 2.5px solid #012840;
  padding: 16px;
  box-sizing: border-box;
}

.form2-top-header-center {
  text-align: center;
  border-bottom: 1.5px solid #012840;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.form2-top-header-center .school-name {
  font-family: 'Arial', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #012840;
  text-transform: uppercase;
  margin: 2px 0;
  text-align: center;
}

.form2-top-header-center .school-address {
  font-size: 11.5px;
  color: #334155;
  margin: 0;
  text-align: center;
}

.form2-meta-subbar {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: bold;
  color: #0f172a;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.meta-sub-left, .meta-sub-right {
  line-height: 1.4;
}

.meta-sub-right {
  text-align: right;
}

.form2-banner {
  text-align: center;
  margin: 6px 0 10px 0;
}

.form2-banner-title {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0d47a1;
  text-decoration: underline;
}

.form2-fields-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.form2-fields-list td {
  padding: 3px 6px;
  border: 1px solid #cbd5e1;
  vertical-align: middle;
}

.form2-fields-list .num-cell {
  width: 4%;
  text-align: center;
  font-weight: bold;
  background: #f1f5f9;
}

.form2-fields-list .label-cell {
  width: 54%;
  color: #334155;
}

.form2-fields-list .value-cell {
  width: 42%;
  font-weight: bold;
  color: #0284c7;
}

.form2-bottom-stamps {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 22px;
  padding: 0 10px;
}

.stamp-box {
  width: 65px;
  height: 65px;
  border: 1.5px dashed #94a3b8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #94a3b8;
  text-align: center;
  text-transform: uppercase;
}

/* Public Verification Portal View */
.verify-card {
  max-width: 650px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 30px;
  text-align: center;
}

.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Notification Toast */
.tc-toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--dark-navy);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-fast);
  pointer-events: none;
}

.tc-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.tc-toast.success i {
  color: #22c55e;
}

/* ==========================================================================
   PRINT STYLESHEET (@media print)
   Optimized strictly for SINGLE A4 SHEET FIT (No website header/footer/nav)
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 5mm 8mm;
  }

  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10pt !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* Completely hide website header, navigation bar, links, intro, footers, buttons */
  header,
  nav,
  footer,
  .main-header,
  .header-container,
  .announcement-bar,
  .nav-menu,
  .nav-item,
  .nav-link,
  .logo-link,
  .nav-actions,
  .lang-selector,
  .theme-toggle,
  .tc-hero-banner,
  .tc-dashboard-nav,
  .stats-grid,
  .table-card,
  .form-panel,
  .preview-toolbar,
  .auth-modal-backdrop,
  .tc-toast,
  .footer,
  .footer-bottom,
  .footer-col,
  button,
  select,
  input,
  .no-print {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
  }

  .tc-app-container {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
  }

  .tc-generator-split {
    display: block !important;
  }

  .preview-panel {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    max-height: none !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .tc-paper-container {
    width: 100% !important;
    box-shadow: none !important;
    padding: 5px !important;
    margin: 0 auto !important;
    max-height: 275mm !important;
    box-sizing: border-box !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    overflow: hidden !important;
  }

  .form1-border-wrapper,
  .form2-container {
    min-height: auto !important;
    box-sizing: border-box !important;
  }

  .form1-table td,
  .form2-fields-list td {
    padding: 2px 5px !important;
  }

  .form1-signatures,
  .form2-bottom-stamps {
    margin-top: 15px !important;
  }
}

