/* Webmail STIE Indonesia Malang: lapisan tampilan di atas skin Elastic (Roundcube 1.7).
   Arah desain mengikuti www.stieimlg.ac.id (desain G): Plus Jakarta Sans, biru #2f5d99, permukaan #f5f6f8,
   sudut 10/14/22 px, tombol pil. Tata letak ala Gmail: kolom daftar + baca berupa satu "lembar" putih di atas
   latar abu muda, menu kiri terang. Hanya mode terang (dark_mode_support dimatikan di stie_tampilan.php).
   Kembali ke Elastic asli: cabut stie_tampilan dari ROUNDCUBEMAIL_PLUGINS. */

/* ---------- huruf (disajikan sendiri, lisensi OFL di fonts/OFL.txt) ---------- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/plus-jakarta-sans-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --stie-biru: #2f5d99;
  --stie-biru-tua: #234a7d;
  --stie-biru-pilih: #e6edf7;
  --stie-biru-aktif: #dbe5f2;
  --stie-biru-cincin: rgba(47, 93, 153, .22);
  --stie-navy: #0b1d38;
  --stie-teks: #1d1d1f;
  --stie-teks-2: #5f5f64;
  --stie-teks-3: #6e6e73;
  --stie-ikon: #5f5f64;
  --stie-latar: #f5f6f8;
  --stie-latar-2: #eceef2;
  --stie-sorot: #eef0f3;
  --stie-garis: #e5e5ea;
  --stie-garis-halus: #eef0f3;
  --stie-garis-isian: #d2d2d7;
  --stie-merah: #c4314b;
  --stie-hijau: #1e7b45;
  --stie-r-kecil: 10px;
  --stie-r: 14px;
  --stie-r-besar: 22px;
  --stie-bayang: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .06);
  --stie-bayang-tinggi: 0 2px 8px rgba(16, 24, 40, .08), 0 16px 40px rgba(16, 24, 40, .12);
  --stie-huruf: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- dasar ---------- */
