body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f7f8fa;
  color: #222;
}
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-bottom: 2px solid #A7AAFF;
  padding: 0.5rem 2rem 0.5rem 260px; /* left padding for sidebar */
  min-height: 64px;
  box-sizing: border-box;
}
.header-logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 36px;
  margin-right: 10px;
}
.header-title {
  font-size: 1.7rem;
  font-weight: bold;
  color: #513587;
  letter-spacing: 1px;
}
.header-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-role {
  color: #513587;
  font-weight: 600;
  background: #A7AAFF;
  border-radius: 16px;
  padding: 0.2em 1em;
  font-size: 1rem;
}
.header-avatar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  outline: 2px solid transparent;
  transition: outline 0.2s;
}
.header-avatar:focus {
  outline: 2px solid #513587;
  outline-offset: 2px;
}
.sidebar {
  background: #513587;
  color: #fff;
  width: 240px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  padding-top: 0;
  z-index: 200;
  box-sizing: border-box;
}
.sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-title {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  margin: 1.5rem 0 1rem 2rem;
  color: #A7AAFF;
  text-decoration: none;
}
.sidebar nav ul li {
  margin-bottom: 0.5rem;
}
.sidebar nav ul li a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  border-left: 4px solid transparent;
  transition: background 0.2s, border 0.2s;
}
.sidebar nav ul li a.active, .sidebar nav ul li a:focus {
  background: #A7AAFF;
  color: #513587;
  border-left: 4px solid #fff;
  outline: none;
}
.sidebar nav ul li a:focus {
  outline: 2px solid #fff;
  outline-offset: -2px;
}
.main-content {
  margin-left: 260px;
  padding: 2.5rem 2rem 2rem 2rem;
  min-height: 100vh;
  padding-top: 80px; /* space for fixed header */
}
.content-box {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px 0 rgba(81,53,135,0.08);
  padding: 2rem 2.5rem 2.5rem 2.5rem;
  max-width: 800px;
  margin: 0 auto;
}
.section-title {
  font-size: 1.5rem;
  color: #513587;
  margin-bottom: 1.2rem;
}
.info-box {
  background: #A7AAFF;
  color: #222;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  box-shadow: 0 1px 4px 0 rgba(81,53,135,0.05);
}
.struktur-title {
  font-size: 1.2rem;
  color: #513587;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}
.struktur-box {
  margin-bottom: 1.5rem;
}
.bab-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: #f4f4fa;
  border-radius: 8px;
  margin-bottom: 1.1rem;
  padding: 1rem 1.5rem;
  box-shadow: 0 1px 2px 0 rgba(81,53,135,0.04);
  gap: 0.7rem 1rem;
}
.bab-info {
  flex: 2 1 180px;
  min-width: 180px;
}
.bab-title {
  font-weight: 600;
  color: #513587;
  font-size: 1.1rem;
  display: block;
}
.bab-desc {
  font-size: 0.97rem;
  color: #444;
}
.bab-progress {
  flex: 1 1 110px;
  min-width: 110px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 24px;
}
.progress-bar {
  background: linear-gradient(90deg, #513587 60%, #A7AAFF 100%);
  height: 12px;
  border-radius: 8px;
  min-width: 60px;
  max-width: 110px;
  transition: width 0.5s;
}
.progress-label {
  font-size: 0.95rem;
  color: #513587;
  font-weight: bold;
}
.bab-actions {
  flex: 1 1 170px;
  min-width: 170px;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.btn {
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 0.6em 1.5em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  outline: 2px solid transparent;
}
.btn.braille {
  background: #513587;
  color: #fff;
}
.btn.braille:focus, .btn.braille:hover {
  background: #3a2463;
  outline: 2px solid #A7AAFF;
}
.btn.lihat {
  background: #A7AAFF;
  color: #513587;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn.lihat:focus, .btn.lihat:hover {
  background: #7d7fbe;
  color: #fff;
  outline: 2px solid #513587;
}
.btn.selesai {
  background: #513587;
  color: #fff;
  margin-top: 1.2rem;
  width: 100%;
  font-size: 1.1rem;
}
.btn.selesai:focus, .btn.selesai:hover {
  background: #3a2463;
  outline: 2px solid #A7AAFF;
}
@media (max-width: 900px) {
  .main-content {
    margin-left: 0;
    padding: 1.5rem 0.5rem;
  }
  .sidebar {
    position: relative;
    width: 100%;
    min-height: auto;
  }
  .content-box {
    padding: 1rem 0.5rem;
  }
}
a.btn.lihat,
a.btn.lihat:visited,
a.btn.lihat:active,
a.btn.lihat:hover,
a.btn.lihat:focus {
  text-decoration: none !important;
  text-align: center;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 0.6em 1.5em;
  display: inline-block;
  background: #A7AAFF;
  color: #513587;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  outline: 2px solid transparent;
}

a.btn.lihat:hover, a.btn.lihat:focus {
  background: #7d7fbe;
  color: #fff;
  outline: 2px solid #513587;
}

/* Accessibility: focus visible for all clickable elements */
:focus-visible {
  outline: 3px solid #A7AAFF;
  outline-offset: 2px;
}
