/**
Theme Name: Portal BPS Daerah
Template: astra
Version: 1.0
Author: Galon
Description: Child theme dari Astra
*/

/* Gdrive Scanner */
#gdrive-scan-container {
    max-width: 720px;
    margin: 40px auto;
    background: #fafbfc;
    border-radius: 16px;
    box-shadow: 0 2px 24px #0002;
    padding: 32px 24px 28px 24px;
    font-family: 'Inter', Arial, sans-serif;
}
#gdrive-scan-container > div {
    margin-bottom: 16px;
}
#gdrive-scan-form {
    overflow-x: auto;
}
#gdrive-scan-form select {
    padding: 7px 12px;
    border: 1px solid #e4e7ef;
    border-radius: 8px;
    margin-right: 8px;
    background: #fff;
    font-size: 15px;
}
#gdrive-scan-form select,
.gdrive-scan-dropdown {
    max-width: 320px;   /* Batasi lebar select */
}

#gdrive-scan-form select option,
.gdrive-scan-dropdown option {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;    /* Sesuaikan dengan select */
    display: block;
}
#gdrive-scan-folderbar a {
    display: inline-block;
    padding: 7px 16px;
    background: #195efc;
    color: #fff;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 1px 6px #0001;
    transition: background 0.16s;
}
#gdrive-scan-folderbar a:hover {
    background: #1244b8;
}
.gdrive-scan-thumb {
    display: block;
    margin: 0 auto;
    height: 200px !important;
/*     max-width: 100px !important; */
    width: auto !important;
    border-radius: 5px;
    box-shadow: 0 1px 4px #0002;
    cursor: pointer;
    transition: box-shadow .16s;
}
.gdrive-scan-thumb:hover {
    box-shadow: 0 3px 16px #0003;
}
#gdrive-scan-table {
    width: 100%;
    overflow-x: auto;
	-webkit-overflow-scrolling: touch;
    box-shadow: 0 0 10px #0001 inset;
}
#gdrive-scan-table table {
    min-width: 600px; /* atau lebih kecil sesuai kebutuhan */
    width: 100%;
}
#gdrive-scan-table td:nth-child(3) {
    text-align: center;
}
#gdrive-scan-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 15px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 8px #0001;
}
#gdrive-scan-table th, #gdrive-scan-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #ececec;
    text-align: left;
    vertical-align: middle;
}
#gdrive-scan-table th {
    background: #f4f6fa;
    font-weight: 600;
}
#gdrive-scan-table tr:last-child td {
    border-bottom: none;
}
#gdrive-scan-table a {
    color: #195efc;
    text-decoration: none;
}
#gdrive-scan-table a:hover {
    text-decoration: underline;
}
#gdrive-scan-table img {
    border-radius: 5px;
    box-shadow: 0 1px 4px #0002;
    transition: box-shadow .16s;
}
#gdrive-scan-table img:hover {
    box-shadow: 0 3px 16px #0003;
}
#gdriveScanPreviewModal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    /* penting! Flexbox untuk centering */
}
#gdriveScanPreviewModal[style*="display: flex"] {
    display: flex !important;
}
.gdrive-scan-modal-inner {
    background: #191919;        /* hitam gelap */
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 4px 32px #000b;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 26px 18px 26px;
}
.gdrive-scan-modal-close {
    position: absolute;
    top: 10px;
    right: 16px;
    cursor: pointer;
    font-size: 24px;
    color: #fff;                 /* warna x jadi putih */
    z-index: 10;
    background: #222;            /* background tombol jadi hitam gelap */
    border-radius: 35%;
    padding: 5px 9px;
    line-height: 1;
    box-sizing: content-box;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
}
.gdrive-scan-modal-close:hover {
    background: #444;            /* lebih terang sedikit saat hover */
    color: #fff;
}
#gdriveScanPreviewFrame {
    width: 70vw;
    height: 70vh;
    border: 0;
    border-radius: 8px;
    display: block;
    background: #191919;      /* isi iframe background hitam */
}
@media (max-width: 800px) {
    #gdriveScanPreviewFrame {
        width: 94vw !important;
        height: 62vw !important;
    }
}
@media (max-width: 600px) {
    #gdrive-scan-form select,
    .gdrive-scan-dropdown {
        max-width: 98vw;
        font-size: 14px;
    }
}