.popover, body, button, input, optgroup, select, textarea,
div.tox, div.tox :not(.svg) { font-family: var(--stie-huruf); }
div.tox .tox-color-input > input, div.tox .tox-listboxfield .tox-listbox--select, div.tox .tox-textarea,
div.tox .tox-textfield { font-family: var(--stie-huruf) !important; }
.message-htmlpart blockquote span.blockquote-link, .message-part blockquote span.blockquote-link { font-family: var(--stie-huruf); }
body { color: var(--stie-teks); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html:not(.iframe) body { background-color: var(--stie-latar); }

a { color: var(--stie-biru); }
a:hover { color: var(--stie-biru-tua); }
.btn-link { color: var(--stie-biru); }

/* fokus papan ketik yang jelas (Elastic menghapus outline di banyak tempat) */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, .btn:focus-visible,
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible {
  outline: 2px solid var(--stie-biru) !important; outline-offset: 2px;
}
.menu a:focus-visible, .listing li > a:focus-visible, #taskmenu a:focus-visible, .header a.button:focus-visible,
.searchbar a:focus-visible, .pagenav a:focus-visible { outline-offset: -2px; }
::selection { background: #cfdcf0; }
.listing td[tabindex]:focus-visible, .listing tr:focus-visible, table.listing:focus-visible { outline: none !important; }

/* ---------- tombol ---------- */
.btn { border-radius: 980px; font-weight: 600; letter-spacing: 0; }
.btn:focus, .btn.focus { box-shadow: 0 0 0 3px var(--stie-biru-cincin); }
.btn-primary, .btn-primary.disabled, .btn-primary:disabled,
div.tox .tox-dialog__footer .tox-button, div.tox .tox-dialog__footer .tox-button.disabled,
div.tox .tox-dialog__footer .tox-button:disabled { background: var(--stie-biru); border-color: var(--stie-biru); color: #fff; }
.btn-primary:hover, .btn-primary:focus, div.tox .tox-dialog__footer .tox-button:hover,
div.tox .tox-dialog__footer .tox-button:focus { background: var(--stie-biru-tua); border-color: var(--stie-biru-tua); color: #fff; }
.btn-primary:focus, div.tox .tox-dialog__footer .tox-button:focus,
div.tox .tox-dialog__footer .tox-button:focus:not(:disabled) { box-shadow: 0 0 0 3px var(--stie-biru-cincin); }
.btn-primary:not(:disabled):not(.disabled).active, .btn-primary:not(:disabled):not(.disabled):active,
div.tox .tox-dialog__footer .tox-button:not(:disabled):not(.disabled).active,
div.tox .tox-dialog__footer .tox-button:not(:disabled):not(.disabled):active { background: #1d3f6c; border-color: #1d3f6c; }
.btn-primary:not(:disabled):not(.disabled).active:focus, .btn-primary:not(:disabled):not(.disabled):active:focus { box-shadow: 0 0 0 3px var(--stie-biru-cincin); }
.btn-secondary, .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset .btn-secondary {
  background: #fff; color: var(--stie-teks); border: 1px solid var(--stie-garis-isian);
}
.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:not(:disabled):not(.disabled):active {
  background: var(--stie-latar); color: var(--stie-teks); border-color: #c7c7cc;
}
.btn-danger { background: var(--stie-merah); border-color: var(--stie-merah); }
.button.mainaction, a.button.mainaction { text-transform: none; }
.text-uppercase.btn { text-transform: none !important; }
.floating-action-buttons a.button {
  background: var(--stie-biru); box-shadow: 0 4px 14px rgba(11, 29, 56, .28); border-radius: 18px;
}

/* ---------- isian formulir ---------- */
.form-control, .custom-select, .recipient-input, .multi-input > .content, .tagedit-list, .input-group-text {
  border-color: var(--stie-garis-isian);
}
.form-control, .custom-select { border-radius: var(--stie-r-kecil); }
.input-group > .form-control:not(:first-child), .input-group > .custom-select:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .form-control:not(:last-child), .input-group > .custom-select:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group-text { background-color: var(--stie-latar); color: var(--stie-teks-2); }
.input-group-prepend .input-group-text { border-radius: var(--stie-r-kecil) 0 0 var(--stie-r-kecil); }
.input-group-append .input-group-text, .input-group-append .btn { border-radius: 0 var(--stie-r-kecil) var(--stie-r-kecil) 0; }
.form-control::placeholder, input::placeholder, textarea::placeholder { color: #6a6a6f; opacity: 1; }
.form-control:focus, .formcontent.raweditor .CodeMirror-focused, .multi-input > .content.focused, .recipient-input.focus,
.tagedit-list[tabindex="-1"], .custom-file-input:focus ~ .custom-file-label {
  border-color: var(--stie-biru); box-shadow: 0 0 0 3px var(--stie-biru-cincin);
}
.input-group-text input:focus { border-color: var(--stie-biru) !important; }
.input-group a:focus { background-color: var(--stie-biru-cincin); }
.custom-switch .custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 3px var(--stie-biru-cincin); }
.custom-switch .custom-control-input:focus:not(:checked) ~ .custom-control-label::before { border-color: var(--stie-biru); }
.custom-switch .custom-control-input:checked ~ .custom-control-label::before { background-color: var(--stie-biru); border-color: var(--stie-biru); }
.custom-switch .custom-control-input:checked:disabled ~ .custom-control-label::before { background-color: #9db4d4; border-color: #9db4d4; }
input[type=checkbox], input[type=radio] { accent-color: var(--stie-biru); }
div.tox.focused { border-color: var(--stie-biru) !important; box-shadow: 0 0 0 3px var(--stie-biru-cincin) !important; }
div.tox .tox-color-input > input:focus, div.tox .tox-listboxfield .tox-listbox--select:focus, div.tox .tox-textarea:focus,
div.tox .tox-textfield:focus { border-color: var(--stie-biru); box-shadow: 0 0 0 3px var(--stie-biru-cincin); }
div.tox .tox-dialog .tox-dialog__body-nav-item--active { color: var(--stie-biru); border-color: var(--stie-biru); }

/* ---------- kerangka: latar abu, menu kiri terang, lembar putih ---------- */
@media screen and (min-width: 481px) {
  #layout-menu, #taskmenu .special-buttons { background-color: var(--stie-latar); }
  #layout-menu .popover-header { background-color: var(--stie-latar) !important; }
  #layout-menu .popover-header img { padding: .5rem .55rem .25rem; }

  #taskmenu a { color: #3a3a3f; height: auto; padding: .4rem 0 .35rem; border-radius: 0; transition: color .15s ease; }
  #taskmenu a:before {
    display: block; width: 3.5rem !important; height: 2.15rem !important; line-height: 2.15rem; margin: 0 auto .2rem !important;
    border-radius: 980px; font-size: 1.15rem; transition: background-color .15s ease, color .15s ease;
  }
  #taskmenu a:hover, #taskmenu a:focus, #taskmenu a.selected, #taskmenu a.selected:hover { background: transparent; color: var(--stie-teks); }
  #taskmenu a:hover:before, #taskmenu a:focus-visible:before { background-color: var(--stie-latar-2); }
  #taskmenu a.selected:before, #taskmenu a.selected:hover:before { background-color: var(--stie-biru-aktif); color: var(--stie-biru); }
  #taskmenu a.selected .inner { font-weight: 700; color: var(--stie-teks); }
  #taskmenu .action-buttons a, #taskmenu .action-buttons a:hover { color: var(--stie-biru); background: transparent; }
  #taskmenu .action-buttons a:before {
    width: 3.25rem !important; height: 3.25rem !important; line-height: 3.25rem; border-radius: 16px;
    background-color: var(--stie-biru); color: #fff; box-shadow: 0 2px 6px rgba(11, 29, 56, .2);
  }
  #taskmenu .action-buttons a:hover:before, #taskmenu .action-buttons a:focus-visible:before { background-color: var(--stie-biru-tua); }
  #taskmenu .action-buttons a.selected:before { background-color: var(--stie-biru-tua); }
  #taskmenu .action-buttons a .inner { color: var(--stie-biru); font-weight: 600; }
  #taskmenu a.logout, #taskmenu a.logout:hover { color: var(--stie-merah) !important; }
  #rcmdraglayer { background-color: var(--stie-navy); border-radius: var(--stie-r-kecil); }
}
@media screen and (min-width: 1025px) {
  #taskmenu span.inner {
    display: block; white-space: normal; overflow: visible; text-overflow: clip;
    font-size: 11.5px; line-height: 1.25; font-weight: 500; padding: 0 .3rem;
  }
}
@media screen and (min-width: 481px) and (max-width: 1024px) {
  #taskmenu a { height: auto; padding: .35rem 0; }
  #taskmenu a:before { width: 2.5rem !important; height: 2.25rem !important; line-height: 2.25rem !important; margin: 0 auto !important; }
  #taskmenu .action-buttons a:before { width: 2.5rem !important; height: 2.5rem !important; line-height: 2.5rem !important; border-radius: 12px; }
}

/* kolom-kolom */
#layout > div > .header {
  background-color: #fff; color: var(--stie-teks); border-bottom: 1px solid var(--stie-garis-halus);
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
}
#layout-sidebar { background-color: var(--stie-latar); border-right: 0; }
#layout > #layout-sidebar > .header { background-color: var(--stie-latar); border-bottom: 0; }
#layout-list, #layout-content { background-color: #fff; }
#layout-list { border-right: 1px solid var(--stie-garis); }
#layout > div > .footer { background-color: #fff; border-top: 1px solid var(--stie-garis-halus); }
#layout > #layout-sidebar > .footer { background-color: var(--stie-latar); border-top: 0; }

@media screen and (min-width: 769px) {
  html:not(.iframe) body:not(.task-login) #layout > #layout-list {
    margin: 8px 0; border: 1px solid var(--stie-garis); border-right-color: var(--stie-garis);
    border-radius: 16px 0 0 16px; overflow: hidden;
  }
  html:not(.iframe) body:not(.task-login) #layout > #layout-content {
    margin: 8px 8px 8px 0; border: 1px solid var(--stie-garis); border-radius: 16px; overflow: hidden;
  }
  html:not(.iframe) body:not(.task-login) #layout > #layout-list:not(.hidden) + #layout-content {
    border-left: 0; border-radius: 0 16px 16px 0;
  }
  html:not(.iframe) #layout > #layout-sidebar.sidebar-right { margin-left: 0; border-left: 0; }
  #layout-content .iframe-wrapper { background: #fff; }
}

