:root{
  --bg:#f7f5f3;
  --surface:#ffffff;
  --surface-2:#fbf9f8;
  --text:#282321;
  --muted:#817873;
  --line:#ebe4e0;
  --accent:#bd7c76;
  --accent-dark:#9c625d;
  --accent-soft:#f4e5e3;
  --green:#43815f;
  --green-soft:#ebf5ef;
  --orange:#b57c34;
  --orange-soft:#fff3e4;
  --red:#b55757;
  --red-soft:#fbecec;
  --shadow:0 12px 34px rgba(66,44,37,.07);
  --radius:18px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg);
  color:var(--text);
}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
a{color:inherit}
.site-header{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:1240px;
  margin:auto;
  min-height:80px;
  padding:0 22px;
  display:flex;
  align-items:center;
  gap:28px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  font-weight:800;
  white-space:nowrap;
}
.brand-mark{
  width:40px;height:40px;border-radius:12px;
  display:grid;place-items:center;
  background:var(--accent);
  color:white;
  font-family:Georgia,serif;
  font-size:22px;
}
.brand-name{font-size:16px}
.nav{
  display:flex;
  align-items:center;
  gap:7px;
  overflow-x:auto;
  scrollbar-width:none;
}
.nav::-webkit-scrollbar{display:none}
.nav a{
  display:flex;
  align-items:center;
  gap:7px;
  padding:11px 13px;
  border-radius:12px;
  text-decoration:none;
  color:#665d58;
  font-size:14px;
  white-space:nowrap;
}
.nav a:hover,.nav a.active{
  color:var(--accent-dark);
  background:var(--accent-soft);
}
.header-spacer{margin-left:auto}
.user-chip{
  display:flex;align-items:center;gap:9px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:13px;
  background:var(--surface);
}
.user-avatar{
  width:32px;height:32px;border-radius:50%;
  display:grid;place-items:center;
  background:#e7d5d1;color:#78534f;font-weight:800;font-size:12px;
}
.user-chip strong{font-size:12px;display:block}
.user-chip small{font-size:11px;color:var(--muted);display:block}
.container{
  max-width:1240px;
  margin:auto;
  padding:30px 22px 60px;
}
.page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:24px;
}
.page-head h1{
  margin:0 0 7px;
  font-size:29px;
  letter-spacing:-.6px;
}
.page-head p{margin:0;color:var(--muted);font-size:14px}
.btn{
  border:0;
  border-radius:12px;
  padding:11px 16px;
  font-weight:700;
  font-size:13px;
  transition:.18s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-dark)}