/* Prevent Scroll Embedpress */
.embedpress-elements-wrapper iframe {
  display: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.embedpress-elements-wrapper iframe.shown {
  display: block;
  opacity: 1;
}

.embedpress-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  font-size: 1.1em;
  color: #444;
  background: #f7f7f7;
}
.embedpress-loader .spinner {
  border: 4px solid #eee;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  margin-right: 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.embedpress-elements-wrapper iframe {
  transition: opacity 0.4s;
}



/* Laporan Lembur */
#form-lembur {
  max-width: 900px;
  margin: 36px 16px 42px 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 32px #0002;
  padding: 38px 34px 32px 34px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  transition: box-shadow .16s;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 28px;
}
.form-grid > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}
.form-grid label {
  margin-bottom: 7px;
  color: #3d3b38;
  font-size: 1.06em;
  font-weight: 600;
  letter-spacing: .01em;
  min-height: 2.0em;
}
.form-grid input[type="text"],
.form-grid input[type="date"],
.form-grid input[type="number"] {
  background: #fafbfc;
  border: 1.8px solid #ececec;
  border-radius: 9px;
  padding: 11px 13px;
  font-size: 1.09em;
  color: #232323;
  margin-top: 0;
  margin-bottom: 0;
  outline: none;
  box-shadow: 0 1.5px 8px #00000010;
  transition: border .2s, box-shadow .2s, background .13s;
}
.form-grid input:focus {
  border-color: #ffb53a;
  background: #fffdf4;
  box-shadow: 0 2px 14px #ffb53a23;
}
.form-grid input[readonly] {
  background: #f5f5f7;
  color: #999;
  border-style: dashed;
}

#form-lembur button,
#form-lembur .remove-row {
  display: block;
  width: 100%;
  max-width: 260px;
  padding: 15px 0;
  margin: 16px 0 0 0;
  border: none;
  border-radius: 8px;
  background: #ffad38;
  color: #232323;
  font-size: 1.13em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 14px #ffb53a23;
  letter-spacing: .7px;
  transition: background .14s, color .13s, box-shadow .18s;
}
#form-lembur button:hover,
#form-lembur .remove-row:hover {
  background: #ff8b00;
  color: #fff;
  box-shadow: 0 6px 20px #ffb53a44;
}

#form-lembur .remove-row {
  background: #ee5a41;
  color: #fff;
  font-size: 1em;
  font-weight: 600;
  margin: 16px 0 0 0;
  max-width: 140px;
}
#form-lembur .remove-row:hover {
  background: #c53e28;
}

@media (max-width: 1000px) {
  .form-grid { grid-template-columns: repeat(2, 1fr);}
}
@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr;}
  #form-lembur {
    padding: 14px 4vw;
  }
}

#add-row-btn {
  width: fit-content;
  padding-left: 34px;
  padding-right: 34px;
  margin: 18px 0 0 0;
  display: block;
}

#add-row-btn, #submit-lembur-btn {
  margin-bottom: 12px;
}

#lembur-fields {
  display: flex;
  flex-direction: column;
  gap: 15px;
}


.lembur-row {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  align-items: flex-end;
  margin-bottom: 0;
}

.lembur-row > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.lembur-row label {
  font-size: 1em;
  font-weight: 500;
  color: #353333;
  margin-bottom: 6px;
}
.lembur-row input {
  background: #fafbfc;
  border: 1.5px solid #ececec;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 1.05em;
  color: #232323;
  outline: none;
  margin-top: 0;
  margin-bottom: 0;
  box-shadow: 0 1.5px 8px #00000009;
  transition: border .2s, box-shadow .2s, background .13s;
  width: 100%;
}
.lembur-row input:focus {
  border-color: #ffb53a;
  background: #fffbe9;
  box-shadow: 0 2px 12px #ffb53a22;
}
.lembur-row .remove-row {
  margin: 18px 0 0 0;
  width: 100%;
  min-width: 85px;
  padding: 11px 0;
  background: #ee5a41;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .13s;
}
.lembur-row .remove-row:hover {
  background: #c53e28;
}