/* kepala kolom: judul kiri, tombol rapi */
#layout > div > .header a.button, .menu.toolbar a, #layout .header .toolbar a { color: #3a3a3f; }
.menu.toolbar a { max-width: 7.5rem; border-radius: var(--stie-r-kecil); padding: .4rem .45rem .35rem; margin: 0 1px; transition: background-color .15s ease; }
#layout > div > .header .menu.toolbar a, #layout > div > .header a.button { height: calc(100% - 10px); margin-top: 5px; margin-bottom: 5px; }
.menu.toolbar a:before { color: var(--stie-ikon); }
.menu.toolbar a:not(.disabled):hover, .menu.toolbar a:not(.disabled):focus,
.header a.button.icon:not(.disabled):hover, .header a.button.icon:not(.disabled):focus,
.menu .dropbutton:not(.disabled):hover, .menu.toolbar .dropbutton:not(.disabled):hover { background-color: var(--stie-sorot); }
.menu.toolbar .dropbutton:not(.disabled):hover a, .menu.toolbar .dropbutton a.dropdown:hover { background-color: transparent; }
.menu.toolbar .dropbutton { border-radius: var(--stie-r-kecil); }
.menu.toolbar .dropbutton a { margin: 0; }
.menu span.inner { font-size: 12px; font-weight: 500; letter-spacing: 0; }
.menu.toolbar a.disabled, .menu.toolbar a.disabled:before { color: #b4b4b9; }
.menu.toolbar a.selected { color: var(--stie-hijau); }
a.toolbar-button span.inner { font-size: 12px !important; font-weight: 500 !important; }

@media screen and (min-width: 1201px) {
  #layout-list > .header > .header-title:not(.all-sizes) {
    display: block; margin: 0 !important; padding: 0 .5rem 0 .9rem !important; text-align: left;
  }
  #layout > #layout-list > .header { justify-content: flex-start; }
}
@media screen and (min-width: 769px) {
  #layout > #layout-content > .header { justify-content: flex-start; padding-left: .5rem; }
  #layout-content > .header > .toolbar, #layout-content > .header > .menu { text-align: left; }
  #layout > #layout-sidebar > .header .header-title {
    text-align: left; margin: 0 !important; padding: 0 .5rem 0 1rem !important;
    font-size: 13px; font-weight: 600; color: var(--stie-teks-2); letter-spacing: 0;
  }
}

