/* Student ID card maker. Complements styles.css and maram-tools-kit.css. */
.id-hero-visual { display: block; min-height: 420px; }
.id-mock { position: absolute; z-index: 1; background: #fff; border-radius: 16px; box-shadow: 0 26px 60px rgba(0,0,0,.3); overflow: hidden; }
.id-mock-a { width: 340px; height: 214px; left: 34px; top: 80px; transform: rotate(-5deg); }
.id-mock-band { height: 62px; background: #0a66c2; display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.id-mock-band i { width: 36px; height: 40px; background: #fff; clip-path: polygon(50% 0, 95% 16%, 90% 62%, 50% 100%, 10% 62%, 5% 16%); }
.id-mock-band b { color: #fff; font-size: .9rem; }
.id-mock-body { display: flex; gap: 16px; padding: 16px; }
.id-mock-ph { display: block; width: 80px; height: 96px; border-radius: 10px; background: #e7edf4 radial-gradient(circle at 50% 38%, #b8c4d2 0 18px, transparent 19px); position: relative; overflow: hidden; flex: 0 0 auto; }
.id-mock-ph::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -30px; height: 60px; border-radius: 50%; background: #b8c4d2; }
.id-mock-ph.round { width: 96px; height: 96px; border-radius: 50%; border: 5px solid #fff; margin: -48px auto 10px; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.id-mock-body b, .id-mock-b b { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 8px; }
.id-mock s { display: block; height: 8px; border-radius: 4px; background: #e2e8f0; margin-top: 8px; width: 150px; } .id-mock s.short { width: 90px; }
.id-mock-b { width: 196px; height: 300px; right: 30px; top: 60px; transform: rotate(6deg); text-align: center; padding-bottom: 16px; }
.id-mock-b s { margin: 8px auto 0; width: 130px; }
.id-mock-top { height: 110px; background: linear-gradient(135deg, #06111f, #0a66c2); }

.id-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); gap: 26px; align-items: start; }
.id-controls .mt-panel + .mt-panel { margin-top: 22px; }
.id-h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 18px; }
.id-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.id-upload { padding: 14px; border: 1px dashed #c9d6e3; border-radius: 16px; background: var(--soft); display: grid; gap: 6px; align-content: start; }
.id-upload strong { color: var(--ink); font-size: .9rem; }
.id-upload > span { font-size: .8rem; color: var(--muted); font-weight: 650; }
.id-upload > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.id-file { position: relative; overflow: hidden; }
.id-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.id-file:focus-within { box-shadow: 0 0 0 4px rgba(10,102,194,.2); }
.id-accents { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.id-accents button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.id-accents button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--c); }
.id-color { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 750; color: var(--muted); cursor: pointer; }
.id-color input { width: 38px; height: 34px; border: 1px solid var(--border); border-radius: 10px; padding: 2px; background: #fff; cursor: pointer; }
.id-templates { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.id-templates button { display: grid; justify-items: center; gap: 6px; padding: 12px 10px; border: 1px solid var(--border); border-radius: 16px; background: var(--soft); cursor: pointer; transition: all .15s ease; }
.id-templates button canvas { max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 6px 16px rgba(6,17,31,.12); }
.id-templates button.is-landscape canvas { width: 100%; } .id-templates button.is-portrait canvas { height: 118px; width: auto; }
.id-templates button span { font-weight: 800; font-size: .84rem; color: var(--ink); }
.id-templates button small { font-size: .72rem; color: var(--muted); font-weight: 700; margin-top: -4px; }
.id-templates button[aria-pressed="true"] { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(10,102,194,.18); }
.id-fields { border: 0; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.id-fields legend { font-size: .84rem; font-weight: 850; color: #334155; margin-bottom: 8px; padding: 0; }
.id-fields label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft); font-weight: 750; font-size: .86rem; cursor: pointer; }
.id-fields input { accent-color: var(--blue); width: 16px; height: 16px; }
.id-fields label:has(input:checked) { background: #fff; border-color: rgba(10,102,194,.4); color: var(--blue); }
.id-bulk { display: flex; flex-wrap: wrap; gap: 8px; }
.id-help { margin: 12px 0 14px; font-size: .84rem; }
.id-list-wrap { max-height: 300px; overflow: auto; }
.id-list { width: 100%; border-collapse: collapse; }
.id-list th, .id-list td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.id-list thead th { position: sticky; top: 0; background: var(--soft); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 850; z-index: 1; }
.id-list td { color: #334155; font-weight: 650; }
.id-list tr.is-current td { background: #f0f7ff; }
.id-pick { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; text-align: left; }
.id-pick:hover { color: var(--blue); }
.id-x { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.id-x:hover { color: #b91c1c; border-color: #fecaca; }
.id-ok { font-size: .74rem; font-weight: 850; color: #15803d; background: #dcfce7; padding: 3px 8px; border-radius: 999px; }
.id-miss { font-size: .74rem; font-weight: 800; color: #64748b; background: #f1f5f9; padding: 3px 8px; border-radius: 999px; }
.id-empty { text-align: center !important; color: var(--muted); padding: 22px !important; }
.id-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.id-form h3 { font-size: 1.05rem; margin-bottom: 14px; }
.id-form .mt-grid-2 { row-gap: 14px; }
.id-form .mt-grid-2 + .mt-grid-2 { margin-top: 16px; }
.id-stage { position: sticky; top: 140px; }
.id-stage-panel { padding: 24px; }
.id-stage-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.id-stage-head strong { color: var(--ink); } .id-stage-head span { color: var(--muted); font-weight: 750; font-size: .86rem; }
.id-preview { display: grid; place-items: center; padding: 22px; border-radius: 20px; background: repeating-linear-gradient(45deg, #eef3f8 0 12px, #f6f9fc 12px 24px); min-height: 280px; }
.id-card-canvas { display: block; border-radius: 14px; box-shadow: 0 22px 44px rgba(6,17,31,.22); background: #fff; }
.id-card-canvas.is-landscape { width: 100%; height: auto; }
.id-card-canvas.is-portrait { height: 420px; width: auto; max-width: 100%; }
.id-nav { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.id-export { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.id-export .btn-primary { width: 100%; }
.id-export-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.id-sheets { font-size: .86rem; font-weight: 750; color: var(--ink); text-align: center; }
.id-print-tip { font-size: .8rem; padding: 10px 12px; border-radius: 12px; background: #f0f7ff; color: #1e3a5f; }
.id-layout > * { min-width: 0; }
.id-help code { word-break: break-word; }
@media (max-width: 1100px) { .id-layout { grid-template-columns: minmax(0, 1fr); } .id-stage { position: static; order: -1; } }
@media (max-width: 720px) {
  .id-uploads, .id-templates { grid-template-columns: 1fr 1fr; }
  .id-card-canvas.is-portrait { height: 360px; }
  .id-preview { padding: 14px; min-height: 0; }
  .id-stage-panel { padding: 16px; }
}
