*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,sans-serif;background:#f5f7f6;color:#18231d}.layout{display:grid;grid-template-columns:260px 1fr;min-height:100vh}.sidebar{background:#123a24;color:#fff;padding:20px 14px;position:sticky;top:0;height:100vh;overflow:auto}.brand{display:flex;gap:10px;align-items:center;padding:8px 10px 20px;border-bottom:1px solid rgba(255,255,255,.1);margin-bottom:14px}.brand-logo{width:42px;height:42px;border-radius:12px;background:#c9a227;display:grid;place-items:center;color:#123a24;font-weight:800;overflow:hidden}.brand-logo img{width:100%;height:100%;object-fit:cover}.brand strong{display:block}.brand small{opacity:.65}.menu-title{font-size:10px;text-transform:uppercase;letter-spacing:.14em;opacity:.45;margin:18px 10px 7px}.sidebar a{display:flex;gap:10px;align-items:center;color:rgba(255,255,255,.75);text-decoration:none;padding:10px 12px;border-radius:9px;margin:2px 0;font-size:14px}.sidebar a:hover,.sidebar a.active{background:rgba(255,255,255,.11);color:#fff}.main{min-width:0}.topbar{height:70px;background:#fff;border-bottom:1px solid #e7ece9;display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:20}.content{padding:28px}.pagehead{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:22px}.pagehead h1{font-size:25px;margin:0 0 5px}.pagehead p{margin:0;color:#718078;font-size:14px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.stat{background:#fff;border:1px solid #e4eae6;border-radius:14px;padding:20px}.stat b{font-size:28px;display:block;color:#17653a}.stat span{font-size:12px;color:#77827c}.panel{background:#fff;border:1px solid #e4eae6;border-radius:14px;margin-bottom:18px;overflow:hidden}.panel-head{padding:16px 18px;border-bottom:1px solid #edf0ee;display:flex;justify-content:space-between;align-items:center}.panel-head h3{margin:0;font-size:16px}.panel-body{padding:18px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}label{display:block;font-size:12px;font-weight:700;color:#465249;margin-bottom:5px}.field{margin-bottom:14px}input,textarea,select{width:100%;padding:10px 12px;border:1px solid #dbe3de;border-radius:9px;background:#fff;font:inherit;font-size:14px;outline:none}input:focus,textarea:focus,select:focus{border-color:#1a6b3a;box-shadow:0 0 0 3px rgba(26,107,58,.08)}textarea{min-height:110px;resize:vertical}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:9px;padding:10px 14px;font-weight:700;font-size:13px;text-decoration:none;cursor:pointer}.btn-primary{background:#1a6b3a;color:#fff}.btn-gold{background:#c9a227;color:#18331f}.btn-light{background:#edf3ef;color:#294235}.btn-danger{background:#fff0f0;color:#c33;border:1px solid #ffd2d2}.actions{display:flex;gap:7px;flex-wrap:wrap}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th,td{padding:12px 14px;border-bottom:1px solid #edf0ee;text-align:left;vertical-align:top}th{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#758078;background:#fbfcfb}.badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:#edf6f0;color:#17653a;font-size:11px;font-weight:700}.badge.off{background:#f1f1f1;color:#777}.alert{padding:12px 15px;border-radius:10px;margin-bottom:16px;font-size:13px}.alert.success{background:#eaf8ee;color:#17653a}.alert.error{background:#fff0f0;color:#b52929}.thumb{width:48px;height:48px;border-radius:9px;object-fit:cover;background:#eef2ef}.logo-preview{max-width:90px;max-height:90px;border-radius:12px;background:#f2f3f2;padding:8px}.muted{color:#869089;font-size:12px}.login-wrap{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#103921,#1a6b3a)}.login-card{width:min(420px,calc(100% - 32px));background:#fff;border-radius:20px;padding:28px;box-shadow:0 30px 70px rgba(0,0,0,.25)}.login-card h1{margin:0 0 6px}.login-card p{color:#728078;margin:0 0 22px;font-size:13px}.login-brand{width:58px;height:58px;border-radius:16px;background:#c9a227;display:grid;place-items:center;font-weight:900;color:#164629;margin-bottom:18px}@media(max-width:1000px){.layout{grid-template-columns:80px 1fr}.brand .txt,.sidebar a span,.menu-title{display:none}.sidebar a{justify-content:center;font-size:18px}.cards{grid-template-columns:1fr 1fr}.grid3{grid-template-columns:1fr 1fr}}@media(max-width:650px){.layout{display:block}.sidebar{position:relative;height:auto;display:flex;overflow:auto;padding:8px}.brand,.menu-title{display:none}.sidebar a{min-width:48px;margin-right:4px}.content{padding:18px}.topbar{padding:0 18px}.cards,.grid2,.grid3{grid-template-columns:1fr}.pagehead{display:block}.pagehead .actions{margin-top:12px}}