/* ---------- pencarian: kolom pil di bawah judul daftar ---------- */
.searchbar {
  background-color: var(--stie-latar); border-bottom: 0; border-radius: 980px;
  margin: 2px 12px 10px; height: 38px; min-height: 38px; line-height: 38px;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.searchbar:focus-within { background-color: #fff; box-shadow: inset 0 0 0 1px var(--stie-biru), 0 0 0 3px var(--stie-biru-cincin); }
.searchbar form:before { color: var(--stie-teks-3); height: 38px; margin-left: .9rem; }
.searchbar input { font-size: 14px; color: var(--stie-teks); }
.searchbar a { color: var(--stie-ikon); border-radius: 980px; height: 30px; line-height: 30px; margin: 0 1px; }
.searchbar a:before { height: 30px; line-height: 30px; }
.searchbar a:last-of-type { margin-right: .35rem; }
.searchbar a.selected, .searchbar a.unread.selected { color: var(--stie-biru); }
#layout > div > .header + .searchbar { margin-top: 0; }
#layout > #layout-list > .header { border-bottom: 0; }
#layout-list > .searchbar + .scroller, #layout-list > .searchbar ~ .scroller { border-top: 1px solid var(--stie-garis-halus); }
.searchoptions { border-radius: var(--stie-r); }

/* ---------- daftar umum ---------- */
.listing tbody td, .listing li { border-bottom-color: var(--stie-garis-halus); }
.listing li.selected, .listing tr.selected td, ul.treelist li.selected > a, ul.treelist li.selected > div > a,
.table-widget table.options-table tr.selected td { background-color: var(--stie-biru-pilih); color: var(--stie-teks); }
html:not(.touch) .listing li > a:focus, html:not(.touch) .listing.focus tbody tr.focused > td:first-child,
html:not(.touch) .listing.focus:not(.withselection) tbody tr.focused > td.selection + td { border-left-color: var(--stie-biru); }
html:not(.touch) .listing tbody tr:not(.selected):hover td { background-color: #f6f7f9; }
.listing-info { color: var(--stie-teks-3); font-weight: 600; font-size: 14px; }
#messagelist-content .listing-info:before {
  display: block; margin: 0 auto .6rem; font-family: Icons; font-weight: 900; content: "\f01c"; font-size: 2.4rem; color: #c7c7cc;
}
.image-selector .attachmentslist li:focus, .image-selector .attachmentslist li:hover { background: var(--stie-biru-pilih); }

/* ---------- daftar folder: pil lembut ---------- */
#layout-sidebar:not(.sidebar-right) > .scroller { padding: 2px 10px 10px; }
#layout-sidebar .listing li { border-bottom: 0; }
#layout-sidebar ul.listing li ul { border-top: 0; }
#layout-sidebar .listing li > a, #layout-sidebar ul.treelist li > a {
  border-radius: 980px; line-height: 36px; height: 36px; margin: 1px 0; color: var(--stie-teks);
  transition: background-color .12s ease;
}
#layout-sidebar .listing li > a:hover { background-color: var(--stie-latar-2); }
#layout-sidebar .listing li.selected, #layout-sidebar ul.treelist li.selected { background: transparent; }
#layout-sidebar .listing li.selected > a, #layout-sidebar ul.treelist li.selected > a {
  background-color: var(--stie-biru-aktif); color: var(--stie-biru); font-weight: 700;
}
#layout-sidebar .listing li > a:before { color: var(--stie-ikon); }
#layout-sidebar .listing li.selected > a:before { color: var(--stie-biru); }
html:not(.touch) #layout-sidebar .listing li > a { border-left: 0; }
html:not(.touch) #layout-sidebar .listing li > a:focus { border-left: 0; background-color: var(--stie-latar-2); }
ul.treelist li div.treetoggle { color: var(--stie-ikon); height: 38px; line-height: 38px; z-index: 1; }
.folderlist li.mailbox .unreadcount {
  background: transparent; color: var(--stie-teks); font-weight: 700; font-size: 12.5px;
  min-width: 1.8em; margin: 9px 10px 0 0; line-height: 20px; border-radius: 980px;
}
.folderlist li.mailbox.selected > a > .unreadcount { color: var(--stie-biru); }
.folderlist li.mailbox.recent > a { color: var(--stie-biru); }
.folderlist li.mailbox.recent > a > .unreadcount { background: var(--stie-biru); color: #fff; }
.folderlist li.mailbox.unread > a { font-weight: 700; }
html.touch #layout-sidebar .listing li > a { line-height: 44px; height: 44px; }
html.touch .folderlist li.mailbox .unreadcount { margin: 12px 10px 0 0; line-height: 20px; }
html.touch ul.treelist li div.treetoggle { height: 46px; line-height: 46px; }

/* tombol "Tulis pesan" di atas daftar folder (disisipkan stie_tampilan.php) */
.stie-tulis-wadah { position: sticky; top: 0; z-index: 2; background: var(--stie-latar); padding: 4px 0 12px; }
a.stie-tulis {
  display: inline-flex; align-items: center; gap: .6rem; height: 48px; padding: 0 1.4rem 0 1.1rem;
  border-radius: 16px; background: var(--stie-biru); color: #fff; font-weight: 600; font-size: 14.5px;
  text-decoration: none; box-shadow: 0 1px 2px rgba(11, 29, 56, .16), 0 2px 8px rgba(11, 29, 56, .1);
  transition: background-color .15s ease, box-shadow .15s ease;
}
a.stie-tulis:before { font-family: Icons; font-weight: 900; content: "\f044"; font-size: 1.05rem; line-height: 1; }
a.stie-tulis:hover, a.stie-tulis:focus { background: var(--stie-biru-tua); color: #fff; text-decoration: none; }
a.stie-tulis:hover { box-shadow: 0 2px 4px rgba(11, 29, 56, .18), 0 6px 16px rgba(11, 29, 56, .14); }
a.stie-tulis .inner { font-size: inherit; font-weight: inherit; }
.stie-tulis-wadah { display: none; }
html.layout-large body.task-mail .stie-tulis-wadah { display: block; }
html.layout-large body.task-mail.action-none:has(a.stie-tulis) #taskmenu .action-buttons { display: none; }

/* ---------- daftar pesan ---------- */
.messagelist td { font-size: 14px !important; }
.messagelist td.subject { position: relative; padding: 10px 6px 10px 30px; }
.messagelist td.subject span { line-height: 20px; }
.messagelist td.subject span.fromto {
  padding-left: 0; font-size: 14px; color: var(--stie-teks); font-weight: 500;
}
.messagelist td.subject span.date, .messagelist td.subject span.size { font-size: 12px; color: var(--stie-teks-2); font-weight: 500; padding-left: .5rem; }
.messagelist td.subject span.subject { font-size: 13.5px; color: var(--stie-teks-2); margin-top: 2px; }
.messagelist td.subject span.subject a { color: inherit; }
.messagelist tr.unread td.subject span.fromto { font-weight: 700; color: var(--stie-teks); }
.messagelist tr.unread td.subject span.subject { font-weight: 600; color: var(--stie-teks); }
.messagelist tr.unread td.subject span.date { font-weight: 700; color: var(--stie-biru); }
/* titik status: biru untuk belum dibaca, tersembunyi untuk yang sudah dibaca */
.messagelist td.subject span.msgicon.status { position: absolute; left: 6px; top: 10px; width: 22px; text-align: center; }
.messagelist td.subject span.msgicon.status:before { width: 22px; height: 20px; line-height: 20px; font-size: .5rem; color: transparent; margin: 0; }
html:not(.touch) .messagelist tr:hover td.subject span.msgicon.status:not(.replied):not(.forwarded):before { color: #c7c7cc; }
.messagelist td.subject span.msgicon.status.unread:before { color: var(--stie-biru); font-size: .62rem; }
.messagelist td.subject span.msgicon.status.replied:before, .messagelist td.subject span.msgicon.status.forwarded:before {
  color: var(--stie-ikon); font-size: .8rem;
}
.messagelist td.subject span.msgicon.status.unread.replied:before, .messagelist td.subject span.msgicon.status.unread.forwarded:before { color: var(--stie-biru); }
.messagelist td.flags { padding-top: 10px; padding-right: 10px; }
.messagelist td.flags > span { height: 20px; line-height: 20px; }
.messagelist td.flags span.flag { margin-bottom: 2px; }
.messagelist span.attachment span { color: var(--stie-ikon); }
.messagelist span.flagged:before { color: var(--stie-merah); }
/* baris bertanda: cukup ikon bendera, teks tetap tenang */
.messagelist tr.flagged td, .messagelist tr.flagged span.size, .messagelist tr.flagged td.subject span.subject a,
.messagelist tr.flagged td.subject span.date, .messagelist tr.flagged td.subject span.fromto { color: inherit; }
.messagelist tr.flagged td.subject span.fromto { color: var(--stie-teks); }
.messagelist tr.flagged td.subject span.date { color: var(--stie-teks-2); }
.messagelist tr.unread.flagged td.subject span.date { color: var(--stie-biru); }
.messagelist td.threads { padding-top: 10px; color: var(--stie-ikon); }
.messagelist td.selection { padding-top: 12px; vertical-align: top; }
.listing-hover-menu {
  border: 1px solid var(--stie-garis); border-radius: 12px; box-shadow: var(--stie-bayang); background: rgba(255, 255, 255, .96);
}
.listing-hover-menu a.button { color: var(--stie-ikon); }
.listing-hover-menu a.button:hover { color: var(--stie-biru); }

html.touch .messagelist tbody td { line-height: 20px; font-size: 15px; }
html.touch .messagelist td.subject { padding: 12px 10px 12px 30px; }
html.touch .messagelist td.subject span.fromto { font-size: 15.5px; }
html.touch .messagelist td.subject span.subject { font-size: 14.5px; }
html.touch .messagelist td.subject span.date { font-size: 12.5px; }
html.touch .messagelist td.subject span.msgicon.status { top: 12px; }
html.touch .messagelist td.flags { top: 0; padding: 34px 10px 0 0; display: flex; flex-direction: row-reverse; align-items: flex-start; gap: 6px; }
html.touch .messagelist td.flags > span { height: 18px; line-height: 18px; margin: 0; }
html.touch .messagelist td.flags .flag { visibility: visible; pointer-events: none; }
html.touch .messagelist td.flags .flag span.unflagged { display: none; }
html.touch .messagelist td.subject span.subject { padding-right: 2.9rem; }
html.touch .messagelist td.selection, html.touch .messagelist td.threads { line-height: 20px; padding-top: 12px; }

/* navigasi halaman di bawah daftar */
.menu.pagenav, #layout > div > .footer.pagenav { background-color: #fff; }
.menu.pagenav a { color: var(--stie-ikon); border-radius: 8px; }
.menu.pagenav a.disabled, .menu.pagenav a.disabled:before { color: #c7c7cc; }
.menu.pagenav .pagenav-text { color: var(--stie-teks-2); font-size: 12px; font-weight: 500; }
.menu.pagenav input { border-radius: 8px; }
.menu.pagenav.pagenav-list { background-color: var(--stie-latar); border-bottom-color: var(--stie-garis-halus); }

/* tabel catatan (kontak, folder, bagian pengaturan) */
table.records-table td, table.records-table th { border-bottom-color: var(--stie-garis-halus); }
#contacts-table td.name, #sections-table td.section, #subscription-table td.name, #identities-table td,
#responses-table td, #filtersetslist td, #filterslist td { padding-left: 1rem; }
.listing.iconized tr td:before { color: var(--stie-ikon); }
.listing.iconized tr.selected td:before { color: var(--stie-biru); }

/* ---------- panel baca / tampilan pesan ---------- */
html.iframe body { background-color: #fff; }
#layout-content .frame-content, .frame-content { padding: 1.5rem 2rem 2rem; }
#message-header > .subject {
  font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; color: var(--stie-teks); margin-bottom: 1rem;
}
#message-header > .subject a.extwin { color: var(--stie-teks-3); }
#message-header > .header img.contactphoto { width: 44px; height: 44px; margin-right: .85rem; background: var(--stie-latar-2); }
#message-header .header-content { min-height: 44px; }
#message-header .header-summary { margin-top: .1rem; color: var(--stie-teks-2); font-size: 13.5px; }
#message-header .header-summary a, #message-header .header-summary .adr a { color: var(--stie-teks); font-weight: 600; }
#message-header .header-headers .header-title { color: var(--stie-teks-2); font-weight: 600; }
#message-header .header-links { margin-top: .35rem; }
#message-header .header-links a { font-size: 12.5px; font-weight: 500; color: var(--stie-biru); margin-right: .9rem; }
#message-header .header-links a:before { color: var(--stie-ikon); margin-right: .1rem; }
#message-content .attachmentslist:not(:empty), .attachmentslist {
  background-color: transparent; border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px;
}
#message-content .attachmentslist li {
  border: 1px solid var(--stie-garis); border-radius: 12px; padding: 4px 6px 4px 12px; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease; max-width: calc(100% - 8px);
}
#message-content .attachmentslist li:hover { border-color: #c9d6ea; box-shadow: var(--stie-bayang); }
#message-content .attachmentslist li:before { color: var(--stie-biru); margin-right: .35rem; }
#message-content .attachmentslist li a.filename { font-weight: 500; }
.attachmentslist li .attachment-size { color: var(--stie-teks-2); font-size: 12.5px; }
.attachmentslist li a.dropdown { color: var(--stie-ikon); border-radius: 8px; padding: 0 .3rem; }
.attachmentslist li a.dropdown:hover { background: var(--stie-sorot); }
.message-part, .message-htmlpart { font-size: 14.5px; line-height: 1.6; }
.message-part div.pre { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; font-size: 13px; }
.message-part:not(:first-child), .message-htmlpart:not(:first-child) { border-top-color: var(--stie-garis-halus); }
.message-htmlpart blockquote, .message-part blockquote { color: #2a4a77; border-left-color: var(--stie-biru); border-right-color: var(--stie-biru); }
p.image-attachment { background-color: var(--stie-latar); border-radius: var(--stie-r); border: 0; }
p.image-attachment .image-link { border-radius: var(--stie-r-kecil); overflow: hidden; }
.image-tools { background-color: rgba(47, 93, 153, .45); }
.image-tools a:focus, .image-tools a:hover { background-color: rgba(47, 93, 153, .7) !important; }
.message-partheaders { background-color: var(--stie-latar); border-top-color: var(--stie-garis-halus); border-radius: var(--stie-r-kecil); }
.ui.alert { background-color: rgba(47, 93, 153, .06); border-radius: var(--stie-r-kecil); }
.ui.alert a:not(.btn) { color: var(--stie-biru); }
.ui.alert.boxinformation { background-color: rgba(47, 93, 153, .1); }

/* ---------- tulis pesan ---------- */
body.action-compose #layout-content .formcontent, body.task-mail.action-compose #compose-content { padding-top: .5rem; }
#compose-headers .form-group > label, #compose-headers .col-form-label { color: var(--stie-teks-2); font-weight: 600; }
div.tox, div.tox.tox-tinymce { border-color: var(--stie-garis-isian); border-radius: var(--stie-r) !important; }
div.tox .tox-toolbar, div.tox .tox-toolbar__overflow, div.tox .tox-toolbar__primary, div.tox .tox-editor-header {
  background-color: #fafbfc !important;
}
div.tox .tox-tbtn { border-radius: 8px; }
div.tox .tox-tbtn:hover, div.tox .tox-tbtn--enabled, div.tox .tox-tbtn--enabled:hover { background: var(--stie-sorot); }
.formcontent.raweditor, .editor-toolbar, #composebody { border-color: var(--stie-garis-isian); }
textarea#composebody, .html-editor textarea { border-radius: var(--stie-r); }
.compose-attachments, #compose-attachments, .file-upload { border-radius: var(--stie-r); }
#compose-attachments .attachmentslist li { border: 1px solid var(--stie-garis); border-radius: 10px; background: #fff; }
.recipient-input { border-radius: var(--stie-r-kecil); }
.recipient-input ul.recipient-input-list li.recipient {
  background-color: var(--stie-biru-pilih); border-color: transparent; border-radius: 980px; color: var(--stie-teks); padding: 0 .55rem;
}
.recipient-input ul.recipient-input-list li.recipient.invalid { background-color: #fbe3e7; }
.quota-widget { border-radius: 980px; }
.quota-widget .value { background-color: var(--stie-biru); }

/* ---------- menu munculan ---------- */
.popover {
  border: 1px solid var(--stie-garis); border-radius: var(--stie-r); box-shadow: var(--stie-bayang-tinggi);
  background-color: rgba(255, 255, 255, .97);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  html:not(.layout-phone):not(.layout-small) .popover { background-color: rgba(255, 255, 255, .88); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); }
}
.popover .popover-body { padding: 6px; }
.popover .menu li a, .popupmenu .listing li > a { border-radius: 8px; color: var(--stie-teks); }
.popover .menu li a:before { color: var(--stie-ikon); }
.popover .menu li a:not(.disabled):hover, .popover .menu .dropbutton a.dropdown:hover, .popupmenu .listing li > a:not(.disabled):hover {
  background-color: var(--stie-sorot); color: var(--stie-teks);
}
.popover .menu li a:not(.disabled):hover:before { color: var(--stie-biru); }
.popover .menu li a[aria-haspopup]:hover:after { color: var(--stie-teks-2); }
.popover .menu li a.disabled, .popover .menu li a.disabled:before { color: #b4b4b9; }
.popupmenu .listing li.selected { background-color: var(--stie-biru-pilih); color: var(--stie-teks); }
.popover .menu li.separator { background: transparent; color: var(--stie-teks-3); font-weight: 600; text-transform: none; }
.popover .menu .dropbutton:not(.disabled):hover { background-color: transparent; }
.popover .menu .dropbutton a.dropdown { background-color: transparent; border-radius: 8px; }
.popover > .arrow { display: none; }
.ui-menu .ui-state-active { background-color: var(--stie-biru) !important; border-radius: 6px; }
.googie_list li.googie_list_onhover { background-color: var(--stie-biru); }
#messagestack div, #messagestack .alert { border-radius: 12px; box-shadow: var(--stie-bayang-tinggi); border: 0; }
#messagestack .alert-info.information { background-color: var(--stie-biru); }
#messagestack .alert-success.confirmation { background-color: var(--stie-hijau); color: #fff; }
#messagestack .alert-danger.error { background-color: var(--stie-merah); color: #fff; }
#messagestack .alert-secondary.loading { background-color: #3a3a3f; color: #fff; }

/* ---------- dialog ---------- */
.ui-dialog.ui-widget-content, .ui-dialog {
  border: 1px solid var(--stie-garis); border-radius: var(--stie-r-besar); box-shadow: var(--stie-bayang-tinggi); overflow: hidden;
}
.ui-dialog .ui-dialog-titlebar { border-bottom: 1px solid var(--stie-garis-halus); padding-left: 1.25rem; }
.ui-dialog .ui-dialog-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--stie-teks); }
.ui-dialog .ui-dialog-titlebar-close { border-radius: 980px; }
.ui-dialog .ui-dialog-buttonpane { border-top: 1px solid var(--stie-garis-halus); background: #fafbfc; }
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset a.btn-link:focus { background-color: var(--stie-biru-cincin); }
.ui-widget-overlay { background: rgba(11, 29, 56, .28); opacity: 1; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .ui-widget-overlay { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
}
.ui-widget-overlay.datepicker { background-color: rgba(11, 29, 56, .06); -webkit-backdrop-filter: none; backdrop-filter: none; }
.ui-datepicker .ui-datepicker-days-cell-over a, .ui-datepicker .ui-datepicker-days-cell-over a.ui-state-default,
.ui-datepicker .ui-state-hover { color: var(--stie-biru); background: var(--stie-biru-pilih); }
.ui-datepicker a.ui-state-active { background: var(--stie-biru) !important; }
.ui-slider .ui-slider-range { background: var(--stie-biru-pilih); }
.ui-slider .ui-slider-handle.ui-state-active { background: var(--stie-biru); border-color: var(--stie-biru-tua); }

/* ---------- pengaturan dan kontak ---------- */
.formcontent fieldset legend, fieldset > legend, .propform legend {
  font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--stie-teks); border-bottom-color: var(--stie-garis-halus);
}
table.propform td.title, .propform .col-form-label, .propform label { color: #3a3a3f; }
.formbuttons { border-top-color: var(--stie-garis-halus); }
.tabsbar, .nav-tabs { border-bottom-color: var(--stie-garis-halus); }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--stie-teks-2); font-weight: 600; padding: .55rem .15rem; margin-right: 1.4rem; background: transparent; }
.nav-tabs .nav-link:hover { color: var(--stie-teks); border-bottom-color: var(--stie-garis-isian); }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { color: var(--stie-biru); border-bottom-color: var(--stie-biru); background: transparent; }
.contact-header .contact-name, #contacthead .names { font-weight: 700; letter-spacing: -.01em; }
#contact-photo, .contactphoto img, img.contactphoto { border-radius: 50%; }

/* ---------- halaman masuk ---------- */
body.task-login #layout-content { background: transparent; justify-content: center; }
body.task-login #logo { max-width: 84px !important; max-height: 84px !important; margin: 0 auto 18px !important; }
body.task-login #login-form {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--stie-garis); border-radius: var(--stie-r-besar);
  box-shadow: var(--stie-bayang); max-width: 400px; width: calc(100% - 32px); margin: 0 auto; padding: 28px 28px 26px;
}
body.task-login #login-footer {
  order: -1; margin: 0 0 18px; color: var(--stie-teks); font-size: 18px; font-weight: 700; letter-spacing: -.02em; text-align: center;
}
body.task-login #login-form table { margin: 0; }
body.task-login #login-form td.input { padding: 0; margin-bottom: 12px; }
body.task-login #login-form .form-group { margin: 0; }
body.task-login #login-form .input-group-prepend .input-group-text {
  background: #fff; border-color: var(--stie-garis-isian); border-right: 0; border-radius: 12px 0 0 12px; color: var(--stie-teks-3);
  padding-left: .95rem; padding-right: .35rem; min-width: 2.6rem;
}
body.task-login #login-form .form-control { border-color: var(--stie-garis-isian); border-left: 0; border-radius: 0 12px 12px 0; font-size: 15px; height: 48px; padding-left: .5rem; }
body.task-login #login-form .form-control:focus { box-shadow: none; }
body.task-login #login-form td.input-group:focus-within { border-radius: 12px; box-shadow: 0 0 0 3px var(--stie-biru-cincin); }
body.task-login #login-form td.input-group:focus-within .input-group-text,
body.task-login #login-form td.input-group:focus-within .form-control { border-color: var(--stie-biru); }
body.task-login #login-form td.input-group:focus-within .input-group-text { color: var(--stie-biru); }
body.task-login #login-form .formbuttons { margin: 6px 0 0; }
body.task-login #login-form .button.mainaction { height: 48px; font-size: 15px; font-weight: 600; border-radius: 980px; }
body.task-login .noscriptwarning { border-radius: var(--stie-r); }