.btn-secondary{background:#fff;border:1px solid var(--line);color:var(--text)}
.btn-danger{background:var(--red-soft);color:var(--red)}
.btn-sm{padding:8px 10px;font-size:12px}
.stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px;
  margin-bottom:18px;
}
.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.stat{padding:19px}
.stat-label{font-size:12px;color:var(--muted);margin-bottom:8px}
.stat-value{font-size:25px;font-weight:800;letter-spacing:-.5px}
.stat-note{font-size:11px;color:var(--green);margin-top:8px}
.grid-2{
  display:grid;
  grid-template-columns:1.4fr .9fr;
  gap:18px;
}
.section{padding:20px}
.section-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin-bottom:15px;
}
.section-head h2{margin:0;font-size:17px}
.muted-link{font-size:12px;color:var(--accent-dark);text-decoration:none}
.list{display:grid;gap:10px}
.list-item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:13px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background:#fff;
}
.item-main{min-width:0}
.item-title{font-size:13px;font-weight:750;margin-bottom:4px}
.item-subtitle{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item-right{text-align:right;white-space:nowrap}
.amount{font-weight:800;font-size:13px}
.badge{
  display:inline-flex;align-items:center;
  padding:6px 9px;border-radius:999px;
  font-size:10px;font-weight:750;
}
.badge-green{color:var(--green);background:var(--green-soft)}
.badge-orange{color:var(--orange);background:var(--orange-soft)}
.badge-red{color:var(--red);background:var(--red-soft)}
.badge-gray{color:#746b67;background:#f0ecea}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;min-width:700px}
th,td{padding:13px 12px;text-align:left;border-bottom:1px solid var(--line);font-size:12px}
th{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}
tbody tr:hover{background:#fcfaf9}
.actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:15px;
  flex-wrap:wrap;
}
.search{
  flex:1;
  min-width:220px;
  position:relative;
}
.search input{padding-left:37px}
.search::before{
  content:"⌕";
  position:absolute;left:13px;top:50%;transform:translateY(-50%);
  color:var(--muted);
}
input,select,textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fff;
  padding:11px 12px;
  outline:none;
  color:var(--text);
}
textarea{resize:vertical;min-height:110px}
input:focus,select:focus,textarea:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}
.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.form-group{display:grid;gap:6px}
.form-group.full{grid-column:1/-1}
label{font-size:12px;font-weight:700;color:#5f5652}
.empty{
  padding:30px 20px;
  border:1px dashed #d9ceca;
  border-radius:14px;
  color:var(--muted);
  text-align:center;
  font-size:13px;
  background:#fcfaf9;
}
.modal{
  position:fixed;
  inset:0;
  z-index:50;
  display:none;
  place-items:center;
  padding:20px;
  background:rgba(25,20,18,.42);
}
.modal.show{display:grid}
.modal-card{
  width:min(560px,100%);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border-radius:20px;
  box-shadow:0 30px 90px rgba(0,0,0,.2);
  padding:22px;
}
.modal-head{
  display:flex;align-items:center;justify-content:space-between;
  gap:15px;margin-bottom:18px;
}
.modal-head h3{margin:0;font-size:18px}
.icon-btn{
  width:34px;height:34px;border:0;border-radius:10px;
  background:#f6f1ef;color:#6d625d;
}
.modal-actions{
  display:flex;justify-content:flex-end;gap:9px;margin-top:18px;
}
.notice{
  padding:12px 14px;
  border-radius:12px;
  background:var(--accent-soft);
  color:#77504c;
  font-size:12px;
  margin-bottom:16px;
}
.whatsapp-layout{
  display:grid;
  grid-template-columns:.8fr 1.2fr;
  gap:18px;
}
.phone-preview{
  max-width:360px;
  margin:auto;
  border:8px solid #292929;
  border-radius:30px;
  overflow:hidden;
  background:#efeae2;
  box-shadow:var(--shadow);
}
.phone-top{
  padding:14px;
  background:#075e54;
  color:white;
  display:flex;align-items:center;gap:10px;
}
.phone-avatar{
  width:35px;height:35px;border-radius:50%;background:#d7cbc5;
  display:grid;place-items:center;color:#6b514d;font-weight:800;
}
.phone-top strong{font-size:12px;display:block}
.phone-top small{font-size:10px;opacity:.8}
.phone-body{
  min-height:420px;
  padding:18px 12px;
  background-color:#efeae2;
}
.chat-bubble{
  margin-left:auto;
  width:88%;
  padding:10px 11px;
  border-radius:9px 2px 9px 9px;
  background:#d9fdd3;
  font-size:12px;
  line-height:1.55;
  white-space:pre-wrap;
}
.toast{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:100;
  padding:12px 15px;
  border-radius:12px;
  background:#282321;
  color:#fff;
  font-size:12px;
  opacity:0;
  transform:translateY(15px);
  pointer-events:none;
  transition:.25s ease;
}
.toast.show{opacity:1;transform:translateY(0)}
.quick-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.quick-link{
  padding:14px;
  border:1px solid var(--line);
  border-radius:13px;
  text-decoration:none;
  background:#fff;
}
.quick-link:hover{border-color:#d7c4bf;background:#fdfafa}
.quick-link strong{display:block;font-size:13px;margin-bottom:4px}
.quick-link small{color:var(--muted);font-size:11px}
@media(max-width:960px){
  .header-inner{gap:14px}
  .brand-name,.user-chip{display:none}
  .grid-2,.whatsapp-layout{grid-template-columns:1fr}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  .header-inner{padding:0 13px;min-height:72px;align-items:flex-start;padding-top:13px;padding-bottom:10px}
  .brand-mark{width:36px;height:36px}
  .nav a{padding:9px 10px}
  .container{padding:22px 14px 45px}
  .page-head{align-items:flex-start}
  .page-head h1{font-size:24px}
  .stats{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
  .form-group.full{grid-column:auto}
  .page-head .btn{white-space:nowrap}
  .quick-grid{grid-template-columns:1fr}
}

/* Invoice share page */
.invoice-document-wrap{
  max-width:900px;
  margin:0 auto;
}
.invoice-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
  flex-wrap:wrap;
}
.invoice-paper{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow);
  padding:34px;
}
.invoice-paper-head{
  display:flex;
  justify-content:space-between;
  gap:24px;
  padding-bottom:24px;
  border-bottom:1px solid var(--line);
}
.invoice-business{
  display:flex;
  gap:14px;
  align-items:flex-start;
}
.invoice-logo{
  width:52px;
  height:52px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:var(--accent);
  color:#fff;
  font-family:Georgia,serif;
  font-size:28px;
  font-weight:700;
}
.invoice-business h1{
  margin:0 0 4px;
  font-size:20px;
}
.invoice-business p,
.invoice-meta p,
.invoice-party p,
.invoice-notes p{
  margin:3px 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}
.invoice-meta{
  text-align:right;
}
.invoice-meta strong{
  display:block;
  margin-bottom:7px;
  font-size:22px;
}
.invoice-parties{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  padding:24px 0;
}
.invoice-party{
  padding:16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fcfaf9;
}
.invoice-party span{
  display:block;
  color:var(--muted);
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.6px;
  margin-bottom:7px;
}
.invoice-party strong{
  display:block;
  font-size:14px;
  margin-bottom:4px;
}
.invoice-items{
  width:100%;
  min-width:0;
  border-collapse:collapse;
}
.invoice-items th,
.invoice-items td{
  padding:14px 12px;
  border-bottom:1px solid var(--line);
}
.invoice-items th:last-child,
.invoice-items td:last-child{
  text-align:right;
}
.invoice-total{
  margin-left:auto;
  width:min(360px,100%);
  padding-top:18px;
}
.invoice-total-row{
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:8px 0;
  font-size:13px;
}
.invoice-total-row.grand{
  margin-top:7px;
  padding-top:14px;
  border-top:1px solid var(--line);
  font-size:18px;
  font-weight:800;
}
.invoice-payment,
.invoice-notes{
  margin-top:24px;
  padding:16px;
  border-radius:14px;
  background:#fcfaf9;
  border:1px solid var(--line);
}
.invoice-payment h3,
.invoice-notes h3{
  font-size:13px;
  margin:0 0 8px;
}
.invoice-footer{
  margin-top:26px;
  padding-top:18px;
  border-top:1px solid var(--line);
  text-align:center;
  color:var(--muted);
  font-size:11px;
  line-height:1.6;
}
.status-pill{
  display:inline-flex;
  margin-top:8px;
  padding:7px 10px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
}
@media(max-width:640px){
  .invoice-paper{padding:22px 16px;border-radius:14px}
  .invoice-paper-head{display:grid}
  .invoice-meta{text-align:left}
  .invoice-parties{grid-template-columns:1fr}
}
@media print{
  body{background:#fff}
  .site-header,.invoice-toolbar,.toast{display:none!important}
  .container{max-width:none;padding:0}
  .invoice-paper{border:0;box-shadow:none;border-radius:0;padding:0}
  .invoice-document-wrap{max-width:none}
}


/* Database-connected version */
.alert{padding:12px 14px;border-radius:12px;margin-bottom:14px;font-size:12px;line-height:1.5}
.alert-error{background:var(--red-soft);color:var(--red);border:1px solid #f2d2d2}
.alert-success{background:var(--green-soft);color:var(--green);border:1px solid #cfe7d8}
.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#f7f5f3,#f2e7e4)}
.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:0 24px 70px rgba(67,43,37,.12);padding:28px}
.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:24px}
.login-brand h1{margin:0;font-size:20px}.login-brand p{margin:3px 0 0;color:var(--muted);font-size:12px}
.login-card .form-group{margin-bottom:13px}.login-card .btn{width:100%;margin-top:4px}
.logout-link{font-size:11px;color:var(--muted);text-decoration:none}.logout-link:hover{color:var(--red)}
.loading{padding:24px;text-align:center;color:var(--muted);font-size:13px}
.select-small{width:auto;min-width:160px}
.inline-note{font-size:11px;color:var(--muted);margin-top:5px}
.status-select{min-width:135px;padding:7px 9px;font-size:11px}
@media(max-width:640px){.login-card{padding:22px}.logout-link{display:none}}

/* ==================================================
   MOBILE UI IMPROVEMENT
   ================================================== */

@media (max-width: 640px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  /* Header hanya menampilkan logo */
  .site-header {
    position: sticky;
    top: 0;
    box-shadow: 0 4px 18px rgba(66, 44, 37, 0.06);
  }

  .header-inner {
    min-height: 66px;
    padding: 11px 16px;
    gap: 10px;
    align-items: center;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 21px;
  }

  /* Tampilkan nama usaha kembali */
  .brand-name {
    display: block;
    font-size: 15px;
  }

  .user-chip,
  .logout-link {
    display: none;
  }

  /* Menu menjadi navigasi bawah */
  .nav {
    position: fixed;
    z-index: 100;
    left: 0;
    right: 0;
    bottom: 0;

    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;

    width: 100%;
    height: calc(68px + env(safe-area-inset-bottom));
    padding:
      8px
      8px
      calc(8px + env(safe-area-inset-bottom));

    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(66, 44, 37, 0.08);
    backdrop-filter: blur(16px);
    overflow: visible;
  }

  .nav a {
    min-width: 0;
    height: 48px;
    padding: 8px 3px;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 12px;
    font-size: 10.5px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .nav a:hover,
  .nav a.active {
    background: var(--accent-soft);
    color: var(--accent-dark);
  }

  /* Konten utama */
  .container {
    width: 100%;
    padding: 22px 14px 35px;
  }

  .page-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 20px;
  }

  .page-head h1 {
    margin-bottom: 5px;
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -0.4px;
  }

  .page-head p {
    max-width: 300px;
    font-size: 13px;
    line-height: 1.5;
  }

  .page-head .btn {
    width: 100%;
    padding: 12px 16px;
    text-align: center;
  }

  /* Statistik dibuat 2 x 2 */
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }

  .stat {
    min-height: 126px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .stat-label {
    min-height: 30px;
    margin-bottom: 5px;
    font-size: 11px;
    line-height: 1.35;
  }

  .stat-value {
    font-size: clamp(18px, 5vw, 23px);
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .stat-note {
    margin-top: 7px;
    font-size: 10px;
    line-height: 1.35;
  }

  /* Kartu dan bagian dashboard */
  .card {
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(66, 44, 37, 0.055);
  }

  .grid-2,
  .whatsapp-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section {
    padding: 16px;
  }

  .section-head {
    margin-bottom: 13px;
  }

  .section-head h2 {
    font-size: 16px;
  }

  .list-item {
    align-items: flex-start;
    padding: 12px;
    gap: 10px;
  }

  .item-title {
    font-size: 12.5px;
  }

  .item-subtitle {
    font-size: 11px;
  }

  /* Pencarian dan filter */
  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .search {
    min-width: 0;
    width: 100%;
  }

  .toolbar select {
    width: 100% !important;
  }

  /* Tabel tetap bisa digeser */
  .table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 680px;
  }

  th,
  td {
    padding: 12px 10px;
  }

  /* Form */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .form-group.full {
    grid-column: auto;
  }

  input,
  select,
  textarea {
    min-height: 46px;
    font-size: 16px;
  }

  textarea {
    min-height: 95px;
  }

  /* Modal menjadi bottom sheet */
  .modal {
    align-items: end;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-height: 90vh;
    padding: 20px 16px 22px;
    border-radius: 22px 22px 0 0;
  }

  .modal-head {
    margin-bottom: 16px;
  }

  .modal-actions {
    position: sticky;
    bottom: -22px;
    margin: 18px -16px -22px;
    padding: 13px 16px calc(13px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
  }

  .modal-actions .btn {
    flex: 1;
  }

  /* Tombol aksi */
  .actions {
    gap: 6px;
  }

  .btn-sm {
    padding: 8px 9px;
    font-size: 11px;
  }

  /* Notifikasi tidak tertutup menu bawah */
  .toast {
    left: 14px;
    right: 14px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    text-align: center;
  }

  /* Tampilan invoice publik */
  .invoice-paper {
    padding: 20px 15px;
    border-radius: 16px;
  }

  .invoice-paper-head,
  .invoice-parties {
    grid-template-columns: 1fr;
    flex-direction: column;
    gap: 14px;
  }

  .invoice-meta {
    text-align: left;
  }

  .invoice-parties {
    display: grid;
  }

  .invoice-toolbar .btn {
    flex: 1;
    text-align: center;
  }
}


/* ==================================================
   ADMIN SIDEBAR LAYOUT
   ================================================== */

.admin-body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: #f8f5f3;
}

.admin-shell {
  min-height: 100vh;
}

/* Sidebar */

.admin-sidebar {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  bottom: 0;

  width: 238px;
  padding: 18px 14px;

  display: flex;
  flex-direction: column;

  background: #ffffff;
  border-right: 1px solid var(--line, #eadfda);
  box-shadow: 10px 0 35px rgba(65, 43, 36, 0.035);
}

.sidebar-brand {
  min-height: 54px;
  padding: 7px 8px;
  margin-bottom: 22px;

  display: flex;
  align-items: center;
  gap: 11px;

  color: var(--ink, #2c2522);
  text-decoration: none;
}

.sidebar-brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;

  display: grid;
  place-items: center;

  border-radius: 13px;
  background: var(--accent, #bd7c76);
  color: #ffffff;

  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
}

.sidebar-brand-text,
.sidebar-brand-text strong,
.sidebar-brand-text small {
  display: block;
}

.sidebar-brand-text {
  min-width: 0;
}

.sidebar-brand-text strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand-text small {
  margin-top: 3px;
  color: var(--muted, #7e736e);
  font-size: 9px;
}

.sidebar-navigation {
  display: grid;
  gap: 4px;
}

.sidebar-section-label {
  margin: 0 10px 8px;
  color: #a19590;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sidebar-link {
  min-height: 45px;
  padding: 9px 11px;

  display: flex;
  align-items: center;
  gap: 11px;

  border-radius: 12px;

  color: #645a55;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;

  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.sidebar-link:hover {
  background: #f8f1ef;
  color: var(--accent-dark, #995f5a);
  transform: translateX(2px);
}

.sidebar-link.active {
  background: var(--accent-soft, #f5e6e4);
  color: var(--accent-dark, #995f5a);
  font-weight: 800;
}

.sidebar-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;

  display: grid;
  place-items: center;

  border-radius: 9px;

  font-size: 15px;
  line-height: 1;
}

.sidebar-link.active .sidebar-icon {
  background: rgba(189, 124, 118, 0.14);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--line, #eadfda);
}

.sidebar-user {
  padding: 7px 6px 12px;

  display: flex;
  align-items: center;
  gap: 9px;
}

.sidebar-avatar,
.topbar-avatar {
  display: grid;
  place-items: center;

  border-radius: 50%;
  background: var(--accent-soft, #f5e6e4);
  color: var(--accent-dark, #995f5a);

  font-size: 9px;
  font-weight: 900;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.sidebar-user-info,
.sidebar-user-info strong,
.sidebar-user-info small {
  display: block;
}

.sidebar-user-info {
  min-width: 0;
}

.sidebar-user-info strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-info small {
  margin-top: 2px;
  color: var(--muted, #7e736e);
  font-size: 8px;
}

.sidebar-logout {
  width: 100%;
  min-height: 37px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--line, #eadfda);
  border-radius: 10px;

  color: #795e59;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.sidebar-logout:hover {
  border-color: #d59b95;
  background: #fff5f3;
}

/* Area kanan */

.admin-workspace {
  width: calc(100% - 238px);
  min-height: 100vh;
  margin-left: 238px;
}

.admin-topbar {
  position: sticky;
  z-index: 90;
  top: 0;

  min-height: 70px;
  padding: 11px 26px;

  display: flex;
  align-items: center;
  gap: 14px;

  border-bottom: 1px solid var(--line, #eadfda);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.sidebar-toggle {
  display: none;

  width: 39px;
  height: 39px;

  border: 1px solid var(--line, #eadfda);
  border-radius: 11px;

  background: #ffffff;
  color: var(--ink, #2c2522);

  font-size: 18px;
}

.topbar-title,
.topbar-title small,
.topbar-title strong {
  display: block;
}

.topbar-title small {
  margin-bottom: 2px;
  color: var(--muted, #7e736e);
  font-size: 8px;
}

.topbar-title strong {
  font-size: 14px;
}

.topbar-user {
  margin-left: auto;

  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-avatar {
  width: 34px;
  height: 34px;
}

.topbar-user > span:not(.topbar-avatar),
.topbar-user strong,
.topbar-user small {
  display: block;
}

.topbar-user strong {
  font-size: 9px;
}

.topbar-user small {
  margin-top: 2px;
  color: var(--muted, #7e736e);
  font-size: 8px;
}

.admin-page {
  padding: 27px 29px 45px;
}

/* Mengikuti lebar area admin baru */

.admin-page > .container,
.admin-page .container {
  width: 100%;
  max-width: 1380px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

.sidebar-overlay {
  display: none;
}

/* Mobile */

@media (max-width: 820px) {
  .admin-sidebar {
    width: 244px;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  .admin-workspace {
    width: 100%;
    margin-left: 0;
  }

  .sidebar-toggle {
    display: grid;
    place-items: center;
  }

  .sidebar-overlay {
    position: fixed;
    z-index: 110;
    inset: 0;

    border: 0;
    background: rgba(38, 29, 26, 0.47);
    backdrop-filter: blur(3px);
  }

  .sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .sidebar-open .sidebar-overlay {
    display: block;
  }

  .admin-topbar {
    min-height: 64px;
    padding: 10px 14px;
  }

  .admin-page {
    padding: 20px 13px 36px;
  }

  .topbar-user > span:last-child {
    display: none;
  }
}