/*
* demo.css
* File include item demo only specific css only
******************************************************************************/
@import url("https://fonts.googleapis.com/css?family=Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i");

:root{
  --primary:#d11d24;      /* red */
  --secondary:#25499f;    /* blue */
  --hover:rgba(37,73,159,.07); /* row hover tint */
}

.menu .app-brand.demo {
  height: 64px;
  margin-top: 12px;
}

.app-brand-logo.demo svg {
  width: 22px;
  height: 38px;
}

.app-brand-text.demo {
  font-size: 1.75rem;
  letter-spacing: -0.5px;
  text-transform: lowercase;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
/* Detached navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 76px !important;
}
/* Default navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}
.myTable {
  display: none;
  width: 100%; /* Pastikan tetap responsif */
}
.toast-container{
  z-index:2000;
}
table.dataTable td {
  white-space: normal; /* Mengizinkan teks turun ke bawah */
  word-wrap: break-word; /* Memastikan kata-kata panjang turun ke bawah */
}
.fileuploader{
  margin:0px !important;
}
.trumbowyg-box, .trumbowyg-editor{
  margin-bottom:0px !important;
}

.parent-menu {
  background-color: #d4edda !important; /* Warna hijau lembut */
  font-weight: bold; /* Buat tulisan lebih tebal */
}

img#uploadedAvatar,
.avatar-online img {
  object-fit:cover;
}

.search-item {
  cursor: pointer;
  padding: 10px;
}

.search-item:hover {
  background-color: #f8f9fa;
}

#search-results{
  top:45px;
}

.fileuploader-input .fileuploader-input-button, .fileuploader-popup .fileuploader-popup-content .fileuploader-popup-button.button-success{
    background: #696cff !important;
}

.fileuploader-input .fileuploader-input-caption{
    color: #696cff !important;
}

#addModal .modal-dialog {
  transform: none !important;
}
#editModal .modal-dialog {
  transform: none !important;
}

.avatar-100 {
    width: 125px;
    height: 125px;
    object-fit: cover;
}

/*
---------------------------------------------
ID Card
---------------------------------------------
*/

@media print {
  body > *:not(.print-root){ display:none !important; }
}

#idcard .idcard{
  width:336px; height:212px;                 /* preview screen */
  border-radius:14px;
  background:#fff; position:relative;
  box-shadow:0 16px 40px rgba(0,0,0,.15);
  border:1px solid var(--line);
  overflow:hidden;
  font-size:12px;
  font-family: 'Poppins', sans-serif;
}

/* Header bar dengan brand */
#idcard .brand-bar{
  height:36px; color:#fff;
  background:linear-gradient(135deg, var(--secondary), #2f60d0);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 .75rem;
}
#idcard .brand-bar .brand{
  font-weight:700; letter-spacing:.4px;
}
#idcard .brand-bar .tag{
  font-size:.72rem; opacity:.95;
  background:rgba(255,255,255,.15); padding:.15rem .45rem; border-radius:999px;
}

/* Accent strip miring tipis */
/* #idcard .accent{
  position:absolute; inset:auto 0 auto auto; top:36px; right:-40px;
  width:120px; height:8px; transform:rotate(35deg);
  background:linear-gradient(90deg, var(--primary), #f05a60);
  opacity:.85;
} */

/* Grid konten */
#idcard .id-body{
  display:grid; grid-template-columns:84px 1fr 72px; grid-template-rows:auto 1fr;
  gap:.5rem; padding:.7rem .7rem .6rem;
}

/* Avatar bulat */
#idcard .avatar{
  grid-row:1 / span 2; grid-column:1;
  width:74px; height:74px; border-radius:50%;
  object-fit:cover; border:3px solid #fff;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
  margin-top:.25rem;
}

/* Info utama */
#idcard .name{
  grid-column:2; grid-row:1;
  font-weight:700; font-size:14px; line-height:1.1;
  margin-top:.1rem;
  color:#212529;
}

#idcard .meta{
  grid-column:2; grid-row:2;
}
#idcard .type-badge{
  display:block; 
  width:fit-content;
  font-weight:600; font-size:.7rem;
  padding:.22rem .5rem; border-radius:999px; margin-top:5px;
  vertical-align:middle;
  border:1px solid rgba(0,0,0,.06);
}
#idcard .type-athlete{ background:rgba(209,29,36,.08); color:var(--primary); border-color:rgba(209,29,36,.25); }
#idcard .type-coach{ background:rgba(37,73,159,.08); color:var(--secondary); border-color:rgba(37,73,159,.25); }
#idcard .type-referee{ background:#f3f4f6; color:#111827; }
#idcard .type-official{ background:#000; color:#fff; }

/* #idcard .meta{
  grid-column:2; grid-row:2;
  display:grid; grid-template-columns:1fr 1fr; gap:.35rem .75rem;
  align-content:start;
} */
#idcard .label{ font-size:.68rem; color:var(--muted); margin-bottom:.05rem; }
#idcard .value{ font-weight:600; font-size:.86rem; color:#212529;}

/* QR slot */
#idcard .qr{
  grid-column:3; grid-row:1 / span 2;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
}
#idcard .qr-box{
  width:64px; height:64px; background:#fff;
  border:1px dashed #c7cdd6; border-radius:8px;
  display:grid; place-items:center;
  overflow:hidden;
}
#idcard .qr-box img{ width:100%; height:100%; object-fit:cover; }
#idcard .qr-caption{ font-size:.66rem; color:var(--muted); margin-top:.3rem; text-align:center;}

/* Footer kecil */
#idcard .id-footer{
  position:absolute; bottom:0; left:0; right:0;
  display:flex; align-items:center; justify-content:space-between;
  padding:.35rem .6rem; border-top:1px solid var(--line);
  background:linear-gradient(90deg, rgba(37,73,159,.06), rgba(209,29,36,.06));
  font-size:.7rem;
}
#idcard .sig{
  display:flex; align-items:center; gap:.35rem;
  color:#212529;
}
#idcard .sig-line{
  width:92px; height:18px; border-bottom:1px solid #cdd3dd;
}
#idcard .logo-mini{
  width:20px; height:20px; border-radius:4px;
  background:linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow:0 2px 6px rgba(0,0,0,.18);
}

/* Cetak: ukuran kartu CR80 dalam mm, hilangkan shadow */
@media print{
  #idcard .idcard{
    width:85.6mm; height:54mm;
    border-radius:3mm; box-shadow:none; border:0;
  }
}

/* Wrapper pusatkan kartu */
.idcard-wrap{
  display:flex;
  justify-content:center;
  padding: 16px;  /* ruang tepi di mobile */
}

/* Elemen yang di-scale */
.idcard-zoom{
  width: 336px;               /* sama dengan .idcard */
  transform-origin: top center;
  will-change: transform;
  /* Skala: 1 di layar lebar, mengecil otomatis jika viewport < 360px + padding */
  transform: scale( min(1, calc((100vw - 32px) / 360px)) );
}

.w-fit{
  width:fit-content;
}

/* (opsional) sedikit halus saat orientasi berubah */
@media (prefers-reduced-motion: no-preference){
  .idcard-zoom { transition: transform .2s ease; }
}
.avatar-wrap {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background-size: cover;      /* inilah pengganti object-fit: cover */
  background-position: center;
  background-repeat: no-repeat;
  border:3px solid #fff;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
}