/* ---------- ponsel dan layar kecil ---------- */
@media screen and (max-width: 768px) {
  #layout > div > .header { background-color: #fff; font-size: 16px; }
  #layout > div > .header a.button { color: var(--stie-teks); }
  #layout > div > .header a.button:before { color: var(--stie-ikon); }
  #layout-sidebar, #layout > #layout-sidebar > .header, #layout > #layout-sidebar > .footer { background-color: #fff; }
  .stie-tulis-wadah { background: #fff; }
  #layout-list { border-right: 0; }
  .searchbar { margin: 4px 12px 10px; height: 40px; min-height: 40px; line-height: 40px; }
  .searchbar form:before { height: 40px; }
  #layout > div > .footer { background-color: #fff; }
  /* label kolom Pengirim/Penerima/Judul selebar teksnya (kolom col-2 Bootstrap terlalu sempit) */
  #compose-headers .form-group.row > label.col-form-label { flex: 0 0 auto; max-width: none; width: auto; min-width: 4.6rem; padding-right: .5rem; font-size: 13.5px; }
  #compose-headers .form-group.row > .col-10 { flex: 1 1 0; max-width: none; min-width: 0; }
}
/* isi bingkai (pratinjau, pengaturan) ikut mode layar induk, bukan lebar iframe-nya sendiri */
html.layout-phone .frame-content, html.layout-small .frame-content { padding: 1rem 1rem 1.5rem; }
html.layout-phone #message-header > .subject, html.layout-small #message-header > .subject { font-size: 20px; }
html.layout-phone .popover-header, html.layout-small .popover-header {
  background-color: #fff; color: var(--stie-teks); border-bottom: 1px solid var(--stie-garis-halus);
}
html.layout-phone .popover-header a, html.layout-small .popover-header a { color: var(--stie-ikon); }
html.layout-phone .popover, html.layout-small .popover { background-color: #fff; }
html.layout-phone #layout-menu.popover, html.layout-small #layout-menu.popover { border-radius: 0; }
@media screen and (max-width: 480px) {
  #taskmenu { padding: 6px 8px; }
  #taskmenu a { color: var(--stie-teks); border-bottom: 0 !important; border-radius: 12px; margin: 2px 0; font-size: 16px; }
  #taskmenu a:before { color: var(--stie-ikon); }
  #taskmenu a:hover, #taskmenu a:focus { background: var(--stie-latar); }
  #taskmenu a.selected { background: var(--stie-biru-pilih); color: var(--stie-biru); font-weight: 600; }
  #taskmenu .special-buttons { display: block; border-top: 1px solid var(--stie-garis-halus); margin-top: 6px; padding-top: 6px; }
  #taskmenu a.selected:before, #taskmenu .action-buttons a, #taskmenu .action-buttons a:before { color: var(--stie-biru); }
  #taskmenu a.logout, #taskmenu a.logout:before { color: var(--stie-merah) !important; }
  #layout-menu .popover-header { background-color: #fff !important; }
  .floating-action-buttons a.button { width: 56px; height: 56px; }
}

/* ---------- gerak seperlunya ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { transition: none !important; animation-duration: .01ms !important; }
}

/* situs tidak punya mode gelap: lapis cadangan bila kelas dark-mode sempat terpasang */
html.dark-mode body { background: var(--stie-latar) !important; color: var(--stie-teks) !important; }

/* Layar laptop (<=1365px): tombol toolbar daftar email cukup ikon (label tetap jadi tooltip), supaya judul folder tidak terpotong */
@media (min-width: 1025px) and (max-width: 1365px) {
  #layout-list .header .toolbar a .inner, #layout-list .header a.refresh .inner { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #layout-list .header .toolbar a, #layout-list .header a.refresh { min-width: 36px; padding-left: 4px; padding-right: 4px; }
}