@media (max-width: 700px) {
  .lembur-row { grid-template-columns: 1fr; gap: 14px; }
}



/* Login */
.ge-login-box {
    max-width: 350px;
    background: #fffd;
    border-radius: 16px;
    box-shadow: 0 4px 18px #0002;
    padding: 32px 24px 24px 24px;
    margin: 34px auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    text-align: left;
    transition: box-shadow .2s;
}
.ge-login-box form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ge-login-label {
    font-size: 1em;
    font-weight: 500;
    margin-bottom: 3px;
    color: #4a3c28;
}
.ge-login-input {
    border: 1.5px solid #e4e1de;
    border-radius: 7px;
    font-size: 1.04em;
    padding: 10px 12px;
    background: #fcfaf9;
    margin-bottom: 7px;
    outline: none;
    transition: border .2s, box-shadow .2s;
    box-shadow: 0 1px 8px #0000;
}
.ge-login-input:focus {
    border-color: #fbb040;
    box-shadow: 0 1px 8px #fbb04033;
    background: #fffbe9;
}
.ge-login-btn {
    margin-top: 12px;
    display: inline-block;
    padding: 12px 0;
    background: #fbb040;
    color: #2d2308 !important;
    border: none;
    border-radius: 7px;
    font-size: 1.07em;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px #0001;
    letter-spacing: .5px;
    transition: background .15s, color .15s;
}
.ge-login-btn:hover {
    background: #ff9700;
    color: #000;
}

.ge-login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff4f2;
    color: #c0392b;
    border: 1px solid #ffd5d2;
    padding: 11px 16px 10px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 1.09em;
    font-weight: 600;
    box-shadow: 0 1px 8px #e74c3c18;
}
.ge-error-icon {
    font-size: 1.35em;
    color: #e67e22;
    margin-right: 3px;
}


/* Profile Box */
.ge-profile-box {
    max-width: 340px;
    background: #fffa;
    border-radius: 16px;
    box-shadow: 0 4px 18px #0002;
    padding: 28px 24px 24px 24px;
    margin: 24px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    transition: box-shadow .2s;
}
.ge-profile-box:hover {
    box-shadow: 0 8px 28px #0003;
}
.ge-profile-avatar-wrap {
    margin-bottom: 2px;
}
.ge-profile-avatar img,
.ge-profile-avatar {
    border-radius: 50%;
    box-shadow: 0 2px 8px #0001;
    width: 64px;
    height: 64px;
    object-fit: cover;
}
.ge-profile-name {
    font-size: 1.22em;
    font-weight: 600;
}
.ge-profile-role {
    font-size: 0.97em;
    color: #666;
}
.ge-profile-logout {
    margin-top: 12px;
    display: inline-block;
    padding: 7px 22px;
    background: #f55a42;
    color: #fff !important;
    border-radius: 7px;
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    box-shadow: 0 2px 8px #0001;
    transition: background .15s;
}
.ge-profile-logout:hover {
    background: #c74232;
}


/* Accordion compact style */
.accordion .accordion-button {
	padding: 0.4rem 1rem 0.1rem 1rem !important;  /* Lebih kecil dari default */
	font-size: 1rem;
	background: #fff;
	border-radius: 0 !important;
}
.accordion .accordion-item {
	border-radius: 0 !important;
}
.accordion .accordion-button:focus {
	box-shadow: none;
}
.accordion .accordion-button:not(.collapsed) {
	background: #e9f1ff !important;
}
.accordion .accordion-body {
	padding: 0.75rem 1rem !important;
	font-size: 0.97rem;
}
.accordion .baca-link {
	color: #1a73e8;
	text-decoration: none;
	font-size: 0.97rem;
}
.accordion .baca-link:hover {
	text-decoration: underline;
}