/* Small dashboard sidebar credit */
.admin-crafted-footer {
  margin-top: auto;
  padding: .7rem .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  font-size: .68rem;
  line-height: 1;
  opacity: .58;
  white-space: nowrap;
}
.admin-crafted-footer .crafted-coffee {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-crafted-footer .crafted-coffee svg {
  width: 13px;
  height: 13px;
}
.admin-crafted-footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.admin-crafted-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}


/* Sidebar footer positioning */
.admin-sidebar,
aside.sidebar,
body > aside {
  display: flex;
  flex-direction: column;
}


/* ===== Sidebar accordion CMS ===== */
.admin-accordion-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admin-menu-group {
  border-radius: 10px;
  overflow: hidden;
}

.admin-menu-group > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  font-weight: 700;
  user-select: none;
  transition: background .2s ease, color .2s ease;
}

.admin-menu-group > summary::-webkit-details-marker {
  display: none;
}

.admin-menu-group > summary:hover,
.admin-menu-group[open] > summary {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.admin-menu-group-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-menu-group-label .group-icon {
  width: 20px;
  display: inline-flex;
  justify-content: center;
  flex: 0 0 20px;
}

.group-chevron {
  font-size: 14px;
  transition: transform .2s ease;
  opacity: .7;
}

.admin-menu-group[open] .group-chevron {
  transform: rotate(180deg);
}

.admin-menu-group-body {
  padding: 3px 0 6px 10px;
}

.sidebar .admin-menu-group-body a {
  padding: 8px 10px;
  margin: 1px 0;
  font-size: 13px;
}

.sidebar .admin-menu-group-body a.active {
  background: rgba(201,162,39,.16);
  color: #f1d66e;
}

/* Sidebar tetap satu kolom dan footer berada di bawah */
.sidebar {
  display: flex;
  flex-direction: column;
}

.admin-crafted-footer {
  margin-top: auto;
}

@media(max-width:1000px) {
  .admin-menu-group-label > span:last-child,
  .group-chevron {
    display: none;
  }
  .admin-menu-group > summary {
    justify-content: center;
    padding: 10px 8px;
  }
  .admin-menu-group-body {
    padding-left: 0;
  }
  .sidebar .admin-menu-group-body a {
    justify-content: center;
  }
}

@media(max-width:650px) {
  .admin-accordion-nav {
    flex-direction: row;
    gap: 4px;
  }
  .admin-menu-group {
    overflow: visible;
    position: relative;
  }
  .admin-menu-group > summary {
    min-width: 46px;
  }
  .admin-menu-group[open] .admin-menu-group-body {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    min-width: 210px;
    padding: 7px;
    border-radius: 10px;
    background: #123a24;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
    z-index: 100;
  }
  .admin-menu-group-label > span:last-child {
    display: none;
  }
  .sidebar .admin-menu-group-body a {
    justify-content: flex-start;
  }
}


/* ===== Rich Text Editor Berita ===== */
.field:has(.rich-editor) {
  grid-column: 1 / -1;
}
.rich-editor {
  border: 1px solid #d8dfda;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.rich-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid #e5e9e6;
  background: #f7f9f8;
  position: sticky;
  top: 0;
  z-index: 2;
}
.rich-toolbar button,
.rich-toolbar select {
  width: auto;
  min-width: 34px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #d8dfda;
  border-radius: 6px;
  background: #fff;
  color: #26352c;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.rich-toolbar button:hover,
.rich-toolbar select:hover {
  border-color: #1a6b3a;
  background: #edf6f0;
}
.rich-toolbar .rich-format {
  min-width: 115px;
}
.tool-separator {
  width: 1px;
  height: 22px;
  background: #dce2de;
  margin: 0 2px;
}
.rich-surface {
  min-height: 320px;
  padding: 18px 20px;
  outline: none;
  color: #222;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.rich-surface:focus {
  box-shadow: inset 0 0 0 2px rgba(26,107,58,.10);
}
.rich-surface h2 { font-size: 1.6em; margin: 1em 0 .45em; }
.rich-surface h3 { font-size: 1.35em; margin: 1em 0 .4em; }
.rich-surface h4 { font-size: 1.15em; margin: .9em 0 .35em; }
.rich-surface p { margin: .7em 0; }
.rich-surface ul,
.rich-surface ol { padding-left: 1.7em; margin: .7em 0; }
.rich-surface blockquote {
  margin: 1em 0;
  padding: .7em 1em;
  border-left: 4px solid #c9a227;
  background: #faf8ef;
}
.rich-surface a { color: #17683a; text-decoration: underline; }
.rich-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-top: 1px solid #edf0ee;
  background: #fafbfa;
  color: #8a938d;
  font-size: 11px;
}
@media (max-width:700px) {
  .rich-toolbar { gap: 3px; }
  .rich-toolbar button { padding: 0 7px; }
  .rich-surface { min-height: 260px; padding: 14px; }
}


/* Alignment yang tersimpan saat berita diedit kembali */
.rich-surface [data-align="left"] { text-align: left; }
.rich-surface [data-align="center"] { text-align: center; }
.rich-surface [data-align="right"] { text-align: right; }
.rich-surface [data-align="justify"] { text-align: justify; text-justify: inter-word; }

/* Homepage template chooser */
.template-preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.template-preview-grid>div{border:1px solid #e2e8e3;border-radius:9px;padding:10px;background:#fafcfb;display:flex;flex-direction:column;gap:3px}.template-preview-grid b{font-size:12px;color:#23402f}.template-preview-grid small{font-size:10px;color:#8a938d}

/* Sebaran Mata Kuliah */
.course-admin-filter{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.course-admin-filter select,.course-admin-filter input{width:auto;min-width:150px}.course-admin-filter input{flex:1;min-width:220px}.admin-pagination{display:flex;gap:5px;flex-wrap:wrap;justify-content:center;margin:18px 0}.admin-pagination a{min-width:34px;height:34px;display:grid;place-items:center;border:1px solid #dfe5df;border-radius:7px;background:#fff;color:#31503d;text-decoration:none;font-size:12px}.admin-pagination a.active{background:#1a6b3a;color:#fff;border-color:#1a6b3a}

/* Pagination Sebaran Mata Kuliah */
.course-pager{display:flex!important;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:18px 0 4px}.course-pager .pager-numbers{display:flex;align-items:center;gap:5px}.course-pager a{min-width:34px;height:34px;padding:0 10px!important;display:inline-flex!important;align-items:center;justify-content:center;border-radius:7px}.course-pager .pager-arrow{min-width:auto}.course-pager span{padding:0 3px;color:#8f978f}@media(max-width:600px){.course-pager{gap:6px}.course-pager .pager-arrow{font-size:0}.course-pager .pager-arrow:first-child::after{content:'←';font-size:13px}.course-pager .pager-arrow:last-child::after{content:'→';font-size:13px}}


/* ===== Sebaran MK admin flow ===== */
.course-filter-panel{overflow:visible}
.course-filter-title{padding-bottom:0;border-bottom:0}
.course-filter-title h3{margin-bottom:3px}
.course-filter-title p{margin:0;color:#89918c;font-size:12px}
.course-admin-filter{
  display:grid;
  grid-template-columns:minmax(190px,1.4fr) minmax(135px,.7fr) minmax(135px,.7fr) minmax(125px,.65fr);
  gap:12px;
  align-items:end;
}
.course-filter-field{display:flex;flex-direction:column;gap:6px}
.course-filter-field label{font-size:10px;letter-spacing:.06em;text-transform:uppercase;font-weight:800;color:#68736d}
.course-filter-field label small{font-size:9px;text-transform:none;letter-spacing:0;font-weight:500;color:#a0a7a2}
.course-filter-field select,.course-filter-field input{width:100%;min-height:42px}
.course-filter-search{grid-column:1 / -2}
.course-filter-actions{display:flex;gap:7px;align-items:center;min-height:42px}
.course-filter-actions .btn{min-height:42px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}
.course-admin-start{
  max-width:760px;margin:26px auto;padding:23px 25px;border:1px dashed #cad8cf;border-radius:12px;background:#f8fbf9;
  display:flex;align-items:center;gap:16px
}
.course-admin-start>span{width:46px;height:46px;display:grid;place-items:center;border-radius:10px;background:#e8f4ed;font-size:20px;flex:none}
.course-admin-start b{display:block;color:#143d27;font-size:14px;margin-bottom:4px}
.course-admin-start p{margin:0;color:#7a837e;font-size:12px;line-height:1.6}
.course-result-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:18px 2px 9px}
.course-result-head>div:first-child{display:flex;align-items:baseline;gap:6px}.course-result-head>div:first-child b{font-size:19px;color:#176b3b}.course-result-head>div:first-child span{font-size:11px;color:#89918c}
.course-result-tags{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}.course-result-tags span{padding:5px 8px;border-radius:999px;background:#eef5f0;color:#42604e;font-size:10px;font-weight:600}
.course-no-data{text-align:center;padding:35px 18px;display:flex;flex-direction:column;gap:5px}.course-no-data b{color:#284a36}.course-no-data span{font-size:11px;color:#89918c}
.course-editor-panel{margin-bottom:17px}
@media(max-width:1100px){.course-admin-filter{grid-template-columns:1fr 1fr}.course-filter-search{grid-column:1 / 2}.course-filter-actions{grid-column:2 / 3}}
@media(max-width:680px){.course-admin-filter{grid-template-columns:1fr}.course-filter-search,.course-filter-actions{grid-column:auto}.course-filter-actions{justify-content:flex-start}.course-result-head{align-items:flex-start;flex-direction:column}.course-result-tags{justify-content:flex-start}}


/* ===== Input Mata Kuliah Massal ===== */
.course-bulk-panel .panel-head p{margin:3px 0 0;color:#89918c;font-size:12px}
.bulk-course-meta{
  display:grid;
  grid-template-columns:1.6fr .8fr .75fr .7fr;
  gap:12px;
  margin-bottom:18px;
  padding:14px;
  border:1px solid #e2e9e4;
  border-radius:10px;
  background:#f8fbf9;
}
.bulk-table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid #e0e6e2;
  border-radius:10px;
}
.bulk-course-table{
  width:100%;
  min-width:1450px;
  border-collapse:collapse;
  background:#fff;
}
.bulk-course-table th{
  position:sticky;
  top:0;
  z-index:1;
  padding:9px 7px;
  background:#f3f7f4;
  border-bottom:1px solid #dde5df;
  color:#657169;
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.055em;
  text-align:left;
  white-space:nowrap;
}
.bulk-course-table td{
  padding:5px 4px;
  border-bottom:1px solid #edf1ee;
}
.bulk-course-table tbody tr:last-child td{border-bottom:0}
.bulk-course-table tbody tr:hover{background:#fbfdfb}
.bulk-course-table input{
  width:100%;
  min-width:90px;
  height:36px;
  padding:6px 8px;
  border:1px solid transparent;
  border-radius:6px;
  background:transparent;
  font-size:11px;
}
.bulk-course-table input:hover{border-color:#dfe7e1;background:#fff}
.bulk-course-table input:focus{border-color:#25814b;background:#fff;outline:0;box-shadow:0 0 0 2px rgba(37,129,75,.08)}
.bulk-course-table .bulk-no{width:42px;text-align:center}
.bulk-course-table .bulk-mk{min-width:220px}
.bulk-course-table .bulk-sks{width:66px}
.bulk-course-table .bulk-row-no{text-align:center;color:#8a938d;font-size:11px;font-weight:700}
.bulk-course-table .bulk-action{width:38px}
.bulk-course-table td:nth-child(4) input{min-width:55px;text-align:center}
.bulk-remove{
  width:27px;height:27px;border:0;border-radius:50%;background:#f8eded;color:#a33;cursor:pointer;font-size:16px;line-height:1
}
.bulk-remove:hover{background:#a33;color:#fff}
.bulk-course-footer{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:13px;
}
.bulk-course-footer>span{margin-right:auto;color:#8a938d;font-size:11px}
@media(max-width:1050px){
  .bulk-course-meta{grid-template-columns:1fr 1fr}
}
@media(max-width:650px){
  .bulk-course-meta{grid-template-columns:1fr}
  .bulk-course-footer{align-items:stretch;flex-direction:column}
  .bulk-course-footer>span{margin-right:0}
}

/* Tahun Akademik */


/* ===== Tahun akademik: copy sebaran tahun sebelumnya ===== */
.inline-check{
  display:flex !important;
  align-items:center;
  gap:8px;
  min-height:42px;
  font-weight:500 !important;
}
.inline-check input{width:auto !important}
.academic-copy-field{
  grid-column:1 / -1;
  padding:13px 14px;
  border:1px solid #dfe8e2;
  border-radius:9px;
  background:#f8fbf9;
}
.copy-year-select{
  margin-top:8px;
  padding-left:25px;
}
.copy-year-select select{max-width:330px}
.copy-year-select small{
  display:block;
  margin-top:6px;
  color:#7d8781;
  font-size:11px;
  line-height:1.55;
}


/* ===== Mata Kuliah Sebelumnya ===== */
.bulk-prev-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:-3px 0 14px;
  padding:12px 14px;
  border:1px dashed #ccd9d0;
  border-radius:9px;
  background:#fbfdfb;
}
.bulk-prev-actions>div{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.bulk-prev-actions b{
  color:#20432e;
  font-size:12px;
}
.bulk-prev-actions span{
  color:#7e8882;
  font-size:10.5px;
  line-height:1.5;
}
.bulk-copy-notice{
  margin:0 0 12px;
  padding:10px 13px;
  border-radius:8px;
  font-size:11px;
  line-height:1.55;
}
.bulk-copy-notice.success{
  color:#275c39;
  background:#edf7f0;
  border:1px solid #cde5d4;
}
.bulk-copy-notice.warning{
  color:#775d21;
  background:#fff8e6;
  border:1px solid #ecdba7;
}
@media(max-width:760px){
  .bulk-prev-actions{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* ===== Input MK sederhana: Kode, Mata Kuliah, SKS, Dosen Pengampu ===== */
.bulk-course-table{
  min-width:900px !important;
}
.bulk-course-table th:nth-child(2),
.bulk-course-table td:nth-child(2){width:150px}
.bulk-course-table th:nth-child(3),
.bulk-course-table td:nth-child(3){width:330px}
.bulk-course-table th:nth-child(4),
.bulk-course-table td:nth-child(4){width:80px}
.bulk-course-table th:nth-child(5),
.bulk-course-table td:nth-child(5){width:300px}
