  :root {
      --bg-body: #f0f2f5;
      --panel-bg: #ffffff;
      --border-color: #e5e7eb;
      --primary-ui: #3b82f6;
      --text-main: #1f2937;

      /* Dynamic Card Variables */
      --card-primary: #1a4f9c;
      --card-secondary: #dc2626;
  }

  * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: 'Poppins', sans-serif;
  }

  body {
      background-color: var(--bg-body);
      color: var(--text-main);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
  }

  /* Top Navigation Header */
  .top-header {
      width: 100%;
      max-width: 1400px;
      padding: 15px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
  }

  .back-btn {
      text-decoration: none;
      background: #ffffff;
      color: var(--primary-ui);
      padding: 8px 16px;
      border-radius: 6px;
      font-weight: 600;
      font-size: 0.9rem;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
      border: 1px solid var(--border-color);
      transition: all 0.3s ease;
      display: inline-flex;
      align-items: center;
      gap: 8px;
  }

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

  .header-title {
      font-size: 1.2rem;
      font-weight: 700;
      color: #111827;
  }

  /* App Main Wrapper */
  .page-wrapper {
      width: 100%;
      padding: 0 20px 30px 20px;
      display: flex;
      justify-content: center;
  }

  .app-container {
      display: flex;
      height: 85vh;
      width: 100%;
      max-width: 1400px;
      background: var(--panel-bg);
      border-radius: 12px;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
      border: 1px solid var(--border-color);
      overflow: hidden;
  }

  .panel {
      padding: 20px;
      overflow-y: auto;
  }

  .left-panel {
      width: 320px;
      min-width: 320px;
      display: flex;
      flex-direction: column;
      gap: 15px;
      border-right: 1px solid var(--border-color);
  }

  .center-panel {
      flex: 1;
      background: #e2e8f0;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 30px 20px;
      position: relative;
      border-right: 1px solid var(--border-color);
  }

  /* Reduced gap slightly to make room for bottom list */
  .right-panel {
      width: 350px;
      min-width: 350px;
      background: #fafafa;
      display: flex;
      flex-direction: column;
      gap: 15px;
  }

  h2 {
      font-size: 1.1rem;
      font-weight: 600;
      margin-bottom: 10px;
      color: #111827;
      border-bottom: 2px solid var(--border-color);
      padding-bottom: 5px;
  }

  /* Form Controls */
  .form-group {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-bottom: 10px;
  }

  .form-group label {
      font-size: 0.8rem;
      font-weight: 500;
      color: #4b5563;
  }

  .form-group input[type="text"],
  .form-group select {
      padding: 8px 10px;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      font-size: 0.85rem;
      outline: none;
      transition: 0.2s;
  }

  .form-group input[type="text"]:focus,
  .form-group select:focus {
      border-color: var(--primary-ui);
      box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  }

  .file-upload {
      border: 2px dashed #cbd5e1;
      padding: 8px;
      text-align: center;
      border-radius: 6px;
      cursor: pointer;
      position: relative;
      font-size: 0.75rem;
      color: #64748b;
      background: #f8fafc;
      margin-bottom: 5px;
  }

  .file-upload input[type="file"] {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      cursor: pointer;
  }

  .checkbox-group {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 5px;
      background: #eff6ff;
      padding: 10px;
      border-radius: 6px;
      border: 1px solid #bfdbfe;
  }

  .checkbox-group input[type="checkbox"] {
      width: 16px;
      height: 16px;
      cursor: pointer;
      accent-color: var(--primary-ui);
  }

  .checkbox-group label {
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--primary-ui);
      cursor: pointer;
      margin: 0;
  }

  .btn {
      padding: 12px 20px;
      border: none;
      border-radius: 6px;
      font-weight: 600;
      cursor: pointer;
      font-size: 0.95rem;
      transition: 0.2s;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
  }

  .btn-primary {
      background: var(--primary-ui);
      color: white;
      width: 100%;
  }

  .btn-primary:hover {
      background: #2563eb;
  }

  .btn-success {
      background: #10b981;
      color: white;
      box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
      font-size: 1.05rem;
      letter-spacing: 0.5px;
  }

  .btn-success:hover {
      background: #059669;
      transform: translateY(-1px);
  }

  .print-actions {
      width: 100%;
      max-width: 450px;
      background: white;
      padding: 15px;
      border-radius: 10px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
      margin-bottom: 30px;
      display: flex;
      flex-direction: column;
      gap: 10px;
  }

  /* Template Selector - UPDATED FOR SCROLLING */
  /* Changed max-height from 250px to 180px so student list remains visible */
  .template-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      max-height: 180px;
      overflow-y: auto;
      padding-right: 5px;
      border: 1px solid #e2e8f0;
      padding: 10px;
      border-radius: 8px;
      background: #f8fafc;
  }

  /* Custom Scrollbar for Template Grid */
  .template-grid::-webkit-scrollbar {
      width: 6px;
  }

  .template-grid::-webkit-scrollbar-track {
      background: #e2e8f0;
      border-radius: 4px;
  }

  .template-grid::-webkit-scrollbar-thumb {
      background: var(--primary-ui);
      border-radius: 4px;
  }

  .template-grid::-webkit-scrollbar-thumb:hover {
      background: #2563eb;
  }

  .template-option {
      border: 2px solid #e2e8f0;
      border-radius: 6px;
      padding: 8px 5px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 0.7rem;
      font-weight: 600;
      background: #fff;
      text-align: center;
      transition: 0.2s;
      line-height: 1.2;
  }

  .template-option:hover {
      border-color: #cbd5e1;
  }

  .template-option.active {
      border-color: var(--primary-ui);
      background: #eff6ff;
      color: var(--primary-ui);
  }

  .template-badge {
      font-size: 0.6rem;
      background: #e2e8f0;
      padding: 2px 5px;
      border-radius: 4px;
      margin-bottom: 3px;
      color: #475569;
  }

  .template-option.active .template-badge {
      background: var(--primary-ui);
      color: white;
  }

  .color-picker-row {
      display: flex;
      gap: 10px;
      margin-bottom: 5px;
  }

  .color-picker-row input[type="color"] {
      border: none;
      width: 35px;
      height: 35px;
      border-radius: 6px;
      cursor: pointer;
      padding: 0;
  }

  /* Custom Scrollbar for Student List */
  .student-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 8px;
      flex: 1;
      overflow-y: auto;
      padding-right: 5px;
  }

  .student-list::-webkit-scrollbar {
      width: 6px;
  }

  .student-list::-webkit-scrollbar-track {
      background: #e2e8f0;
      border-radius: 4px;
  }

  .student-list::-webkit-scrollbar-thumb {
      background: #94a3b8;
      border-radius: 4px;
  }

  .student-item {
      padding: 10px;
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 6px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.85rem;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }

  .remove-btn {
      color: #ef4444;
      cursor: pointer;
      font-weight: bold;
      background: #fee2e2;
      border: none;
      width: 24px;
      height: 24px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  .remove-btn:hover {
      background: #fca5a5;
  }

  /* INFO SECTIONS */
  .info-section {
      width: 100%;
      max-width: 1400px;
      background: white;
      padding: 40px;
      border-radius: 12px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
      margin-bottom: 30px;
  }

  .info-section h3 {
      font-size: 1.5rem;
      color: #1e293b;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 10px;
  }

  .steps-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 20px;
  }

  .step-card {
      background: #f8fafc;
      padding: 20px;
      border-radius: 8px;
      border: 1px solid #e2e8f0;
  }

  .step-num {
      display: inline-block;
      width: 30px;
      height: 30px;
      background: var(--primary-ui);
      color: white;
      text-align: center;
      line-height: 30px;
      border-radius: 50%;
      font-weight: bold;
      margin-bottom: 10px;
  }

  .faq-item {
      margin-bottom: 15px;
      border-bottom: 1px solid #e2e8f0;
      padding-bottom: 15px;
  }

  .faq-q {
      font-weight: 700;
      color: #334155;
      margin-bottom: 5px;
  }

  .faq-a {
      color: #64748b;
      font-size: 0.95rem;
      line-height: 1.5;
  }

  .site-footer {
      text-align: center;
      padding: 20px;
      color: #64748b;
      font-size: 0.9rem;
      margin-top: auto;
      width: 100%;
      border-top: 1px solid var(--border-color);
      background: #fff;
  }

  /* ========================================================
           ID CARD STYLES & TEMPLATES 
           ======================================================== */
  .preview-wrapper {
      box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
      border-radius: 10px;
      background: transparent;
      overflow: hidden;
      margin: auto;
      transition: 0.3s;
  }

  .id-card {
      position: relative;
      background: #fff;
      overflow: hidden;
      box-sizing: border-box;
      font-family: 'Poppins', sans-serif;
      color: #000;
  }

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

  .photo-frame {
      object-fit: cover;
      object-position: top center;
      background: #e2e8f0;
      transition: 0.2s all;
  }

  .logo-frame {
      object-fit: contain;
  }

  .sign-frame {
      object-fit: contain;
      max-height: 25px;
      max-width: 70px;
      background: transparent;
  }

  .custom-border {
      border: 3px solid var(--card-primary) !important;
      padding: 2px;
      background: #fff !important;
      border-radius: 6px !important;
  }

  /* BASE SIZES */
  .vert-card {
      width: 230px;
      height: 350px;
      border: 1px solid #ccc;
      display: flex;
      flex-direction: column;
      position: relative;
  }

  .horiz-card {
      width: 400px;
      height: 240px;
      border: 1px solid #ccc;
      display: flex;
      flex-direction: column;
      position: relative;
  }

  /* --- VERTICAL TEMPLATES --- */
  /* T1: Classic */
  .t1-vert .header {
      background: var(--card-primary);
      color: white;
      text-align: center;
      padding: 12px 5px;
      min-height: 60px;
      display: flex;
      flex-direction: column;
      justify-content: center;
  }

  .t1-vert .school-name {
      font-size: 14px;
      font-weight: 800;
      text-transform: uppercase;
      line-height: 1.1;
  }

  .t1-vert .body {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 10px;
  }

  .t1-vert .photo {
      width: 75px;
      height: 95px;
      border-radius: 4px;
      margin-bottom: 5px;
  }

  .t1-vert .student-name {
      font-size: 14px;
      font-weight: 700;
      margin-bottom: 5px;
  }

  .t1-vert .details-table {
      width: 100%;
      font-size: 9px;
      line-height: 1.4;
  }

  .t1-vert .details-table tr td:first-child {
      font-weight: 600;
      color: var(--card-secondary);
      width: 40%;
  }

  .t1-vert .sign-area {
      position: absolute;
      bottom: 25px;
      right: 10px;
      text-align: center;
  }

  .t1-vert .footer {
      background: var(--card-secondary);
      color: white;
      text-align: center;
      padding: 6px;
      font-size: 11px;
      font-weight: 600;
      display: flex;
      justify-content: center;
      align-items: center;
      position: absolute;
      bottom: 0;
      width: 100%;
  }

  /* T2: Wave */
  .t2-vert .header-bg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 110px;
      background: var(--card-primary);
      border-bottom-left-radius: 50% 20px;
      border-bottom-right-radius: 50% 20px;
      z-index: 0;
  }

  .t2-vert .content {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      height: 100%;
      padding: 10px;
  }

  .t2-vert .header-text {
      display: flex;
      align-items: center;
      gap: 5px;
      width: 100%;
      justify-content: center;
      margin-bottom: 15px;
  }

  .t2-vert .logo {
      width: 25px;
      height: 25px;
      background: white;
      border-radius: 50%;
      padding: 2px;
  }

  .t2-vert .school-name {
      color: white;
      font-size: 12px;
      font-weight: 700;
      text-align: center;
      line-height: 1.1;
      text-transform: uppercase;
  }

  .t2-vert .photo {
      width: 70px;
      height: 85px;
      border-radius: 6px;
      margin-bottom: 8px;
  }

  .t2-vert .student-name {
      font-size: 15px;
      font-weight: 800;
      color: var(--card-secondary);
      text-transform: uppercase;
      margin-bottom: 5px;
  }

  .t2-vert .details {
      width: 100%;
      font-size: 8.5px;
      padding: 0 5px;
  }

  .t2-vert .details div {
      display: flex;
      margin-bottom: 3px;
  }

  .t2-vert .details div span:first-child {
      font-weight: 700;
      color: var(--card-primary);
      width: 35%;
  }

  .t2-vert .footer {
      margin-top: auto;
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      font-size: 8px;
      padding-top: 5px;
      border-top: 1px solid #eee;
  }

  /* T5: Split Modern */
  .t5-vert .top-half {
      background: var(--card-primary);
      height: 140px;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 10px;
      color: white;
  }

  .t5-vert .school-name {
      font-size: 12px;
      font-weight: 700;
      text-align: center;
      margin-top: 5px;
  }

  .t5-vert .photo {
      width: 80px;
      height: 100px;
      border-radius: 50%;
      border: 4px solid white;
      position: absolute;
      top: 90px;
      left: 50%;
      transform: translateX(-50%);
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }

  .t5-vert .bottom-half {
      margin-top: 60px;
      padding: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
  }

  .t5-vert .student-name {
      font-size: 16px;
      font-weight: 800;
      color: var(--card-secondary);
  }

  .t5-vert .details {
      font-size: 9px;
      width: 100%;
      margin-top: 10px;
      text-align: center;
  }

  .t5-vert .footer {
      position: absolute;
      bottom: 0;
      width: 100%;
      height: 30px;
      background: var(--card-secondary);
      display: flex;
      justify-content: space-between;
      padding: 0 10px;
      align-items: center;
      color: white;
      font-size: 8px;
  }

  /* T6: Minimalist Left Border */
  .t6-vert {
      border-left: 8px solid var(--card-primary);
      padding: 15px;
  }

  .t6-vert .header {
      display: flex;
      align-items: center;
      gap: 8px;
      border-bottom: 1px solid #eee;
      padding-bottom: 10px;
      margin-bottom: 10px;
  }

  .t6-vert .logo {
      width: 30px;
      height: 30px;
  }

  .t6-vert .school-name {
      font-size: 11px;
      font-weight: 800;
      color: var(--card-primary);
  }

  .t6-vert .main-content {
      display: flex;
      gap: 10px;
  }

  .t6-vert .photo {
      width: 70px;
      height: 90px;
      border-radius: 4px;
  }

  .t6-vert .info {
      flex: 1;
  }

  .t6-vert .student-name {
      font-size: 14px;
      font-weight: 700;
      margin-bottom: 5px;
      color: var(--card-secondary);
  }

  .t6-vert .details-table {
      font-size: 8.5px;
      line-height: 1.5;
  }

  .t6-vert .details-table td:first-child {
      font-weight: 600;
  }

  .t6-vert .bottom {
      position: absolute;
      bottom: 15px;
      right: 15px;
      text-align: right;
      font-size: 8px;
  }

  /* T7: Dark Solid */
  .t7-vert {
      background: var(--card-primary);
      color: white;
      padding: 10px;
  }

  .t7-vert .inner {
      border: 1px solid rgba(255, 255, 255, 0.3);
      height: 100%;
      padding: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
  }

  .t7-vert .school-name {
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 10px;
      letter-spacing: 0.5px;
  }

  .t7-vert .photo {
      width: 80px;
      height: 100px;
      border: 2px solid white;
      margin-bottom: 10px;
  }

  .t7-vert .student-name {
      font-size: 15px;
      font-weight: 800;
      background: var(--card-secondary);
      padding: 2px 10px;
      border-radius: 10px;
      margin-bottom: 10px;
  }

  .t7-vert .details {
      font-size: 9px;
      line-height: 1.6;
  }

  .t7-vert .sign-area {
      margin-top: auto;
      border-top: 1px dashed rgba(255, 255, 255, 0.4);
      padding-top: 5px;
      width: 100%;
  }

  /* T8: Gradient Premium */
  .t8-vert {
      background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  }

  .t8-vert .header {
      background: transparent;
      padding: 10px;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      border-bottom: 2px solid var(--card-primary);
  }

  .t8-vert .school-name {
      font-size: 12px;
      font-weight: 800;
      color: var(--card-primary);
      text-align: center;
  }

  .t8-vert .body {
      padding: 15px 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
  }

  .t8-vert .photo {
      width: 75px;
      height: 95px;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      margin-bottom: 10px;
  }

  .t8-vert .details-card {
      background: white;
      border-radius: 8px;
      padding: 10px;
      width: 100%;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
      font-size: 9px;
      line-height: 1.5;
      border-left: 3px solid var(--card-secondary);
  }

  .t8-vert .student-name {
      font-size: 13px;
      font-weight: 700;
      color: #000;
      border-bottom: 1px solid #eee;
      padding-bottom: 3px;
      margin-bottom: 3px;
  }

  /* T9: ID Badge Clean */
  .t9-vert .top-bar {
      height: 8px;
      background: var(--card-secondary);
      width: 100%;
  }

  .t9-vert .header {
      padding: 10px;
      display: flex;
      align-items: center;
      gap: 10px;
  }

  .t9-vert .logo {
      width: 35px;
      height: 35px;
  }

  .t9-vert .school-name {
      font-size: 11px;
      font-weight: 700;
      line-height: 1.2;
      color: var(--card-primary);
  }

  .t9-vert .id-title {
      text-align: center;
      font-size: 10px;
      font-weight: bold;
      background: #eee;
      padding: 3px;
      margin: 5px 15px;
      border-radius: 4px;
      letter-spacing: 1px;
  }

  .t9-vert .photo-sec {
      display: flex;
      justify-content: center;
      margin: 10px 0;
  }

  .t9-vert .photo {
      width: 85px;
      height: 105px;
      border-radius: 6px;
  }

  .t9-vert .details {
      font-size: 9px;
      padding: 0 15px;
  }

  .t9-vert .details span {
      display: block;
      margin-bottom: 3px;
  }

  .t9-vert .footer {
      position: absolute;
      bottom: 0;
      width: 100%;
      background: var(--card-primary);
      color: white;
      text-align: center;
      font-size: 8px;
      padding: 5px;
  }

  /* --- HORIZONTAL TEMPLATES --- */
  /* T3: Bordered */
  .t3-horiz {
      border: 5px solid var(--card-secondary);
      border-radius: 12px;
      background: white;
  }

  .t3-horiz .header {
      background: var(--card-secondary);
      color: white;
      padding: 8px 15px;
      display: flex;
      align-items: center;
      gap: 10px;
  }

  .t3-horiz .logo {
      width: 35px;
      height: 35px;
      background: white;
      border-radius: 50%;
      padding: 2px;
  }

  .t3-horiz .school-name {
      font-size: 18px;
      font-weight: 800;
      letter-spacing: 1px;
  }

  .t3-horiz .body {
      flex: 1;
      display: flex;
      padding: 15px;
      gap: 15px;
  }

  .t3-horiz .left-col {
      width: 90px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
  }

  .t3-horiz .photo {
      width: 85px;
      height: 105px;
      border-radius: 4px;
  }

  .t3-horiz .roll {
      font-size: 9px;
      font-weight: bold;
      background: #eee;
      padding: 2px 5px;
      border-radius: 4px;
  }

  .t3-horiz .right-col {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
  }

  .t3-horiz .details-table {
      width: 100%;
      font-size: 10px;
      line-height: 1.5;
  }

  .t3-horiz .details-table td:first-child {
      font-weight: 700;
      color: var(--card-secondary);
      width: 35%;
  }

  .t3-horiz .footer {
      background: var(--card-secondary);
      color: white;
      text-align: center;
      font-size: 9px;
      padding: 4px;
      border-bottom-left-radius: 6px;
      border-bottom-right-radius: 6px;
  }

  .t3-horiz .sign-area {
      position: absolute;
      bottom: 20px;
      right: 15px;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
  }

  /* T4: Ribbon */
  .t4-horiz {
      border-radius: 10px;
      background: linear-gradient(to bottom, #ffffff 0%, #f1f5f9 100%);
  }

  .t4-horiz .header {
      display: flex;
      align-items: center;
      padding: 10px 15px;
      gap: 10px;
  }

  .t4-horiz .logo {
      width: 30px;
      height: 30px;
  }

  .t4-horiz .school-name {
      font-size: 18px;
      font-weight: 800;
      color: var(--card-secondary);
      text-transform: uppercase;
  }

  .t4-horiz .name-ribbon {
      background: var(--card-primary);
      color: white;
      text-align: right;
      padding: 5px 20px;
      font-size: 16px;
      font-weight: 700;
      width: 80%;
      align-self: flex-end;
      border-top-left-radius: 20px;
      border-bottom-left-radius: 20px;
      margin-bottom: 10px;
  }

  .t4-horiz .body {
      display: flex;
      padding: 0 15px 10px 15px;
      gap: 20px;
      flex: 1;
  }

  .t4-horiz .photo {
      width: 90px;
      height: 110px;
      border-radius: 8px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .t4-horiz .details {
      flex: 1;
      font-size: 10px;
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 4px;
      align-content: start;
  }

  .t4-horiz .details span:nth-child(odd) {
      font-weight: 600;
  }

  .t4-horiz .footer-graphic {
      position: absolute;
      bottom: 0;
      right: 0;
      background: var(--card-secondary);
      color: white;
      padding: 5px 15px;
      border-top-left-radius: 20px;
      font-size: 10px;
      font-style: italic;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 100px;
      height: 30px;
  }

  /* T10: Sidebar Left */
  .t10-horiz {
      flex-direction: row;
  }

  .t10-horiz .sidebar {
      width: 30%;
      background: var(--card-primary);
      padding: 15px 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      color: white;
  }

  .t10-horiz .photo {
      width: 80px;
      height: 100px;
      border: 3px solid white;
      border-radius: 6px;
      margin-bottom: 10px;
  }

  .t10-horiz .roll-bg {
      background: var(--card-secondary);
      padding: 2px 8px;
      border-radius: 12px;
      font-size: 9px;
      font-weight: bold;
  }

  .t10-horiz .main-area {
      width: 70%;
      padding: 15px;
      display: flex;
      flex-direction: column;
  }

  .t10-horiz .school-name {
      font-size: 15px;
      font-weight: 800;
      color: var(--card-primary);
      border-bottom: 2px solid var(--card-secondary);
      padding-bottom: 5px;
      margin-bottom: 10px;
  }

  .t10-horiz .student-name {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 5px;
  }

  .t10-horiz .details {
      font-size: 9.5px;
      line-height: 1.6;
  }

  .t10-horiz .details span {
      font-weight: 600;
      color: #555;
  }

  .t10-horiz .sign-area {
      align-self: flex-end;
      margin-top: auto;
      text-align: center;
  }

  /* T11: Right Photo Clean */
  .t11-horiz .top-accent {
      height: 6px;
      width: 100%;
      background: var(--card-primary);
  }

  .t11-horiz .header {
      padding: 10px 15px;
      display: flex;
      align-items: center;
      gap: 10px;
  }

  .t11-horiz .school-name {
      font-size: 16px;
      font-weight: 800;
      color: var(--text-main);
  }

  .t11-horiz .content-wrap {
      display: flex;
      padding: 0 15px;
      gap: 15px;
  }

  .t11-horiz .info-sec {
      flex: 1;
  }

  .t11-horiz .student-name {
      font-size: 18px;
      font-weight: 700;
      color: var(--card-secondary);
      margin-bottom: 8px;
  }

  .t11-horiz .details-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 5px;
      font-size: 9px;
  }

  .t11-horiz .photo-sec {
      width: 90px;
  }

  .t11-horiz .photo {
      width: 100%;
      height: 110px;
      border-radius: 4px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .t11-horiz .footer {
      position: absolute;
      bottom: 0;
      width: 100%;
      padding: 6px 15px;
      background: #f8fafc;
      border-top: 1px solid #eee;
      font-size: 9px;
      display: flex;
      justify-content: space-between;
      align-items: center;
  }

  /* T12: Corporate Wireframe */
  .t12-horiz {
      padding: 10px;
      background: white;
  }

  .t12-horiz .inner-border {
      border: 1px solid var(--card-primary);
      height: 100%;
      display: flex;
      flex-direction: column;
      padding: 10px;
  }

  .t12-horiz .header {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
      border-bottom: 1px solid #ddd;
      padding-bottom: 8px;
      margin-bottom: 10px;
  }

  .t12-horiz .school-name {
      font-size: 16px;
      font-weight: 700;
      letter-spacing: 0.5px;
  }

  .t12-horiz .body-area {
      display: flex;
      gap: 15px;
  }

  .t12-horiz .photo {
      width: 80px;
      height: 100px;
      border: 1px solid #ccc;
      padding: 2px;
  }

  .t12-horiz .details table {
      font-size: 9px;
      line-height: 1.5;
  }

  .t12-horiz .details td:first-child {
      font-weight: 600;
      padding-right: 10px;
  }

  /* T13: Modern Wave Bottom */
  .t13-horiz .header {
      background: var(--card-primary);
      padding: 15px;
      color: white;
      display: flex;
      align-items: center;
      gap: 10px;
      clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
      height: 80px;
  }

  .t13-horiz .school-name {
      font-size: 16px;
      font-weight: bold;
  }

  .t13-horiz .body {
      padding: 0 15px;
      display: flex;
      gap: 15px;
      margin-top: -10px;
  }

  .t13-horiz .photo {
      width: 85px;
      height: 105px;
      border-radius: 8px;
      border: 3px solid white;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      background: white;
  }

  .t13-horiz .info-list {
      font-size: 9.5px;
      padding-top: 15px;
  }

  .t13-horiz .student-name {
      font-size: 15px;
      font-weight: 800;
      color: var(--card-secondary);
      margin-bottom: 5px;
  }

  .t13-horiz .bottom-bar {
      position: absolute;
      bottom: 0;
      right: 0;
      background: var(--card-secondary);
      color: white;
      padding: 4px 15px;
      border-top-left-radius: 10px;
      font-size: 9px;
  }

  /* T14: Center Profile Focus */
  .t14-horiz {
      background: #f8fafc;
      border-top: 5px solid var(--card-secondary);
  }

  .t14-horiz .top-row {
      display: flex;
      justify-content: space-between;
      padding: 10px 15px;
  }

  .t14-horiz .logo {
      width: 40px;
      height: 40px;
  }

  .t14-horiz .school-name {
      font-size: 14px;
      font-weight: 800;
      text-align: right;
      width: 60%;
      color: var(--card-primary);
  }

  .t14-horiz .mid-row {
      display: flex;
      padding: 0 15px;
      align-items: center;
      gap: 15px;
  }

  .t14-horiz .photo {
      width: 75px;
      height: 95px;
      border-radius: 50%;
      object-fit: cover;
      border: 3px solid var(--card-primary);
  }

  .t14-horiz .details-wrap {
      background: white;
      padding: 10px;
      border-radius: 8px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
      flex: 1;
      font-size: 9px;
  }

  .t14-horiz .student-name {
      font-size: 14px;
      font-weight: bold;
      margin-bottom: 5px;
      border-bottom: 1px solid #eee;
      padding-bottom: 4px;
  }

  /* ========================================================
           PRINT SYSTEM CSS
           ======================================================== */
  #print-container {
      display: none;
  }

  @media print {
      @page {
          size: A4;
          margin: 10mm;
      }

      body {
          background: white;
          height: auto;
          overflow: visible;
          display: block;
          -webkit-print-color-adjust: exact;
          print-color-adjust: exact;
      }

      .top-header,
      .page-wrapper,
      .info-section,
      .site-footer {
          display: none !important;
      }

      #print-container {
          display: grid;
          gap: 15px;
          width: 100%;
          justify-content: center;
          align-content: start;
      }

      .print-grid-2x4 {
          grid-template-columns: repeat(2, auto);
      }

      .print-grid-3x3 {
          grid-template-columns: repeat(3, auto);
      }

      .vert-card,
      .horiz-card {
          break-inside: avoid;
          page-break-inside: avoid;
          box-shadow: none;
          margin: 0;
          zoom: 0.88;
      }

      .vert-card {
          width: 230px;
          height: 350px;
      }

      .horiz-card {
          width: 400px;
          height: 240px;
      }

      .t3-horiz {
          border: 5px solid var(--card-secondary);
      }
  }