/* Search Bar */
.portal-search-container {
  max-width: 600px;
  margin: 24px auto 0 auto;
  font-family: inherit;
  position: relative;

}

.portal-search-bar-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #ddd;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 2px 6px #e0e0e0;
  padding: 0 12px;
  position: relative;
  overflow: hidden;
  max-width: 650px;
  margin: 0 auto;
}

.portal-search-input {
  border: none !important;     /* <- Penting */
  outline: none !important;    /* <- Penting */
  flex: 1;
  font-size: 1.05em;
  padding: 13px 12px 13px 12px;
  background: transparent !important;  /* <- Biar flat */
  border-radius: 0 !important;         /* <- Tidak bulat sendiri */
  height: 48px;
  box-shadow: none !important;         /* <- Hilangkan shadow/input Chrome */
}

.portal-search-input:focus {
  background: #f7fafd;
}

.portal-search-btn {
  border: none;
  background: none;
  color: #2684ff;
  font-size: 1.2em;
  cursor: pointer;
  padding: 0 10px 0 0;
  border-radius: 0;     /* <- Jangan bulat! */
  height: 48px;
  display: flex;
  align-items: center;
  transition: background 0.18s, color 0.18s;
}

.portal-search-btn:hover,
.portal-search-btn:focus {
  background: #f3f6fd00;      /* <- Biru muda, sangat soft */
  color: #0d63bb;
}

.portal-search-btn:active {
  background: #eaf3ff;
}

/* Optional: hilangkan warna outline tombol di Chrome */
.portal-search-btn:focus {
  outline: none;
}

/* Search Sugggestion */
.portal-search-suggestion {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 350px;
  max-width: 600px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 36px #0002, 0 1.5px 6px #ccd4ee22;
  z-index: 1000;
  padding: 6px 0;
  margin-top: 10px;
  transition: box-shadow 0.18s;
}

@media (max-width: 700px) {
  .portal-search-suggestion {
    min-width: 0;
    width: 95vw;
    left: 50%;
    transform: translateX(-50%);
  }
}

.portal-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 12px 22px;
  font-size: 1.05em;
  color: #232b44;
  cursor: pointer;
  transition: background 0.14s, color 0.18s;
  border: none;
  background: none;
}
.portal-suggestion-item:not(:last-child) {
  border-bottom: 1px solid #f3f4f7;
}
.portal-suggestion-item:not(.is-active):focus, 
.portal-suggestion-item.is-active {
  background: #f6f9ff;
  color: #1976d2;
}
.portal-suggestion-type {
  color: #92a0c2;
  font-size: 0.89em;
  margin-left: 12px;
  letter-spacing: 0.2px;
}
.open-newtab {
    text-decoration: none;
    color: #666; /* warna normal */
    transition: color 0.2s ease;
}
.open-newtab:hover {
    color: #007bff; /* atau warna lain yang kamu suka */
}

/* Table */
table th{
	border:2px solid #ccc;
	padding:8px;	
}
table td{
	border:1px solid #ccc;
	padding:8px;	
}

/* Sortable */
th.sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background 0.2s;
}
th.sortable:hover {
    background: #f2f2f2;
}
th.sortable .sort-icon {
    font-size: 0.8em;
    margin-left: 4px;
    color: #aaa;
    vertical-align: middle;
    transition: color 0.2s;
}
th.sortable.asc .sort-icon-up,
th.sortable.desc .sort-icon-down {
    color: #222;
}
th.sortable .sort-icon {
    display: inline-block;
}

/* tbody.animating tr {
    transition: transform 0.4s cubic-bezier(.53,2,.71,.3);
    /* Optionally, tambahkan efek */
} */
tbody.sort-fading {
  opacity: 0.3;
  transition: opacity 0.3s;
}